{'fraction_non_alphanumeric': 0.033068329792337744, 'fraction_numerical': 0.005859776574600782, 'mean_word_length': 4.558666666666666, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 13, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Thermodynamics of MHD flows with axial symmetry

We present strategies based upon extremization principles, in the case of the axisymmetric equations of magnetohydrodynamics (MHD). We study the equilibrium shape by using a minimum energy principle under the constraints of the MHD axisymmetric equations. We also propose a numerical algorithm based on a maximum energy dissipation principle to compute in a consistent way the equilibrium states. Then, we develop the statistical mechanics of such flows and recover the same equilibrium states giving a justification of the minimum energy principle. We find that fluctuations obey a Gaussian shape and we make the link between the conservation of the Casimirs on the coarse-grained scale and the process of energy dissipation.


I. INTRODUCTION
The recent success of two experimental fluid dynamos [1,2] has renewed the interest in the mechanism of dynamo saturation, and, thus, of equilibrium configurations in MHD. At the present time, there is no general theory to tackle this problem, besides dimensional theory. For example, in a conducting fluid with typical velocity V , density ρ , Reynolds number Re and magnetic Prandtl number P m, the typical level of magnetic field reached at saturation is necessarily [3]: where f is a priori an arbitrary function of Re and P m. Many numerical simulations [4] lead to f = 1, i.e. equipartition between the magnetic and turbulent energy. This is therefore often taken as a working tool in astrophysical or geophysical application. However, this result is far from applying to any saturated dynamo. Moreover, it does not give any information about possible anisotropy of the saturated field. It would therefore be interesting to build robust algorithms to derive the function f . By robust, we mean algorithm which depends on characteristic global quantities of the system (like total energy) but not necessarily on small-scale dissipation, or boundary conditions. An interesting candidate in this regards is provided by statistical mechanics. In the case of pure fluid mechanics, statistical mechanics has mainly been developed within the frame of Euler equation for a two-dimensional perfect fluid. Onsager [5] first used a Hamiltonian model of point vortices. Within this framework, turbulence is a state of negative temperature leading to the coalescence of vortices of same sign [6]. Further improvement were provided by Miller et al. [7] and Robert and Sommeria [8] who independently introduced a discretization of the vorticity in a certain number of levels to account for the continuous nature of vorticity. Using the maximum entropy formalism of statistical mechanics [9], it is then possible to give the shape of the (meta)-equilibrium solution of Euler's equation as well as the fine-grained fluctuations around it [10]. This is similar to Lynden-Bell's theory of violent relaxation [11] in stellar dynamics (see Chavanis [12] for a description of the analogy between 2D vortices and stellar systems). The predictive power of the statistical theory is however limited by the existence of an infinite number of constants (the Casimirs) which precludes the finding of an universal Gibbs state. In particular, the metaequilibrium state strongly depends on the details of the initial condition. In certain occasions, for instance when the flow is forced at small scales, it may be more relevant to fix a prior distribution of vorticity fluctuations instead of the Casimirs [13]. Then, the coarse-grained flow maximizes a "generalized" entropy functional determined by the prior distribution of vorticity [14]. The statistical mechanics of MHD flows has been recently explored by Jordan and Turkington [15] in 2D. In contrast with non-magnetized 2D hydrodynamics they obtained a universal Gaussian shape for the fluctuations. This comes from the fact that the conserved quantity in the MHD case is an integral quantity of the primitive velocity and magnetic fields and thus, in the continuum limit, has vanishing fluctuations.
The pure 2D situation however seldom applies to astrophysical or geophysical flows. In this respect, it is interesting to develop statistical mechanics of systems closer to natural situations, albeit sufficiently simple so that the already well tested recipes of statistical mechanics apply. These requirements are met by flows with axial symmetry. Most natural objects are rotating, selecting this peculiar symmetry. Moreover, upon shifting from 2D to axi-symmetric flows, one mainly shifts from a translation invariance along one axis, towards a rotation invariance along one axis. Apart from important physical consequences which need to be taken into account (for example conservation of angular momentum instead of vorticity or momentum, curvature terms), this induces a similarity between the two systems which enables a natural adaptation of the 2D case to the axisymmetric case. This is shown in the present paper, where we recover the Gaussian shape of the fluctuations and make the link between the conservation of the Casimirs on the coarse-grained scale and the process of energy dissipation.
In the first part of the paper, we study the equilibrium shape by using a minimum energy principle under the constraints of the MHD axisymmetric equations. We also propose a numerical algorithm based on a maximum energy dissipation principle to compute in a consistent way the equilibrium states. This is similar to the relaxation equation proposed by Chavanis [14] in 2D hydrodynamics to construct stable stationary solutions of the Euler equation by maximizing the production of a H-function. Then, we develop the statistical mechanics of such flows and recover these equilibrium states, thereby providing a physical justification for the minimum energy principle.

A. Equations and notations
Consider the ideal incompressible MHD equations: where U is the fluid velocity, P is the pressure, √ ρµ 0 B is the magnetic field and ρ is the (constant) fluid density. In the axisymmetric case we consider, it is convenient to introduce the poloidal/toroidal decomposition for the fields U and B: where A = A p + A e θ is the potential vector. This decomposition will be used in our statistical mechanics approach.
When considering energy methods, we shall introduce alternate fields, built upon the poloidal and toroidal decomposition. They are : σ u = rU , σ b = rA, ξ u = ω/r and ξ b = B/r, where ω is the toroidal part of the vorticity field. In these variables, the ideal incompressible MHD equations (2) become, in the axisymmetric approximation, a set of four scalar equations: where the fields are function of the axial coordinate z and the modified radial coordinate y = r 2 /2 and ψ is a stream function: U p = ∇ × (ψ/r e θ ). We have introduced a Poisson Bracket: {f, g} = ∂ y f ∂ z g − ∂ z f ∂ y g. We also defined a pseudo Laplacian in the new coordinates: Following [15], we will make an intensive use of the operators (for more details, see appendix ): curl which gives the toroidal part of the curl of any vector and Curl which takes a toroidal field as argument and returns the poloidal part of the curl. If j = curlB is the toroidal part of the current and ψ = r Curl −1 (U p ), the following relations hold: Under the shape (4), the ideal axisymmetric MHD equation of motion lead to the immediate identification of σ b = rA as a conserved quantity associated to axial symmetry. This quantity is only advected by the velocity field and thus should play a special role regarding the global conserved quantities, as we now show.

General case
The whole set of conservation laws of the axisymmetric ideal MHD equations have been derived by Woltjer [16]: where C, N , F and G are arbitrary functions. One can check that these integrals are indeed constants of motion by using (4) and the following boundary conditions: σ b = σ u = ξ u = ξ b = 0 on the frontier of the domain. To prove the constancy of the third integral, one has to suppose that F (0) = 0. The interpretation of these integrals of motion is easier when considering a special case, introduced by Chandrasekhar [17].

Chandrasekhar model
The conservation laws take a simpler shape when one considers only linear and quadratic conservation laws, such that [17] The case F (σ b ) = 1 is forbidden by the condition that F should vanish at the origin. In that case, the set of conserved quantities can be split in two families. The first one is made-up with conserved quantities of the ideal MHD system, irrespectively of the geometry: where H m is the magnetic helicity, H c is the cross-helicity and E is the total energy. Note that due to the Lorentz force, the kinetic helicity is not conserved, unlike in the pure hydrodynamical case. The other family of conserved quantities is made of the particular integrals of motion which appear due to axisymmetry: Apart from L ′ the angular momentum, it is difficult to give the other quantities any physical interpretation. The class of invariant I are called the Casimirs of the system (if one defines a non canonical bracket for the Hamiltonian system, they commute, in the bracket sense, will all other functionals). The conservation laws found by Woltjer are then generalization of these quantities.
C. Dynamical stability

General case
Following [16], we show that the extremization of energy at fixed I, H m , H c and L determines the general form of stationary solutions of the MHD equations. We argue that the solutions that minimize the energy are nonlinearly dynamically stable for the inviscid equations.
To make the minimization, we first note that each integral is equivalent to an infinite set of constraints. Following Woltjer, we shall introduce a complete set of functions and label these functions and the corresponding integrals with an index n. Then, introducing Lagrange multipliers for each constraint, to first order, the variational problem takes the form: Taking the variations on σ b , ξ b , σ u and ξ u , we find: and similar notations for the other functions. This is the general solution of the incompressible axisymmetric ideal MHD problem [16]. In the general case, it is possible to express the three field σ u , ξ u and ξ b in terms of σ b . Then the first equation of the above system leads a partial differential equation for σ b to be solved to find the equilibrium distribution. Note that the extremization of the "free energy" J = E + αI + µ m H m + µ c H c + γL yields the same equations as (12). Differences will appear on the second order variations (see below).

Chandrasekhar model
In the Chandrasekhar model, the arbitrary functions are at most linear functions of Thus the stationary profile in the Chandrasekhar model is given by: From the previous equations, we obtain where σ b is given by the differential equation: These expressions can be used to prove that these fields are stationary solutions of the axisymmetric MHD equations. We now turn to the stability problem. Since the free energy J = E + αI + µ m H m + µ c H c + γL is conserved by the ideal dynamics, a minimum of J will be nonlinearly dynamically stable (at least in the formal sense of Holm et al. [18]). Note that this implication is not trivial because the system under study is dimensionally infinite. We will admit that their analysis can be generalized to the axisymmetric case. Since the integrals which appear in the free energy are conserved individually, a minimum of energy at fixed other constraints also determines a nonlinearly dynamically stable stationary solution of the MHD equations. This second stability criterion is stronger than the first (it includes it). We shall not prove these results, nor write the second order variations, here.
D. Numerical algorithm

General case
It is usually difficult to solve directly the system of equations (14)- (15) and make sure that they yield a stable stationary solution of the MHD equations. Instead, we shall propose a set of relaxation equations which minimize the energy while conserving any other integral of motion. This permits to construct solutions of the system (14)- (15) which are energy minima and respect the other constraints. A physical justification of this precedure linked to the dissipation of energy will be given in Sec. III C 1.
Our relaxation equations can be written under the generic form where σ stands for σ b , ξ b , σ u or ξ u . Using straightforward integration by parts, we then get: To construct the optimal currents, we rely on a procedure of maximization of the rate of dissipation of energyĖ very similar to the procedure of maximum entropy production principle (MEPP) of Robert and Sommeria [21] in the 2D turbulence case. This is equivalent to say that the evolution towards the equilibrium state (14)-(15) is very rapid. We thus try to maximizeĖ given the conservation ofİ,Ḣ m ,Ḣ c andL. Such maximization can only have solution for bounded currents (if not, the fastest evolution is for infinite currents). Therefore, we also impose a bound on J 2 σ where, as before, σ stands for σ b , ξ b , σ u , ξ u . Writing the variational problem under the form and taking variations on J σ b , J ξ b , J σu , J ξu , we obtain the optimal currents. Inserting their expressions in the relaxation equations (16), we get: where we have set F (σ b , t) = +∞ n=0 µ  and solving the resulting set of algebraic equations. Using the expression of the optimal currents and the condition thatİ =Ḣ m =Ḣ c =L = 0, we can show that: provided that the diffusion currents D ξu , D σ b ,D σu and D ξ b are positive. Thus, the energy decreases until all the currents vanish. In that case, we obtain the static equations (12). In addition, this numerical algorithm guarantees that only energy minima (not maxima or saddle points) are reached. Note that if we fix the Lagrange multipliers instead of the constraints, the foregoing relaxation equations lead to a stationary state which minimizes the free energy J. Then, as stated above, the constructed solutions will be nonlinearly dynamical stable solution of the MHD set of equations. However, not allowing the Lagrange multiplier to depend on time, we may "miss" some stable solutions of the problem. Indeed, we know that minima of the free energy are nonlinearly stable solutions of the problem but we do not know if they are the only ones: some solutions can be minima of E at fixed I, H m , H c and L while they are not minima of J = E + αI + µ m H m + µ c H c + γL.

Chandrasekhar model
In the Chandrasekhar model (with µ ′ m = γ ′ = 0), the previous equations can be simplified. The equilibrium solution does not depend on the particular value of the diffusion coefficients (these are only multiplicative factors of the optimal currents) and for simplicity, we set D ξu = D σ b = D σu = D ξ b = 1. The relaxation equations then reduce to: where the Lagrange multipliers evolve in time so as to conserve the constraints (17). These equations are the MHD counterpart of the relaxation equations proposed by Chavanis [14] for 2D hydrodynamical flows described by the Euler equation. In this context, a stable stationary solution of the Euler equation maximizes a H-function (playing the role of a generalized entropy) at fixed energy and circulation. A justification of this procedure, linked to the increase of H-functions on the coarse-grained scale, will be further discussed in Sec. IV and compared with the MHD case.
If we set the velocity field to zero (σ u = ξ u = 0), we get a system of equations linking the poloidal part (σ b ) and the toroidal part (ξ b ) of the magnetic field. It is fairly easy to see that the coupling between the two quantities is proportional to µ m the Lagrange multiplier associated to the conservation of magnetic helicity. This is reminiscent of the α effect of dynamo theory (see Steenbeck et al. [19]): in the "kinematic approximation" where the effect of the Lorentz force is removed, the coupling between the toroidal and poloidal part of the magnetic field is given by a coefficient proportional to the kinetic helicity of the fluctuating velocity field. Our model is not able to recover this fact because, as noticed above, this quantity is not conserved in the full MHD case. However, taking into account the retroaction of the magnetic field on the velocity field, Pouquet et al. [20] were able to write the non-linear α-effect as a difference between the kinetic and the magnetic helicity of the fluctuations: α = H k − H m . Our relaxation equations therefore recover the fact that the approach to saturation of the magnetic field is mainly monitored by the magnetic helicity.

III. STATISTICAL MECHANICS OF AXISYMMETRIC FLOWS
In the previous section, we obtained general equilibrium velocity and magnetic field profiles through minimization of the energy under constraints. In the present section, we derive velocity and magnetic field distribution using a thermodynamical approach, based upon a statistical mechanics of axisymmetric MHD flows. As we later check, the distribution we find are such that their mean fields obey the equilibrium profiles found by energy minimization. For simplicity, we focus here on the Chandrasekhar model.

A. Definitions and formalism
Following [7], [8] and [15], we introduce a coarse-graining procedure through the consideration of a length-scale under which the details of the fields are irrelevant. The microstates are defined in terms of all the microscopic possible fields u(x) and b(x). On this phase space, we define the probability density ρ(r, u, b) of a given microstate. The macrostates are then defined in terms of fields observed on the coarse-grained scale. The mean field (denoted by a bar) is determined by the following relations: We introduce the mixing entropy which has the form of Shanon's entropy in information theory [22] [9]. The most probable states are the field U and B which maximize the entropy subject to the constraints. The mathematical ground for such a procedure is that an overwhelming majority of all the possible microstates with the correct values for the constants of motion will be close to this state (see [8] for a precise definition of the neighborhood of a macrostate and the proof of this concentration property). Note that this approach gives not only the coarse-grained field (U, B) but also the fluctuations around it through the distribution ρ(r, u, b).
Each conserved quantity has a numerical value which can be calculated given the initial condition, or from the detailed knowledge of the fine-grained fields. The integrals calculated with the coarse-grained quantities are not necessarily conserved because part of the integral of motion can go into fine-grained fluctuations (as we shall see, this is the case for the energy in MHD flows). This induces a distinction between two classes of conserved quantities, according to their behavior through coarse-graining. Those which are not affected are called robust, whereas the other one are called fragiles.

B. Constraints
In this section, it is convenient to come back to the original velocity and magnetic fields. The constraints are the coarse-grained values of the conserved quantities (9). The key-point, as noted by [15], is that the quantity coming from a spatial integration of one of the field u or b, is smooth. In our case, it amounts to neglecting the fluctuations of A which is spatially integrated from B and write A =Ā. Thus, the coarse-grained values of the conserved quantity are given by: The constraintĪ is the Casimir, connected to the conservation of σ b along the motions. In the present case, it is a robust quantity as it is conserved on the coarse-grained scale. As stated previously, the quantitiesH m ,H c andĒ are the mean values of the usual quadratic invariants of ideal MHD, namely the magnetic helicity, the cross-helicity and the energy. On the contrary, the quantitiesH ′ m ,L andL ′ are specific to axisymmetric systems. Because these last three conservation laws are usually disregarded in classical MHD theory, it is interesting in the sequel to separate the study in two cases, according to which the conservation ofH ′ m ,L andL ′ is physically relevant ("rotating case") or is not physically relevant ("classical case").
C. Gibbs state

Classical case
The MHD equations develop a mixing process leading to a metaequilibrium state on the coarse-grained scale. It is obtained by maximizing the mixing entropy S[ρ] with respect to the distribution ρ at fixedĪ,H m ,H c andĒ (we omit the bars in the following). We have: The variation of the magnetic helicity and the Casimirs is more tedious because they involve the coarse-grained field A. For the magnetic helicity, we have: Now, using an integration by parts, it is straightforward to show that δA B dx = δB P · A P dx .
Therefore, δH m = 2 (δB P ·Ā P +Ā δB) dx = 2 Ā · δB dx (29) Regarding the variation of the Casimirs, we find: or Writing the variational principle in the form we find that It is appropriate to write u =Ū + u ′ and b =B + b ′ where the first term denotes the coarse-grained field. Then, the equation (33) can be rewritten Hence the fluctuations are Gaussian: where we defined a 6-dimensionnal vector: . The mean-field is given by: Taking the curl of these relations and using curlB P = j, curlU P = ω and curlA P = B, we recover the equilibrium distribution (13) with γ = γ ′ = µ ′ m = µ ′ c = 0. Therefore, in this classical case, the equilibrium profiles are such that mean velocity and mean magnetic field are aligned. This is a well known feature of turbulent MHD, which has been observed in the solar wind (where v ≈ ±B). It has been linked with a principle of minimum energy at constant cross-helicity (see chapter 7.3 of [24] and references therein). This feature is also present in numericals simulation of decaying 2D MHD turbulence, where the current and the vorticity are seen to be very much equal [25]. This can therefore be seen as the mere outcome of conservation of quadratic integral of motions, and may provide an interesting general rule about dynamo saturation in systems where these quadratic constraints are dominant.
Using the Gaussian shape for the fluctuations, it is quite easy to derive the mean properties of the fluctuations. To do so, we will make use of the following standard results [23]: Then, it is easy to show that part of the energy is going into the fluctuations and that there is equipartition between the fluctuating parts of the magnetic energy and of the kinetic energy: One can also calculate the quantity of cross helicity going into the fluctuations: One should notice that there is no net magnetic helicity in the fluctuations because of the fact that A is strictly conserved. Then, the fractions of magnetic energy, cross helicity and kinetic energy going into the fluctuations are: where M = B 2 dx is the magnetic energy of the coarsed-grained field. The first equation shows that there is an equal fraction of magnetic energy and cross helicity which goes in the fluctuations and the positivity of the magnetic energy requires: β 2 > µ 2 c . Using this inequality and the second line, we can show that the fraction of kinetic energy going into the fluctuations is then bigger than that of the magnetic energy and cross helicity. This may gives some mathematical ground to the energy minimization procedure we used in section II C.

Rotating case
The situation is changed when the other constant of motion are taken into account. We have: δL ′ = ur δρ dxdudb .
On the other hand, Adding Lagrange multipliers −µ ′ m , −γ and −γ ′ for H ′ m , L and L ′ respectively, we find that the expression (33) is multiplied by The distribution of fluctuations is then still Gaussian and given by (35) but now the mean-field equations are Taking the curl of the vectorial relations, we get the system (13). Therefore, in the pesent case taking into account additional constant of motions, the relation between the velocity and the magnetic field is not linear anymore. The linearity is only valid for the poloidal component. The toroidal component obeys: We can interprete U + γ ′ /βr as the relative velocity around a solid rotation Ω = −γ ′ /β. Indeed, γ ′ is the Lagrange multiplier for the angular momentum constraint. The non-trivial term responsible for the departure from linearity is −γAr 2 . Thus, the breaking of the proportionnality between the velocity and the magnetic field can be attributed to the conservation of the angular momentum in the Chandrasekhar model. This is an interesting feature because this conservation rule is likely to be more relevent in rapidly rotating objects. This may explain the dynamo saturation in rotating stars, where linearity between magnetic and velocity field is observed for slowly rotating stars and is broken for rotator faster than a certain limit (cf figure 1). However, the non-proportionnality between velocity and magnetic field can also be due to additional conserved quantities such as those considered by Woltjer [16].

IV. SUMMARY
We have developped a statistical theory of axisymetric MHD equations generalizing the 2D approach by [15]. We derived the velocity and magnetic field distribution, and computed the corresponding equilibrium profiles for the mean flow. Like in the 2D case, the fluctuations around the mean field are found Gaussian, an universal feature connected to the conservation of the Casimirs under the coarse-graining. The equilibrium profiles are characterized by an alignment of the velocity and magnetic field, which is broken when the angular momentum conservation is taken into account. The statistical equilibrium profiles are found to correspond to profiles obtained under minimization of energy subject to the constraints. Thus, in the MHD case, in the presence of a coarse-graining (or a small viscosity), the energy is dissipated while the Helicity, the angular momentum and the Casimirs are approximately conserved (hydromagnetic selective decay). In particular, E = 1 2 U 2 + B 2 dx = 1 2 (Ū 2 +B 2 )dx because part of energy goes into fine grained fluctuations E f luct = E − E m.f. . Therefore, the metaequilibrium state minimizes E at fixed I, H m , H c and L. This can be justified in the "classical case" (section III C 1) where we showed that the fraction of kinetic energy going into the fluctuating part of the fields was higher than that of the other quantities, namely the magnetic energy and the cross-helicity. The "rotating case" (section III C 2) requires more algebra and is left for further study.
In contrast, in the 2D hydrodynamical case, the Casimirs are fragile quantities (because they are expressed as function of the vorticity which is not an integral quantity as the magnetic potential is) and thus are altered by the coarse-graining procedure. This is true in particular for a special class of Casimirs H = − C(ω)dx, called H-functions, constructed with a convex function C such that C ′′ > 0. This leads to two very different behaviors of hydrodynamical turbulence compared to the hydromagnetic one. First, the H-functions calculated with the coarsegrained vorticity ω increase with time while the circulation and energy are approximately conserved (hydrodynamic selective decay). Thus, the metaequilibrium state maximizes one of the H-functions at fixed E and Γ. For example, Chavanis and Sommeria [10] showed that in the limit of strong mixing (or for gaussian fluctuations), the quantity to maximize is minus the enstrophy, giving some mathematical basis to an (inviscid) "minimum enstrophy principle". In this context, Γ 2 = ω 2 dx = ω 2 dx because part of enstrophy goes into fine-grained fluctuations Γ f luct =Γ 2 − Γ m.f.

.
However, for more general situations, the H-function that is maximized at metaequilibrium is non-universal and can take a wide diversity of forms as discussed by Chavanis [14]. Due to their resemblance with entropy functionals (they increase with time, one is maximum at metaequilibrium,...), and because they generally differ from the Boltzmann entropy S B = − ω ln ωdx, the H-functions are sometimes called "generalized entropies" [14]. From the statistical mechanics point of view, there is an infinite number of constraints (depending on the micro scale fields) to take into acccount when deriving the Gibbs state. Consequently, the shape of the fluctuations is not universal. This is why the H-function that is maximized at metaequilibrium is also non-universal. However, if the distribution of fluctuations is imposed by some external mechanism (e.g., a small-scale forcing) as suggested by Ellis et al. [13], the functional S[ω] is now a well-determined functional determined by the Gibbs state and the prior vorticity distribution [13,14].
Our computation can provide interesting insight regarding dynamo saturation. It is however limited by its neglect of dissipation and forcing mechanism. It would therefore be interesting to generalize this kind of approach to more realistic systems. In that case, the entropy might not be the relevent quantity anymore, but rather the turbulent transport, or the entropy production [26]. Setting A = Curl −1 B ′ and curlB = A ′ in the last identity, we get