On the Geometry of the Near-Core Magnetic Field in Massive Stars R. P. Ratnasingam, P. V. F. Edelmann, D. M. Bowman, T. M. Rogers Abstract It is well-known that the cores of massive stars sustain a stellar dynamo with a complex magnetic field configuration. However, the same cannot be said for the field’s strength and geometry at the convective-radiative boundary, which are crucial when performing asteroseismic inference. In this Letter, we present three-dimensional (3D) magnetohydrodynamic (MHD) simulations of a 7 M ⊙ \mathrm{M}_{\odot} mid-main sequence star, with particular attention given to the convective-radiative boundary in the near-core region. Our simulations reveal that the toroidal magnetic field is significantly stronger than the poloidal field in this region, contrary to recent assumptions. Moreover, the rotational shear layer, also important for asteroseismic inference, is specifically confined within the extent of the Brunt–Väisälä frequency peak. These results, which are based on the inferred properties of HD 43317, have widespread implications for asteroseismic studies of rotation, mixing and magnetism in stars. While we expect our results to be broadly applicable across stars with similar Brunt–Väisälä frequency profiles and stellar masses, we also expect the MHD parameters (e.g. Re m ) and the initial stellar rotation rate to impact the geometry of the field and differential rotation at the convective-radiative interface. I Introduction Stars born with masses above about 1.2 M \odot have a convective core and radiative envelope during the main sequence, with the fluid motions in the core exhibiting turbulent convection. This process sets up a magnetic dynamo in the core, the strength of which is influenced mainly by rotation rate. The study of the stellar dynamos has been extensive, both analytically ( Pitts & Tayler 1985 ; Spruit 1999 ; Zahn et al. 2007 ; Augustson et al. 2019 ; Charbonneau & Sokoloff 2023 ) and numerically ( Brun et al. 2005 ; Zahn et al. 2007 ; Browning 2008 ; Featherstone et al. 2009 ; Featherstone et al. 2011 ; Augustson et al. 2016 ) . Currently, there are a number of uncertainties in stellar structure theory to be resolved. Among these are the mechanisms responsible for setting stars’ rotation and chemical mixing profiles, and interior magnetic fields. One particularly important uncertainty is the amount of convective-boundary mixing (CBM) at the interface between convective cores and radiative envelopes in main-sequence massive stars, which can provide fresh hydrogen to the nuclear-burning core and extend the main-sequence lifetime by upwards of 25% ( Bowman 2020 ) . CBM and more generally interior rotation and mixing processes are controlled by largely uncalibrated prescriptions in one-dimensional (1D) stellar evolution models. Whereas, magnetic fields are often neglected entirely owing to their complexity, and yet have been inferred indirectly to impact the amount of CBM ( Briquet et al. 2012 ) . Only recently have we been able to diagnose interior magnetic fields thanks to the study of stellar pulsations — asteroseismology ( Aerts et al. 2010 ) . There has been a great deal of advancement in understanding the rotation and mixing profiles of stars thanks to asteroseismology ( Aerts 2021 ) . The high-radial order gravity modes in slowly pulsating B-type (SPB; 3\lesssim M\lesssim 8 M ⊙ ) stars are particularly sensitive to the Brunt–Väisälä peak just outside the convective core, and reveal precise core masses and near-core rotation rates ( Moravveji et al. 2015 ; Moravveji et al. 2016 ; Pápics et al. 2017 ; Szewczuk et al. 2021 ; Michielsen et al. 2021 ; Pedersen et al. 2021 ) . However, asteroseismic studies of SPB stars have generally assumed rigid interior rotation profiles, and have also not considered the impact of an interior magnetic field. The exception to this is HD 43317 which is the only confirmed magnetic SPB star to have undergone forward asteroseismic modelling ( Pápics et al. 2012 ; Briquet et al. 2013 ; Buysschaert et al. 2017 ; Buysschaert et al. 2018 ) . Recently, Lecoanet et al. 2022 used the best-fitting asteroseismic model of Buysschaert et al. 2018 and dedalus ( Burns et al. 2020 ) to solve the linear eigenvalue problem assuming a purely dipolar interior magnetic field geometry to constrain an upper limit of the near-core field strength of HD 43317 as approximately 5\times 10^{5} G. This result, whilst being an important step forward in the novel field of magneto-asteroseismology ( Bowman 2023 ) , assumed the magnetic field geometry and a rigid radial rotation profile, which are simplifications if compared to previous numerical simulations. In this Letter, we perform 3D MHD simulations of a 7-M ⊙ mid-main sequence star and reveal the magnetic field geometry and rotational profile at the core-envelope boundary in such massive stars. II Numerical setup Our 3D spherical simulations are done using RAYLEIGH ( Featherstone & Hindman 2016 ; Featherstone et al. 2022 ; Matsui et al. 2016 ) , an open-source pseudospectral code which solves the MHD equations in the anelastic approximation. The discretisation is done with a finite-difference scheme in the radial direction and spherical harmonics in the horizontal directions. The whole simulation domain is resolved with 2400 radial ( r ) grid points, 256 grid points in the polar ( \theta ) direction and 512 grids in the azimuthal ( \phi ) direction, equivalent to a spherical harmonic \ell_{\rm max}=170 . The code implements parallel frameworks using Message Passing Interface (MPI) and Open Multi-Processing (OpenMP) to achieve efficient scaling to more than 10000 cores. The simulation solves the MHD equations: The radial velocity, v_{r} , together with the latitudinal velocity, v_{\theta} , and the azimuthal velocity, v_{\phi} , form the velocity vector, \boldsymbol{v} . The radial, polar and azimuthal magnetic fields, represented by B_{r} , B_{\theta} and B_{\phi} respectively, form the magnetic field vector, \boldsymbol{B} . S and P are the perturbation entropy and pressure, respectively. The quantities with an overline are the radially dependent reference state values density, \overline{\rho} , specific pressure heat capacity, \overline{c_{P}} , gravity, \overline{g} , temperature, \overline{T} , entropy, \overline{S} , thermal diffusivity, \overline{\kappa} , magnetic diffusivity, \overline{\eta} , and viscosity, \overline{\nu} . The reference input state data are taken from the 1D stellar evolution code Modules for Stellar Astrophysics (MESA; Paxton et al. 2011 ; Paxton et al. 2013 ; Paxton et al. 2015 ; Paxton et al. 2018 ; Paxton et al. 2019 ; r23.05.01) for an input model of a 7 M \odot star in the middle of the main sequence. The middle of the main-sequence here is defined to be when the central hydrogen mass fraction of the evolving star is X_{\rm c}=0.35 . For the MESA simulations, we set the stellar metallicity, Z , to be equal to the solar value of Z = 0.02, the mixing-length parameter to be 1.8 and the convective overshoot profile is set to exponential (cf. Buysschaert et al. 2018 ). Lastly, the stellar rotation rate, \Omega_{0} , was initially set to a solid body rotation rate of 1.8\times 10^{-5} rad s -1 (i.e. 4.04 d/11.5% critical breakup velocity), which is slower than that of HD 43317. Figure 1 shows the smoothed Brunt–Väisälä frequency, thermal diffusivity profiles and density of the reference state model. To obtain these, we perform a cubic spline interpolation to the output of the MESA models and used the Hann function as a window to smooth all abrupt variations in the profiles. Furthermore, we clip the profiles between 1% and 90% of the total stellar radius (R star ) to avoid numerical instabilities due to the large density stratification near the stellar surface. The middle panel displays the square of Brunt–Väisälä or the buoyancy frequency, an output from MESA used to calculate d\overline{S}/dr (see Eq. (2)) in the radiation zone. The inclusion of the Brunt–Väisälä spike at the convective-radiative interface, left over from the receding convective core, has also not been investigated in previous studies. These are crucial differences that allow these simulations to better inform asteroseismology, which is extremely sensitive to this region ( Bowman 2020 ) . The bottom panel of Fig. 1 , shows the different values of the diffusivities and viscosity used in our MHD simulations. In the convection zone, we have used a much higher thermal diffusivity, at 7\times 10^{12} cm 2 s -1 , shown by the green line, than the stellar thermal diffusivity generated by MESA, shown by the red line. This is also true for the viscosity, at also 7\times 10^{12} cm 2 s -1 , and the magnetic diffusivity, at 2.5\times 10^{12} cm 2 s -1 , which was done to ensure numerical stability. At the convective-radiative boundary, we decrease the diffusivities since they are meant to mimic “turbulent” diffusivities and would be physically smaller in the radiative region. We reduce \overline{\kappa} to match the realistic thermal diffusivity profiles towards the top of the domain. The viscosity and magnetic diffusivity profiles are then decreased to match the thermal diffusivity profiles up to approximately 0.592 R star , where both the viscosity and magnetic diffusivity profiles are set to a constant value of 1\times 10^{11} cm 2 s -1 towards the top of the domain. Table 1 provides a summary of the parameter space of our model. Parameters Values (in cgs units) R domain /cm 3.04 \times 10^{11} R CZ /cm 4.04 \times 10^{10} \tau_{\mathrm{rot}} /days 4.04 \tau_{\mathrm{sim}} /days 275 c s /cm s -1 2.0\times 10^{6} (minimum) CZ RZ v rms /cm s -1 82300 cm s -1 1130 cm s -1 Re 823 Re m 1320 Ro 0.718 \tau_{\kappa} /days 3090 14400/1.18 \times 10^{9} \tau_{\eta} /days 7410 7.82 \times 10^{7} /1.18 \times 10^{9} \tau_{\mathrm{CZ}} /days 6.62 Table 1: Stellar model parameters. The radius of the simulation domain and the convection zone are represented by R domain and R CZ , respectively. \tau_{\mathrm{rot}} and \tau_{\mathrm{sim}} are the rotational period and total simulation time, whilst c_{s} is minimum sound speed in the whole domain. Under the convection zone (CZ) and radiation zone (RZ) headers, v rms is the root-mean-square velocity. The Reynold’s and magnetic Reynold’s numbers are represented by Re and Re m , while the Rossby number by Ro. The thermal diffusion timescale is \tau_{\kappa}=L^{2}/\kappa and the magnetic diffusion timescale is \tau_{\eta}=L^{2}/\eta , where L is either the size of the convection zone or the radiation zone. \tau_{\mathrm{CZ}} is the convective timescale and is calculated as R CZ /v rms . Figure 1: Reference state density, \overline{\rho} (top panel), Brunt–Väisälä frequency squared (middle panel) and various diffusivity profiles (bottom panel) as functions of stellar radius in units of total stellar radius, R star . The solid, grey vertical lines show the extent of the Brunt–Väisälä frequency peak and the inset shows a zoom-in of this peak. The viscosity profile coincides exactly with the thermal diffusivity profile up to 0.6 R star . III Magnetic Field Evolution Figure 2: Magnetic field geometry from our simulations. The gold-blue magnetic field lines show a predominantly dipolar field geometry within the radiative envelope, whereas the dark blue-red-green magnetic field lines show a more complex magnetic field structure inside the convective core. We begin by solving only the hydrodynamical equations to allow the onset of stellar convection until steady-state velocities are reached. Once the simulation reaches this stage, we introduce a weak dipolar magnetic field of strength \sim 1 G and solve the full MHD equations. The interaction between the convective motions and the magnetic field leads to large increases in the magnetic energy in the convective core as the dynamo is established. In the radiative zone the large scale dipole field decays on a magnetic diffusion timescale, which is much larger than our total simulation time (see \tau_{\mathrm{sim}} and \tau_{\eta} in Table 1 ). Figure 2 shows the magnetic streamlines when the magnetic field is in steady-state, where we observe a complex magnetic field structure in the core, surrounded by a dipolar field in the radiation zone. The magnetic field inside the core is sustained by a magnetic dynamo, generated by the convective motions. Starting from the convective-radiative boundary, where the Brunt–Väisälä frequency is zero (see Fig. 1 ), the magnetic field strength decreases with radius until it matches the imposed large-scale dipolar magnetic field. However, close to the boundary, Fig. 2 shows that the magnetic field is dominated by streamlines in the azimuthal direction, representative of a strong toroidal field in that region. IV Near-Core Magnetic Field Geometry Figure 3: Mollweide plots showing the ratio of the toroidal magnetic field energy to poloidal field energy, \mathrm{BT}^{2}/\mathrm{BP}^{2} as functions of latitudes and longitudes over a sphere. The plots in the top row show the ratios inside the convection zone. At 0.12 R star , the Brunt–Väisälä frequency is approximately 0 Hz. The remaining plots show the ratios inside the Brunt–Väisälä frequency peak from its maximum value at 0.127 R star to just outside the peak at 0.176 R star (see Fig. 1 ). The main aim of this work is to determine the magnetic field geometry at the core-envelope boundary of a mid-main sequence massive star, so we start with a time snapshot of the magnetic field configuration at different shells (radii) after the system has evolved (see Fig. 3 ). This time was chosen to be within the steady-state evolution of both the averaged kinetic and magnetic energies inside the convection zone, which were reached within 30 days for the kinetic energy and 50 days for the magnetic energy. At this point, the average magnetic field is around 100 kG in the convection zone and lower in the shear layer, dropping to the imposed 10 G at the top of the shear layer. Note that this is within the upper limit constraint of 500 kG placed on HD 43317. We show the ratio of the toroidal to poloidal components of the magnetic field, mainly to demonstrate the changes to the field geometry, using Mollweide projection plots in this figure. The first row shows that there is more energy in the poloidal components of the magnetic field compared to the energy in the toroidal component deeper inside the convection core. As the radius approaches 0.12 R star , which is the location where N=0 , we observe more energy in the toroidal magnetic field. Moving past this boundary into the Brunt–Väisälä frequency peak, we observe a larger surface area of the shell, having a ratio of toroidal to poloidal energies that exceeds unity. At r = 0.127 R star , the ratio of toroidal to poloidal field peaks with B_{T}/B_{P}>10 almost over the whole shell. This is true up to r = 0.149 R star and at radii larger than this, the poloidal field starts to dominate again, as the ratio of energies starts to fall below unity over the whole shell. Figure 4: The ratios of the toroidal magnetic field energy to poloidal field energy, \mathrm{BT}^{2}/\mathrm{BP}^{2} as functions of latitudes and longitudes at different times (rows) and different radii (columns). Figure 5: The shell-averaged ratios of the toroidal magnetic field energy to poloidal field energy, \mathrm{BT}^{2}/\mathrm{BP}^{2} (solid lines) and azimuthal velocities (dashed lines) as a function of radius. The different colours represent different points in time during the simulation. The solid, grey vertical lines represent the extent of the Brunt–Väisälä frequency peak. The randomly-spread poloidal and toroidal energies inside the convection core generally follow the pattern of convective fluid motions. However, around the convective-radiative boundary, a strong shear layer forms within the Brunt–Väisälä frequency peak, perpendicular to the stellar rotational axis (see Figure 5). The rotation profile is columnar, exhibiting a strong radial differential rotation at the interface, with prograde flow at lower latitudes and retrograde motion at higher latitudes. The radial shear drags magnetic field lines in the azimuthal direction, causing the toroidal magnetic field to become stronger within the shear layer ( Pitts & Tayler 1985 ; Zahn et al. 2007 ) . The latitudinal differential rotation causes the toroidal field to change sign at mid-latitudes. Figure 4 shows the Mollweide projections at different times as different rows, and for different radii as different columns. In the first column, where the shells are located just below the convective-radiative boundary, there are no large differences in the magnetic field energy distribution between the toroidal and poloidal components. As we move into the shear layer within the Brunt–Väisälä peak, the toroidal field energy begins to dominate over time at all latitudes. Further inside the Brunt–Väisälä frequency peak, regions that are initially dominated by the poloidal field can be seen to become to more dominated by the toroidal field, away from the equatorial plane. In Fig. 5 , we show the shell-averaged radial profiles of the ratio of toroidal to poloidal magnetic energies (solid lines), alongside the azimuthal velocity squared, relative to the rotating frame (dashed lines) at different times. Within the convection zone, the ratios range from 10-100, but vary dramatically as seen in Fig. 4 . Moving into the convective-radiative interface, demarcated by the Brunt–Väisälä frequency peak, the toroidal field dominates throughout. The toroidal field is generally 100 times stronger than the poloidal field and maps regions of strong azimuthal shear, as expected. Outside this region, within the bulk of the radiation zone, the (seed) poloidal field dominates. Within the shear layer, we also find that, at steady-state evolution, the ratio of the magnetic energy to the kinetic energy ranges between 0.15 and 0.4. These ratios are fairly low, and hence the magnetic field strength is not large enough to reduce the hydrodynamically-driven differential rotation in the region. However, at larger rotation rates, where a larger field might be induced, the near-core differential rotation could be reduced by magnetic tension. V Conclusions We present 3D spherical MHD simulations of the internal fluid and magnetic field evolution of a mid-main sequence 7 \mathrm{M}_{\odot} star at 11.5% the critical breakup velocity. The simulations were run with RAYLEIGH using reference state data from the 1D stellar evolution code MESA. The simulation domain covers between 1% to 90% of the total stellar radius, and the initial magnetic seed was set as a weak dipole field. We find that the geometry of the magnetic field evolves and changes from its original dipolar configuration to a more complex configuration inside the convection zone, due to the action of the stellar dynamo, whilst remaining unaffected in the radiation zone. At the convective-radiative interface, the ratio of toroidal to poloidal field increases with time, which is driven by the shear between the regions. We also observe a latitudinal dependence consistent with the same shear flow that coincides exactly with the peak in the Brunt–Väisälä frequency profile. These results apply to specific stellar and MHD parameters (e.g. Re m and initial rotation rates). A faster initial rotation or a larger Reynolds number could both lead to a stronger magnetic field, which could reduce differential rotation across the BVF peak. Therefore, a broader parameter study is required to ascertain the variety of behaviour possible. The Brunt–Väisälä frequency peak just outside the convective core is precisely the region that asteroseismology of pulsation modes in SPB stars is most sensitive to ( Bowman 2020 ) . Not many main-sequence stars born with a convective core have been investigated for the amount of differential radial rotation within the Brunt–Väisälä frequency peak (e.g. Aerts et al. 2003 ; Van Reeth et al. 2018 ; Burssens et al. 2023 ), but such work generally requires the extent and shape of the shear layer to be assumed. Recently, Burssens et al. 2023 was the first to test the impact of this assumption on the resultant differential rotation profiles for the mid-main sequence 12M ⊙ star HD 192575. They demonstrated the significant impact on the inferred core-to-envelope rotation ratio when assuming the shear layer to be either the width of the Brunt–Väisälä frequency or the (much) smaller CBM region. The former was shown to provide the statistically better fit, which is supported by 2D structure models by Mombarg et al. 2023 and our 3D MHD simulations presented in this work. To date, only a single asteroseismic study has probed the properties of an interior magnetic field deep inside an SPB star. Assuming a purely dipolar field geometry and a rigid rotation profile for the mid-main sequence SPB star HD 43317 ( Buysschaert et al. 2018 ) , an upper limit of the near-core magnetic field was constrained to be 5\times 10^{5} G ( Lecoanet et al. 2022 ) . Furthermore, there are currently no forward modelling results that directly include magnetic fields. Parameter studies of massive stars that include the impact of a magnetic field include Prat et al. 2019 ; Prat et al. 2020 and Van Beeck et al. 2020 , which show significant differences in pulsation mode frequencies when using a perturbative approach with a mixed poloidal and toroidal magnetic field topology. In our work, we provide numerical evidence that the magnetic field topology for such stars in the near-core region is predominantly toroidal. Moreover, we demonstrate that the location of the shear layer and the predominantly toroidal magnetic field geometry is within the Brunt–Väisälä frequency peak for a representative mid-main sequence massive star. These results are important for future forward-asteroseismic modelling studies that aim to constrain interior rotation rates, mixing profiles, and interior magnetic fields for stars born with convective cores. Acknowledgements: We would like to thank the referee for providing useful feedback that helped us improve our work. We acknowledge support from STFC grant ST/W001020/1. Computing was carried out on the DiRAC Data Intensive service at Leicester (DIaL), operated by the University of Leicester IT Services, which forms part of the STFC DiRAC HPC Facility ( www.dirac.ac.uk ), funded by BEIS capital funding via STFC capital grants ST/K000373/1 and ST/R002363/1 and STFC DiRAC Operations grant ST/R001014/1. PVFE was supported by the U.S. Department of Energy through the Los Alamos National Laboratory (LANL). LANL is operated by Triad National Security, LLC, for the National Nuclear Security Administration of the U.S. Department of Energy (Contract No. 89233218CNA000001). DMB gratefully acknowledges funding from UK Research and Innovation (UKRI) in the form of a Frontier Research Grant under the UK government’s ERC Horizon Europe funding guarantee (SYMPHONY; grant number: EP/Y031059/1), and a Royal Society University Research Fellowship (URF; grant number: URF\R1\231631). This work has been assigned a document release number LA-UR-24-25321.