{'fraction_non_alphanumeric': 0.036364485108766685, 'fraction_numerical': 0.019185883670992436, 'mean_word_length': 4.306663363884073, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Solar-like dynamos and rotational scaling of cycles from star-in-a-box simulations

Magnetohydrodynamic star-in-a-box simulations of convection and dynamos in a solar-like star with different rotation rates are presented. These simulations produce solar-like differential rotation with a fast equator and slow poles, and magnetic activity that resembles that of the Sun with equatorward migrating activity at the surface. Furthermore, the ratio of rotation to cycle period is almost constant as the rotation period decreases in the limited sample considered here. This is reminiscent of the suggested inactive branch of stars from observations and differs from most earlier simulation results from spherical shell models. While the exact excitation mechanism of the dynamos in the current simulations is not yet clear, it is plausible that the greater freedom that the magnetic field has due to the inclusion of the radiative core and regions exterior to the star are important in shaping the dynamo.


INTRODUCTION
The Sun maintains a global dynamo with a magnetic cycle of approximately 22 years, with activity appearing at the surface at midlatitudes and propagating equatorward as the cycle progresses (e.g. Hathaway 2010). Three-dimensional magnetohydrodynamic (MHD) simulations struggle to reproduce such cycles: often the activity propagates poleward (e.g. Brown et al. 2011;Nelson et al. 2013), active latitudes do not coincide with those in the Sun (e.g. Ghizaru et al. 2010), or there is a mismatch between the simulated and solar cycle periods (e.g. Käpylä et al. 2012;Warnecke 2018). Furthermore, the simulations usually require substantially faster rotation than in the Sun to achieve cyclic dynamos (e.g. Viviani et al. 2018). Another issue arises when simulations at different rotation rates are confronted with observations: cycles observed from stars other than the Sun suggest that in the vicinity of the solar Rossby number, which is the ratio of the rotation period to convective turnover time, the ratio of rotation to cycle period is increasing as the Rossby number decreases (e.g. Olspert et al. 2018). Simulations often produce the opposite trend (e.g. Warnecke 2018; Strugarek et al. 2018). Typically more than one of these defects is found in any given simulation.
There are several possible reasons for the mismatch between simulations and reality. A major factor in this is likely to be the inability of current simulations to capture stellar convective flows accurately enough. This is known as the convective conundrum, and manifested by too high large-scale velocity amplitudes in simulations in comparison to the Sun (e.g. Hanasoge et al. 2012;O'Mara et al. 2016;Schumacher & Sreenivasan 2020). This often leads to anti-solar differential rotation in simulations with solar luminosity and rotation rate (e.g. Käpylä et al. 2014), and very high resolutions in addition to highly supercritical dynamos are likely needed to overcome this (Hotta & Kusano 2021).
Another factor is that stellar dynamo simulations are often done in spherical shells where only the convection zone (CZ), or additionally a part of the radiative core is modeled (e.g. Guerrero et al. 2019;Bice & Toomre 2020). This necessitates the use of boundary conditions which may not always be appropriate and which can affect the dynamo solutions in ways that are a priori not obvious (e.g. Cole et al. 2016). In the present study a star-in-a-box model, where a spherical star is embedded into a Cartesian cube, is used to model a solar-like star in a rotational regime where cyclic solutions are excited. The model thus includes the radiative core and regions exterior to the star. The former enables contributions to the dynamo from the interface between radiative and convective zones, whereas the latter is usually not considered to be important in the maintenance of the dynamo. However, including the outer layers is less restrictive than imposing mathematically or numerically convenient boundary conditions on the flows and magnetic fields, and which can also affect the resulting dynamo solution (e.g. Warnecke et al. 2016).

MODEL
The star-in-a-box model described in Käpylä (2021) is used; see also Dobler et al. (2006). A star of radius R is embedded into a Cartesian cube with a side length H = 2.2R. Equations governing the system are: where A is the magnetic vector potential, U is the velocity, B = ∇ × A is the magnetic field, J = ∇ × B/µ 0 is the current density, µ 0 is the permeability of vacuum, η is the magnetic diffusivity, D/Dt = ∂/∂t + U · ∇ is the advective derivative, ρ is the fluid density, Φ is the gravitational potential, p is the pressure, and ν is the kinematic viscosity. The traceless rate-of-strain tensor is given by S ij = 1 2 ∂Ui ∂xj + ∂Uj ∂xi − 1 3 δ ij ∇ · U , where δ ij is the Kronecker delta. The angular velocity is given by Ω = (0, 0, Ω 0 ), f d is a damping function, T is the temperature, and s is the specific entropy. F rad and F SGS are the radiative and subgrid-scale (SGS) entropy fluxes, and H and C describe heating and cooling, respectively.
The gas obeys an ideal gas equation of state with p = RρT , where R = c P − c V is the gas constant, and c P and c V are the heat capacities at constant pressure and volume, respectively. The gravitational potential Φ corresponds to a polytrope of index n = 1.5 of a main-sequence M5 star (see Appendix A of Dobler et al. 2006). Flows in the exterior to the star are damped through the term f d = − U τ damp f e (r), where τ damp is a damping timescale, and f e (r) = 1 2 1 + tanh r−r damp w damp , where r damp = 1.03R and w damp = 0.03R. The damping timescale τ damp ≈ 0.2τ ff , where τ ff = R 3 /GM is the free-fall time, G is the gravitational constant, and M is the mass of the star.
The radiative flux is given by with a = −1 and b = 7/2 corresponds to the Kramers opacity law (e.g. Brandenburg et al. 2000). Additional SGS entropy flux is included with F SGS = −χ SGS ρ∇s , where s = s − s t , are the fluctuations of the entropy, and s t (x, t) is a running temporal mean computed over an interval of ten free-fall times. Nuclear energy production in the core of the star is parameterized by the heating term H with a Gaussian profile, where L sim is the luminosity and w L = 0.162R is the width of the Gaussian. The cooling term C models radiative losses above the stellar surface with C (x) = ρc P , where τ cool = τ damp is a cooling timescale and T surf the fixed surface temperature.
The fluid and magnetic Reynolds numbers, and the Péclet number are given by Re = u rms /(νk 1 ), Re M = Pr M Re = u rms /(ηk 1 ), Pe = Pr SGS Re = u rms /(χ SGS k 1 ), where u rms is the volume-averaged rms-velocity in the CZ and k 1 = 2π/∆R the wavenumber corresponding to the approximate depth of the CZ with ∆r = 0.35R, and where Pr M = ν/η and Pr SGS = ν/χ SGS are the magnetic and SGS Prandtl numbers, respectively. Rotational influence on the flow is measured by the Coriolis number, Co = 2Ω 0 /(u rms k 1 ). Magnetic fields are measured in terms of the equipartition field strength B eq = µ 0 ρU 2 where . refers to volume averaging over the CZ. Mean values are taken to be azimuthal averages and denoted by overbars. The Pencil Code (Pencil Code Collaboration et al. 2021) 1 was used to make the simulations.
The set-up of the simulations is otherwise identical to those in Käpylä (2021) except that the amplitude of the radiative conductivity K 0 is enhanced such that in the thermodynamically saturated state the star has a radiative core (CZ) that encompasses roughly two thirds (one third) of stellar radius. Furthermore, the diffusion coefficients η, ν, and χ SGS have radial profiles such Table 1. Summary of the simulations. Emag = 1 2 B 2 /µ0 and E kin = 1 2 ρU 2 are the total magnetic and kinetic energies, and E pol refer to the energies of the poloidal and toroidal magnetic fields, and the meridional circulation and differential rotation, respectively. P surf cyc and P deep cyc are the cycle periods measured from Br at the surface and B φ at the base of the CZ. PrM = 0.5 and PrSGS = 0.2 in all runs except run C1 where PrM = 1. that their values in the radiative core are 10 2 smaller than in the CZ to avoid diffusive spreading of magnetic fields and flows into the core. This nevertheless happens in many runs during the initial transient toward a statistically steady state for the flow. This is due to the fact that the initial state of the simulations is an isentropic polytrope, and because of this choice, the star is fully convective in the early stages. To circumvent this issue the magnetic field is rescaled to 10 −6 B eq level after a statistically steady state for the flow and thermodynamics is reached. The simulations are then further evolved until the magnetic field reaches a statistically steady state. The simulations at the higher resolutions (576 3 and 1152 3 ) were remeshed from such saturated snapshots from the low resolution (288 3 ) cases.

RESULTS
The simulations are summarized in Table 1. The models cover a modest range of Coriolis numbers between 5.6 and 17 where cyclic dynamos with a dominating axisymmetric magnetic fields are found. Runs with slower rotation produce quasi-static magnetic fields whereas for more rapid rotation non-axisymmetric fields and less coherent cycles become dominant. The run with the highest resolution (Ch) has completed only one full cycle and therefore it is not used in the statistical analysis of the cycle periods, but merely to demonstrate that the cycles persists also at higher Reynolds numbers. A more comprehensive study of the simulations including the slower and faster rotation cases will be presented elsewhere.

Magnetic fields and cycles
The current simulations produce dynamos where the magnetic energy E mag is a significant fraction of the kinetic energy E kin ; see the sixth column of Table 1. The ratio E mag /E kin is practically constant as a function of Co in the parameter regime studied here, which differs from the scaling found in Augustson et al. (2019), and the MAC balance which is often assumed to hold for the saturation level of magnetic fields (e.g. Brun & Browning 2017).
The azimuthally averaged radial magnetic fields near the surface of the star, and the toroidal magnetic field near the base of the CZ for runs A, C, and D are shown in Figure 1 panels (a, d, g) and (b, e, h), respectively. The rest of the runs follow very similar patterns. All of these cases show a solar-like pattern of magnetic field evolution at the surface with strong radial fields concentrated in latitudes |θ| < 50 • and activity propagating equatorward. A weaker poleward branch is visible in some runs; see Figure 1(b). While a similar pattern can be seen for B φ near the surface, the dynamo wave propagates poleward near the base of the CZ.
Power spectra of the velocity and magnetic fields from a spherical harmonic decomposition are shown in Figure 1(c, f, i) for runs A, C, and D. The magnetic power spectrum has its maximum at the largest possible scale ( = 1) for all runs. The maximum of the velocity power occurs at 20, and the peak moves to larger with increasing rotation as the convective cells become smaller. The spectra indicate a clear separation of scales between the dominant scales of convection and those of the magnetic field. The insets of Figure 1(c, f, i) show the fraction of the power in the axisymmetric (m = 0) part for ≤ 10. In this range, the equatorially asymmetric axissymmetric contributions with odd dominate the velocity field. However, these contributions are still clearly subdominant in the kinetic energy which is dominated by convective flows with 10. The largescale magnetic fields are dominated by the axisymmetric ( , m) = (1, 0) component with half or more of the total power in all cases.
The evolution of the mean magnetic fields in runs A, C, and D is shown in the animations in Figure 2. These visualizations show that strong magnetic fields are concentrated near the surface of the star outside the tangent cylinder, and near the interface between radiative and convection zones inside the tangent cylinder. Strong magnetic fields can also be found within the CZ at higher latitudes. This could suggest the presence of multiple dynamo modes which have been detected in simulations previously (e.g. Käpylä et al. 2016;Beaudoin et al. 2016). In distinction to these studies, the cycles in the deep parts and near the surface in the current simulations are synchronised such that their periods are the same. Magnetic fields also penetrate into the upper part of the radiative core down to a depth r ≈ 0.5R. The extent of this penetration is highly likely unrealistic but such effects, albeit quantitatively different, can still conceivably occur at the interfaces of stellar radiative and convective zones.

Flow states and dynamo considerations
All of the current simulations are in the solar-like differential rotation regime, which is characterised by a faster equator and slower poles; see Figure 3(a). However, the differential rotation is in general weak, such that the amplitude is typically of the order of a couple of per cent of Ω 0 everywhere except near the axis where the data is poorly converged. This is also apparent from the seventh and eighth columns Table 1 which show that the energies associated with differential rotation and meridional circulation are at most a few per cent of the total kinetic energy. This is partly due to the damping of flows in the exterior which exerts a torque that opposes differential rotation. Nevertheless, the current simulations also show a minimum of Ω at mid-latitudes, which has been conjectured to be the cause of equatorward migration by a dominating αΩ dynamo in earlier spherical shell simulations (Warnecke et al. 2014).
The other ingredient in such models is the kinetic helicity, H = ω · U , where ω = ∇ × U is the vorticity, which is negative (positive) in the upper (lower) part of the CZ in the northern hemisphere; Figure 3(b). A sign change of H occurs in the deep layers of the CZ everywhere except near the equator, which is a com-  mon feature in overshooting convection (e.g. Ossendrijver et al. 2001;Käpylä et al. 2009). Thus the sign of kinetic helicity follows the sign of g · Ω in the bulk of the convection zone, and a significant helicity inversion and a consequent reversal of the dynamo wave as suggested by Duarte et al. (2016) does not occur. The product of the radial gradient of Ω and H determines the propagation direction of the dynamo wave in αΩ dynamos (Parker 1955;Yoshimura 1975). Figure 3(c) indicates both poleward (H∂ r Ω < 0) and equatorward (H∂ r Ω > 0) regions outside the tangent cylinder, and predominantly poleward propagation in the lower part of the CZ inside the tangent cylinder. It is tempting to associate the equatorward branch near the surface with a corresponding patch of positive H ∂Ω ∂r and the poleward branch in the deep parts with a corresponding patch of negative H ∂Ω ∂r (in the northern hemisphere). However, the Parker-Yoshimura rule applies strictly only in the case of a pure αΩ dynamo with spatially constant helicity and turbulent diffusion. The low ratio of toroidal to poloidal magnetic energies (10th and 11th columns in Table 1) also suggests that the dynamos in the current simulations are not of αΩ type.
In addition to the already mentioned helicity inversion, further possibilities to excite equatorward propagation include the near-surface shear (e.g. Brandenburg 2005), and an α 2 dynamo with a sign change of helicity at the equator (e.g. Mitra et al. 2010). Neither of these possibilities can be ruled out immediately with the data at hand, although the shear near the surface is not very prominent in the current simulations. However, explanations based on such simple models should be considered with caution in light of a recent study by Warnecke et al. (2021), who found that to explanation the cause and evolution of large-scale magnetism in a spherical shell simulation required a mean-field model with 24 turbulent transport coefficients derived using the test-field method (e.g. Schrinner et al. 2007).

Rotational scaling of dynamo cycles
Long-term observations of chromospheric emission of late-type stars suggest that many such stars have magnetic cycles similar to the Sun (e.g. Baliunas et al. 1995). It has also been suggested that the ratio of stellar rotation and cycle periods fall into a number branches as a function of the Coriolis number (e.g. Brandenburg et al. 1998Brandenburg et al. , 2017. These studies suggest inactive and active branches with P rot /P cyc ∝ Co β where β > 0. However, the exact nature (Olspert et al. 2018), and the signifigance of the branches continues to be debated (e.g. Boro Saikia et al. 2018). It is nevertheless interesting to measure the ratio P rot /P cyc from simulations to see if any systematics can be found. This has been done in a handful of studies: Warnecke (2018) found β = −0.98 ± 0.04 whereas a somewhat steeper relation with β = −1.6 ± 0.14 was reported by Strugarek et al. (2018). Furthermore, the results from a more heterogeneous set of simulations by Viviani et al. (2018) also suggest β < 0. A notable exception is the study of Guerrero et al. (2019) who found a flat (β ≈ 0) or slightly positive β for rapid rotation.
The cycle periods from the current simulations are computed using libeemd library (Luukko et al. 2015) using the ensemble empirical mode decomposition (EEMD). Periods are determined from B r (R, θ d , t) and B φ (0.65R, θ d , t), where −45 • < θ d < 45 • is the range of latitudes considered. The mode with the largest energy is identified as the primary cycle and the period is computed from zero crossings of that mode. The mean cycle period P cyc is taken to be the average over θ d . Error estimates are provided by dividing the time series in three parts and repeating the analysis for each part. The largest deviation from the mean period over the full time series is taken to represent the error. The current results indicate that the ratio P rot /P cyc is almost independent of Co in the parameter range explored here with β = 0.13 ± 0.17 (β = −0.01 ± 0.21) for the surface (deep) cycles; see Figure 4. These results differ qualitatively from those of Warnecke (2018) and Strugarek et al. (2018) that are also shown in Figure 4 2 . Guerrero et al. (2019) reported results for P rot /P cyc that are similar to those obtained here from models that also included a radiative layer below the CZ. However, the magnetic field configurations achieved in that study are quite different from those here such that, e.g., no clear equatorward migration is obtained.
The ratio P rot /P cyc in the current simulations is between (3 . . . 5) × 10 −3 which is close to the solar value P rot /P cyc ≈ 6.5 × 10 −3 with P rot = 26 days and P cyc ≈ 11 years. Coupled with the near independence of P rot /P cyc on Co suggests that the dynamos in the current simulations might capture some of the characteristics of stars in the inactive branch where also the Sun belongs to (e.g. Brandenburg et al. 1998). However, at the same time it is clear that the current simulations do not reproduce many other aspects of the Sun, such as the structure and magnitude of the differential rotation.

CONCLUSIONS
Star-in-a-box simulations of a solar-like convective envelope were shown to produce solar-like magnetic activity on a limited range of rotation rates. The current simulations share many characteristics of earlier spherical shells models (e.g. Käpylä et al. 2012), including a local minimum of Ω at midlatitudes which has been conjectured to be the cause of equatorward migration in those studies (Warnecke et al. 2014). However, the magnetic cycles in the current simulations show differences to the earlier studies in that the equatorward migration of the active latitudes is not restricted to mid-latitudes with negative radial differential rotation. Furthermore, the rotational scaling of the cycles is qualitatively different from the earlier studies in spherical shells (e.g. Warnecke 2018), with a weak dependence of P rot /P cyc on rotation.
However, several differences to earlier studies can be readily identified. These include the addition of a simplified corona which provides a free surface for the magnetic field rather than imposing simplified surface boundary conditions (see also Warnecke et al. 2016). Another difference is the inclusion of the radiative core where strong magnetic fields can be stored and possibly amplified by means other than helical convection (e.g. Guerrero et al. 2019). Finally, changing the geometry and size of the system also allows, in general, a wider spectrum of dynamo modes that can be excited. A more detailed analysis of the maintenance of the magnetic fields is needed to precisely pinpoint the differences to the earlier studies. Nevertheless, the current results suggest that regions outside of the CZ shape the global dynamo solutions, and that perhaps the dynamos in the Sun and other inactive stars harbor dynamos where such effects are important. This work was supported by the Deutsche Forshungsgemeinschaft Heisenberg grant KA4825/4-1. The simulations were made using the HLRN-IV supercomputers Emmy and Lise hosted by the North German Supercomputing Alliance (HLRN) in Göttingen and Berlin, Germany.