{'fraction_non_alphanumeric': 0.033745509809339595, 'fraction_numerical': 0.015171663442940039, 'mean_word_length': 4.588698002123347, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Galactic Dynamos

Spiral galaxies, including the Milky Way, have large-scale magnetic fields with significant energy densities. The dominant theory attributes these magnetic fields to a large-scale dynamo. We review the current status of dynamo theory and discuss various numerical simulations designed to explain either particular aspects of the problem or to reproduce galactic magnetic fields globally. Our main conclusions can be summarized as follows. (i) Idealized direct numerical simulations produce mean magnetic fields, whose saturation energy density tends to decline with increasing magnetic Reynolds number. This could imply that the observed large-scale galactic magnetic fields might not entirely originate from a mean-field dynamo. Much of the current numerical effort is focused on this unsolved problem. (ii) Small-scale dynamos are important throughout a galaxy's life, and probably provide strong seed fields at early stages. (iii) Large-scale galactic magnetic fields of microGauss strengths can probably only be explained if helical magnetic fields of small or moderate length scales can rapidly be ejected or destroyed. (iv) The circumgalactic medium (CGM) may play an important role in driving dynamo action at small and large length scales. These interactions between the galactic disk and the CGM may be a key aspect in understanding galactic dynamos. We expect future research in galactic dynamos to focus on the cosmological history of galaxies and the interaction with the CGM as means of replacing the idealized boundary conditions used in earlier work.

• Idealized direct numerical simulations produce mean magnetic fields, whose saturation energy density tends to decline with increasing magnetic Reynolds number. This could imply that the observed large-scale galactic magnetic fields might not entirely originate from a mean-field dynamo. Much of the current numerical effort is focused on this unsolved problem. • Small-scale dynamos are important throughout a galaxy's life, and probably provide strong seed fields at early stages. • Large-scale galactic magnetic fields of microGauss strengths can probably only be explained if helical magnetic fields of small or moderate length scales can rapidly be ejected or destroyed. • The circumgalactic medium (CGM) may play an important role in driving dynamo action at small and large length scales. These interactions between the galactic disk and the CGM may be a key aspect in understanding galactic dynamos.
We expect future research in galactic dynamos to focus on the cosmological history of galaxies and the interaction with the CGM as means of replacing the idealized boundary conditions used in earlier work.

INTRODUCTION
Many spiral galaxies have microgauss magnetic fields, so that their magnetic energy densities are comparable to the thermal, kinetic, and cosmic ray energy densities; see Ruzmaikin et al. (1988) for an early textbook on the subject, and Shukurov & Subramanian (2022) for a recent one. Similar magnetic field strengths have also been detected in galaxies at larger redshifts up to z 1 (Bernet et al. 2008, Mao et al. 2017. Galactic magnetic fields often also show large-scale coherence. The first evidence for a global Galactic magnetic field comes from optical polarization (Hiltner 1949, Hall 1949. The existence of magnetic fields was later confirmed for other galaxies using synchrotron emission (Segalovitz et al. 1976), which showed systematic large-scale magnetic fields roughly in the direction of the galactic spiral arms. There has long been a debate about the origin of such magnetic fields: are they primordial or dynamo-generated, or perhaps a combination of the two? Over the past few decades, there has been a shift in attention from a primordial to a dynamo-generated origin. In the meantime, however, there have also been significant developments in dynamo theory, and global numerical simulations are now becoming more realistic. They tend to show that large-scale magnetic fields can be generated by a dynamo, but the amplitudes may be insufficient or the time scales for their generation too long for the simulations presented so far.
In the present review, we focus on galactic dynamos and highlight some of the main developments since the time of the review of Beck et al. (1996). The broader problem of galactic magnetism that was addressed there will not be reviewed; we refer here to other excellent reviews by Beck (2001Beck ( , 2015a and Han (2017), as well as the recent textbook by Shukurov & Subramanian (2022). A review of astrophysical dynamos covering the era before 2005 is given by Brandenburg & Subramanian (2005a). Regarding small-scale turbulent dynamos in partially ionized plasmas, we refer to the recent review by Xu & Lazarian (2021). We also recommend the reviews by Crutcher (2012) Beck et al. (1996), there were results suggesting that the dynamo effect in mean-field theory is "catastrophically" quenched, i.e., it goes to zero as the magnetic Reynolds number (Re M ) becomes large (Vainshtein & Cattaneo 1992, Cattaneo & Hughes 1996. Specifically, the mean-field effect in question is what is referred to as the α effect, which quantifies the component of the mean electromagnetic force in the direction of the mean magnetic field. "Catastrophic" can mean that the coefficient α goes to zero as Re M goes to infinity. More generally, however, it means that the resulting mean (or large-scale) magnetic field cannot be generated at the expected amplitudes or time scales. This led to a major crisis in dynamo theory, questioning the possibility of an α effect dynamo in the nonlinear regime beyond just infinitesimally weak kinematic dynamo-generated magnetic fields.

Magnetic helicity:
Volume-integrated dot product of magnetic vector potential A and magnetic field B, A · BdV Although there are still unresolved questions in nonlinear dynamo theory today, there have also been major developments in this field: the importance of magnetic helicity fluxes has been recognized, mean-field dynamo coefficients can now be determined from simulations without the restrictions imposed by analytic techniques, and new dynamo mechanisms beyond just the α effect have been identified. At the same time, there has been significant progress in performing realistic three-dimensional (3-D) magnetohydrodynamic (MHD) simulations of galaxy formation, allowing a new theoretical view of the problem, where the circumgalactic medium (CGM) plays an integral part. All these developments motivate a new review on galactic dynamos.

DYNAMOS
We begin by discussing historical and theoretical aspects of MHD and dynamos that are of particular importance in connection with the new developments in galactic dynamo research over the past few decades. The presence of a microphysical magnetic diffusivity plays here an important role. We begin with a historical perspective.

Observational tracers of galactic magnetic fields
Dust extinction / emission polarization. Elongated dust grains in the interstellar medium tend to align their minor axes with the mean magnetic field direction (Davis & Greenstein 1951). As a result, the light they emit in infrared wavelengths is polarized, with the polarization direction perpendicular to the mean direction of the magnetic field. Only recently has it been possible to trace extragalactic magnetic fields with this method (e.g.,the recent survey by Lopez-Rodriguez et al. 2022).
Since starlight emission is unpolarized, we can also measure dust polarization in absorption against stellar sources. If the distances to the stars are known, it is possible to map the magnetic field at different locations along the line-of-sight (e.g., the PASIPHAE survey, Tassis et al. 2018).
Synchrotron emission. Ultra-relativistic cosmic ray particles emit polarized synchrotron radiation in radio wavelengths as they gyrate around the galactic magnetic field. Synchrotron emission, which yields the plane-of-the-sky magnetic field component in the warm/hot ISM, has been the tracer of choice for studying extragalactic magnetic fields (see, e.g., Beck 2012, for a review).
In general, polarization is measured through the Stokes parameters I , Q, and U . Then the angle of the magnetic field with respect to an arbitrarily chosen axis is calculated from the expression 1 2 arctan χ = U Q 1. and the polarization fraction p = Q 2 +U 2 /I . is in units of radians/m 2 . Here, D is the distance to the source in pc, n e is the electron density in cm −3 , and B ∥ is the line-of-sight magnetic field of the medium in Gauss (Burn 1966, Brentjens & de Bruyn 2005. If we have an estimate of the electron density, then Faraday rotation can yield the line-of-sight magnetic field.

Historical remarks
In Section 6 we will discuss the observational signatures of dynamo models in detail. Here, we will only briefly mention some observational results that were significant for the development of dynamo models. For later reference, we provide here a short overview of the existing galactic magnetic field tracers in the text box on "Observational tracers of galactic magnetic fields". In the late 1970s, synchrotron radiation from spiral galaxies began to reveal the presence of large-scale ordered magnetic fields broadly aligned with the galactic spiral pattern. At the time, an obvious possibility was that these magnetic fields were the result of winding up a pre-existing, largescale field. This idea goes back to Piddington (1964) and Ôki et al. (1964), and is now commonly referred to as primordial origin of the magnetic field. The resulting magnetic field is then expected to have the form of a bisymmetric spiral (BSS). The BSS form has a characteristic signature in the  Faraday Rotation Measure (RM): when we observe an external galaxy almost, but not exactly, faceon, the line-of-sight magnetic field measured through RM probes the azimuthal component of the galactic field -see Figure 1 for a sketch. Using this technique, Tosa & Fujimoto (1978), who used a sketch similar to ours in Figure 1, found evidence for a BSS in M51. In an early review on galactic magnetic fields, Sofue et al. (1986) contrasted this with the axisymmetric spiral (ASS), expected from mean-field dynamo theory. Figure 1 also sketches the expected ASS signature.
However, a purely primordial origin of galactic magnetic fields implies that a tremendous amount of winding has occurred over the past 14 Gyr due to the shear induced by the differential rotation of the galaxy. For example, in the solar neighborhood, the angular velocity of the Galaxy is ≈ 30 Gyr −1 , i.e., the rotation period is (2π/30) Gyr ≈ 0.2 Gyr. This yields 70 revolutions in 14 Gyr, so we would expect the magnetic field to be strongly wound up. Figure 2 gives a quantitative illustration of this wind-up process. It shows color scale images of |B| together with field lines corresponding to the contours of the normal component of the magnetic vector potential, A z (x, y), so that the magnetic field in the plane is given by B = ∇ × (ẑ A z ). To obtain the result shown in Figure 2, we solved the two-dimensional (2-D) induction equation, which corresponds to an advection-diffusion equation of the form where D/Dt = ∂/∂t +U ·∇. Here, we assumed that U = Ω(x, y) , where = (x, y, 0) is the cylindrical position vector and Ω = Ω 0 /[1 + ( / 0 ) n ] 1/n is the angular velocity with 0 = 5 kpc, n = 3, and Ω 0 = 40 Gyr −1 . This experiment demonstrates the extreme winding of the magnetic field. The turbulent magnetic diffusivity is here 5 × 10 −4 kpc km s −1 , corresponding to 1.5 × 10 23 cm 2 s −1 , which is three orders of magnitude below the canonical estimates (Brandenburg et al. 1993, Shukurov & www.annualreviews.org • Galactic Dynamos

Figure 2
Snapshots of field lines together with representations of |B| color-coded (in units of its original value) at 0.1 and 1 Gyr for the wind-up problem described in the text. The inset in the upper left corner shows the field lines at the time 0.01 Gyr. . We see about six windings at 1 Gyr with a thirty-fold increase of |B|. This amount of winding is not observed in any galaxy. m = 0 and m = 1 magnetic fields: vary with azimuth φ like e imφ and correspond to ASS and BSS fields Mean-field dynamo theory was originally developed in the solar context (Steenbeck & Krause 1969) and is able to predict both axisymmetric and nonaxisymmetric magnetic fields. Parker (1971) was the first to show that the most easily excited axisymmetric large-scale magnetic fields in oblate bodies such as galaxies have an azimuthal component that is symmetric about the midplane, i.e., the fields have quadrupolar symmetry -in contrast to the dipolar symmetry that is often found in spherical bodies like the Earth.
While dynamo theory can also produce BSS-type fields, it was shown that they are not the most easily excited modes (Elstner et al. 1990, unless the turbulence is strongly anisotropic or the dynamo is controlled by strongly anisotropic flow structures . Today, the significance of primordial magnetic fields is still not resolved, and global 3-D numerical simulations suggest that both primordial and magnetic fields of astrophysical origin may be present in typical galaxies (e.g., Martin-Alvarez et al. 2021, see Figure 3).

The need for magnetic diffusivity: the example of steady flows
The evolution of the magnetic field B is governed by the usual induction equation, where U is the velocity and J = ∇ × B/µ 0 is the current density with µ 0 being the vacuum permeability. Equation 4 also includes an electric conductivity σ, because the mean-free path of the electrons in the interstellar medium (of the order of a few thousand astronomical units) is much smaller that the scales under study here. The magnetic resistivity is 1/σ, and the microphysical magnetic diffusivity is then given by η = 1/σµ 0 . Section of Figure 1 from Martin-Alvarez et al. (2021), showing a cosmological galaxy model evolved with two different initial magnetic fields:primordial or "injected" on small scales by stellar feedback. The left panel shows a color-composite mock observation in the optical, the middle panel shows dust absorption along the line of sight, and the one on the right color-codes the total magnetic energy according to its origin: green for the primordial, red for the injected, and blue for the cross-term field.

Characteristic nondimensional numbers
Fluid and magnetic Reynolds numbers and their ratio, the magnetic Prandtl number, are defined as where ν is the (microphysical) kinematic viscosity, η is the (microphysical) magnetic diffusivity, and k f is the characteristic flow wavenumber. Note that the Reynolds numbers are sometimes based on the length scale, 2π/k f , which leads to about six times larger values. The present definition is commonly used in numerical simulations of turbulence. As a rule of thumb, the number of mesh points needed in a numerical simulation is similar to the value of the Reynolds number. In simulations with partial ionization, the ionization ratio ρ i /ρ n , i.e., the density ratio of ions and neutrals, enters as another nondimensional number.
Dynamos convert kinetic energy into magnetic energy through what is called the dynamo instability. It occurs when the magnetic Reynolds number, Re M , exceeds a certain critical value (see Dynamos: convert kinetic energy into magnetic energy the text box on "Characteristic nondimensional numbers" for a definition of Re M ). Here, k f is the typical wavenumber of the flow. A rigorous definition of this instability is only possible for steady flows. Then an eigenvalue problem can be expressed through: where λ is the eigenvalue and B λ (x) the eigenfunction. For steady, mass conserving, compressible flows, Moffatt & Proctor (1985) proved that dynamos (i.e., λ > 0) cannot exist for η = 0, i.e., in the strictly ideal case. This does not preclude dynamos in the astrophysically relevant limit η → 0, which are called fast dynamos (Soward 1987), but it is important to stress that the limit η → 0 is quite different from the case η = 0. The case η = 0 is arguably pathological, because without resistivity, there is no Joule heating and the field line topology cannot change. This case is therefore of academic interest only, although it can be described using Euler potentials, Φ(x, t ) and Ψ(x, t ), such that B(x, t ) = ∇Φ × ∇Ψ, where www.annualreviews.org • Galactic Dynamos Φ(x, t ) and Ψ(x, t ) obey (e.g., Rosswog & Price 2007),

6.
We see that in the special case of 2-D, this equation agrees with the advection-diffusion equation Equation 3, where Φ = A z and Ψ = z have been assumed. In this special case, it is possible to recover the induction equation in the presence of microphysical magnetic diffusion. Dynamos have not been found in this formulation -even for 3-D turbulent or other flows that allow for dynamo action in the limit η → 0 (Brandenburg 2010a). The method forbids even a very weakly diffusive advection of Φ and Ψ, which would be needed in any numerical simulation to prevent the formation of infinitely sharp gradients.
Dynamos: have not been found with Euler potentials To understand the problem with the case η = 0, let us now discuss instead the limit η → 0. The tangling of a pre-existing magnetic field for can convert kinetic energy into magnetic energy for some period of time, but it is then not through a dynamo instability, and can happen for a purely 2-D field, B = B(x, y), as we have seen in Figure 2. The magnetic field is amplified by perpetual stretching, so it continuously develops smaller scale structures. This continuous change in the field structure makes it impossible to describe the evolving field by an eigenfunction of the form B λ (x), which is independent of time. The actual solution B(x, t ) in the case of η = 0 would continuously develop smaller length scales as time goes on. Thus, even though the growth may still be exponential, the solution cannot be separated into a purely temporal and a purely spatial part.

Dynamos in turbulent and time-dependent flows
All astrophysically relevant flows are time-dependent. Turbulent flows can be statistically steady, so one can still determine an eigenvalue problem by averaging over the fluctuations; see Subramanian & Brandenburg (2014) for detailed studies of kinematic dynamos in helical and fractionally helical turbulence at large magnetic Reynolds numbers. Even in those turbulent time-dependent flows, when eigenvalues and statistical eigenfunctions with certain energy spectra are obtained empirically for finite η by suitable averaging, no dynamos have been found in the case η = 0, when Euler potentials can be used, as discussed above.
In practice, we are often also interested in decaying or collapsing turbulent flows. Dynamos may occur in those cases, but they are hard to define rigorously. Nevertheless, amplification -suggestive of dynamo action -has been reported both for decaying turbulence ) and for turbulent gravitational collapse (Sur et al. 2012, Xu & Lazarian 2020, as will be discussed later in Section 5.2 of this review. Cowling (1933) formulated an anti-dynamo theorem, concluding that "The theory proposed by Sir Joseph Larmor, that the magnetic field of a sunspot is maintained by the currents it induces in moving matter, is examined and shown to be faulty." At that time, there was no hint that the solution to the problem could lie in the third dimension. It was only later that the use of a 2-D analysis in the work of Cowling (1933) was understood as not just a simplification, but as a crucial restriction precluding dynamo action. Even after Parker's discovery (Parker 1955) of what is now called the α effect (see the text box on "The α effect"), it was not generally accepted that dynamos could work even in principle. For example, Chandrasekhar (1956) found that particular flow geometries could prolong the resistive decay time to half a billion years when using the magnetic diffusivity of the Earth's outer core. He speculated that the Earth's magnetic field could be explained in that way, The α effect: example of a mean-field dynamo The α effect quantifies how a systematic twist (or swirl) in a turbulent flow produces secondary magnetic fields around a primary field in a specific direction. An example is the production of a poloidal field from a toroidal field, as is believed to occur through cyclonic convection in the Sun (Parker 1955). Mathematically, this is described by a contribution to the averaged electromotive force, u × b, in the direction of the main magnetic field B, i.e., u × b = αB+ higher order terms. It is called α effect, because of the historically chosen coefficient α. Here, u and b are fluctuations of U and B, respectively. The type of averaging depends on the problem at hand and will be discussed later in Section 2.5. Using B = ∇ × A, and ignoring for now mean flows such as the galactic differential rotation, the averaged uncurled induction equation 4 takes the form

Early examples of dynamos
where α = const has been assumed. Solutions are proportional to the eigenfunctions of the curl operator, for example A = (sin kz, cos kz, 0), which satisfies ∇×A = kA. Seeking solutions of the form A ∝ A 0 e ikz+λt , with A 0 being the eigenfunction, yields the dispersion relation λ = αk − ηk 2 , and therefore self-excited solutions for α > ηk.
The α effect thus explains the exponential growth of a weak mean magnetic field. We recall that the full magnetic field has fluctuations, but they are usually growing at the same rate as the mean field. Since the magnetic field is a pseudovector, but the electromotive force is an ordinary vector, α must be a pseudoscalar, i.e., its sign changes when viewed in a mirror. An α effect can occur when the system is governed by a specific pseudoscalar (Krause & Rädler 1980). As an example, systems governed by gravity g and angular velocity Ω have a finite pseudoscalar given by g · Ω.
The existence of this pseudoscalar is is what caused the systematic twist or swirl in the flow which, in turn, produces the α effect in galaxies. Twist or swirl can also occur through corresponding driving and through initial conditions. It is then characterized by the kinetic helicity.
One of the higher-order contributions to u × b is from turbulent diffusion, so one has u × b = αB −η t µ 0 J , where η t is the turbulent magnetic diffusivity. The second term nearly balances the former and is therefore important. We also note that two further generalizations to this formulation will be discussed later in this review: (i) α and η t become really tensors and (ii) the multiplications become really convolutions. rather than by a dynamo. This suggests that the existence of dynamos was far from being widely accepted at that time.
Small-scale dynamos: generate magnetic fields at the resistive scale in the kinematic regime, but at a fraction of the forcing scale otherwise The first rigorous examples of dynamos were presented by Herzenberg (1958) and Backus (1958). The former, consisting of two rotors (eddies) with an oblique angle between them, was also realized experimentally (Lowes & Wilkinson 1963). However, the length scale of those magnetic fields was only comparable to that of the rotors. This property could classify the Herzenberg result as a small-scale dynamo. During the kinematic phase, small-scale dynamos produce a field at the resistive scale and can later grow to the scale of turbulent eddies as the dynamo saturates. They do not possess a mean field. However, the Herzenberg dynamo is not a typical example of a small-scale dynamo, because it does not involve turbulence, and laminar dynamos cease to exist for large values of Re M . A typical example would be isotropic homogeneous turbulence, which can generate magnetic fields at the resistive scale, as will be described later.
In the early 1970s, Roberts (1972) showed that several 2-D, spatially periodic steady flows can exhibit dynamo action. These flows are now called Roberts flows I-IV. They are large-scale dynamos and their properties have been investigated with modern tools (Rheinhardt et al. 2014). The

The four Roberts flows
The four Roberts flows are classic examples of large-scale dynamos. They serve as simple benchmarks and highlight the existence of completely different mechanisms. Only the first one corresponds to the classical α effect, which is traditionally believed to operate in galaxies. All four flows have the following x and y components: but the z components are different for each flow: sin k 0 x sin k 0 y (for flow I), cos k 0 x cos k 0 y (for flow II), (cos 2k 0 x + cos 2k 0 y)/2 (for flow III), sin k 0 x (for flow IV), 9.
where v 0 , w 0 , and k 0 are constants. Particular solutions are obtained by specifying the magnetic Reynolds number Re M = v 0 /ηk 0 and the ratio w 0 /v 0 . The magnetic field must always be 3-D and varies in the z direction like e ik z z , where k z is sometimes chosen such that it maximizes the growth rate.
expressions for the four Roberts flows are included in a dedicated text box. Flow I has maximum kinetic helicity with 〈ω · u〉 = k f 〈u 2 〉, where angle brackets denote volume averaging. Flow II has ω · u = 0 pointwise, while flows III and IV have vanishing helicity only on average (〈ω · u〉 = 0), but not pointwise.
Kinetic helicity: 〈ω · u〉, where ω = ∇ × u is the vorticity We summarize the essential features of flows I-IV in Table 1. The resulting mean fields for flow I can be interpreted in terms of an α effect; see the text box on "The α effect". The mean field for flow IV was identified to be due to a negative turbulent magnetic diffusivity (Devlen et al. 2013). The origin of the mean field for flows II and III involves the combination of two different effects: turbulent pumping, which acts like an advection velocity without actual material motion, and a memory effect, which means that the electromotive force also involves the mean magnetic field from earlier times.
These classifications can be formalized once we define an averaged magnetic field B, which can here be an x y planar average, so B = B(z, t ) depends just on time and on one spatial coordinate. This defines what we call the fluctuating field b ≡ B − B. For the Roberts flows, there is no mean flow, i.e., U = 0, so the evolution of B is only governed by the mean electromotive force E ≡ u × b, consisting of fluctuations only.

The evolution of B:
is governed by the mean electromotive In all cases, the mean magnetic field along the z axis, B ≡ (0, 0, B z ), vanishes. The perpendicular components, B ⊥ ≡ (B x , B y , 0) are finite and we only need to focus on the components E ⊥ , B ⊥ , and J ⊥ . For flow I, which is maximally helical, there is a systematic swirl. As we have explained in the text box on "The α effect," as a result of this systematic swirl, flow I produces an α effect, and thus, we have

10.
In Equation 10, η t is the turbulent magnetic diffusivity, because it adds to the microphysical magnetic diffusivity η to give the total magnetic diffusivity η T = η t + η. For flows II and III, the situation is more complicated in that α is now a tensor with vanishing diagonal components. For flow IV α is zero and η t is negative, which can thus lead to exponential growth. For all those flows, it is on large length scales 4.55 In all cases, k z = k 0 /2 was used. The values of u rms are 0.866 for flows I-III and unity for flow IV.
important to realize that α and η t are in general scale-dependent, and η t becomes positive when B(z, t ) has high spatial Fourier components, i.e., for mean fields of smaller scale in the z direction. The dependence of E on the mean magnetic field B and its associated mean current density, J = ∇ × B/µ 0 , will be discussed below. To determine all components of the tensors α i j and η i j k in the representation E i = α i j B j + η i j k B j ,k with a rank-3 tensor η i j k , one must solve the equation for the fluctuations in terms of the mean magnetic field. Here, a comma denotes partial differentiation. In Table 1, we indicate the form of E ⊥ for each of the four flows. We also indicate the critical values of the magnetic Reynolds Magnetic Reynolds number: Defined here as Re M = u rms /ηk f , where k f is the wavenumber of velocity fluctuations number Re crit M , above which dynamo action occurs. Here, Re crit M is defined with k f = k 0 , and we have fixed w 0 = v 0 and k z = k 0 /2 to ensure that dynamos are possible for all four flows. For flows II and III, for example, no dynamos are possible for k z = k 0 .

Large-scale dynamos and averaging
As already alluded to above, an important feature of the four Roberts flow dynamos is that all of them are examples of large-scale dynamos, i.e., one can define an average (here an x y average) under which the magnetic field retains most of its energy and still captures its essential spatiotemporal evolution. The most suitable type of averaging depends on the type of the mean mag-Large-scale dynamos: Create coherent structures on large spatial and temporal scales netic field that can emerge in certain geometries and in certain parameter regimes; see Gent et al. (2013) for a discussion.
For example, in the context of disk galaxies, the azimuthally averaged Type of averaging: depends on the magnetic field that can emerge in certain geometries for certain parameters magnetic field plays an important role. In cylindrical coordinates, ( , φ, z), such a field dependsnot necessarily smoothly -on the cylindrical radius and the height z above the midplane. This variability can easily lead to a confusing terminology when we want to split the magnetic field into mean and fluctuations, B = B +b. To avoid the temptation to refer to the non-smoothness of B as fluctuations, one sometimes refers to ordered and random fields instead (Shukurov & Subramanian 2022). An azimuthal average has obviously no azimuthal dependence and cannot describe nonaxisymmetric magnetic fields. On the other hand, in a mean-field model, one can always just assume that B does also depend on φ. A slight problem may then only occur if one wants to make direct comparisons with observations or simulations, because there is no spatial average that describes nonaxisymmetric magnetic fields under which self-consistent mean-field equations can be derived. For Fourier filtering, for example, the product of a mean and a fluctuation vanishes only approximately under averaging if the scales of mean fields and fluctuations are sufficiently differ-

ent.
Regarding the periodic flow patterns in Cartesian coordinates discussed in Section 2.4, it is important to stress that there can be examples where planar x y averaging is not suitable. An example is the Taylor-Green flow, where a one-dimensional average (here a z average) must be taken to demonstrate the existence of a large-scale dynamo due to a negative turbulent magnetic diffusivity (Andrievsky et al. 2015). In that case, the mean field depends on x, y, and t .

Types of large-scale dynamos
Historically, the α effect was the first distinct dynamo effect that was discovered. It emerged in the derivation of mean-field effects in stratified rotating turbulence (Steenbeck et al. 1966), but in its essence, it was already obtained by Parker (1955) using a more phenomenological approach. It is intrinsically connected with the presence of kinetic helicity and was found to be proportional to the pseudo-scalar g · Ω, as discussed in the text box on "The α effect." Dynamos can work with an α effect alone, in which case one talks about an α 2 dynamo. Astrophysical dynamos often have strong shear, so there is an extra U × B term on the right-hand side of Equation 7, but shear alone cannot produce a dynamo. When shear is complemented by an α effect, one talks about an αΩ dynamo, or even an α 2 Ω dynamo if one wants to emphasize that both α and Ω effects play a role.
At the moment, we do not know for sure whether galactic dynamos are of αΩ type, as is generally believed, or of some other, possibly as yet unknown type of large-scale dynamo. To demonstrate the range of possibilities, we summarize in Table 2 the different large-scale dynamos known so far. Here we also indicate whether a small-scale dynamo might operate and whether the dynamo is expected to be fast, i.e., to grow even for very large values of Re M . This is usually not the case for laminar flows, unless the flow has chaotic streamlines. 1 2.6.1. Helical dynamos. The first of the four Roberts flows is maximally helical. It is a prototype of an α 2 dynamo, whereby the two nonvanishing horizontally averaged mean-field components, B x and B y , are being amplified by the α effect. If shear is important, and we have an αΩ dynamo, Roberts flow I: is a prototype of an α 2 dynamo; the flow is fully helical the dynamo is often oscillatory and can exhibit traveling wave solutions. In oblate bodies such as 1 The Galloway-Proctor flow (Galloway & Proctor 1992) is an example of a laminar flow that may be fast. It is a Roberts flow with time-dependent phases in the trigonometric functions, which causes its streamlines to be chaotic. galaxies, however, αΩ dynamos are usually non-oscillatory (Parker 1979, Stix 1975 (Willis 2012), where the growth rates of B x and B y are different and only one of the two components grows. This is unusual and different from conventional dynamos of αΩ or α 2 type, where the two components have strictly the same growth rate. Mathematically, the coupling of the two mean field components is caused by the cross product in the expression ∇ × (αB) on the right-hand side of the evolution equation for B. In the presence of shear, for example by a mean flow with constant shear S = ∂U y /∂x, one has ∂B y /∂t = SB x + ..., where the ellipsis denotes further terms not relevant to the present discussion.
The reason for the decoupling of the two magnetic field components in some examples is the fact that the dynamo-active terms operate on each field component separately, i.e., ∂B x /∂t = −γ · ∇B x and ∂B y /∂t = −γ · ∇B y for dynamos where the pumping velocity γ has a memory effect. In its simplest form, a memory effect has an exponential kernel proportional to e −(t −t )/τ for t > t , and zero otherwise. Here, t is the current time and t the integration variable, covering all earlier times. In Fourier space, it leads to a factor 1/(1 − iωτ) in Fourier space, where ω is the frequency and τ is the turnover time. When γωτ > (η + η t )k, dynamo action becomes possible.
2.6.3. Rädler and shear-current effects. Early in the history of mean-field dynamo theory, Rädler found a novel large-scale dynamo effect for rotating, but unstratified bodies, whereby E has an extra term proportional to Ω × J . Here, Ω is a pseudovector pointing along the rotation axis. The azimuthal velocity is then u φ = × Ω. However, it is easy to see that the Ω × J term in E does not contribute to the generation of mean-field energy proportional to B 2 , because the dot product with J vanishes. Therefore, additional effects are needed to achieve an actual dynamo. Shear is one such effect, which can also generate another large-scale dynamo, similar to the Rädler dynamo: the shear-current effect. Most of the numerical evidence today shows that this effect does not have a favorable sign for dynamo action (Brandenburg et al. 2008a). There is the possibility that this finding would change when the shear-current effect is strongly controlled by the magnetic field from a small-scale dynamo (Squire & Bhattacharjee 2015). While it is true that large-scale magnetic fields can be generated, it is possible that the real reason behind this is actually the incoherent α effect, as will be discussed below; see also Zhou & Blackman (2021) for a detailed assessment of the different possibilities.
2.6.4. Incoherent and shear dynamo effects. There is another important class of large-scale dynamos that may explain the phenomenon of large-scale magnetic field generation in shear flows without helicity. Such nonhelical dynamo action was first found in a more complex shear flow geometry, relevant to the solar tachocline at mid to low latitudes (Brandenburg 2005). In this environment, it was found that large-scale fields can be generated both with and without helicity in the driving of the turbulence. Subsequent studies by Yousef et al. (2008) and Brandenburg et al. (2008a) produced such dynamos in simpler shearing box simulations, but gave different interpretations, which we discuss below.
One interpretation involves helicity fluctuations, which lead to what is known as an incoherent α effect and, in conjunction with shear, to large-scale dynamo action (Vishniac & Brandenburg Figure 4 Magnetic (red lines) and kinetic (blue lines) energy spectra during the kinematic (left) and nonlinear saturated (right) phases. Adapted from Run E of Brandenburg et al. (2022). Note how the peak of E M (k) shifts to larger scales in the saturated case.

1997
). An incoherent α effect leads to a negative turbulent magnetic diffusivity (Kraichnan 1976). An incoherent α effect: implies negative turbulent magnetic diffusivity In that sense, the incoherent α effect is actually similar to the dynamo effect in Roberts flow IV.
Another interpretation is what is sometimes called the shear dynamo. Attempts to interpret this as a mean-field effect amounts to invoking the shear-current effect. The magnetic sheer current effect, by contrast, is based on correlated fluctuations of the magnetic field from a small-scale dynamo, which is assumed to operate in the background.
The role of the incoherent α effect in galactic dynamos is uncertain and may have been underestimated in the past. It might be important if the net kinetic helicity above and below the midplane is small. This may well be the case, especially when there is significant interaction with the CGM. Such interactions can generate strong fluctuations of opposite sign in the kinetic helicity, which would cancel out.

Small-scale dynamos
2.7.1. Early work on the subject. Under fully isotropic conditions and without helicity, dynamo action is still possible-both for large and small values of the magnetic Prandtl number Pr M . This was first shown by Kazantsev (1968). Earlier work suggested dynamo action only for Pr M > 1, but this turns out to be incorrect; see the detailed discussion by Schekochihin et al. (2004). The exis-Nonmagnetic Kolmogorov turbulence: hardly exists in astrophysics tence of small-scale dynamos under isotropic conditions implies that the concept of nonmagnetic Kolmogorov turbulence hardly exists in astrophysics, where the medium is usually always highly conducting.
In the early kinematic regime, when the magnetic field is still weak and exponentially growing, its energy spectrum increases with wavenumber k proportional to k 3/2 and has a peak at the resistive wavenumber, provided Pr M 1. Kulsrud & Anderson (1992) found that the peak occurs at a wavenumber k η that depends on the growth rate λ through k η = 4λ/15η. This is demonstrated in Figure 4, where we plot magnetic and kinetic energy spectra during the kinematic and saturated phases. More recent work on small-scale dynamos is numerical, and will be covered in detail in the following sections.
2.7.2. Effect of ambipolar diffusion. Xu & Lazarian (2016) found a strong similarity between the regime of large magnetic Prandtl numbers and the regime of partial ionization. Their results have been confirmed in numerical simulations (Xu et al. 2019). In those simulations, the microphysical magnetic Prandtl number remained undetermined, because no explicit viscosity or magnetic diffusivity were used. Two-fluid direct numerical simulations (Brandenburg 2019) showed that at large magnetic Prandtl number, the kinetic energy spectra for neutrals and ions show different slopes. The energy spectra of ions and neutrals depart from each other only a small scales when k/k ν > 1. For larger ambipolar diffusion coupling, the kinetic energy spectra of neutrals decrease further while those of the ions increase slightly.

Catastrophic quenching for uniform magnetic fields
As long as the magnetic field is weak, the Lorenz force plays no significant role. Many dynamo effects, including those discussed in Section 2.4, can then be fully described by a given velocity field, because the induction equation 4 is linear in B. However, as soon as the velocity field is determined or modified by the magnetic field, the dynamo problem becomes nonlinear. Eventually, the growing effect of the Lorenz force on the flow can limit (or quench) the magnetic field growth.
Catastrophic quenching means: The term catastrophic quenching was coined by Blackman & Field (2000) to denote any type of detrimental Re M dependence of the nonlinear feedback. Ignoring the effect of turbulent diffusion, i.e., the term −η t µ 0 J in Equation 10, Cattaneo & Hughes (1996) found numerically that α ∝ (1 + Re M B 2 /B 2 eq ) −1 , where B eq = µ 0 ρ 0 u rms is the equipartition field strength, whose energy density is equal to the kinetic one. Evidently, owing to the Re M factor in the expression for α, this dependence is "catastrophic". This dependence was originally anticipated by Vainshtein & Cattaneo (1992) based on earlier analogous results by Cattaneo & Vainshtein (1991) for the suppression of just η t in 2-D. Gruzinov & Diamond (1996) explained these results as a consequence of the conservation of magnetic helicity 〈A · B〉 in 3-D and of 〈A 2 〉 in 2-D, respectively. However, the dependence of α on Re M is a peculiar property of the magnetic helicity equation in the presence of a mean magnetic field B 0 . In that case, the magnetic helicity corresponding to the departure from the imposed field, b, yields, in the steady state, 0 = 〈(u × B 0 ) · b〉 − ηµ 0 〈j · b〉. Since we define here mean fields as volume averages, and since 〈J 〉 = 0 in Equation 10, we have 〈(u × B 0 ) · b〉 = −(〈u × b〉) · B 0 = −αB 2 0 , and therefore α = −ηµ 0 〈j · b〉/B 2 0 , so α → 0 as η → 0 or Re M → ∞. This agrees with the heuristic quenching formula α ∝ (1 + Re M B 2 /B 2 eq ) −1 , which also predicts α → 0 as Re M → ∞. The analysis also shows that the quenching is related to magnetic helicity conservation. A detailed explanation of this derivation is reviewed in Brandenburg & Subramanian (2005a).
Much of the original work on catastrophic quenching adopted periodic domains. This is clearly only of limited value when thinking about galaxies. This result for α in the nonlinear regime was first obtained by Keinigs (1983). However, it is not really relevant in practice, because it assumes that the magnetic field can meaningfully be described by volume averages. This is not the case, because a volume-averaged magnetic field is always constant in a periodic domain.
A relevant mean field for this kind of problem can be defined as planar averages, as discussed in Section 2.4. We denote that by overbars. The diffusion term η t µ 0 J can then not be neglected and the relation of Keinigs (1983) can then be written in the form α−η t k m = −ηµ 0 〈j ·b〉/B 2 0 , where

Derivation of Equation 11
The slow saturation behavior after t = t sat is governed by magnetic helicity conservation. The uncurled induction equation reads, ∂A/∂t = −E −∇ϕ, where E = −U ×B +ηµ 0 J is the electric field and ϕ is the electrostatic potential. The evolution of the magnetic helicity density A · B is then given by ∂ ∂t

13.
Our analysis concerns only the phase when the small-scale dynamo has already saturated (for t > t sat ), so a · b = const and j · b = const. Assuming the field to be helical with negative helicity at small scales and positive at large scales, we have Inserting this into Equation 13 and performing volume averaging over the periodic domain, indicated by angle brackets, so that the flux divergence term vanishes, one obtains d dt the solution of which for 〈b 2 〉 = const is given by Equation 11.

Catastrophically slow saturation in closed domains
In reality, even if the restriction to closed or periodic domains is retained, neither α nor η t are quenched in a catastrophic fashion (Brandenburg et al. 2008b). Instead, the time scale for reach-In a closed domain: final saturation is catastrophically slow ing ultimate saturation is "catastrophically" prolonged, i.e., the final saturation obeys (Brandenburg 2001) where k f is the typical wavenumber of the turbulence, k 1 = 2π/L is the lowest wavenumber of the cubic domain of size L 3 , and t sat marks the end of the early kinematic growth phase and the beginning of the slow saturation phase. Let us emphasize once again that in Equation 11, the value of η is the microphysical value, which is extremely small in galaxies. This motivates the characterization as "catastrophically slow". Equation 11 has been derived based on just the magnetic helicity equation, i.e., no mean field theory was invoked; see the text box on the "Derivation of Equation 11". However, a phenomenological mean field theory can be formulated where the α effect has an extra magnetic contribution related to the magnetic helicity at small scales, which, in turn, is computed based on the largescale magnetic helicity that is being being produced by the mean-field dynamo under the assumption that the total magnetic helicity is conserved. The α effect itself is then not catastrophically quenched (Blackman & Brandenburg 2002), so the magnetic field (in a periodic or closed domain) can still be strong, but only after a resistively long time; see, again, Brandenburg & Subramanian (2005a) for a review.

Alleviating catastrophic quenching by magnetic helicity fluxes
It has long been hypothesized that the action of magnetic helicity fluxes can overcome what would otherwise be an extremely slow approach to saturation (as described in Section 3.2) or a saturation at a very low amplitude (Gruzinov & Diamond 1996). The latter has been demonstrated in , who discussed what they called a "vacuum cleaner experiment". In it, they periodically removed magnetic field at high Fourier modes from the simulation. After each removal, the small-scale field was then no longer saturated and was thus allowed to grow and regain old strength, while the large-scale field grew to larger strength than before. This continued with each removal step. While the idea is simple and convincing, there is as yet no conclusive demonstration that this also works with actual magnetic helicity fluxes.
For assessing the role of magnetic helicity fluxes, the decisive equation is that for the magnetic helicity of the fluctuating field, a · b. The fluctuating field can be determined from the equation for the mean field, which, under the Weyl gauge, can be written as where we recall that E ≡ u × b is the mean electromotive force. This expression results in the following equation for the magnetic helicity of the mean magnetic field: where F m is the magnetic helicity flux for the mean field. The equation for a · b must also have a corresponding E term, −2E · B, ∂ ∂t so that the sum of both equations yields Equation 12. Here, F f is the magnetic helicity flux for the fluctuating field.
In the steady state, there are three terms on the right hand side, 2E · B, 2ηµ 0 j · b, and ∇ · F f .
Simulations by Del Sordo et al. (2013) and Rincon (2021) showed that only at magnetic Reynolds numbers of the order of 1000, the helicity flux divergence begins to become more important than the resistive terms; see Figure 5. Both works showed the presence of turbulent diffusive magnetic helicity fluxes in the simulations. Those fluxes were found to be proportional to the negative gradient of the local magnetic helicity density. In the work of Del Sordo et al. (2013), there was also a galactic wind contributing to an advective magnetic helicity flux proportional to the wind speed. One could expect the saturation behavior to become independent of Re M . However, simulations still show that B

Parameterization of the mean electromotive force
The mean electromotive force, E, in Equation 15 can be expressed in terms of the mean magnetic field as where the asterisks denote a convolution over space and time, and α i j and η i j k are integral kernels and x k is the kth component of the spatial coordinate, i.e., ∂B j /∂x k = B j ,k . For planar averages that depend on just one direction, we can write E i = α i j * B j − η i j * J j , where α i j and η i j would each only have four components. For the rest of this review, we restrict ourselves to this simpler case, but refer to the work of Warnecke et al. (2018) for a study in the context of 3-D convection in a sphere.

Convolution:
becomes a multiplication in Fourier space Most of the published literature ignores the fact that α i j and η i j are integral kernels, and approximates the convolution by a multiplication. This approximation then assumes a local connection between E and the mean fields. It ignores the effect of strong variations of the mean field in space and time. In Fourier space, the convolution in Equation 18 becomes a multiplication, so it describes the combined response of all Fourier modes. This becomes relevant below when measuring the mean-field coefficients for sinusoidal mean fields.

Mean-field coefficients
One of the major advances in mean-field dynamo theory is the development of numerical methods to avoid the limitations imposed by using analytic approaches. This concerns mainly the linearization of the evolution equations for the magnetic and velocity fluctuations in a turbulent flow.
To obtain expressions for α i j and η i j k , one has to solve the equations for the fluctuations u and b. The evolution equation for b is the most important one and is obtained by subtracting the evolution equation for B from that for B. The equations are nonlinear in the fluctuations. In analytic approaches, those nonlinear terms are often ignored, which is referred to as the second order correlation approximation, but this restriction is no longer required in the numerical evaluations of E ≡ u × b. This approximation is only valid when Re M 1, or when the correlation time τ cor is extremely short, i.e., when τ cor u rms k f 1. Neither of the two is relevant to astrophysics, so we focus here on a numerical, nonlinear approach, where no approximation is used.
When the linearization is abandoned, most of the changes in the coefficients α i j and η i j k are of quantitative nature, especially when the mean field is weak. There are a few examples where new effects emerge (turbulent pumping in the Galloway-Proctor flow, or the effect of kinetic helicity on the turbulent magnetic diffusivity, although those effects remain mainly of academic interest; (see Brandenburg 2018, for a review).

Methods for measuring α and other effects
One approach is to use a nonlinear simulation to obtain u and b in the presence of an additional imposed magnetic field. The resulting u × b can be related to B by ignoring η i j and J . This is referred to as the imposed-field method, but it can only be used when J vanishes, for example when the averages are zero-dimensional, i.e., volume averages.
Another approach is to relate u × b to the actual B and J by correlating them to each other and computing α i j and η i j as correlation coefficients. This approach has been applied both for the integral kernels in the nonlocal approach (Brandenburg & Sokoloff 2002, Bendre & Subramanian 2022  The most reliable method for calculating α i j and η i j is the test-field method (TFM), where one solves the equations for the fluctuations numerically for a sufficiently big set of test fields. In the following, we only describe its essence in a few words. A more detailed description can be found in the review of Brandenburg et al. (2010).

Using test fields
The TFM was originally applied by Schrinner et al. (2005Schrinner et al. ( , 2007 to determine the dependence of all transport coefficients in a sphere using longitudinal averages. In that case, one has 9 coefficients for α i j and 18 nonvanishing coefficients for rank three tensor η i j k in the representation E i = α i j B j + η i j k B j ,k . (The nine coefficients η i j φ do not enter the problem, because φ derivatives of φ averages vanish.) For systems in Cartesian coordinates, planar x y averages are often the most suitable; see Brandenburg (2005) and Brandenburg et al. (2008a,c) for the first applications. The number of relevant coefficients is then four for α i j , because only i , j = 1, 2 are relevant, and four for the rank two tensor η i j in the representation E i = α i j B j − η i j µ 0 J j , because there are only two nonvanishing components of B j ,k that can be expressed as the two components of the mean current density with µ 0 J x = −B y,z and µ 0 J y = B x,z . In that case, one can use four sinusoidal test fields (sin kz, 0, 0), (cos kz, 0, 0), as well as (0, sin kz, 0), (0, cos kz, 0).
In Figure 6 we reproduce results from the work of Gressel et al. (2008b), who performed simulations of dynamos from supernova-driven turbulence in a stratified portion of a galactic disk. Using the TFM, they found that η t increases away from the midplane and that this leads to turbulent pumping toward the midplane, which is given by γ ≈ −(τ/2)∇η t . The pumping velocity γ corresponds to off-diagonal components of the α tensor, which they confirmed. In particular, the pumping velocity in the z direction is given by γ z = (α φR − α Rφ )/2, where R (in the subscript) denotes the cylindrical radius. The pumping pushes the magnetic field toward the midplane and Dynamo coefficients from supernova-driven turbulence. Shown here are the off-diagonal components, α φR and −α Rφ , contributing to the pumping velocity γ z = (α φR − α Rφ )/2. The bottom panel shows the diagonal components of η i j , which are seen to increase away from the midplane. Courtesy Gressel et al. (2008b) thereby strengthens the dynamo . Surprisingly, this pumping is found to increase toward smaller scales (Gressel & Elstner 2020).

Nonlocality
It was soon realized that the results for α i j and η i j always depend on the wavenumber k. This is explained in the box "Evolution equation for nonlocality in space and time". For many turbulent flows, it was found that the components of both α i j and η i j decline with increasing values of k in a Laplacian fashion approximately like [1 + (ak/k f ) 2 ] −1 , where a is found to depend on details of the flow. In this relation, the value of the empirical coefficient a was found to vary between 0.1 and 0.5, depending on the nature of the turbulent flow (Brandenburg et al. 2008c, Rheinhardt & Brandenburg 2012. The significance of nonlocality is that the transport coefficients become effectively quenched when the mean field is of small scale, i.e., smaller than the integral scale of the turbulence. Especially near boundaries, where sharp boundary layers may occur in calculations that ignore nonlocality, the actual field would be smoother. In fact, sharp contrasting structures have been found in earlier galactic dynamo simulations (Moss 1996). Such results would need to be revisited in view of the importance of nonlocality effects.
Even more important than spatial nonlocality is temporal nonlocality. It is also referred to as memory effect, because it implies that the electromotive force depends not just on the magnetic field at the current time, but also on the field at earlier times. To leading order, the Fouriertransformed kernel of temporal nonlocality is proportional to (1 − iωτ) −1 , where τ is the turbulent turnover time. Thus, the electromotive force diminishes with increasing frequency ω, but there is also a new imaginary component that was absent otherwise. This can lead to new dynamo effects such as that responsible in the dynamos for the Roberts flows II and III; see the box box on "Dynamos from the memory effect". Whether those effects play a role in any turbulent dynamos is unclear, however.
Although the memory effect may not be strong enough to produce new dynamo effects in turbulent flows, it can be strong enough to produce significant phase shifts between the generation of magnetic field in galactic arm and interarm regions. This has been studied in detail by Shukurov (1998) and Chamandy et al. (2013). Including a memory effect in numerical simulations is, in gen-

Evolution equation for nonlocality in space and time
In Fourier space, the simplest empirical approximations to the spatial and temporal nonlocalities, as obtained with the test-field method, can be combined to a single expression, which reads Moving the denominator to the left-hand side, the equation becomes which, back in real space, becomes a simple evolution equation with a diffusion term on the right inside: This equation for the electromotive force is still only an approximation, because there are in general also larger powers of ω and k, but it provides a substantial improvement over the local formulations.

Dynamos from the memory effect
We emphasize, again, that dynamos from the memory effect are so far only known to occur for the Roberts flow, so the effect may be special. At this point, however, we can not exclude that it plays a role in galaxies, for example in connection with the strong vertical stratification leading to a pumping effect toward the midplane. With the tools now at hand, it is now easy to explain this effect.
The dispersion relation for a problem with turbulent pumping γ and turbulent magnetic diffusion η t is given by λ = −ikγ−η t k 2 . Since Reλ < 0, the solution can only decay, but it is oscillating with the frequency ω = Imλ = γ. In the presence of a memory effect, γ is replaced by γ/(1−iωτ), where τ is the memory time. Then, λ ≈ −ikγ (1−iωτ)−η t k 2 , and Reλ can be positive. This is the case for the Roberts flow discussed in Section 2.4. eral, very cumbersome, because it requires storing the full spatial form of the mean field for many earlier times in order to evaluate the convolution integral in Equation 18. In the present case, however, and to leading order, the convolution integral can be converted into an evolution equation for the electromotive force, which is computationally much easier to solve; see Equation 21. This approach was first proposed by Rheinhardt & Brandenburg (2012) and was applied to dynamos in spheres (Brandenburg & Chatterjee 2018). This formalism also reproduces the dynamo effect from a time delay for Roberts flows II and III; see Section 2.4, as was demonstrated by Rheinhardt et al. (2014). This is explained in the box "Dynamos from the memory effect".

Possibilities for seed magnetic fields
5.1.1. The need for sufficiently strong seed magnetic fields. In Section 2.1 we calculated an average of 70 revolutions in the Galaxy's lifetime. This is not very much, so we have to be concerned about possible effects on the strength and shape of the initial magnetic field. Typical estimates for the growth rate of the Galactic dynamo are of the order of Γ ≈ 2 Gyr −1 (Beck et al. 1996). This means that the mean magnetic field could be amplified by up to 12 orders of magnitude in about 14 Gyr. To reach the current level of the mean magnetic field of about 3 µG, we would need a seed magnetic field of about 10 −18 G. This is just about the level that can be expected from the Biermann battery mechanism (Rees 1987). The text box "Battery mechanisms" provides some more information about the Biermann battery and other mechanisms that can generate magnetic fields in an unmagnetized plasma.
Cosmic battery: A mechanism that can generate magnetic field even when there is none initially Even though the growth rate of a galactic large-scale dynamo may just be large enough for explaining the current level of the mean field of ≈ 3 µG at the present time, it would not be sufficient for explaining large-scale magnetic fields in very young (redshift z = 1) galaxies. Observationally, however, such fields are believed to exist. Kronberg et al. (1992) found evidence for strong magnetic fields in a z = 0.395 galaxy. In a more systematic search, Bernet et al. (2008) found strong RMs in quasar sightlines passing from z 1 galaxy halos. More recently, Mao et al. (2017) estimated a µG, kpc-coherent magnetic field in a lensing galaxy at z 0.46. The fact that the RMs of the lensed images are similar provides evidence for large-scale magnetic coherence.
To explain smaller-scale magnetic fields at equipartition levels of 3 µG would still require dynamo action, but that may just be a small-scale dynamo. Since the typical dynamo growth rates scale with the turbulence turnover time, which is shorter at small scales, a small-scale dynamo is a viable seed-field mechanism, as we discuss next. 5.1.2. Small-scale dynamos as a seed for the large-scale dynamo. All dynamos require seed magnetic fields -even the small-scale one. However, a small-scale dynamo grows much faster than a large-scale one. It would therefore be able to produce equipartition strength magnetic fields from much weaker ones. The idea has been discussed by Beck et al. (1994).
Another related idea is to produce galactic seed magnetic fields in the first stars. The simplest form of this idea is that stars could pick up a Biermann seed, which would then be amplified though a stellar dynamo and get ejected with a supernova explosion at the end of the star's life. This scenario has been explored in many cosmological simulations (Beck et al. 2013, Katz et al. 2019, Vazza et al. 2017, Martin-Alvarez et al. 2021, and shows that it can, in fact, magnetize galaxies very efficiently. However, these simulations use unrealistically high values for the supernova-injected magnetic field. Those fields could then well be large-scale ones, i.e., on the scale of stars, but those would grow on an even shorter time scale, because stars are much smaller than the envisaged turbulent eddies in the interstellar medium. Young stars and also their surrounding accretion disks can host powerful dynamos that also drive magnetized winds; see the estimates in Brandenburg (2000) and corresponding mean-field simulations by von Rekowski et al. (2003). Those winds could magnetize the surrounding interstellar medium and could well produce much more efficient seeds for the galactic dynamo than any battery mechanism. The wind-based injection model would be a viable alternative to the uncertain supernova seeding often used in cosmological simulations.

Battery versus plasma instabilities.
When the electron distribution is anisotropic and the magnetic field is not too weak, the Weibel instability can amplify the magnetic field, Typically, the

Battery mechanisms
The Biermann battery. When the density and the temperature gradient in a plasma are misaligned, the electrons move down the pressure gradient, generating an electromotive force that gives rise to a magnetic field. The resulting time derivative of the magnetic vector potential is then where n e and p e are the electron number density and pressure, c the speed of light, and q the electron charge.
The Durrive battery. Massive stars are surrounded by a region of ionized gas. Durrive & Langer (2015) proposed that an electromotive force should be created by the surplus momentum transferred to the electron after the ionization of an atom. Then, the uncurled induction equation for zero initial magnetic field becomes: whereṗ e is the rate of momentum transfer to the electrons and Equation 23 also includes the Biermann battery.
In the early Universe, the Biermann battery can appear from local fluctuations in the sound speed right after recombination (Naoz & Narayan 2013) and later, around rippled shocks, while both battery mechanisms should operate around ionization fronts (Subramanian et al. 1994, Kulsrud et al. 1997, Gnedin et al. 2000. Weibel instability generates very small-scale fields. Nevertheless, it could play a role in an intermediate regime when the Biermann battery has generated a sufficiently strong magnetic field. Interestingly, this is also in an agreement with recent laser plasma experiments that have been able to access a regime relevant to astrophysical dynamos (Schoeffler et al. 2016).

Weibel instability:
Occurs in a nearly homogeneous plasma when there is an anisotropy in velocity space (Weibel 1959) 5.1.4. Primordial seed magnetic fields. In the early Universe, inflation and phase transitions, such as the decoupling of the weak and electromagnetic forces, or the formation of hadrons from quarks may have produced hydromagnetic turbulence (Widrow 2002). Owing to the lack of further energy input, any magnetic field generated at that time would be slowly decaying. The dilution of the magnetic field due to the expansion of the Universe is always scaled out by talking about the comoving magnetic field, which isB = a 2 B, where a is the scale factor of the Universe. When time is being replaced by conformal time,t = dt /a(t ), the MHD equations, during the radiative era, have their usual form without expansion factors . In the following, the tildes are therefore dropped.
Not much is known about the strength of the comoving magnetic field today. There are only constraints. Upper limits can be derived from Big Bang nucleosynthesis (BBN) constraints; see Grasso & Rubinstein (1995) and Kahniashvili et al. (2022) for recent work taking into account the decay of the magnetic field between the moment of generation and the time of BBN. A lower limit on the present-day magnetic field strength has been proposed on the grounds that magnetic fields would prevent the reconnection of pair-created electrons and positrons when the TeV photons from powerful blazars interact with the extragalactic background light (e.g., Neronov & Vovk 2010). It should be noted, however, that the validity of this technique may have a systematic uncertainty in that plasma instabilities could potentially also provide an explanation for the non-observation of GeV halos (Broderick et al. 2012).
Simulations by Sironi & Giannios (2014), confirm that plasma instabilities do indeed operate, but they can only account for about 90% of the loss of GeV photons and the suppression of the remaining 10% would still need to be explained by the presence of magnetic fields. Similar conclusions were reached by Alves Batista et al. (2019), who performed detailed simulations for individual blazars.
The lower limits derived by Neronov & Vovk (2010), which become less stringent for larger length scales, provide an exciting motivation for primordial magnetogenesis scenarios. At the present time, those primordial magnetic fields may have strengths in the range of 10 −16 G to 10 −9 G (see Subramanian 2016, for a review), and could act as seed magnetic fields for any subsequent dynamo processes -once sufficient kinetic energy becomes available. These seeds, if confirmed, would not only be stronger than those from batteries, but they would also be present in the voids. Figure 7 shows the expected magnetic field ranges as a function of the typical scale λ B of the magnetic field. Here, the white solid lines describe the decay of a helical magnetic field (B 2 ∼ t −2/3 ) along with the increase of its typical length scale (λ B ∼ t 2/3 ), so that B 2 λ B = const. For a nonhelical magnetic field, there are still magnetic helicity fluctuations. They constrain the decay such that the correlation integral of the local magnetic helicity is conserved (Hosking & Schekochihin 2021). This leads to a decay with B 2 ∼ t −10/9 and λ B ∼ t 4/9 , so that B 4 λ 5 B = const (Hosking & Schekochihin 2022).
The first stars are expected to form about 10 8 yr after the Big Bang, marking the beginning of the reionization epoch. After that, galaxies start growing through continuous gas accretion and mergers (Dayal & Ferrara 2018). Since dynamo action is fastest at small length scales, the magnetic field generation during the formation of the first collapsing structures is potentially important and may have produced a stronger seed magnetic field for the subsequent global galactic dynamo. Strong magnetic fields may also affect galaxy and large-scale structure formation of the Universe (Kahniashvili et al. 2013). 5.1.5. Primordial fields during structure formation. Modern numerical simulations of cosmological large-structure formation are taking into account the evolution of the magnetic field, seeded by the various mechanisms outlined above. A central question in these studies is whether the topology and strength of these primordial fields leave measurable signatures on the cluster or galaxy structures. Vazza et al. (2017) performed a comprehensive suite of cosmological simulations using different magnetogenesis mechanisms: a uniform seed, meant to simulate the magnetic field created by inflation, a seed that follows the distribution of density perturbations to approximate the magnetic field generation by a Biermann battery, a seed that approximates the turbulent dynamo amplification, and an astrophysical seed that simulates the injection of magnetic fields by stellar sources. They find that, at z = 0, all mechanisms agree on the cluster magnetization (which they were designed to reproduce). However, there are large differences in the magnetic field structure both on galaxy scales and in the voids. Recently, Mtchedlidze et al. (2022) explored a more diverse set of primordial magnetic fields, including uniform and scale-invariant inflationary fields, as well as helical and non-helical fields from the radiation-dominated epoch. They also reported that the final magnetic field distribution retained a memory of the initial seed. This can be seen from Figure 8, where we show maps of Faraday rotation at the present time. The simulations started at a redshift of z = 60 with the four initial conditions discussed above.
The above works use a uniform spatial resolution, which offers the advantage of an unbiased view of cosmological magnetic field evolution. However, models with adaptive resolution can give a more detailed view of the magnetic field on galaxy scales, while following their cosmological history. One recent example is the work of Garaldi et al. (2021), who explored the evolution of cosmological volumes and zoom-ins using four different mechanisms for magnetic field generation: primordial, Biermann battery, Durrive battery, and stellar seeds. They report, contrary to the findings of the uniform-resolution, large-volume works mentioned above, that the initial conditions are forgotten by redshift z ∼ 2. However, none of their initial conditions contained magnetic helicity, which should not have decayed.  and Martin-Alvarez et al. (2020) focused on the effects of cosmological magnetic fields on galaxy formation. They found that fewer, smaller galaxies form for stronger primordial fields. As already mentioned in Section 2.1, there is a very interesting approach by Martin-Alvarez et al. (2021), who traced the evolution of the primordial field and the field injected by stellar sources separately (see Figure 3). They achieved this by adding two tracer induction equations to the code, one for each seed. These induction equations are not connected to the gas  evolution, but only follow the evolution of the two fields as it would be if they were independent of each other. They found that their evolved galaxies contain a mixture of both: metal-poor gas at the galaxy's outskirts containing mostly primordial fields with large-scale coherence and SN-enriched gas containing mostly fields of stellar origin, coherent on small scales. The cold, star-forming gas contains a mixture of the two. However, in agreement with the Garaldi et al. (2021) result, the origin of the galactic magnetic field becomes practically indistinguishable very early on without the tracers. All these simulations result in microgauss magnetic fields, but their length scales are typically too small to explain the fields seen in actual galaxies.
The results of these comprehensive simulations point to a complex picture in which various seeding mechanisms combine to give the initial and boundary conditions for dynamos on different scales and different epochs. Interestingly, they also point to cluster scales -rather than galaxy scales for an answer regarding the origin of cosmic magnetic fields. 5.1.6. Possible importance of cluster mergers. Mergers of galaxy clusters could amplify largescale magnetic fields quickly to near-equipartition strengths. The merger itself could stretch a preexisting field and amplify it in conjunction with the existing (possibly helical) background turbulence. One could then think of this as some kind of αΩ dynamo, where the Ω effect is associated with the large-scale shear generated during the merger. Such simulations were produced by Roettiger et al. (1999).
The study of the relevance of cluster mergers to dynamos has not been followed up in recent years. In the meantime, there have been many relevant advances in dynamo theory in connection with time dependence of the flow and in the context of measuring field transport coefficients. In view of these advances, this approach might deserve more detailed follow-up studies in the future. However, there are similarities with recent studies of gravitational collapse dynamos that will be discussed next.

Dynamos from gravitational collapse and other instabilities
By the time the first gravitationally bound structures (stars or galaxies) formed, any primordial turbulent velocities from the processes we mention in Section 5.1.4 had already decayed. However, the assembly into these first structures certainly generated large amounts of turbulent kinetic energy, which could have triggered dynamo action. A number of numerical works show that the formation of the first stars is ideal for amplifying nG (Sur et al. 2010, Federrath et al. 2011, or even just 10 −20 G (Schober et al. 2012) fields to equipartition values through a small-scale dynamo. Gravitational compression can amplify the field further, although in the presence of turbulence, the resulting dependence of the magnetic field on the density is weaker than the prediction from ideal flux freezing (Sur et al. 2012). While flux freezing predicts |B| ∝ ρ 2/3 , the theory of Xu & Lazarian (2020), which includes the turbulent dynamo, predicts that |B|/ρ 2/3 ∝ ρ 2/57−1/6 ≈ ρ −0.13 , where the scaling of the small-scale dynamo enters as an assumption. This remarkable agreement with the simulation results of Sur et al. (2012) is taken to be suggestive of the importance of reconnection diffusion and the breakdown of fluxfreezing (Xu & Lazarian 2020), which makes compressional amplification less efficient.
However, the results obtained so far still leave some questions unanswered. For example, is it possible to explain the slow-down of compressional field amplification even in the absence of dynamo action? Although this may be an academic question, it could be answered by performing collapse simulations in two dimensions, when dynamo action is impossible. Also, it would be interesting to see the early magnetic field growth starting from a much smaller initial magnetic field. In fact, the theory of Xu & Lazarian (2020) does not really address the question of when the dynamo is excited, but focusses on the discussion of the nonlinear regime of a supercritical dynamo. 5.2.1. Nature of collapse dynamos. An important tool for characterizing dynamo action in timedependent flows such as decaying turbulence or gravitational collapse, is to compare the work done against the Lorentz force with the Joule dissipation rate, and to look at different contributions to the Lorentz work term. These work and dissipation terms emerge when deriving the evolution equation for the magnetic energy density. Taking the dot product of Equation 4 with B, averaging, and ignoring surface terms, we obtain d dt

24.
Using J · (U × B) = −U · (J × B), the first term on the right-hand side of Equation 24 can be written as the work against the Lorentz force. Two further refinements can then be employed (Bran- The second term, W 3D L , vanishes for 2-D magnetic fields oriented in the plane and describes therefore the work term associated with 2-D compression, stretching, compression, and bending, such as in Equation 3. Second, one can decompose J × B into contributions from the magnetic pressure force, the tension force, and curvature force. The corresponding work terms are then referred to as W c L (for compression), W L (for tension force, i.e., along the field), and W ⊥ L (for the curvature force, i.e., perpendicular to Left: Visualization of the magnetic field. Right: Characteristic wavenumbers k ω (blue), k ω·u (red), k ∇·u (solid black), and k p∇·u (dotted black).
the field).
To determine the reality and nature of dynamo action during a turbulent self-gravitational collapse more carefully, Brandenburg & Ntormousi (2022) computed the aforementioned terms that enter the magnetic energy balance. The basic conclusion is that there is indeed dynamo action during the early phase of the collapse while the initial turbulence is slowly decaying, but that dynamo action diminishes when the flow becomes dominated by 3-D compression toward the various collapsing potential minima, where only the irrotational flow component gains in strength, which, however, does not (or not much) contribute to dynamo action in their simulations. In Figure 9 we show a visualization of the collapsing magnetic field from their simulation, the diminishing of the vorticity, expressed here as a wavenumber k ω = ω rms /u rms , the gain of compressive motions, here expressed through k ∇·u = (∇ · u) rms /u rms , along with several other quantities, k p∇·u = −〈p∇ · u〉/p 0 u rms and k ω·u = |〈ω · u〉|/u 2 rms , characterizing the work done by compression and the amount of kinetic helicity, respectively. A potential problem with the simulations of Brandenburg & Ntormousi (2022) is the relatively short collapse time compared with the turnover time of the turbulence.

Magneto-buoyancy and magneto-rotational instabilities.
These instabilities can drive turbulence and may play important roles in parts of the galaxy. Buoyancy may be driven by cosmic Magneto-rotational instability: arises in a magnetized, rotating disk when the angular velocity decreases with distance (Balbus & Hawley 1991). rays inflating flux tubes and are thought to speed up the dynamo (Parker 1992, Hanasz et al. 2013. The magneto-rotational instability can drive turbulence from the kinetic energy in the shear. It can play a role in the outer parts of the galaxy were supernova driving is less efficient (Piontek & Ostriker 2007). 6. GALACTIC MEAN-FIELD DYNAMOS 6.1. Global magnetic field structure 6.1.1. Early analytic approaches. The idea that the large-scale magnetic field of galaxies could be explained through an αΩ dynamo was formulated early on (Vainshtein & Ruzmaikin 1971, Parker 1971, just after the first successful mean-field models were proposed for the Sun and the Earth. An important early result was the finding that the most preferred magnetic field mode in flat ge-ometries like galaxies is quadrupolar, i.e., the toroidal field is even about the midplane. [Here and elsewhere, quadrupolar means not just a quadrupole, but all modes of even symmetry about the midplane (Krause & Rädler 1980).] In view of many early claimed discoveries of BSS fields (for a review, see Sofue et al. 1986), an important question in those early days concerned the possibility of preferred nonaxisymmetric magnetic fields. Such modes were never found. However, when the assumption of what is known as the pure αΩ approximation was made, i.e., the toroidal field is only generated by differential rotation (Ω effect) and the α effect is neglected in the generation of the toroidal magnetic field, spurious nonaxisymmetric modes where found. This approximation turned out to be not permissible, when the magnetic field is nonaxisymmetric.
6.1.2. Boundary conditions. Standard dynamo problems are usually formulated with vacuum boundary conditions, i.e., the magnetic field is current-free and extends to infinity outside the domain (Krause & Rädler 1980). However, such boundary conditions can only be formulated for spheres or ellipsoids, but not for cylinders, for example. Stix (1975) employed ellipsoidal coordinates and obtained an axisymmetric solution. Contrary to Parker (1971), he found that oscillatory solutions occur only at substantially larger dynamo numbers. Unfortunately, the implementation Dynamo number: where R ω and R α are mean-field magnetic Reynolds numbers associated with differential rotation and α-effect, respectively (Stix 1975) of ellipsoidal coordinates in a numerical code is rather cumbersome. This led to the approach of embedding the galaxy in a sufficiently large poorly conducting halo, which itself is then contained either in a cylinder with perfectly conducting boundaries (Elstner et al. 1990), or in a sphere with vacuum boundaries ). These two alternatives are rather different from each other, but the hope is that those boundaries are far enough away from the physical ones that those differences are without consequence.

Dynamo models for specific galaxies
Various attempts have been made to produce dynamo models of individual galaxies. One such example is M31, i.e., the Andromeda galaxy. Its magnetic field is often described as a ring field. It is also often regarded as an analog of the Milky Way. Corresponding models have been presented by Poezd et al. (1993) using nonlinear α quenching. An important challenge here is to reproduce the right pitch angle of the magnetic field and its radial dependence; see Shukurov (2000) and Fletcher et al. (2004) for detailed discussions.
Another interesting case is M81, whose magnetic field is known to be predominantly nonaxisymmetric. This was difficult to explain. Moss et al. (1993) showed however that such a field could result from an initial magnetic field that might have survived for long enough times, at least in the outer parts of the galaxy. Yet another very different case is NGC 6946, whose field may consist of what is called magnetic arms. Those are structures that are interlaced with the stellar arms, but could also be phase shifted relative to them; see Shukurov (1998) and Chamandy et al. (2015) for a more detailed discussion and references therein.
Finally, we mention the magnetic fields in the halos of the edge-on galaxies NGC 891 and NGC 4631. Brandenburg et al. (1993) and Elstner et al. (1995) found that the observed polarization vectors could only be reproduced when there is a strong enough outflow. We return to this in Section 6.5.

Galactic models with magnetic helicity flux
In Section 3.3 we have discussed the potential importance of magnetic helicity fluxes. It is often believed that they would be required to explain strong magnetic fields in galaxies. Here, we demon-

Figure 10
Left: Evolution of the energy of the mean magnetic field in a model with a shear-induced magnetic helicity flux for different values of Re M (here denoted by R m ). Adapted from Brandenburg & Subramanian (2005b). Right: Magnetic field evolution in models with advective magnetic helicity fluxes for Re M = 10 5 and different values strength of advection. The advection velocity is characterized by the parameters C U . Courtesy of Shukurov et al. (2006). strate the effect of magnetic helicity fluxes in specific models. Shukurov et al. (2006) have presented nonlinear models in a one-dimensional geometry using the magnetic helicity flux associated with a galactic fountain flow. The main nonlinearity was here given through the dynamical quenching formalism with advective magnetic helicity fluxes included, similarly to what was discussed in Section 3.3. The authors found that a magnetic helicity flux does indeed lead to larger magnetic field amplitudes provided the magnetic helicity flux is strong enough. In their model, the helicity flux was accomplished through a galactic fountain flow with a speed of at least 300 m s −1 . More detailed studies have been performed by Prasad & Mangalam (2016), who also included advective and diffusive magnetic helicity fluxes.
There is some uncertainty regarding the main contributors to the magnetic helicity flux; see the more recent study by Vishniac & Shapovalov (2014). In addition to advection, shear could modify the turbulent correlations in such a way as to transport magnetic helicity efficiently outward. This was first proposed by Vishniac & Cho (2001) and can lead to episodic magnetic field amplification, especially as Re M is increased; see Brandenburg & Subramanian (2005b) and the left-hand side of Figure 10. On the right-hand side of Figure 10, we reproduce the simulation result of Shukurov et al. (2006) with an advective magnetic helicity flux. In the models with insufficient advective flux, the magnetic energy decreases to very small values. The earlier simulations by Brandenburg & Subramanian (2005b), their Figure 7, with somewhat smaller values of the magnetic Reynolds number showed that the magnetic field can recover after some time, but then, again, it begins to fall off, just like what is seen in Figure 10. However, one may want to remain sceptical whether these fluxes do really alleviate the catastrophic quenching, because this has so far only been seen in mean-field models and not yet in actual turbulence simulations.

Rotation Measure signature of mean-field models
In Section 2.1 we mentioned the historical importance of RM studies for distinguishing between an ASS field, characteristic of dynamo models, and a BSS field, characteristic of a wound-up primordial fields. The subsequent findings of RM studies indicate that galactic magnetic field evolution might be more complex than this simple dichotomy.

Figure 11
Full-sky view of the Galactic magnetic field in (A) RM of extragalactic sources (Hutschenreuter et al. 2022, where the range of RMs is saturated at |RM| = 250 rad/m 2 ) and (B) synchrotron emission (Bennett et al. 2013).
At the time of the review of Sofue et al. (1986), the majority of galaxies were thought to be of BSS type; the authors listed seven out of 11 galaxies as having a BSS field. However, more accurate subsequent surveys confirmed a predominantly BSS type structure only for M81 (Krause et al. 1989). In a later review, Beck et al. (1996) listed the field structures for 33 galaxies. The picture became more complicated, with four examples primarily of ASS fields (albeit two where marked as uncertain). The dominance of ASS over BSS continues to persist even today. For M33, Tabatabaei et al. (2008) found an axisymmetric field in the inner regions and a superposition of axisymmetric and bisymmetric fields in the outer regions. Beck (2015b) observed a weak (0.5 µG) axisymmetric field in IC 342, and Beck et al. (2020) found a dominating ASS field in M31 combined with a six-times weaker BSS component.
Classifying the Milky Way's magnetic field structure is much harder. The existing parametric models of the Galactic magnetic field are largely based on full-sky RM maps of extragalactic sources (e.g., Oppermann et al. 2015, Hutschenreuter et al. 2022) and synchrotron emission maps of the Milky Way (mainly from the Wilkinson Microwave Anisotropy Probe; see Page et al. 2007, Bennett et al. 2013, see also Figure 11). The model of Sun et al. (2008) assumes an axisymmetric spiral with a reversal in the inner 5 kpc. Jansson & Farrar (2012) include magnetic spiral arms and an X-shaped field in the halo (see also the following section for the observational motivation). Jaffe et al. (2010) also fit magnetic spiral arms to the disk data, also including the random magnetic field component. Terral & Ferrière (2017), using analytic forms for the 3-D field, conclude that a bisymmetric (m = 1) halo field best fits the RM data. However, West et al. (2020) found evidence for an axisymmetric (m = 0) quadrupolar magnetic field with a small net vertical component in RM. A newer analysis (Dickey et al. 2022) shows that a combination of an axisymmetric and a bisymmetric mode, based on analytical galactic dynamo models from Henriksen et al. (2018), best explains the large-scale morphology of the Galactic RM data. As the quality of the observational data improves, a complex picture of galactic magnetic field morphology emerges, including that of the Milky Way.

Synchrotron emission from mean-field models
Synchrotron emission provides an important means of measuring the magnetic field in galaxies and comparing models with simulations (see Beck et al. 2019, for a review on bridging dynamo models and observations).
Early attempts of computing the polarized synchrotron emission from models were presented by Donner & Brandenburg (1990), who computed the linearly polarized emission from galactic mean-field models, which contained both axisymmetric and nonaxisymmetric magnetic fields. They confirmed the idea of distinguishing these modes by measuring the RM along a ring around the galaxy. Another example was the computation of linear polarization from the magnetic field on both sides of the midplane in edge-on galaxies. In galaxies seen edge-on, synchrotron emission reveals X-shaped halo magnetic fields (e.g., Golla & Hummel 1994, Tüllmann et al. 2000, Krause et al. 2006, Stein et al. 2019, Krause et al. 2020. Although the 3-D morphology of these fields is unknown, the X-shaped signature can be reproduced by dynamo models that include an outflow , Elstner et al. 1995. The resulting magnetic fields have a quadrupole symmetry both in the disk and the halo. An alternative would be a dynamo in the halo itself, which could produce dominant dipole modes (Brandenburg et al. 1992, Moss & Sokoloff 2008). The synchrotron intensity gives an indication about the magnetic field strength. It is proportional to the product of the density of relativistic cosmic ray electrons and a power close to 2 of the local magnetic field component perpendicular to the line of sight. However, the relativistic cosmic ray electron density may itself depend on the local magnetic energy density, because cosmic rays and magnetic fields have supernova explosions as a common source of energy. These arguments have been reviewed by Seta & Beck (2019), who also compare with numerical simulations of cosmic ray confinement by a local dynamo-generated magnetic field, similar to what was done earlier by Snodin et al. (2006). Seta & Beck (2019) conclude that the commonly made assumption of an equipartition between cosmic ray and magnetic energy densities is not valid on scales smaller than at least 100 pc. They argue that earlier estimates based on the equipartition assumption may have overestimated the actual magnetic field by a factor of about 1.5.
An interesting comparison between radio synchrotron and dust polarization in emission can be found in Borlaff et al. (2021) for M51. They find that the magnetic pitch angles of the two tracers differ, with the dust polarization showing a more tightly wound spiral than the radio. In light of this and forthcoming comparisons, predictions from dynamo models should take into account the multi-phase nature of the ISM.

E and B polarizations
The linear polarization described by Stokes Q and U can also be expressed in terms of the rotationally invariant parity-even E polarization and the parity-odd B polarization, as is commonly done in cosmology (Seljak & Zaldarriaga 1997, Kamionkowski et al. 1997. Here, the symbols E and B have nothing to do with electric and magnetic fields, except that both can qualitatively be described as gradient-like and curl-like fields. It is important to stress, however, that E and B are only defined on a 2-D surface. Therefore, the parity-odd B polarization has no immediate correspondence with the helicity of the underlying magnetic field. Mathematically, E and B are obtained as the real and imaginary parts of a quantity R(θ, φ) with andR m are coefficients that have been computed as with 2 Y m (θ, φ) being the spin-2 spherical harmonics and the asterisk denoting the complex conjugate.

Figure 12
Left: Galactic B mode polarization. Right: longitudinally averaged B mode polarization. Here, θ and φ are Galactic colatitude (= 90 • − latitude) and longitude.  Brandenburg & Brüggen (2020) found that the B polarization averaged over Galactic longitude is very small owing to longitudinal cancelation, but there is a small net hemispheric antisymmetry. This is shown in Figure 12, where we plot the Galactic B mode polarization together with the longitudinally averaged B mode polarization. It may be tempting to associate this hemispheric dependence with that anticipated for the α effect, which is also a parity-odd quality with hemispheric same change. However, it turned out that the observed hemispheric antisymmetry is actually explained by the spiral nature of the magnetic field. Looking toward northern and southern galactic latitudes yields mirror images of each other, which explains the observed hemispheric antisymmetry of the mean B .

Physical parameters of the ISM
The interstellar gas can be found in various phases, characterized by different temperatures, densities, and degrees of ionization. The neutral, atomic gas is found in a cold (50 K < T < 100 K) and a warm (10 3 K < T < 10 4 K) phase, usually referred to as the cold and warm neutral media (CNM and WNM, respectively). The ionized gas is also found in a hot (T 10 6 K) and a warm (T 10 4 K) phase (HIM and WIM, respectively). Finally, the densest and coldest (10 K < T < 20 K) gas is mostly molecular (MM), with a very low ionization fraction.
Dynamos can easily be excited in the interstellar medium, since all phases (apart from the MM) are characterized by large values of Re, Re M , and Pr M , although these vary greatly between phases; see Table 3, with order-of-magnitude values taken from Ferrière (2020) and Draine (2011). This vast range of parameters also poses a challenge for accurately modeling interstellar turbulence.
Most of the numerical work on ISM turbulent dynamos so far has been isothermal (e.g., Schekochihin et al. 2004, Seta et al. 2020. In an interesting extension, Seta & Federrath (2022) modelled a small-scale dynamo in driven turbulence simulations of a two-phase ISM and identified the processes responsible for vorticity generation in each phase. They found that the magnetic   Rieder & Teyssier (2016, 2017a, Ntormousi et al. (2020a) to turbulent kinetic energy ratio is lower in the cold phase. This will be discussed in more detail further below.

Numerical approaches
Including magnetic fields in simulations of astrophysical systems is a non-trivial task because the chosen discretization must obey the zero divergence constraint. In Eulerian codes, a commonly used approach is the Constrained Transport (CT) scheme (Evans & Hawley 1988), which ensures ∇ · B = 0 by defining the magnetic field components on cell faces. However, no similar scheme is applicable to Lagrangian codes such as Smoothed Particle Hydrodynamics (SPH), which rely on divergence-cleaning algorithms (e.g., Brackbill & Barnes 1980, Powell et al. 1999, Dedner et al. 2002. Lagrangian codes are particularly well-suited for modeling galaxies and cosmological volumes due to the natural adaptation of the resolution to areas of interest. They are also naturally Galileaninvariant. However, their dependence on divergence cleaning poses a significant drawback when modeling astrophysical dynamos. This was clearly demonstrated by Mocz et al. (2016), who compared CT and divergence cleaning approaches, both implemented on the moving-mesh code AREPO. They found that divergence cleaning systematically creates artifacts that mimic physical effects. Some of these artifacts are illustrated in Figure 13.
Out of these effects, particularly notorious for dynamo studies is an artificial increase of the magnetic energy when using scalar divergence-cleaning schemes, as pointed out by Balsara & Kim (2004) for supernova-driven turbulence. Another very relevant example of an artifact caused by divergence cleaning is the spontaneous production of magnetic helicity, which has been found by Brandenburg & Scannapieco (2020), who compared simulations that employed a divergence cleaning algorithm with one that advances instead the magnetic vector potential, A, so that B = ∇ × A is always divergence-free. They found that, for a helically driven flow in a periodic domain, spurious net magnetic helicity is generated on dynamical time scales. An interesting experiment by Tricco et al. (2016) compared an SPH code to the FLASH grid code, both using divergence cleaning, in simulations of turbulent dynamos. They found very good agreement between the codes, both in   Mocz et al. (2016), where the same disk is evolved with CT and a Powell-like divergence cleaning scheme. The winding pattern of the magnetic field is better captured with CT, while an artifact is formed at the center with divergence cleaning. the growth rates and the saturation level of the dynamo.
Yet another method of dealing with the ∇ · B = 0 constraint is to employ the Euler or Clebsch potentials. However, this method only works in the strictly ideal case when the microphysical magnetic diffusivity vanishes; see Section 2.2. As we have stressed there, even the addition of an almost negligibly small diffusivity in the evolution equations for the Euler potentials does not correspond to any physical magnetic diffusivity and leads to wrong results where no dynamo is possible -even for flows that are known to be either fast or slow dynamos (Brandenburg 2010b). Table 4 outlines some characteristics of the codes mentioned in this review. Next to each code we have mentioned the works cited in this review that use it. The fact that many of them have to rely on divergence cleaning methods is evidence of the difficulty in dealing with the divergence problem, but also a sign to use caution when interpreting the results in the context of dynamo action.

Local dynamo simulations of galaxy portions
Simulating the magnetic field evolution over an entire galactic disk is another challenging task, due to the vast range of dynamical scales of the problem and the large shearing velocities involved. One approach to this challenge that can successfully capture many aspects of the problem is simulating galaxy portions. The local approach has been rather successful in the context of accretion disks, where simulations have been performed in what is known as shearing boxes. This means that the radial boundary is "shearing-periodic", i.e., it is periodic with respect to an azimuthal position that shifts in time following the background shear flow.
Using a shearing box, Gressel et al. (2008a) performed the first simulation of a galactic dynamo, including supernova-induced turbulence. It was similar to earlier multiphase simulations of supernova-driven turbulence of Korpi et al. (1999), where the magnetic Reynolds number was still too low to permit dynamo action. Gressel et al. (2008a) found that the rotation frequency of the considered galaxy portion is the dominant factor in determining the dynamo efficiency, while  the supernova rate did not significantly affect the efficiency of the dynamo. This finding suggests that the simulations were able to capture large-scale dynamo action, but not small-scale dynamo action. Interestingly, they also found no evidence of catastrophic quenching in the range of Re M values explored by varying the rotation frequency of the galaxy portion. They hypothesize that this could be due to helicity fluxes. In a subsequent paper, Gressel et al. (2013) speculated about various quenching scenarios based on the magnetic field dependence, but that was just for one value of the microphysical magnetic diffusivity.
Using the PENCIL CODE and a similar setup, Gent et al. (2013) showed that the mean and fluctuating fields have different growth rates, indicating a co-existence of small-and large-scale dynamos. Theoretically, however, the possibility of large-scale and small-scale dynamos having different growth rates in one and the same system is not well understood (Subramanian & Brandenburg 2014).
Recently, Gent et al. (2021) sought to derive criteria for the appearance of a small-scale dynamo in simulations of interstellar turbulence. By not employing a shearing-box setup or stratification, they focused only on the effects of the supernova-driven turbulence. They confirm that, below a critical physical resistivity (i.e., a sufficiently high Re M ), a small-scale dynamo is easily excited by ISM turbulence, a result that appears to converge at resolutions below 1 pc. Seta & Federrath (2022) have shown that the multiphase aspect of the ISM tends to have a detrimental effect on the small-scale dynamo. This is mostly because of the stronger Lorentz force in the cold regions. Their simulations show that with solenoidal forcing, the magnetic field is mostly decoupled from the density behavior; see Figure 14. Simple compression along magnetic field lines (ρ 0 ), perpendicular to to magnetic field lines (b ∝ ρ 1/2 for cylindrical/filamentary geometry and b ∝ ρ 1 for disc-like/slab geometry), and spherical compression (b ∝ ρ 2/3 ) hardly occur. One might argue, however, that in the compressive case, the cold phase shows a higher slope than the warm phase.

Global isolated galaxy simulations
The increasing efficiency and complexity of numerical codes and the availability of resources have led to a number of works studying the magnetic field evolution in global galaxy models. In contrast to the shearing-box approach, such models more naturally allow for the study of the large-scale dynamo. However, the limited resolution is still problematic for simultaneously capturing the small-scale dynamo, as outlined above. Wang & Abel (2009) performed disk galaxy simulations including nG ordered seeds with a code similar to Enzo, using Dedner et al. (2002) divergence-cleaning. They found that the tiny seed was amplified to µG levels over 500 Myr. They also noticed that the magnetic field in the cold gas saturated first. Their setup did not include stellar feedback, so the amplification process was driven by differential rotation only.
In a series of papers, Rieder & Teyssier (2016, 2017a performed multi-component simulations of the magnetic field evolution in dwarf and Milky-Way-like galaxies using the RAMSES code and including supernova feedback. Their setup includes dark matter and stars as collisionless particles, coupled to an Adaptive Mesh Refinement (AMR) grid on which the MHD equations are solved. In the first paper of the series, the authors found signatures of small-scale dynamo amplification (Stellar) Feedback: The energy and momentum deposited to the ISM by stars through radiation, winds, and supernova explosions during intense feedback epochs, followed by a large-scale dynamo at later, more quiescent evolution times. In the second paper, they examined the saturation of the dynamo, which occurs at only a small fraction of the turbulent kinetic energy. They observed that, if the feedback efficiency is artificially lowered after saturation, the turbulence decays and the galaxy settles in a thin disk with an equipartition field. Finally, in Rieder & Teyssier (2017b) they studied the magnetic field evolution in a cosmological context.
Using a similar setup and separating the mean from the fluctuating component using a median filter, Ntormousi et al. (2020b) found large-scale dynamo action in a model of a massive spiral. However, their result was insensitive to the inclusion of supernova feedback. Since supernova feedback is considered an important driver of small-scale turbulence, this could mean that a small-scale dynamo was never captured in their models. This result is consistent with the Rieder & Teyssier (2016) results for the quiescent phase of galaxy evolution. However, as shown by Gent et al. (2021), the limited resolution of the simulation could be preventing the formation of a small-scale dynamo action in this quiescent phase. Pakmor et al. (2017) performed a suite of zoom-in cosmological simulations that includes 30 galaxies using the AREPO code (called the Auriga simulations). Similarly to Rieder & Teyssier (2017b), they reported an early exponential growth of the magnetic field, saturating at redshift z 2 − 3 at a few percent of the turbulent kinetic energy. Steinwandel et al. (2019) also claimed significant small-scale dynamo action in isolated galaxy models using an MHD version of the Gadget code. However, these simulations rely on the divergence-cleaning scheme that could suffer from the problems summarized in Section 7.2.
A very different approach was adopted by Rodrigues et al. (2019), who modeled galactic magnetic fields by post-processing cosmological simulation data. Specifically, they inserted galaxy parameters such as shear rate and turbulence into a parameter-fitting package that returns a suitable dynamo solution . Although this approach cannot capture the back-reaction of the magnetic field on the gas, it can give estimates on the cosmological conditions that favor mean-field dynamo action, which the authors find sets in around redshift z < 3.
While each numerical approach presents certain limitations, the tentative picture painted by global numerical simulations is that the small-scale and large-scale dynamos co-exist during galaxy evolution. Taking into account the large-scale gravitational collapse of the halo, as well as internal galactic processes such as star formation, appears to be fundamental for reconstructing the observed magnetic field evolution.
Currently, the problem of catastrophic quenching we discussed in Section 3.2 remains unexplored in global galaxy models. The reason is that physical resistivity and viscosity are usually not included, so that there is no easy estimate of the Re M range probed by each model. Exploring the effects of the inevitable numerical resistivity by performing resolution studies might also be insufficient to approach the physical solution, because the diffusion operator depends on resolution. Small-scale helicity fluxes, which could in principle appear self-consistently in these models, are not reported. It would be interesting to see how helicity fluxes emerge (or not) from different subgrid models in upcoming studies.

INTERACTION WITH THE CGM
It was already suggested in the previous sections that the galactic environment must play an important role in the behavior of the dynamo, because it defines the boundary conditions for its operation. The immediate environment of a galaxy is its halo, which contains large amounts of diffuse gas, and is usually referred to as the CGM.
The CGM is a powerful probe of galaxy evolution processes, because it contains traces of the cold (T < 10 5 K) and hot (T > 10 5 K) galactic inflows, as well as the hot (T 10 6 K), metal-enriched outflows from feedback events (Putman et al. 2012). The CGM also contains colder gas (T < 10 4 K) that can co-exist with these hotter phases for long periods of time. This observation has led to theories involving magnetic fields and cosmic rays in the dynamics of the CGM.
This cold gas was studied in the context of cosmological simulations by Nelson et al. (2020), who found small-scale cool (T < 10 4 K) structures in massive (M 10 13 − 10 13.5 M ) galaxy halos. In these simulations, the cloudlets are created by thermal instability, seeded by tidally stripped gas from in-falling halos. In many cases, these structures are dominated by magnetic pressure. However, it is not clear whether these properties would persist at higher resolution. In spite of the dominant magnetic pressure, an otherwise identical simulation of a massive halo with the magnetic field set to zero showed essentially no change in the distribution and morphology of these cloudlets.

Magnetization of the galaxy by inflows
The classical picture of gas accretion onto a galaxy halo predicts that the gas should shock and heat up to high temperatures (e.g. White & Rees 1978). However, cosmological simulations of galaxy formation (e.g., Dekel et al. 2009) showed that a high fraction of the in-flowing gas in high-redshift galaxies and present-day dwarfs is organized in cool (T 10 5 K) streams.
RM observations suggest that this gas carries a nG-level magnetic field (e.g., Carretti et al. 2022). These estimates are compatible with the predictions of cosmological magnetic field evolution models, which predict detectable intergalactic magnetic fields from the evolution of primordial seeds (e.g., Vazza et al. 2015Vazza et al. , 2017, see also Section 5.1.5). Then a primordial galaxy might receive a strong seed for its own magnetic field. However, at the time of this review, the possible effect of magnetized inflowing gas on the galactic dynamo remains unexplored. As we have seen in Section 6, some models invoke a large-scale dynamo in galactic halos to explain the observed X-shaped magnetic fields therein. If there is really large-scale dynamo action in the halo, it may be predominantly of dipolar parity (Sokoloff & Shukurov 1990). This can lead to an interaction and competition with the quadrupolar magnetic field in the disk. Brandenburg et al. (1992) found that, during certain time intervals, the RM of these models shows a doubly peaked azimuthal variation, which could be falsely interpreted as an indication of a bisymmetric field structure. The galactic halo may also act as a buffer for the dynamo in the disk to dispose of excess magnetic helicity.
Galaxy mergers are a particular form of inflow, which can influence the entire structure of the galaxy. As the galaxies approach each other, their star formation rate is enhanced and shocks form Figure 15 Adapted panel of Figure 3 from Whittingham et al. (2021), showing a galaxy re-arranging after a merger event. The selected panel shows the magnetic field strength face-on and edge-on. These simulations are part of the Auriga project  in their interstellar media. Both shocks and small-scale flows associated with feedback from young stars can strongly amplify the magnetic field. This highly nonlinear type of interaction requires numerical modeling.
Most numerical models of galaxy mergers with magnetization so far were done using Lagrangian codes, which have an obvious advantage in adapting their resolution in this setup. The first numerical simulation of a galaxy merger with magnetic fields was performed by Kotarba et al. (2010), who modeled the Antennae using an MHD version of the Gadget code that subtracts the Lorenz force associated with magnetic divergence. They confirmed the expected amplification of the magnetic field during the galaxy encounters. However, the amplification was also accompanied by a surge in numerical magnetic divergence. The subsequent cosmological merger models of Beck et al. (2012) suffered from the same issue. Whittingham et al. (2021) showed more sophisticated merger models, modeled in a cosmological context using the AREPO code. They found a significant impact of the magnetic field on the morphology of the remnant galaxy. Specifically, a comparison between MHD and hydro models showed the presence of extended disks and spiral structure in the magnetized mergers, as opposed to compact remnants with a ring morphology in unmagnetized mergers. Figure 15, taken from their work, shows the evolution of the galaxy postmerger.
One exception to the Lagrangian models is the work of Rodenbeck & Schleicher (2016), who performed a grid simulation of a galaxy merger, using a simplified model without stellar feedback or a collisionless component. They found that the enhancement of the magnetic field is particularly pronounced in the central regions of the galaxy.
In a recent study, van de Voort et al. (2021) performed direct galaxy evolution simulations while resolving the magnetized CGM, as part of the Auriga project. They found that, while the CGM remained a high-beta plasma, magnetic fields can noticeably change its structure around galaxies, indirectly affecting numerous galactic processes. For instance, galactic outflows become more collimated, resulting in less efficient mixing between enriched and un-enriched gas. Outflow speeds are also reduced in the presence of magnetization, which means that more metals remain in the halo with respect to the un-magnetized situation. The overall structure of the CGM is smoother, due to the additional magnetic pressure. Arámburo-García et al. (2021) studied the magnetization of halos by AGN and SN-driven outflows in the Illustris-TNG simulations. They found that both types of outflows contributed to the creation of over-magnetized bubbles, with the AGN-driven bubbles playing the dominant role.

The impact of the environment on the galactic dynamo
The interaction of the galaxy with the CGM can have a crucial impact on the development of a dynamo. The loss of helicity flux through a galactic wind or fountain can help avoid catastrophic quenching and sustain a dynamo for longer (see Section 3.3), eventually reaching higher values of the saturated field. However, winds can also interfere with the dynamo itself if they are acting within the dynamo-active region. On the other hand, a strong magnetic field can suppress the galactic outflow.
Whether we are considering inflows, outflows, or a galactic fountain, the galaxy is always embedded in a current system that will have an impact on the evolution of the dynamo. This is a non-trivial complication of the effective boundary conditions because the level of magnetization of the inflowing or outflowing gas is unknown, and the extent of these flows can be much larger than the virial radius of the galaxy.

CONCLUSIONS
After 70 years of inquiry into the possibility of dynamos in galaxies, several important questions can now be answered. First of all, in virtually all astrophysical settings, there is turbulence and this turbulence is always magnetized because of small-scale dynamo action. Dynamos also work in decaying and otherwise nonstationary turbulence and can produce equipartition-strength magnetic fields exponentially on a turbulent turnover time scale. This realization makes the question of cosmological seed magnetic fields for galaxies and galaxy clusters almost obsolete, because it would always be overpowered by small-scale dynamos that can operate very rapidly when the scales are sufficiently small. While primordial magnetic fields may still be present and interesting in their own rights, the simple idea of them being wound up to explain the bisymmetric spiral of nonaxisymmetric magnetic fields in some galaxies is essentially ruled out.
While global numerical simulations are now beginning to show the production of magnetic fields in galaxies, there remains a big uncertainty regarding the question of what actually produces large-scale dynamo action. Is it really the α effect or some other mechanisms at play? In this review, we have outlined several known mechanisms that could produce large-scale magnetic fields, but this question remains a major research topic in the years to come. One reason behind this is that the problem of catastrophic quenching is still not fully resolved. Low resolution simulations of relatively diffusive dynamos may have been promising in terms of field strength and structure, but have so far not survived the test of higher resolution. It will remain important to continue investigating this. At the same time, it is important to open ones mind and think about dynamos beyond just the