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. Idealized direct numerical simulations produce mean magnetic fields, whose saturation energy density tends to decline with increasing magnetic Reynolds number. This is still an unsolved problem. 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. Small-scale dynamos are important throughout a galaxy's life, and probably provide strong seed fields at early stages. 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 provide important insights into our understanding of 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 is still an unsolved problem. • 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. • Small-scale dynamos are important throughout a galaxy's life, and probably provide strong seed fields at early stages. • 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 provide important insights into our understanding of 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 book on the subject, and Shukurov & Subramanian (2022) for a recent one; hereafter SS22. 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 for other galaxies was later confirmed 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 Dynamos: convert kinetic energy into magnetic energy decades, attention has shifted 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 timescales for their generation too long for the simulations presented so far.
In this review, we focus on galactic dynamos and highlight 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 readers to the reviews by Beck (2001Beck ( , 2015a, Beck & Wielebinski (2013), and Han (2017), and the book by SS22. A review of astrophysical dynamos covering the era before 2005 is given by Brandenburg & Subramanian (2005a). The mathematics of small-scale turbulent dynamos is explained in the book by Zeldovich et al. (1990), and those in partially ionized plasmas are discussed by Xu & Lazarian (2021). We also recommend the reviews on ISM magnetic fields by Crutcher (2012), Hennebelle & Inutsuka (2019), and Pattle et al. (2022).
At the time of the review by 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 has been termed the α effect, which quantifies the Catastrophic quenching means: α → 0 as Re M → ∞, so it limits the large-scale field at large Re M component of the mean electromagnetic force in the direction of the mean magnetic field. 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. 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 explored. At the same time, there has been significant progress in performing realistic Magnetic helicity: Volume-integrated dot product of magnetic vector potential A and magnetic field B, A · BdV 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 Polar-Areas Stellar-Imaging in Polarization High-Accuracy Experiment (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, linear polarization is measured through the Stokes parameters I , Q, and U . Then the observed polarization angle χ is calculated from the expression χ = 1 2 arctan(U /Q) and the polarization fraction is p = Q 2 +U 2 /I .

Faraday Rotation.
When polarized radiation passes through an ionized magnetized medium, the plane of polarization is rotated by an angle ∆χ = RM λ 2 , where λ is the observed wavelength and RM = 0.81 D 0 n e B ∥ dl 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 microgauss (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 external 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 preexisting, large-scale field. This idea goes back to Piddington (1964) and Ôki et al. (1964), and is now commonly termed the 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, face-on, 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 BSS with an axisymmetric spiral (ASS), expected from mean-field dynamo theory. Figure 1 also sketches the expected ASS signature. Sketch of the rotation measure (RM) signature of a tilted galaxy with a ring, axisymmetric, or bisymmetric magnetic field. The inclination i is the angle between the z axis, indicated in the top left panel, and the line of sight. Only when i ̸ = 0 can one see the RM signature as sketched in the bottom panels.
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 DA z Dt = η∇ 2 A z , 1.
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, SS22). 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. Mean-field dynamo theory was originally developed in the solar context (Steenbeck & Krause 1969) and can predict both axisymmetric and nonaxisymmetric magnetic fields (Baryshnikova et al. 1987). 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 www.annualreviews.org • Galactic Dynamos   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. the midplane, i.e., the fields have quadrupolar symmetry -in contrast to the dipolar symmetry that is often found in spherical bodies such as the Earth.
While dynamo theory can also produce BSS-type fields (Krasheninnikova et al. 1989), 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).

Characteristic nondimensional numbers
Fluid and magnetic Reynolds numbers and their ratio, the magnetic Prandtl number, are defined as where u rms is the root-mean square velocity, ν 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 enters as another nondimensional number.

The need for magnetic diffusivity: the example of steady flows
The evolution of the magnetic field B is governed by the usual induction equation,

∂B ∂t
where U is the velocity and J = ∇ × B/µ 0 is the current density with µ 0 being the vacuum permeability. Equation 2 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 . Dynamos convert kinetic energy into magnetic energy through what is termed the dynamo instability. It occurs when the magnetic Reynolds number, Re M , exceeds a certain critical value (for the definition of Re M , see the text box titled "Characteristic nondimensional numbers"). 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: B(x, t ) = B λ (x) e λt , 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 Φ(x, t ) and Ψ(x, t ) obey (e.g., Rosswog & Price 2007),

3.
We see that in the special case of 2-D, this equation agrees with the advection-diffusion equation Equation 1, 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 2010). 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.
To understand the problem with the case η = 0, let us now discuss instead the limit η → 0. The tangling of a pre-existing magnetic field 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, amplificationsuggestive of dynamo action-both for decaying turbulence ) and for turbulent gravitational collapse (Sur et al. 2012, Xu & Lazarian 2020 has been reported, as is discussed 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, rather than by a dynamo. His speculation suggests that the existence of dynamos was far from being widely accepted at that time. The first rigorous examples of dynamos were presented by Herzenberg (1958) and Backus (1958). The former, consisting of two rotors (eddies) with an angle between their axes, 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. 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 derivatives. 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 2 takes the form

Early examples of dynamos
where η = const has been assumed. For α = const, 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 derivative 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 in Section 4.1: (i) α and η t become tensors and (ii) the multiplications become convolutions.
In the early 1970s, Roberts (1972) showed that several non-planar 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 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.

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), SB4.
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.
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.
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

4.
In Equation 4, η 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 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 , is 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 three 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 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 .
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.

Large-scale dynamos and averaging
As 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 spatio-temporal evolution. The most suitable type of averaging depends on the type of the mean magnetic field that can emerge in certain geometries and in certain parameter regimes; see Gent et al. (2013) and Hollins et al. (2022) for a discussion. For example, in the context of disk galaxies, the azimuthally averaged 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, as well as on time. This dependence may still involve rapid variability, which can easily lead to a confusing terminology when we want to split the magnetic field into mean fields 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 (SS22). 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 also depends on φ. This mean field could be understood as a low Fourier mode filtering.
However, then the average of the product of a mean and a fluctuation vanishes only approximately; see Zhou et al. (2018) for the related discussion on what is known as Reynolds rules for averaging.
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 is proportional to the pseudoscalar 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 www.annualreviews.org • Galactic Dynamos Small-scale' refers to possibility that a small-scale dynamo would operate together with a large-scale dynamo. 'Fast' refers to the possibility that the dynamo works in the limit η → 0, as discussed in Section 2.2.
shear, so there is an extra U × B term on the right-hand side of Equation SB2, 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. We do not know whether galactic dynamos are of αΩ type. Alternatives include the incoherent α-shear effect, but also the (magnetic) shear-current effect has been discussed Section 2.6.3; see Table 2 for a summary of the different types of 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. Roberts flow I 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, the dynamo is often oscillatory and can exhibit traveling wave solutions. In oblate bodies such as 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.

Pumping velocity γ:
is a contribution to the mean electromotive force given by the off-diagonal terms of the α tensor through The reason for the decoupling of the two magnetic field components in some examples is that the dynamo-active terms operate on each field component separately (i.e., ∂B x /∂t = −γ · ∇B x 1 The Galloway-Proctor flow (Galloway & Proctor 1992) is an example of a laminar flow that is fast. It is a Roberts flow with time-dependent phases in the trigonometric functions, which causes its streamlines to be chaotic.
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ωτ), where ω is the frequency and τ is the turnover time.
2.6.3. Rädler and shear-current effects. Early in the history of mean-field dynamo theory, Rädler (1969) found a novel large-scale dynamo effect for rotating, but unstratified bodies, whereby E has a 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 dynamo action. Shear is one such effect, which can also generate another large-scale dynamo, similar to the Rädler effect: 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. Another important class of large-scale dynamos 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, 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 an incoherent α effect and, in conjunction with shear, to large-scale dynamo action (Vishniac & Brandenburg 1997). An incoherent α effect can lead to a negative turbulent magnetic diffusivity (Kraichnan 1976). 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 shear 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
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 (Kazantsev 1968); see the detailed discussion by Schekochihin et al. (2004). The existence of small-scale dynamos under isotropic conditions im- Magnetic (red lines) and kinetic (blue lines) energy spectra during the kinematic (left) and nonlinear saturated (right) phases. Here, k ν = (ϵ K /ν 3 ) 1/4 with ϵ K being the dissipation rate. Note how the peak of E M (k) shifts to larger scales in the saturated case. Figure adapted from Run E of  plies that the concept of nonmagnetic Kolmogorov turbulence hardly exists in astrophysics, where the medium is usually always highly conducting.
2.7.1. Early work on the subject. 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η. In the saturated stage, the peak of the magnetic spectrum shifts closer to the forcing scale; see Figure 4. More recent work on small-scale dynamos is numerical, and is covered in detail in the following sections. (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 AND MAGNETIC HELICITY FLUXES
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. 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 for uniform magnetic fields
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 4, Cattaneo & Hughes (1996) found numerically that where B eq = µ 0 ρ 0 u rms is the equipartition field strength, whose energy density is equal to the kinetic energy density. 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, which is routinely seen during laboratory plasma relaxation (Ji et al. 1995). However, the dependence of α on Re M is a peculiar property of the magnetic helicity equation in the presence of an imposed 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, This agrees with the heuristic quenching for- 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 2 . This would mean that only the difference α − η t k m , not α itself, is quenched catastrophically.

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 timescale for reaching 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 5, the value of η is the microphysical value, which is extremely small in galaxies. This motivates the characterization as "catastrophically slow". The derivation of Equation 5 is based on just the magnetic helicity equation, i.e., no mean field theory was invoked; see the text box on the "Derivation of Equation 5". 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 large-

Derivation of Equation 5
In periodic domains, 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 where F = E × A + ϕB is the magnetic helicity flux density. (Note the analogy with the Poynting flux E × B/µ 0 of magnetic energy density.) The equations involving A and F depend on the gauge, i.e., on the form of ϕ, which can be chosen freely. One frequently adopts the Weyl gauge, ϕ = 0.
Next, we consider spatial averages B = ∇×A and J = ∇×B/µ 0 , along with the resulting fluctuations, a = A−A, b = B − B, and j = J − J , so, after averaging, Equation SB5 becomes ∂ ∂t where F m is the magnetic helicity flux for the mean field. Our analysis concerns only the phase when the smallscale dynamo has already saturated (for t > t sat ), so a · b is approximately constant in time. Assuming the field to be helical with negative helicity at small scales and positive at large scales, we have Inserting this into Equation SB6 and performing volume averaging over the whole domain, indicated by angle brackets, so that the flux divergence term vanishes, one obtains the solution of which for 〈b 2 〉 = const is given by Equation 5. scale 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 the preferential removal of small scale magnetic fields. In this experiment, 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 from simulations 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 Re M dependence of terms on the right-hand side of the small-scale magnetic helicity equation 8. Note that ∇ · F f becomes comparable to 2E · B and 2ηj · b only for Re M > 1000. Adapted from Del Sordo et al. (2013).
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: The equation for a · b must also have a corresponding E term, −2E · B, ∂ ∂t so that the sum of both equations yields Equation SB5. 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 the helicity flux divergence begins to become more important than the resistive terms only at Re M of the order of 1000 (see Figure 5). Both works showed the presence of turbulent diffusive magnetic helicity fluxes in the simulations. Those fluxes were 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 2 declines with increasing Re M . This could mean that Re M needs to be much larger than 1000, but probing this regime requires larger simulations. It remains then to be seen if future simulations with different setups can result in situations where 2ηµ 0 j · b does become clearly subdominant.

Parameterization of the mean electromotive force
The mean electromotive force, E, in Equation 6 can be expressed nonlocally 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 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 we refer the reader to Warnecke et al. (2018) for a study in the context of 3-D convection in a sphere.
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 9 becomes a multiplication, so it describes the combined response of all Fourier modes. This becomes relevant when measuring the mean-field coefficients for sinusoidal mean fields; see Section 4.4.
Convolution: an operation that becomes a multiplication in Fourier space

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 most important one is that for b and is obtained by subtracting the equation for B from that for B. The equations are nonlinear in the fluctuations. In analytic approaches, those nonlinear terms are often ignored (SS22), which is termed 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 is short (which is even for supernovadriven turbulence hardly the case). 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 qualitatively 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 (for a review, see Brandenburg 2018).

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 termed 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 Dynamo coefficients from supernova-driven turbulence. Shown here are the off-diagonal components, α φR (black line) and −α Rφ (gray line), contributing to the pumping velocity γ z = (α φR − α Rφ )/2. The mean flow velocity is also shown. Courtesy of Gressel et al. (2013) 2022) and the coefficients in the local version (Simard et al. 2016). The reliability of this approach is unclear and it has not yet been verified for the simple examples of the Roberts flow mean-field dynamos discussed in Section 2.4. This method is sometimes called the correlation method. The occurrence of unphysical results with this method (e.g., η t < 0) can sometimes be alleviated by using the singular value decomposition (Simard et al. 2016).
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) 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 portion of a stratified galactic disk. Using the TFM with the Nirvana code, 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 the subscript

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 where ℓ = O(1/k f ) and τ = O(1/u rms k f ). 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-hand side: 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.
R denotes cylindrical radius. The pumping, also termed turbulent diamagnetism (SS22), pushes the magnetic field toward the midplane and thereby strengthens the dynamo . Surprisingly, this pumping increases toward smaller scales (Gressel & Elstner 2020).

Nonlocality in space and time
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, the components of both α i j and η i j decline with increasing values of k in a Laplacian fashion approximately proportional to [1 + (ak/k f ) 2 ] −1 , where a depends on details of the flow. In this relation, the value of the empirical coefficient a varied between 0.1 and 0.5, depending on the nature of the turbulent flow (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 termed a 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 Fourier-transformed 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 turbulent dynamos is unclear.

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 the memory 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λ = kγ. 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.
Although the memory effect may not be strong enough to produce new dynamo effects in turbulent flows, it is strong enough to produce significant phase shifts between the generation of magnetic fields 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 general, 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 9. 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 SB10. 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
The conditions in the early Universe provide several possibilities for seeding galactic dynamos. The seeds could be primordial, which generally means that they were generated during inflation or phase transitions, or they could originate from a cosmic battery. Other theories also involve later seeding from astrophysical processes. We examine these possibilities in the following sections.
Cosmic battery: A mechanism that can generate magnetic field even when there is none initially 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 . 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.
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 be insufficient

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 SB12 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. Garaldi et al. (2021) performed cosmological simulations testing, among other scenarios, the efficiency of the Biermann and Durrive battery terms through cosmic time. They found that, although the two batteries behave similarly, the Durrive term produces systematically weaker magnetic fields by approximately three orders of magnitude.
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 small-scale ones. 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 seeds. 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 sce-nario has been explored in many cosmological simulations , 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 timescale, 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 (Weibel 1959) can amplify the magnetic field, Typically, the 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. This is also in an agreement with recent laser plasma experiments that have accessed 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 5.1.4. Primordial seed magnetic fields. In the early Universe, inflation and phase transitions, such as the decoupling of the weak force and the electromagnetic force 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 . Hereafter, 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). Note, 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 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. 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).

Primordial fields during structure formation. Modern numerical simulations of cosmolog-
ical 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 = 50 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 mentioned in Section 2.1, Martin-Alvarez et al. (2021), 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 supernova (SN)-enriched gas containing mostly fields of stellar origin with small-scales coherence. 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. 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.
Several 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 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 2 with B, averaging, and ignoring surface terms, we obtain d dt

10.
Using J · (U × B) = −U · (J × B), one can write the first term on the right-hand side of Equation 10 as the work against the Lorentz force. Two further refinements can then be employed (Brandenburg & Ntormousi 2022). First, one can decompose ( 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, and bending, such as in Equation 1. 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 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 visualize the collapsing magnetic field from Brandenburg & Ntormousi (2022), 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. rays inflating flux tubes and are thought to speed up the dynamo (Parker 1992, Hanasz et al. 2013). The magneto-rotational instability (Balbus & Hawley 1991) can drive turbulence from the kinetic energy in the shear. It can also 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 One of the strongest existing tests for dynamo theories is the predicted structure of the large-scale magnetic field contrasted to observations. In the next sections we outline the predictions from different models.
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 Earth. An important early result was the finding that the most preferred magnetic field mode in flat geometries 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,

ASS and BSS fields:
defined as m = 0 and m = 1 magnetic fields and vary with azimuth φ like e imφ . nonaxisymmetric modes where found to be excited, although the growth rates of the corresponding ASS fields were always larger; see Section 2.1. 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. 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 these boundaries are far enough away from the physical boundaries that these 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 possibly 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 structures usually termed magnetic arms. Magnetic arms are often interlaced with the stellar arms, but can also be phase-shifted relative to them; see Shukurov (1998) and Chamandy et al. (2015) for a more detailed discussion, and Beck et al. (2019) for recent updates.
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 demonstrate 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 mod-

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). ify the turbulent correlations in such a way as to transport magnetic helicity efficiently outward. First proposed by Vishniac & Cho (2001), this 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 about whether these fluxes really do alleviate the catastrophic quenching, because so far this has been seen only in mean-field models and not yet in actual turbulence simulations.

Galactic rotation measure signature
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.
At the time of the review of Sofue et al. (1986), most 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 for only 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 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). 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 Section 6.5 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 were thought to have quadrupolar symmetry also in the halo, but this now seems to be ruled out by new observations (Mora-Partiarroyo et al. 2019). An alternative would be a dynamo in the halo itself, which could produce dominant dipole modes (Brandenburg et al. 1992, Moss & Sokoloff 2008. At long radio wavelengths, the synchrotron emission from even just a uniform magnetic field suffers depolarization from the superposition of Faraday-rotated contributions. However, if the magnetic field is helical, the polarized intensity can either enhance the depolarization if helicity and RM have opposite signs, or it can cancel it if they have the same sign (Brandenburg & Stepanov 2014, Horellou & Fletcher 2014. This leads to a correlation between polarized intensity and RM (Volegova & Stepanov 2010), which has now been used by West et al. (2020) to characterize the Galactic magnetic helicity. Future observations with the Square Kilometre Array are expected to reveal much more detailed information on magnetic helicity using a continuous band of wavelengths (Beck et al. 2015).
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 make comparisons 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 ignoring the nonlinear dependence of the synchrotron emission on the plane-of-the sky magnetic field component can lead to an overestimation of the actual magnetic field by up to a factor of 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 sign change. However, 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 termed 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 medium (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. At large Pr M , the small-scale magnetic energy tends to dominate and the dynamo returns much of the magnetic energy back into kinetic energy (Brandenburg & Rempel 2019). However, no effect on the large-scale dynamo has been reported as yet.
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)   (2021), Brandenburg & Ntormousi (2022) 7 Rieder & Teyssier (2016, 2017a, Ntormousi et al. (2020) 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 to turbulent kinetic energy ratio is lower in the cold phase. This will be discussed in more detail in Section 7.3.

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 timescales. 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 the growth rates and the saturation level of the dynamo. This suggests that potential problems with divergence cleaning may not be severe.
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 in Section 2.2, the addition of an almost negligibly small diffusivity to 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 fast dynamos (Brandenburg 2010). 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 largescale 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. Rieder & Teyssier (2017b) 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. (2020) 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 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 set in at 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 ob-served 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 in upcoming studies how helicity fluxes emerge (or not) from different subgrid models.

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 include 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 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 galaxies 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 hydrodynamic 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, from their work, shows the evolution of the galaxy post-merger.
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.

Magnetization of the CGM by outflows
Galactic outflows are fundamental in any theory of galaxy evolution. In starburst and dwarf galaxies they are powered by stellar feedback (e.g., Zhang 2018), while a few galaxies host AGN-powered winds (Fabian 2012, Kormendy & Ho 2013, Martin 1998, Veilleux et al. 2005. Recent work has indicated that, in some cases, galactic winds can be driven by cosmic ray (CR) pressure (Hanasz et al. 2013, Girichidis et al. 2016). The material carried by these outflows can magnetize the CGM.
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 affects 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. 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 timescale. This realization makes the question of cosmological seed magnetic fields for galaxies and galaxy clusters almost obsolete, because they 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 so far they have not survived the test of higher resolution. It remains important to continue to investigate this. At the same time, it is important to open one's mind and think about dynamos beyond just the immediate proximity of a galaxy. The interaction with the CGM may be of crucial importance, and not all of the different processes, which are important, may qualify as a dynamo.