The divergence-free condition in axisymmetric magnetohydrodynamic models

Axisymmetric magnetohydrodynamic (MHD) models are useful in studies of magnetized winds and non-linear Alfv´en waves in solar and stellar atmospheres. We demonstrate that a condition often used in these models for the determination of a nearly vertical magnetic ﬁeld is applicable to a radial ﬁeld instead. A general divergence-free condition in curvilinear coordinates is self-consistently derived and used to obtain the correct condition for the variation of a nearly vertical magnetic ﬁeld. The obtained general divergence-free condition along with the transﬁeld equation completes the set of MHD equations in curvilinear coordinates for axisymmetric motions and could be useful in studies of magnetized stellar winds and non-linear Alfv´en waves.

axisymmetric magnetic field is usually represented in terms of the field-stream function and the divergence-free condition is expressed in spherical or cylindrical coordinates.
In studies of time-dependent axisymmetric motions or Alfvén waves, a divergence-free condition in curvilinear coordinates is applied to field lines that remain close to the axis of symmetry. The condition was derived by Hollweg et al. (1982) and is based on general considerations of flux conservation. The aim of this letter is the derivation of a self-consistent divergence-free condition in curvilinear coordinates. The consequences and applications of the obtained result to some special cases are discussed. The derived condition is different from those used in previous studies that were based on general considerations of flux conservation.

E Q UAT I O N S
Consider the ideal MHD equations of mass continuity, momentum, and induction: The last equation represents the divergence-free condition for the magnetic field. In cylindrical coordinates, (r, ϕ, z), the axisymmetric motions are characterized by the condition ∂/∂ϕ = 0. To be consistent with Hollweg et al. (1982), we also assume time independence of B r and B z : ∂B r /∂t = ∂B z /∂t = 0. We also take the local curvilinear coordinates (a, ϕ, s), where s is the distance measured along the poloidal field line, a is the distance Figure 1. Distance s along a radial magnetic field and incremental increase along and across the poloidal field projected on to the radial, r, and symmetry, z, axes. perpendicular to the poloidal field line, and ϕ is the azimuthal angle measured around the rotation axis.
The magnetic field B may be decomposed either into cylindrical components, (B r , B ϕ , B z ), or into toroidal and poloidal components, (0, B ϕ , B s ), where B s denotes the poloidal field and there is no component in the transverse a direction. The same applies to the velocity. Contopoulos (1996) considered a more general case where the poloidal flow is not parallel to the poloidal magnetic field.
We introduce the directional derivatives that relate the two coordinate systems: along the poloidal field, and in the transverse direction. The equations of field lines, r = r(a, s), z = z(a, s), are obtained by solving where θ denotes the angle between the poloidal field and the symmetry axis (Fig. 1). The adopted approach leads to an interchange of the dependent and independent variables. A similar approach has been applied to static plasmas in a Cartesian geometry: Fiedler & Cally (1990) and Cally (1991) developed semi-inverse and fully inverse methods in which one or both Cartesian coordinates are dependent variables and are solved for as functions of a and s.

R E S U LT S
Using the relationships presented in the previous section, we derive the governing equations for the axisymmetric motions: ∂ ∂t Equations (9)-(12) have been derived by Hollweg et al. (1982). Using the directional derivatives (5), (6), and the angle θ between the poloidal field and the symmetry axis, we derive the following divergence-free condition: An additional transfield equation can be cast in the following form: The above equation expresses force balance in a direction perpendicular to the magnetic field and therefore represents a generalized Grad-Shafranov equation. It is equivalent to equation (21) in Okamoto (1975) and equation (7.41) in Mestel (2012). The transfield equation (14) determines the shape of the field lines as a result of the forces acting in the transverse direction. The field lines bend away or towards the symmetry axis depending on the sign of ∂θ/∂s. The solenoidal condition (13) and the balance of forces in the transverse direction (14) complete the set of the governing equations for axisymmetric motions in curvilinear coordinates.
The azimuthal part of the energy density represents the sum of the azimuthal kinetic and magnetic energy densities. It is given by The set of governing equations (9)-(12) can be combined to derive the following equation: where represents the azimuthal energy flux.

D I S C U S S I O N
Equations (9)-(12) were derived by Hollweg et al. (1982) using curvilinear coordinates. For an axisymmetric field, the divergencefree condition (4) takes the form where r denotes distance from the axis of symmetry and h ξ is an arbitrary curvilinear scale factor. It was argued that due to the conservation of magnetic flux the above condition (18) could be reduced to for field lines close to the axis of symmetry. Condition (19) has been widely used in many studies of axisymmetric motions. We note that the conservation of magnetic flux, S B·dS = constant along field lines, can be derived from the divergence-free condition by applying Gauss' theorem. Assuming nearly vertical field lines, B s , close to the axis of symmetry, we have whereB s is the mean magnetic field between 0 and r. However, the mean is not necessarily the same as the value of B s at r because, in general, the strength of the magnetic field is variable across the field lines. Therefore, condition (19) cannot be derived from general considerations of flux conservation. The divergence-free condition (13) obtained in this work is consistent with the remaining governing equations in curvilinear coordinates. It can be used to investigate axisymmetric motions with more general poloidal magnetic fields. We consider two applications: a radial field and a nearly vertical field.
As a first example, we consider the case of a radial field shown in Fig. 1 for which we have where δ denotes incremental variation. For a radial field, we also have δr δs = r s .
Therefore, the derivative of θ is reduced to Equation (13) Condition (26) was used by Cui & Yuan (2020) to study stellar winds along radial field lines. It is equivalent to the well-known condition for B R R 2 in spherical coordinates, where R denotes the radial distance. Condition (26) was also used by Hollweg et al. (1982) and in subsequent studies of field lines in the neighbourhood of the symmetry axis. However, these studies did not assume a radial magnetic field and therefore condition (26) may not be compatible with the remaining governing equations that contain both B s and r.
For field lines near the axis of symmetry that are nearly vertical, the angle θ is small and the second term in equation (13) can be ignored. The resulting divergence-free condition is B s r = constant along field lines.
Condition (27) is applicable to arbitrary field lines that remain close to the symmetry axis. It is different from condition (26) that has been traditionally used in axisymmetric models. Replacing condition (27) with condition (26) should result in stronger variation of the poloidal field for a given expansion factor. It is important to note that both B s and r figure in the governing equations and cannot be chosen independently.
Equation (27) can be used to derive an equation of energy for the neighbourhood of an arbitrary field line near the axis of symmetry. The azimuthal energy in a volume element dV containing a field line element ds is given by rdϕdrds.
The total azimuthal energy in a thin axisymmetric shell of thickness dr is given by the integral Integrating equation (16) and using the divergence-free condition (27), we obtain Equation (30) represents an equation for the temporal variation of the total azimuthal energy in a thin axisymmetric shell. The second term on the left-hand side of equation (30) represents the net azimuthal energy flux. The sources on the right-hand side of equation (30) represent the sum of the tension and centrifugal forces (first term) and the twist-flow coupling (second term). It is worth noting that condition (27) separates two classes of field lines. More specifically, the divergence-free condition (13) shows that for a diverging field (∂r/∂s > 0) of the form B s ∼ r α − 1 , where α < 0, the field lines become less vertical and more inclined with distance a. The radial field with α = −1 that we have considered above belongs in this category. On the contrary, for α > 0, the field lines tend to become more vertical with distance a.

S U M M A RY
Axisymmetric MHD models are commonly used to study the properties of magnetized stellar winds and the evolution of Alfvén waves in solar/stellar atmospheres. Both time-dependent and timeindependent models rely on a divergence-free condition to determine the poloidal magnetic field. Alternatively, it is represented in terms of a field-stream function, so the divergence-free condition is automatically satisfied. In both cases, the poloidal magnetic field is represented in spherical or cylindrical coordinates that are treated as independent variables.
We derive a general divergence-free condition for axisymmetric motions where the curvilinear coordinates s and a are treated as independent variables. It completes the set of governing equations in curvilinear coordinates.
As an application, we demonstrate that a well-known condition, previously thought to represent a nearly axial poloidal field, is consistent with a radial field. The correct condition for a nearly axial poloidal field is obtained. The derived divergence-free condition can be used in future studies to find more general solutions that are compatible with the remaining governing equations.

DATA AVA I L A B I L I T Y
No new data were generated or analysed in support of this research.

A P P E N D I X A : D E R I VAT I O N O F T H E D I V E R G E N C E -F R E E C O N D I T I O N
The radial component of the induction equation can be written in the following form: where the superscript denotes the partial derivative with respect to the enclosed variable. The z component of the induction equation can be represented as Using the adopted time independence of B r and B z and the axisymmetric nature of the model (∂/∂ϕ = 0), we have which are satisfied if We split the velocity and the magnetic field into toroidal, ϕ, and poloidal, s, components: The corresponding components in the direction transverse to the field are zero. Using equation (A4), we have We also have We introduce the directional derivatives: along the magnetic field, and transverse to the magnetic field. The equations of field lines can be found by solving where we have introduced the angle θ between the poloidal field B s and the symmetry axis r = 0. By combining (A8) and (A9), we obtain expressions for the partial derivatives with respect to r and z: The divergence-free condition in cylindrical coordinates has the following form: The assumed axisymmetry (∂/∂ϕ = 0) reduces condition A14 to We rewrite this formula in the form Finally, by using the relationships (A10 and A11), we can express the second term on the right-hand side of (A22) in terms of the angle θ: ∂ ∂s ln |B s r| + ∂θ ∂a = 0. (A23) Equation (A23) represents the divergence-free condition for axisymmetric motions in curvilinear coordinates.

A P P E N D I X B : D E R I VAT I O N O F T H E G OV E R N I N G E Q UAT I O N S
In the present section, we derive the conservation equations of mass, momentum, and induction in terms of the introduced variables s and a and show their consistency with those derived by Hollweg et al. (1982). An additional transfield equation is derived. From the mass conservation law (1), we have Using equations (A4 and A6), we have or, using the divergence-free condition (A14), we obtain Finally, using the definition (A8) of the directional derivative and the time independence of B s , we obtain the desired continuity equation (9): The ϕ component of the equation of motion has the following form: We multiply both sides by r and use the introduced directional derivative (A8) to obtain , The ϕ component of the induction equation reads