-
PDF
- Split View
-
Views
-
Cite
Cite
N. Bucciantini, L. Del Zanna, A fully covariant mean-field dynamo closure for numerical 3 + 1 resistive GRMHD, Monthly Notices of the Royal Astronomical Society, Volume 428, Issue 1, 1 January 2013, Pages 71–85, https://doi.org/10.1093/mnras/sts005
- Share Icon Share
Abstract
The powerful high-energy phenomena typically encountered in astrophysics invariably involve physical engines, like neutron stars and black hole accretion discs, characterized by a combination of highly magnetized plasmas, strong gravitational fields and relativistic motions. In recent years, numerical schemes for general relativistic magnetohydrodynamics (GRMHD) have been developed to model the multidimensional dynamics of such systems, including the possibility of evolving space–time. Such schemes have been also extended beyond the ideal limit including the effects of resistivity, in an attempt to model dissipative physical processes acting on small scales (subgrid effects) over the global dynamics. Along the same lines, the magnetic field could be amplified by the presence of turbulent dynamo processes, as often invoked to explain the high values of magnetization required in accretion discs and neutron stars. Here we present, for the first time, a further extension to include the possibility of a mean-field dynamo action within the framework of numerical 3 + 1 (resistive) GRMHD. A fully covariant dynamo closure is proposed, in analogy with the classical theory, assuming a simple α-effect in the comoving frame. Its implementation into a finite-difference scheme for GRMHD in dynamical space–times (the x-echo code by Bucciantini & Del Zanna) is described, and a set of numerical test is presented and compared with analytical solutions wherever possible.
1 INTRODUCTION
A strong magnetic field plays a crucial role in many high-energy astrophysical systems. It is believed to be the key element in the context of gamma-ray bursts (GRBs; Duncan & Thompson 1992; Thompson 1994; Meszaros & Rees 1997; Lee, Wijers & Brown 2000; Lyutikov & Blackman 2001; Vlahakis & Königl 2001; van Putten & Levinson 2003; Lyutikov 2006a; Komissarov & Barkov 2007; Metzger, Thompson & Quataert 2007; Uzdensky &MacFadyen 2007a,b; Barkov & Komissarov 2008; Bucciantini et al. 2008, 2009; Lyons et al. 2010; Metzger et al. 2011; Rezzolla et al. 2011), active galactic nucleus (AGN) jets (Blandford & Znajek 1977; Blandford & Payne 1982; Belvedere & Molteni 1984; Khanna & Camenzind 1992; Konigl & Kartje 1994; Balbus & Hawley 1998; Tomimatsu 2000; Fendt & Memola 2001; Sauty, Tsinganos & Trussoni 2002; van Putten & Levinson 2003; Duttan & Biermann 2007; Hawley 2008; Penna et al. 2010; Tchekhovskoy, Narayan & McKinney 2011), magnetars (Duncan & Thompson 1992; Thompson & Duncan 1996; Murakami 1999; Lyutikov 2003, 2006b; Braithwaite & Spruit 2006; Kasen & Bildsten 2010; Woosley 2010; Yu 2011), and its dissipation and reconnection to be at the origin of many typical high-energy phenomena (Uzdensky 2011). A large-scale ordered magnetic field is in fact crucial to power many high-energy systems. A strong magnetic field close to the central black hole (BH) in accretion discs is invoked to explain the launching of relativistic jets. The pulsar and magnetar paradigms require a strong dipolar magnetic field in neutron stars (NSs). Magnetic field's stresses provide an efficient way to convert the rotational or accretion energy into bulk flow, and to power relativistic winds.
However, the origin of this strong and ordered magnetic field remains poorly understood. In particular, the environment in which such a magnetic field is supposed to arise is often characterized by turbulence (Zhang, MacFadyen & Wang 2009; Mizuno et al. 2011) and instabilities, ranging from Magneto-Rotational Instability (MRI) in accretion discs (Balbus & Hawley 1998) to kink and Tayler and convection in NSs (Miralles, Pons & Urpin 2000, 2002; Braithwaite & Spruit 2006; Rüdiger et al. 2009). While turbulent small-scale motions can easily amplify a seed field up to equipartition with the turbulent kinetic energy, one expects such a field to be highly tangled. If a large-scale ordered mean field can arise due to small-scale velocity fluctuations is highly debated, and understanding what its configuration and its geometry are, and under what conditions it is realized, is of fundamental importance. It is not unreasonable that during the formation of compact objects like BHs or NSs, any frozen-in large-scale field might be amplified due to advection. However, as an explanation of the required magnetic field, this simply shifts the problem from the object to the progenitor. Moreover, in BHs, NSs and GRBs, a large amount of angular momentum is required in the engine, but any strong and pre-existing magnetic field would rapidly slow down the rotation (Duez et al. 2006; Obergaulinger et al. 2006; Bisnovatyi-Kogan, Moiseenko & Ardelyan 2008; Benson & Babul 2009).
Processes that lead to in situ amplification of large-scale magnetic field, due to the dynamics of the flow, are usually referred to as dynamos (Parker 1955, 1987; Moffatt 1978; Cowling 1981; Zeldovich & Ruzmaikin 1987; Roberts & Soward 1992; Kulsrud et al. 1997; Sato 1999; Brandenburg & Subramanian 2005). There are many kinds of dynamo processes but, essentially, all involve twisting of the magnetic field lines by the flow and reconnection events that allow us to re-arrange irreversibly the field topology. Dynamos usually require a fully 3D flow structure. Cowling's theorem, for example, states that dynamos cannot work for 2D flow patterns.
Of particular interest in astrophysics are dynamo processes due to the presence of small-scale fluctuations in the flow and turbulence. The idea that small-scale velocity and magnetic field fluctuations might be correlated, leading to a large-scale effective electromotive force capable of amplifying and generating a large-scale magnetic field, is at the base of the so-called mean-field dynamo theory (Moffatt 1978; Krause & Raedler 1980; Brandenburg & Dobler 2002; Brandenburg & Subramanian 2005). Mean-field dynamos have been applied to a large variety of astrophysical systems, from the Sun (Parker 2009) to stellar magnetism (Brandenburg & Dobler 2002), from accretion discs (Khanna & Camenzind 1996b; Pariev, Colgate & Finn 2007) to proto-NSs (Bonanno, Rezzolla & Urpin 2003), from the origin of the Galactic field (Shukurov 2002) to that of the cosmological primordial field (Kulsrud & Zweibel 2008), just to cite a few.
The formulation of a mean-field closure of Maxwell's equation in the context of General Relativity (GR) has been done only for two astrophysical cases, to our knowledge: Marklund & Clarkson (2005) have investigated the origin of the cosmic magnetic field during inflation, while Khanna & Camenzind (1996a) and Khanna (1999) have focused on the specific case of discs in the Kerr metric. Both have performed some study in the limiting kinematic case, where the back-reaction of the magnetic field on the plasma is neglected. Khanna (1999) has also not considered the displacement current, which however might become non-negligible near the event horizon of a BH, or for rapidly evolving systems. They show that various new terms can arise in GR which are not present in a flat space–time. There is also a debate if Cowling's anti-dynamo theorem still holds in GR: frame dragging effects can generate currents even for axisymmetric configurations (the gravitomagnetic term) in the absence of turbulence (Khanna & Camenzind 1996a).
The possibility of a stable and reliable mean-field closure for turbulent dynamos is however very important in the context of numerical simulations. Quite often large-scale simulations are required to investigate the dynamics of GRB engines, accretion discs in AGN and magnetosphere–jet coupling. The development of small-scale fluctuations is a property of turbulence that makes its numerical investigation within global models prohibitive if not impossible at the moment. The idea behind a mean-field approach is that the effects of physical processes at scales that cannot be resolved can instead be modelled by an appropriate closure of the equations, so that the problem can become treatable by numerical investigation. However, we want to stress here that, in the mean-field approach, determining what could be realistic values for the parameters that are used in the closure is usually non-trivial, and often requires the use of mesoscale information, and extrapolation of flow properties to small unresolved scales. It rests to be proved that a mean-field approach can achieve full resolution of microscopic physics on the macroscale.
Here we present the first fully covariant mean-field dynamo closure of Maxwell's equations, by extending the covariant Ohm's law widely used in resistive general relativistic magnetohydrodynamics (GRMHD; Lichnerowicz 1967; Anile 1989). The new contribution is due to an α-dynamo term proportional to the large-scale magnetic field as measured in the local comoving frame, in analogy to the classical case. Moreover, having in mind numerical applications, the equations are then cast in the 3 + 1 formalism, leading to a modified evolution equation for the spatial electric field as measured by Eulerian observers. When dynamo effects are negligible, the equation reduces to that already derived for resistive magnetohydrodynamic (MHD) in special relativity (Komissarov 2007; Dumbser & Zanotti 2009; Palenzuela et al. 2009), thus extending it to the more general case of 3 + 1 resistive GRMHD. It is not our intention to discuss here either the validity of mean-field dynamo or its theoretical implication within GRMHD. As already done for the purely resistive case, in the above-cited works, here we mainly focus on the numerical implementation of the proposed closure. Our numerical references are the Eulerian Conservative High-Order (echo) and x-echo codes (Del Zanna et al. 2007; Bucciantini & Del Zanna 2011), and the actual implementation and validation tests of this new dynamo closure will refer to these schemes.
The plan of the paper is as follows. In Section 2, we discuss the mean-field closure for the induction equation, and present our covariant GR extension. Section 3 is devoted to its representation in the 3 + 1 formalism, necessary for numerical modelling, whereas in Section 4 we discuss its actual implementation within the x-echo code for GRMHD. In Section 5 we present a set of simple standard tests done both in the so-called kinematic and in the fully dynamic regime, and compare them with previously published results and with analytic and semi-analytic solutions. Finally, we present our conclusion in Section 6.
In the following, we assume a signature −, +, +, + for the space–time metric and we use Greek letters μ, ν, λ, … (running from 0 to 3) for 4D space–time tensor components, while Latin letters i, j, k, … (running from 1 to 3) will be employed for 3D spatial tensor components, and spatial vectors will be often written using boldface characters. Moreover, we set c = G = M⊙ = 1 and all | $\sqrt{4\pi }$ | factors will be absorbed in the definition of the electromagnetic fields.
2 THE COVARIANT OHM's LAW AND ITS MEAN-FIELD DYNAMO CLOSURE
We want to stress here that, as in the standard mean-field dynamo theory, there is a large degree of freedom in the choice of the closure relations. It can even be debated if a closure in terms of mean quantities and their derivative can be found at all. The quest for an appropriate closure is only apparently more complex in GR, due to the requirement of general covariance, but practically this seems to support the validity of our simple expression in equation (13). However, we want to stress once again that this can be so straightforward only when the isotropic case is assumed, as done in this work for simplicity. Anisotropic resistive MHD in a Minkowskian space–time was considered by Zanotti & Dumbser (2011). On the other hand, our scalar parameters ξ and η may be both functions of all the other (macroscopic) quantities, and thus evolve dynamically in time with them. For simplicity, however, even if the scheme is built to take into account this most general case, numerical tests will be presented only for constants ξ and η.
3 THE DYNAMO CLOSURE IN 3 + 1 GRMHD
Ideal GRMHD (eμ = 0).
The spatial projection readily provides the usual ideal MHD assumptionexactly as in the classical limit.(28)\begin{equation} \boldsymbol {E} + \boldsymbol {v}\times \boldsymbol {B}= 0, \end{equation}Resistive GRMHD (eμ = ηjμ).
The time projection leads to | $\Gamma (\boldsymbol {E}\cdot \boldsymbol {v}) = \eta (q-q_0\Gamma )$ |, which may be used to express q0 in the spatial component. The result isas already found in previous treatments within special relativistic resistive MHD (Komissarov 2007; Dumbser & Zanotti 2009; Palenzuela et al. 2009); thus, here we extend its validity to 3 + 1 GRMHD. When η = 0, we reduce to the previous ideal MHD case, while for | $|\boldsymbol {v}|\ll 1$ |, | $|\boldsymbol {E}|\sim |\boldsymbol {v}||\boldsymbol {B}|$ | we recover the classical limit of equation (1).(29)\begin{equation} \Gamma [\boldsymbol {E} + \boldsymbol {v}\times \boldsymbol {B} - (\boldsymbol {E}\cdot \boldsymbol {v})\boldsymbol {v}] = \eta (\boldsymbol {J} - q\boldsymbol {v}), \end{equation}Resistive GRMHD + dynamo (eμ = ξbμ + ηjμ).
The time projection is nowwhich again may be used to express q0 in the spatial component. Now the result is(30)\begin{equation} \Gamma (\boldsymbol {E}\cdot \boldsymbol {v}) = \eta (q-q_0\Gamma ) + \xi \Gamma (\boldsymbol {B}\cdot \boldsymbol {v}), \end{equation}which is a novel closure to our knowledge, reducing to the case of resistive GRMHD when ξ = 0 and to the classical case of equation (7) for small velocities.(31)\begin{eqnarray} &&\!\!\!\Gamma [\boldsymbol {E} + \boldsymbol {v}\times \boldsymbol {B} - (\boldsymbol {E}\cdot \boldsymbol {v})\boldsymbol {v}] \nonumber\\ &&\quad = \eta (\boldsymbol {J} - q\boldsymbol {v}) + \xi \Gamma [\boldsymbol {B} - \boldsymbol {v}\times \boldsymbol {E} - (\boldsymbol {B}\cdot \boldsymbol {v})\boldsymbol {v}], \end{eqnarray}
It is interesting to note that in all cases, the presence of a curved or even evolving GR metric is not apparent in Maxwell's equations, since α or βi terms do not appear explicitly, whereas γij is just needed to work out scalar and cross products between (spatial) vectors.
While in resistive schemes for classical MHD (see e.g. Landi et al. 2008) q and | $\boldsymbol {E}$ | do not play a role and the system is closed simply by taking | $\boldsymbol {J}={\nabla }\times \boldsymbol {B}$ | in Ampere's law, the presence of Maxwell's displacement current in the relativistic case forces one to use equation (20) to evolve the electric field in time. Only in ideal GRMHD is it still possible to neglect the Maxwell equations for the electric field, since | $\boldsymbol {E}$ | is provided from the ideal Ohm's law (equation 28). In the other cases the two equations for | $\boldsymbol {E}$ | must be evolved or preserved in time, and we need to face the problem of dealing with the unknown sources q and | $\boldsymbol {J}$ |. In the proposed scheme we use Ohm's law to provide an expression for the spatial current density | $\boldsymbol {J}$ |, while the constraint on q is enforced by using the Gauss theorem in equation (22). Note that here we do not evolve the charge density via the corresponding continuity equation (charge conservation law), since we choose to impose directly | $q={\nabla }\cdot \boldsymbol {E}$ |.
4 IMPLEMENTATION IN THE echo CODE
Let us discuss here how the closure relation equation (32) can be solved in a numerical scheme for 3 + 1 GRMHD taking as a reference the echo (Del Zanna et al. 2007) and x-echo (Bucciantini & Del Zanna 2011) codes developed in the ideal regime. Here, we propose a very simple method to integrate the equation implicitly. Considering a first-order discretization of the time derivative, one can write an expression for the electric field at the end of a timestep Δt as a function of other quantities, both at the end (superscript (1)) and at the beginning (superscript (0)) of the implicit procedure.
4.1 Primitive variables
Equation (35) provides the electric field at the end of a timestep as a function of other primitive variables like the velocity and the magnetic field. However, numerical schemes for GRMHD usually evolve conserved variables like momentum and energy, and primitive variables are not immediately available at the end of a timestep, but must be derived by inverting a set of non-linear equations. This implies that equation (35) must be solved simultaneously with the inversion from conserved variables to primitive. In analogy to Palenzuela et al. (2009), the derivation of the primitive variables and the electric field is done along the following lines.
Given the conserved variables at the end of a timestep, a guess for the pressure p* is chosen, using the value at the previous timestep.
With this value p* of the pressure kept fixed, a guess for the vi* is chosen, again using the values at the previous timestep.
Ei components are derived according to equation (35). This step is performed only when the solution of an implicit equation is required. In general, the Qi contains all of the explicit terms (see the following subsection on time stepping). Equation (34) provides the value of Qi in the simple case for a first-order implicit solver.
The momentum equations are inverted keeping fixed the value p*, by means of a Newton–Raphson scheme, where the Jacobian is computed numerically, to provide a new guess vi* for the vi components. A new electric field is derived and this loop is iterated until convergence.
The energy equation is finally inverted by means of a Newton–Raphson scheme using the values of the velocity vi* and electric field obtained in the inner cycle, to provide a new guess p* for the pressure. Again the derivative required for the Newton–Raphson scheme is computed numerically, allowing for a general equation of state (EoS).
The overall cycle over the pressure p is repeated until convergence.
This approach has the advantage to allow the use of a general EoS; hence, it is not limited to the ideal gas or polytropic EoS, and in principle can be generalized to other closure relations for Ohm's law. We opted for numerical Jacobians, as opposed to approximations to the true analytical ones (Palenzuela et al. 2009), which might be extremely complex to derive and expensive to compute.
The above implementation is straightforward in the Cowling approximation, where the metric terms are fixed in time, but it can also be easily extended to a dynamical space–time by using, for example, the extended conformally flat condition (XCFC) approach as used in x-echo (Cordero-Carrión et al. 2009; Bucciantini & Del Zanna 2011), given that the equation for the evolution of the metric terms is decoupled from the inversion from conserved to primitive variables. The only problem is actually the treatment of the lapse function, appearing in the definition of | $\tilde{\eta }$ |. While in XCFC the conformal factor and the determinant of the 3-metric γ can be easily computed from the conserved quantities, the lapse α requires the previous knowledge of the primitive variables, including the electric field. This implies that one should in principle solve simultaneously for α and the primitive variables. Given that in general the lapse is a slowly and smoothly varying function of time, we prefer to use for simplicity α(0) in | $\tilde{\eta }$ |, and we expect this choice to introduce only minor errors.
4.2 Time-stepping and constrained transport
This simple scheme has the advantage of being easily implementable, requiring only a modification in the definition of the electric field, within the algorithm that derives the primitive from the conserved variables. Moreover, the algorithm is well behaved in the case η = 0 [it reduces to solving | $ \boldsymbol {R}(\boldsymbol {U,W}) =0$ |], and thus it can also handle the ideal MHD regime.
Again the implicit step acts only on the electric field | $\boldsymbol {E}$ |, and it is performed during the inversion from conserved to primitive variables. Note however that now the Qi are no more given simply by equation (34).
However, in comparison with the previous first and second scheme, this IMEX scheme requires three different steps instead of two, the steps do not have the same functional form, and, because of the last step, it is not well behaved in the case η = 0, and so it cannot be used for ideal MHD problems.
All the test that we present in the following have been repeated both without first and second scheme and with the IMEX scheme. As we will discuss, depending on the problem or the desired accuracy, our proposed first/second scheme might offer an easy alternative to more sophisticated IMEX implementations.
The value of the timestep Δt is chosen in accordance to the Courant–Friedrichs–Lewy (CFL) condition, with typical Courant numbers ranging from 0.1 to 0.5 (smaller values have been adopted in high-resistivity runs to avoid large truncation errors in the solution of the implicit part, due to the smaller diffusive time-scale).
As far as the electromagnetic constraints of equations (22) and (23) are concerned, all previously developed schemes for (special) relativistic resistive MHD (Komissarov 2007; Dumbser & Zanotti 2009; Palenzuela et al. 2009) adopt a divergence-cleaning approach (Munz et al. 2000; Dedner et al. 2002), where an augmented system of equations is introduced (including the charge conservation law), and where the solenoidal constraint on the magnetic field and Gauss's theorem is not enforced but preserved by damping and propagating away any violation arising from numerical truncation errors. Here, instead we choose to use a fully constrained scheme, where the charge q appearing in the equation for | $\boldsymbol {E}$ | is taken directly from equation (22) while the divergence-free condition on | $\boldsymbol {B}$ | is treated with staggered grids via the upwind constrained transport method (Londrillo & Del Zanna 2000; Del Zanna, Bucciantini & Londrillo 2003a; Londrillo & del Zanna 2004). A benefit of this fully constrained approach is that, neglecting dynamo effects (ξ = 0) in the purely resistive case, it is possible to recover the ideal MHD expression simply by setting η = 0 (see equation 35), while all previous schemes recover the ideal regime only as a limit for low resistivity η → 0. However, this also depends on the time-stepping algorithm, as we have discussed previously.
To conclude this section, note that in the resistive case the maximum wavespeed is not limited by the fast magnetosonic mode and may approach the speed of light independently of the value of the magnetic field. The Riemann problem at cell interfaces is thus solved for simplicity using the maximally diffusive (global) Lax–Friedrichs (LF) scheme, where the fastest characteristic speed is set to be equal to the speed of light. The use of such a scheme, as opposed to more accurate Riemann solvers like the Harten-Lax-van Leer (HLL) or Harten-Lax-van Leer-Discontinuities (HLLD) might lead to less satisfactory results in the ideal MHD limit, where sharp discontinuities are allowed to arise. In the resistive case, where smooth profiles are expected, the use of more diffusive algorithms is less problematic, especially in conjunction with high-order reconstruction algorithms, a distinguishing feature of our echo scheme. Again, we leave the implementation of more accurate Riemann solvers as a future upgrade.
5 TEST PROBLEMS
In the following, we present a set of standard tests. The first three are done in the purely resistive regime, for comparison with results previously presented in the literature. Then there are three dynamo problems in the so-called kinematic regime, and finally a fully dynamical problem. All but the last of these tests are done in a flat, stationary metric, since they are aimed at evaluating the implementation of the resistive/dynamo closure, and for a more straightforward comparison with previous results, and with analytical solutions.
5.1 Resistive tests
We present here a set of three resistive tests (ξ = 0) in a stationary Cartesian grid (Minkowskian space–time), to be compared with both analytical and previously published results. In the following, we use a third-order Central Essentially Non-Oscillatory (CENO) spatial reconstruction with Monotonized Center (MC) limiter, our both first-order implicit/second-order explicit temporal evolution scheme and the second-order IMEX scheme. A maximally diffusive global LF Riemann solver is employed for upwinding.
5.1.1 Self-similar current sheet
Despite the evolution being almost purely resistive (in principle, in the limit of infinite pressure only the magnetic field evolves and only the induction equation needs to be solved), the problem is followed in the fully dynamical regime. The initial conditions at t = 1 are ρ = 1, p = 50, Ei = 0, vi = 0, Bx = Bz = 0, By = By(x, 1), with B0 = 1, and we have adopted an adiabatic coefficient γ = 4/3. Our computational domain extends in the range x = [ − 1.5, 1.5] and is covered by a uniform grid with 200 cells. The problem is evolved to the final time t = 10. In Fig. 1, we compare our numerical results with equation (40), in the case η = 0.01. Errors and convergence estimates are presented in Section 5.3 together with a comparison between the first/second scheme and the IMEX scheme.

Evolution of the magnetic field in a self-similar current sheet, for η = 0.01. The red dot–dashed line is the initial condition at t = 1. The blue solid line is the numerical solution at t = 10, indistinguishable from the green dashed line representing the exact solution equation (40).
5.1.2 Resistive shock tube

Resistive shock tube problem. The upper panel shows the density and the lower panel shows the y-component of the magnetic field at the final time t = 0.55. The blue solid line is the case η = 0, the dotted cyan line is the case η = 0.01, the green dashed line is the case η = 0.1, the yellow dot–dashed line is the case η = 1, while the red double-dot–dashed line is the case η = 1000.
5.1.3 Resistive rotor
This is a fully multidimensional problem. The relativistic ideal MHD version was first proposed by Del Zanna, Bucciantini & Londrillo (2003b), while the resistive version has been presented by Dumbser & Zanotti (2009).
A circular region with radius r = 0.1, uniform density ρ = 10 and rotating with a uniform angular velocity Ω = 8.5 is located within a medium at rest, with a lower density ρ = 1. The pressure p = 1 and the magnetic field (Bx, By, Bz) = (1, 0, 0) are uniform in the whole domain. The adiabatic coefficient is γ = 4/3 and the system is followed to a final time t = 0.3. The initial electric field is set equal to the ideal MHD value Ei = −ϵijkBjvk. The computational domain is x = [ − 0.5, 0.5], y = [ − 0.5, 0.5], with the rotating region located at the centre, and is covered with a uniform grid of 400 × 400 cells. The problem is solved in the ideal MHD regime η = 0, in the quasi-ideal regime η = 0.001 and in the resistive regime η = 0.1, and the results are shown in Fig. 3. Comparison between the cases η = 0 and 0.001 suggests that, at this resolution, the intrinsic resistivity of the scheme is smaller than η = 0.001. Moreover, the case η = 0, when repeated with a HLL solver (not shown here) does not show any significant improvement with respect to the same case done with LF.

Relativistic rotor. The upper panels show the pressure, while the lower panels show the z-component of the electric field at the final time t = 0.3. Left-hand column: the ideal case η = 0. Central column: quasi-ideal case η = 0.001. Right-hand column: resistive case η = 0.1.
5.2 Dynamo tests
Here, we present the tests done using the closure equation (13), leading to the full version in equation (32) of the evolution equation for | $\boldsymbol {E}$ |. The first three are performed in the so-called kinematic regime, where only the induction equation is solved and only the electric and magnetic fields are allowed to change in time. Given the physical nature of mean-field dynamos, related to small-scale turbulence, the kinematic approximation is actually commonly adopted as a suitable approximation. In fact, the magnetic field generated by turbulent dynamo action is often well below equipartition, with respect to the internal energy density, and as such of negligible dynamical consequences. Moreover, kinematic dynamos often allow for simple analytical solutions, whereas the non-linear feedback on the flow can only be dealt with using numerical methods. As for the resistive cases, in all of the following we employ a third-order CENO spatial reconstruction with MC limiter, the maximally diffusive LF solver, and both the usual first-order implicit/second-order explicit and the IMEX time-stepping schemes.
5.2.1 1D steady dynamo
This is a very simple test describing the growth of magnetic field in a stationary medium. It is the dynamo equivalent to the resistive current sheet presented in Section 5.1.1, because it admits an analytical solution (see Appendix A).
Fig. 4 shows the evolution of the By component of the magnetic field, compared with the corresponding analytical expectations, for various values of η and k. It is interesting to note that in the case η = 0.1 and k = 5, the magnetic field is expected to remain unchanged, due to the opposite effects of resistivity and dynamo. Given the nature of the dynamo closure in equation (13), due to round-off and interpolation errors, the evolution of the fastest growing mode however dominates asymptotically. This is what is observed around t = 60: the field starts to grow exponentially, with a growth rate corresponding to the fastest growing mode. The exact time, when this transition happens, depends on roundoff and interpolation errors, and differs for the IMEX scheme.

1D steady dynamo. The triangles represent cases with η = 0.1 (and k = 1, 2, 5), the squares η = 0.05 (k = 1, 2) and diamonds η = 0.25 (k = 1). Overplotted is the expected analytical solution with an exponential growth rate Iω: the green dotted lines refer to cases with η = 0.1, corresponding to Iω = 0.385, 0.567, 0.59; the red dashed lines to cases with η = 0.05, corresponding to Iω = 0.44, 0.77; and the solid blue line to η = 0.25, corresponding to Iω = 0.236.
In Fig. 5 this property of the dynamo solution is shown for η = 0.05: the initial solution with a wavenumber k = 9 evolves with a slow growth rate until the fastest growing mode, corresponding to k = 5, emerges at t = 12, to dominate the subsequent evolution. Note that, given the exponential nature of the solution, the transition is very sharp. Errors and convergence estimates are presented in Section 5.3 together with a comparison between the first/second scheme and the IMEX scheme.

1D steady dynamo, transition to the fastest growing mode. The left-hand panel shows the By component of the magnetic field, normalized to its maximum value. The transition from the k = 9 mode to the k = 5 mode happens around t = 12. The right-hand panel shows the evolution of the maximum value of By. The solid blue line is the expected growth for a k = 9 mode, the solid red line is the expected growth for the fastest k = 5 mode.
5.2.2 Thin shear layer
In this section, we present a 2D shear dynamo problem in the so-called thin-layer approximation, where one of the dimension is assumed to be much smaller than the other, such that higher order variations of all quantities in that direction can be neglected. This is the relativistic equivalent to the 1D problem investigated by Arlt & Rüdiger (1999), where spatial variations of the dynamo coefficient and quenching were also included. The difference between the non-relativistic and the relativistic case is immediately evident. In the former, one just need to add a shear term to the induction equation, proportional to the derivative of the shear velocity along the neglected dimension. However, this is not possible within our relativistic formalism, where the modification due to the dynamo process does not appear in the induction equation, which for us retains the general form given by Maxwell's equations, but instead in the definition of the electric field via the closure of equation (13). For this reason, we adopt the thin-layer approach that allows one to recover the 1D results in the limit of a negligible thickness. This test is representative of typical conditions in accretion discs, in the limit where one models the differential rotation with a shear term in the radial direction and consider modes extending along the vertical direction.
The computational domain has 200 equally spaced zones in the x-direction. We have repeated the run varying δ between 0.05 and 0.2, and the number of cells in the z-direction between 5 and 11, and found no appreciable difference in the results. In Fig. 6 we show the evolution and compare the numerical results with the analytical expectations. Both the drifting velocity of the wave and the exponential growth of its amplitude are properly recovered with an accuracy of ∼ 1 per cent. Errors and convergence estimates are presented in Section 5.3 together with a comparison between the first/second scheme and the IMEX scheme, and an estimate of the true growth rate and phase shift.

1D thin shear dynamo. The upper panel shows the By component of the magnetic field, normalized to its maximum value, as a function of time and space. The solid line represents the analytical phase shift ∝0.261t. The lower panel shows the evolution of the maximum value of By. The red solid line is the analytical solution.
5.2.3 Kinematic Couette flow
This is a fully 2D dynamo test, on a non-Cartesian grid, corresponding to a Couette flow. We use cylindrical coordinates R, z, with a domain extending in the radial direction in the range R = [0.1, 2], with 100 equally spaced zones, and along the z-direction in the range z = [ − 1, 1], with 100 equally spaced zones. This corresponds to an aspect ratio ∼ 1.

2D Couette flow dynamo. The upper-left panel shows the Bφ component of the magnetic field, in R = 1, normalized to its maximum value, as a function of time. The upper-left panel is a contour plot of Bφ, in the domain at t = 40 (solid cyan lines) and 400 (dashed red lines), after exactly one wavecycle. The lower panel shows the evolution of the maximum value of Bφ.
5.2.4 Dynamical NS dynamo in full GRMHD
The 2D simulation is performed in spherical-like coordinates for the conformal flat metric assuming axisymmetry. The computational domain is θ = [ − π, π], with reflecting boundary conditions on the axis, and r = [0, 10], with dipole-like reflecting conditions at the centre and zeroth-order extrapolation at the outer radius. The dipole-like conditions are chosen to allow a dipolar magnetic and electric field where physical quantities like the radial and θ-components of the magnetic field do not vanish in r → 0. The resistivity is set as η = 0.05, while the dynamo coefficient is ξ = 0.1, uniform in the computational domain. The problem is followed to a final time t = 200. The time evolution of the metric is computed once every 100 steps of the MHD part. We want to stress here that these values have been chosen for the sake of having a fast numerical run, and have no physical significance. The scope here is to perform a test of the code in its full dynamical regime, and not to address a particular physical problem in realistic conditions.
In Fig. 8 we show the result of the evolution. The upper panel shows the magnetic configuration that is obtained at the end of the run. The lower panel shows the growth of the maximum value of the poloidal magnetic field during the evolution. Having adopted a uniform ξ term, spurious dynamo action is also present in the atmosphere surrounding the NS. As a consequence a magnetic field develops and grows in the atmosphere too, despite it being completely unmagnetized at the beginning. Again, this is just due to the unphysical choice of a uniform dynamo term. In the figure, for the sake of clarity, we plot the poloidal field just inside the star. It is interesting to note that the growth rapidly approaches an exponential behaviour, but that the slope (the growth rate) changes at around t = 140. This corresponds to the transition to a shorter wavelength. In particular, at the beginning the mode that is excited and grows corresponds to a radial wavelength of the order of twice the stellar radius (given the initial conditions on Bφ). At t = 140 an eigenmode with a shorter radial wavelength of the order of the stellar radius emerges, corresponding to a faster growing mode.

Dynamical NS dynamo. The upper-panel shows the poloidal magnetic field lines. Colours represent the value of the Bφ component of the magnetic field in units 1015 G. The thick solid line represents the surface of the NS. The lower panel shows the evolution of the maximum value of poloidal magnetic field | $\sqrt{B^rB_r+B^{\theta }B_{\theta }}$ |.
5.3 Convergence and comparison between the first/second and IMEX schemes
In this section, we discuss the convergence properties of our scheme and compare the different time-stepping approaches. Despite the simplicity of our first/second scheme, we do expect that, depending on the problem, its accuracy might be closer to first order, as opposed to the IMEX which should preserve second-order accuracy in all cases. We want to stress here that the IMEX scheme we have implemented only acts on the solution of the MHD equations, and it is not integrated with the metric solver. However, in the choice of the XCFC approach, we already assumed that the metric should be slowly varying in time with respect to the plasma. In this case, we do expect that the order of the scheme should not be affected by the metric solver.
We want to point out here that in order to evaluate the convergence of an algorithm, one needs a test problem with a smooth flow structure at all times including the initial conditions, and well-posed boundary conditions that preserve the overall accuracy. If a reference solution, either an analytical solution or a high-resolution run (such that numerical resistivity is smaller than the physical resistivity) for comparison is not available, one can compute the order of convergence using relative errors at different resolutions. In ideal relativistic MHD such a test was designed by Del Zanna et al. (2003b), using a large amplitude, circularly polarized Alfvén wave.

Convergence test for the resistive current sheet problem. Relative L1 errors on By at | $\tilde{t}=10$ |, with respect to a high-resolution run with 1600 grid points, in logarithmic scale, as function of the number of grid points. The diamonds represent the first/second scheme and the triangles the IMEX scheme. The dashed and dotted lines represent scaling, respectively, as − 2.5 and − 2.7.
For the relativistic dynamo closure, as opposed to the resistive case, the 1D steady dynamos admit analytical solutions. The other multidimensional tests we have presented lack a correct analytical solution and, being multidimensional, it is computationally prohibitive to run a high-resolution reference case; however, as we will show we can use relative errors at different resolutions. In Fig. 10 we show the relative error on one component of the magnetic field, defined as in equation (49) for the 1D steady dynamo with k = 1, η = 0.1, ξ = 0.25. These values have been selected in order for the mode with k = 1 to be the fastest growing mode. 1D steady dynamos are rapidly evolving in time, and with small spatial gradients. The displacement current dominates over the conduction current. The IMEX scheme performs as previously, with an order which is again between 2 and 3 for the same reason as before. The first/second scheme instead reduces to first order as expected.

Convergence test for the 1D steady dynamo problem, with k = 1, η = 0.1 and ξ = 0.25. Relative L1 errors on By at | $\tilde{t}=20$ |, with respect to the analytical solution, in logarithmic scale, as a function of the number of grid points (per mode wavelength). The diamonds represent the first/second scheme and the triangles the IMEX scheme. The dashed and dotted lines represent scaling, respectively, as − 2.3 and − 1.
We have also attempted to estimate convergence of the solution and the order of accuracy of our algorithm for the thin shear layer dynamo (Section 5.2.2). We do not have an analytic solution available to use as a reference solution, and it is computationally prohibitive to run a high-resolution case, so we proceed comparing errors in runs of different resolutions. Moreover, we do have an analytic approximated solution and we have an expectation for the functional form of the eigenmode. In particular, we expect the various quantities to evolve as e−Iωt. So if we assume that the unknown true solution changes in time according to this exponential growth, and that the error of our numerical solutions scales with the number of grid points N as N−p, we can fit simultaneously for the growth rate, phase shift and accuracy of the scheme. The result is shown in Fig. 11. This is equivalent to estimate the order of accuracy by comparing relative errors. We find that for both the IMEX scheme and our first/second scheme, the best-fitting estimate for ω is ω = −I(0.2383 ± 0.0001) + (0.2626 ± 0.0005), to be compared with the expectation of the approximated analytical solution ω = −0.238I + 0.261. The best fit for the order gives p = 2 ± 0.1 for the IMEX and p = 1.5 ± 0.1 for the first/second scheme. We want to remember here that we use extrapolation for the boundary conditions in the z-direction, and the accuracy of the solution also depends on the boundary conditions that are used.

Convergence fit for the thin shear layer dynamo problem. Relative L1 errors on By at | $\tilde{t}=24$ |, with respect to the best-fitting reference solution, in logarithmic scale, as function of the number of grid points (per mode wavelength) in the x-direction. The diamonds are for the first/second scheme and the triangles for the IMEX scheme. The dashed and dotted lines represent scaling, respectively, as − 2 and − 1.5.
In all of our tests, we have verified that, at the resolution at which they were performed, the relative errors of the first/second scheme are of the order of a few 10−3. Unless one requires higher accuracy, or if the problem involves slowly varying solutions with strong spatial gradients, or for discontinuous solutions, given its easy implementation, we deem this approach satisfactory. The IMEX scheme in general shows better convergence already at 25 points per wavelength of the eigenmode, and should be the algorithm of choice for more demanding cases.
6 CONCLUSION
In this paper, we have presented a fully covariant mean-field α-dynamo closure of the resistive relativistic MHD equations, and shown how it can be implemented within a code for numerical 3 + 1 GRMHD. In particular, we have upgraded the echo code for GRMHD, in its version for dynamical space–times (Bucciantini & Del Zanna 2011). The x-echo scheme employs a fully constrained method for Einstein's equations based on the XCFC, but this particular choice poses no constraint on the applicability of our dynamo closure, which is unchanged in the Cowling approximation (a static GR metric) as well as in other formulations of the Einstein equations. We have shown that our implementation of a dynamo effect is straightforward for any numerical scheme that has already been extended to include resistivity, since the novel generalized Ohm's law is very similar to that for resistive GRMHD and does not pose any additional numerical difficulty. This is true in the simple case proposed here, where an isotropic resistivity and an isotropic α-dynamo term (thus simple proportionality between the electric and magnetic fields in the comoving frame) have been considered. Far more complex closures have been developed for non-relativistic MHD; however, it is not obvious if and how fully covariant equivalent formulations could be found at all. We stress again that determining realistic values for the parameters that are used in the closure, or even finding an appropriate closure, is usually non-trivial, and often requires the use of mesoscale information, and extrapolation of flow properties to small unresolved scales. It rests to be proved that a mean-field approach can achieve full resolution of microscopic physics on the macroscale.
This is the first numerical implementation of a fully covariant dynamo closure for relativistic MHD in the general dynamical regime. Instead of starting with the simpler Minkowskian case, we have directly proposed and applied our model to full GRMHD, exploiting the 3 + 1 formalism, in both static and evolving space–times. We have adopted a fully constrained strategy, to retain the general philosophy of the echo and x-echo schemes. The charge density is derived from Gauss theorem, and it is not evolved as an independent quantity like in previous formulations (no appreciable differences are observed in the numerical tests available in the literature). The solenoidal condition on the magnetic field is preserved to machine accuracy using the upwind constrained transport method on a staggered grid. Stiff terms due to small resistivity in the evolution equation for the (spatial) electric field have been treated both with a simple implicit time-stepping procedure, which allows us, contrary to previous works, to obtain the ideal case of a perfectly conducting plasma simply by setting the resistivity coefficient to zero, and not just as a limit for small resistivity, and with a more roboust IMEX scheme. We have shown that depending on the problem, and in particular on the relative importance of spatial versus temporal gradients, a simple first-order implicit scheme can give satisfactory results, while the IMEX scheme tends to give more reliable performances independently of them.
We have presented a set of standard tests, easily implementable and, where possible, we have compared the numerical results with the analytical expectations, confirming the robustness of the implementation. The majority of the tests have been performed in the so-called kinematic regime. This choice has a physical motivation: mean-field dynamo action arises from small-scale motions that are almost always strongly subsonic. Their kinetic energy is negligible with respect to the internal or gravitational energy of the system. Dynamo action is supposed to be quenched once the strength of the magnetic field reaches equipartition with the kinetic energy of the turbulent motions. As such, one expects that dynamo amplified magnetic fields cannot reach values high enough to affect the global dynamics. However, to verify the stability and robustness of the implementation in a more demanding regime, which must be fully dynamic and closer to a physical application, we have also presented a full dynamical case applied to an NS in GRMHD with a time-dependent metric.
Our results show that it is possible to implement within codes for numerical relativity, a closure that in principle can allow one to model effects arising from dynamics at small scales, that would be prohibitive to follow in global simulations. The general idea of subgridding modelling effects has been widely developed in the context of classical fluid dynamics, but is still in its infancy in the field of numerical relativity. There are several outstanding problems of relativistic fluid dynamics, ranging from the origin of relativistic engines, to their characterization to the dissipative evolution of their magnetic fields, that involve extensive dynamical ranges in space and time. The development of a clever subgridding approach offers an interesting possibility to investigate and model physical processes that otherwise would require a resolution that would be computationally prohibitive. This might lead to a different approach and to a rapid advancement in the field.
We plan to apply our code for dynamo in GRMHD to both accreting discs around BHs and in proto-NSs. These two different environments are fundamentally related to the more promising engines for GRBs, and might have important implications for the general modelling of core-collapse supernovae. Strong magnetic fields have also been invoked for short GRBs, which are commonly considered to be a possible electromagnetic counterpart of binary mergers. Indeed, much of the MHD modelling done until now has focused on the large-scale properties, but it has been shown that the expected magnetic configurations can be highly unstable, and a turbulent cascade is expected. Understanding, if and under what conditions a mean-field dynamo can operate, what is its efficiency, and the geometry and topology of the resulting field, might help to put stronger constraints on to the environment within which they are supposed to operate.
The authors wish to thank A. Bonanno, O. Zanotti, C. Palenzuela and A. Bandenburg for fruitful discussions on issues relating to dynamos, numerical relativity and the solution of the implicit stiff equations. We thank the referee for his fruitful suggestions and comments.
REFERENCES
APPENDIX A: DYNAMO SOLUTION FOR A RELATIVISTIC THIN SHEAR LAYER
We present here an approximated analytical solution for a simple relativistic shear layer (see problems in Sections 5.2.1 and 5.2.2). It is the relativistic generalization of a problem presented by Arlt & Rüdiger (1999). Let us consider a shear layer, with an extension in the z-direction much smaller than in the x-direction, where we assume that all quantities do not depend on y. Within this layer the velocity has the following profile: vx = vz = 0, vy = Sz, where S is the shear parameter, and does not change in time.
For example, in the case ξ = 0.2, η = 0.1, k = 1 and S = 0.9 we find a growing mode solution with ω = 0.261 − 0.238I. To this mode it corresponds an eigenvector with |By0|/|Bx0| = 2.13 and with a phase difference between these two components δφ = 0.66. The non-relativistic case, instead, where displacement currents and charge densities are neglected, and where an exact analytical solution can be found, gives ω = 0.254 − 0.240I.