Relative magnetic field line helicity
K. Moraitis E. Pariat G. Valori K. Dalmasse






LESIA, Observatoire de Paris, Université PSL, CNRS, Sorbonne Université, Univ. Paris Diderot, Sorbonne Paris Cité, 5 place Jules Janssen, 92195 Meudon, France Mullard Space Science Laboratory, University College London, Holmbury St. Mary, Dorking, Surrey, RH5 6NT, UK IRAP, Université de Toulouse, CNRS, CNES, UPS, 31028 Toulouse, France



Magnetic helicity is an important quantity in studies of magnetized plasmas as it provides a measure of the geometrical complexity of the magnetic field in a given volume. A more detailed description of the spatial distribution of magnetic helicity is given by the field line helicity that expresses the amount of helicity associated to individual field lines, rather than in the full analysed volume.Magnetic helicity is not a gauge-invariant quantity in general, unless it is computed with respect to a reference field, yielding the so-called relative magnetic helicity. The field line helicity corresponding to the relative magnetic helicity has only been examined under specific conditions so far. This work aims to define the field line helicity corresponding to relative magnetic helicity in the most general way. In addition to its general form, we provide the expression for the relative magnetic field line helicity in a few commonly used gauges, and reproduce known results as a limit of our general formulation.By starting from the definition of relative magnetic helicity, we derive the corresponding field line helicity, and we note the assumptions it is based on.We check that the developed quantity reproduces relative magnetic helicity by using three different numerical simulations. For these cases we also show the morphology of field line helicity in the volume, and on the photospheric plane. As an application to solar situations, we compare the morphology of field line helicity on the photosphere with that of the connectivity-based helicity flux density in two reconstructions of an active region's magnetic field. We discuss how the derived relative magnetic field line helicity has a wide range of applications, notably in solar physics and magnetic reconnection studies.



Relative magnetic field line helicity
Moraitis et al.

Relative magnetic field line helicity
    K. Moraitis^1 E. Pariat^1 G. Valori^2 K. Dalmasse^3
    Received ... / Accepted ...
=======================================================








§ INTRODUCTION



Magnetic helicity is an important quantity in studies of the Sun, as well as, in any other environment where magnetohydrodynamics (MHD) is the appropriate description. This is because magnetic helicity is a conserved quantity in ideal MHD <cit.>, and is approximately conserved even in non-ideal conditions, i.e., in the presence of reconnection (, and more recently, ). 

Magnetic helicity quantifies the complexity of a magnetic field, and relates to the twist and braiding of the magnetic field lines. It is clasically defined as H_m=∫_V 𝐀·𝐁  dV, where 𝐁 is the magnetic field in the volume V, and 𝐀 the corresponding vector potential. It therefore depends on the gauge of 𝐀 unless it is computed in a volume bounded by a magnetic flux surface. This condition can be too restrictive in many cases, especially when the considered volume is constrained by observational limitations as in solar observations. In order to remove this limitation, the helicity can be defined with respect to a reference magnetic field. The first such relative magnetic helicity was introduced by <cit.>, and a gauge-independent version of it was later defined by <cit.>. In this definition of relative magnetic helicity, the obtained helicity values do not depend on the gauges of the vector potentials of the original and reference fields as long as the normal components of the two fields coincide on the boundary of the volume. 

The importance of relative magnetic helicity (RMH) has lead to the development of many computational methods in the recent years. These include finite-volume methods in Cartesian coordinates <cit.>, finite-volume methods in spherical coordinates <cit.>, and methods relying on other definitions of helicity <cit.>. A complete description and intercomparison of the Cartesian methods can be found in <cit.>.

Relative magnetic helicity is a global quantity that characterizes the magnetic field. There are cases however where it is desirable to be able to describe helicity more locally. This can be done with field line helicity that was introduced by <cit.>, and <cit.>. Field line helicity (FLH) of a magnetic field is simply the line integral of the vector potential (that produces the magnetic field) along a field line. The usefulness of FLH stems from the fact that its flux-weighted integral along the boundary is equal to the relative magnetic helicity. FLH can be considered as a function of the field lines, and, due to the arbitrariness of the gauge choice, has no physical meaning unless the field line is closed, in which case it expresses the flux of the magnetic field through the surface bounded by the closed field line. Alternatively, FLH can attain physical meaning under specific gauges for the vector potentials.

Field line helicity has been employed in various solar applications. As an example, <cit.> used FLH to trace the connectivity changes caused by reconnection in a magnetic field confined between two planes, simulating coronal loops. In another example, <cit.> have applied FLH to the global magnetic field of the Sun in order to study the distribution of helicity in the solar corona. A more theoretical study of the properties of FLH can be found in <cit.>. In most of these applications a special gauge for the vector potentials was used to simplify calculations, which lead to inaccurate helicity budgets when the flux-weighted integral of FLH along the boundary was taken. This has very recently been fixed by <cit.>, where a relative FLH was introduced that reproduced relative magnetic helicity to a high degree when integrated over the boundary. Still, this relative FLH is in the same constrained gauge used previously. One of the purposes of this paper is to find an expression for field line helicity that accurately reproduces relative magnetic helicity, and that, at the same time, makes no assumption about the adopted gauge.

Apart from field line helicity there are other methods that employ the magnetic connectivity to compute quantities related to magnetic helicity. An example is the twist number method <cit.>, where the twist component of helicity is computed in configurations consisting of twisted magnetic flux ropes. In an alternative method that approximates helicity through its twist, <cit.> compute RMH by matching the shapes of coronal loops with field lines of a linear force-free field.

Another method that uses the magnetic connectivity to infer a helicity-related quantity is the connectivity-based helicity flux density method <cit.>. In this, the rate of helicity change in the volume (dH_m/ dt) is deduced from the flux-weighted integral of a quantity dh_Φ/ dt along the boundary of the volume, which can therefore be considered as the helicity flux density per unit of magnetic flux. Moreover, this flux density is inferred from the connectivity of the magnetic field in a similar manner as FLH.

In this paper we define a relative magnetic field line helicity (RMFLH) whose gauge is unrestricted, and investigate its relation with the connectivity-based helicity flux density. In Sect. <ref> we define RMFLH, and also express it in various simplifying gauges. In Sect. <ref> we describe the magnetic field data that we use for testing our derivation. In Sect. <ref> we first validate the derived field line helicity method, and then we apply and compare it to a similar method that uses the helicity flux density. Finally, in Sect. <ref> we summarize and discuss the results of the paper.






§ RELATIVE MAGNETIC FIELD LINE HELICITY





 §.§ Definition



Relative magnetic helicity of a three-dimensional (3D) magnetic field 𝐁 in a simply-connected, finite volume V⊂ℝ^3 with boundary ∂ V, is given by the <cit.> formula

    H_r=∫_V (𝐀+𝐀_p)· (𝐁-𝐁_p)  dV.

Here, 𝐁_p is a potential magnetic field that is used as reference, and 𝐀, 𝐀_p are the vector potentials of the fields 𝐁, 𝐁_p, respectively. Relative magnetic helicity does not depend on the gauges of 𝐀 and 𝐀_p as long as the condition

    . n̂·𝐁|_∂ V=. n̂·𝐁_p|_∂ V

holds <cit.>, where n̂ denotes the outward-pointing unit normal of ∂ V. The relative magnetic helicity defined in Eq. (<ref>) can be decomposed into the sum of two gauge-independent helicities, one involving only the current-carrying part of the magnetic field, 𝐁_j=𝐁-𝐁_p, namely

    H_j=∫_V (𝐀-𝐀_p)· (𝐁-𝐁_p)  dV,

and one also involving the potential magnetic field

    H_pj=2∫_V 𝐀_p· (𝐁-𝐁_p)  dV.

These components are referred to as the non-potential and volume-threading helicities in <cit.>, respectively.

In order to derive a general expression for the field line helicity we start from relative magnetic helicity of Eq. (<ref>), and decompose it as

    H_r=∫_V  (𝐀+𝐀_p)·𝐁  dV - ∫_V  (𝐀+𝐀_p)·𝐁_p  dV,

where the individual terms on the right-hand side are now gauge-dependent. The volume integrations can be performed along the field lines of the respective magnetic field if we split the volume elements according to dV= dS dl= d𝐒· dl (with both d𝐒, dl pointing along the field lines) in the first integral, and dV= dS dl_p= d𝐒· dl_p in the second, and rearrange the dot products inside the integrals. Equation (<ref>) then reads

    H_r=∫_∂ V^+| n̂·𝐁| ( ∫_α_+^α_- (𝐀+𝐀_p) · dl)  dS - 
    ∫_∂ V^+| n̂·𝐁_p| ( ∫_α_p+^α_p- (𝐀+𝐀_p) · dl_p)  dS ,

where ∂ V^+ (∂ V^-) denotes the part of the boundary where magnetic flux enters into (leaves) the volume, defined through ∂ V^±={𝐱∈∂ V: n̂·𝐁(𝐱)≶ 0}. The footpoints of the field lines of 𝐁 (𝐁_p) are denoted as α_+∈∂ V^+, α_-∈∂ V^- (α_p+∈∂ V^+, α_p-∈∂ V^-). The only assumption made in going from Eq. (<ref>) to (<ref>) is that each field line can be labelled with its infinitesimal flux, or in other words, that an infinitesimal flux tube can surround each field line. This assumption can always be fulfilled in regions of sufficiently smooth magnetic field.

The integrations in Eq. (<ref>) are taken along ∂ V^+ so that each field line is counted only once, but equivalently, they can be performed along ∂ V^-, or even along the whole boundary, ∂ V, but in that case the resulting helicity should be halved. Since by construction the potential field has the same normal components along the boundaries with the given magnetic field, we can choose to start from the same footpoint in the two integrals, α_p+=α_+, so that | n̂·𝐁|=| n̂·𝐁_p|, yielding

    H_r=∫_∂ V^+| n̂·𝐁| ( ∫_α_+^α_- (𝐀+𝐀_p) · dl - ∫_α_+^α_p- (𝐀+𝐀_p) · dl_p)  dS.

By defining the relative magnetic field line helicity as

    𝒜_r^+= ∫_α_+^α_- (𝐀+𝐀_p) · dl - ∫_α_+^α_p- (𝐀+𝐀_p) · dl_p,

it follows that H_r=∫_∂ V^+𝒜_r^+  dΦ with dΦ=| n̂·𝐁|  dS the elementary magnetic flux on the boundary. A similar expression results when we consider as starting points the field lines of ∂ V^-

    𝒜_r^-= ∫_α_+^α_- (𝐀+𝐀_p) · dl - ∫_α_p+^α_- (𝐀+𝐀_p) · dl_p,

where the common footpoint is now α_p-=α_-. When the whole boundary is considered, the respective RMFLH is given by the average of the latter two expressions, namely






    𝒜_r^0=1/2( 𝒜_r^+ + 𝒜_r^-).

In all cases the RMFLH is expressed relative to the same quantity integrated along the field lines of the potential magnetic field, hence the name relative magnetic field line helicity seems appropriate. It also follows that for a potential magnetic field all RMFLH expressions, Eqs. (<ref>), (<ref>), and (<ref>), vanish by definition. Inevitably, the RMFLH is a function of not only the footpoints of 𝐁, but also of 𝐁_p. Expressed differently, RMFLH depends on the way that both fields connect positive to negative footpoints.

The relative magnetic helicity can be interpreted as the helicity budget of the composing field line helicities in the whole volume, and can be expressed in all cases as

    H_r=∫_∂ V^s𝒜_r^s  dΦ,

where s stands for the characters, `+', `-', or `0', and we defined for reasons of uniformity, ∂ V^0=∂ V. This relation shows that the RMFLH can be considered as the RMH density per unit magnetic flux. Note also that, differently from the direct computation of RMH as a volume integral, its computation as a budget of RMFLH does not include the contribution from field lines that do not connect with the boundary (if any) but rather close within the volume. The RMFLH can always be computed from one of the Eqs. (<ref>)–(<ref>), but its flux-weighted integral given by Eq. (<ref>) will be equal to the RMH only if all field lines are connected to the boundary at both ends, i.e., when no closed and/or ergodic field lines are present in the volume. We adopt this assumption henceforth.

In a similar manner one can also define the relative magnetic field line helicity of the components H_j and H_pj of helicity by replacing 𝐀+𝐀_p in Eqs. (<ref>)–(<ref>) with 𝐀-𝐀_p, and 2𝐀_p, respectively. As an example, the relative magnetic field line helicity of the non-potential component of helicity with field lines starting from the positive polarity is

    𝒜_j^+= ∫_α_+^α_- (𝐀-𝐀_p) · dl - ∫_α_+^α_p- (𝐀-𝐀_p) · dl_p

Of course, all these RMFLHs are gauge-dependent, but their flux-weighted integrals along the (whole) boundary recover the respective gauge-independent helicity component, i.e., for Eq. (<ref>) the budget H_j=∫_∂ V^+𝒜_j^+  dΦ is indeed gauge-invariant.



 §.§ Specific gauge choices



As with any FLH defined on open field lines, all RMFLH expressions depend on the gauges of the vector potentials. The only gauge independent FLH is when field lines are closed, in which case the FLH is the magnetic flux through the surface defined by the closed field line. For the RMFLH, by setting 𝐀'=𝐀+∇ψ_1 and 𝐀'_p=𝐀_p+∇ψ_2 in Eq. (<ref>) for example, it can easily be seen that 𝒜^+'_r=𝒜^+_r+(ψ_1+ψ_2)(α_-)-(ψ_1+ψ_2)(α_p-). It would be thus useful to exploit this gauge freedom in order to derive expressions for the RMFLH that are a function of the footpoints of only one magnetic field (and preferably of 𝐁) instead of two, and, if possible, without restricting the gauge of 𝐀 in doing so. Here we give a non-exhaustive list of choices for the gauges that simplify the resulting RMFLH.




  §.§.§ Potential-free gauge


An obvious way to have a RMFLH that depends only on the footpoints of 𝐁 is by making the second term in Eqs. (<ref>), (<ref>) to vanish. By going back in the derivation to Eq. (<ref>), and replacing in the second term the potential field with the identity 𝐁_p=∇Ψ, we have

    H_r=∫_V  (𝐀+𝐀_p)·𝐁  dV - ∫_V  (𝐀+𝐀_p)·∇Ψ  dV=
    ∫_V  (𝐀+𝐀_p)·𝐁  dV - ∮_∂ V Ψ(𝐀+𝐀_p)· d𝐒+∫_V Ψ∇·(𝐀+𝐀_p)   dV.

The last two terms can be eliminated with the gauge combination

    ∇·𝐀_p=-∇·𝐀
    . n̂·𝐀_p|_∂ V=-. n̂·𝐀|_∂ V

The respective field line helicity is then

    𝒜_r^A= ∫_α_+^α_- (𝐀+𝐀_p) · dl.

It depends only on the footpoints of 𝐁, and can be obtained with an arbitrary gauge for 𝐀, only the gauge of 𝐀_p is restricted.




  §.§.§ Berger & Field gauge


Another possibility for the gauge is given by the relation

    . n̂·(𝐀×𝐀_p) |_∂ V=0,

which involves the tangential components of the two vector potentials on the boundary, as can be seen from the sufficient condition for its validity

    . n̂×𝐀_p|_∂ V = . n̂×𝐀|_∂ V.

This gauge can be fulfilled with the tangential components of 𝐀_p being determined from those of 𝐀, while the gauge of the latter is unrestricted. The gauge condition given by Eq. (<ref>) was used in the original definition of relative magnetic helicity by <cit.>, where Eq. (<ref>) then reads H_r=∫_V 𝐀·𝐁  dV-∫_V 𝐀_p·𝐁_p  dV. This gauge is thoroughly examined in <cit.> where it is used to define the following relative field line helicity

    𝒜_r^ YP,+= ∫_α_+^α_- 𝐀· dl - ∫_α_+^α_p- 𝐀_p· dl_p,

written here in our notation and for the positive polarity boundary. This relative FLH is constructed similarly to the RMFLH of this paper since both quantities are differences of FLHs along the field lines of 𝐁 and 𝐁_p. Unlike the RMFLH given by Eq. (<ref>) however, it employs a specific gauge condition, although <cit.> provide a recipe to impose this gauge starting from a general one.

An alternative form for the relative FLH of <cit.> can be obtained when helicity is written as H_r=∫_V (𝐀-𝐀_p)· (𝐁+𝐁_p)  dV in the same gauge <cit.>. By splitting the volume element along and across the field lines of the magnetic field 𝐁_q=𝐁+𝐁_p according to dV= d𝐒· dl_q, we can define the respective field line helicity 

    𝒜_r^B= 2∫_α_q+^α_q- (𝐀-𝐀_p) · dl_q.

With respect to <cit.>, this RMFLH depends on the footpoints (α_q+,α_q-) of the single magnetic field 𝐁_q, and therefore requires to trace field lines for this magnetic field only. The factor of 2 comes from the flux of the respective flux tubes, dΦ_q=2 dΦ, on the boundary.



  §.§.§ Original Berger gauge


An even more restricting gauge combination is the one originally used in <cit.>, and more recently in <cit.>. This consists of the relations 

    ∇·𝐀_p=0
    . n̂·𝐀_p|_∂ V=0
    . n̂·(𝐀×𝐀_p) |_∂ V=0

and it also involves the gauge of 𝐀, not just 𝐀_p's. Relative magnetic helicity from Eq. (<ref>) simplifies then to H_r=∫_V 𝐀·𝐁  dV <cit.>. By splitting the volume element along and across the field lines of 𝐁, we derive the respective field line helicity 

    𝒜_r^C= ∫_α_+^α_- 𝐀· dl.

This RMFLH involves only the footpoints of 𝐁. Although the form of RMFLH in this gauge is very simple, it is difficult to use in practical implementations because of all the restrictions of Eq. (<ref>).






§ MAGNETIC-FIELD DATA



To check that the definition of relative magnetic field line helicity, given in Sect. <ref>, is consistent, and that it is implemented correctly, we need to compare the values of helicity obtained with the RMFLH method with those of a standard volume method. We use three MHD simulations for this comparison, so that to be able to also follow the evolution of the RMH. 

Additionally, we want to examine the relation between the helicity flux density method of <cit.> with the RMFLH one. For this we use two extrapolations of the 3D magnetic field of an observed active region (AR). All magnetic field data, from simulations or from extrapolations, are described below.




 §.§ MHD data



The first two MHD datasets that we use are from the non-eruptive <cit.>, and eruptive <cit.> flux-emergence simulations that were used and described in <cit.>, and also in <cit.> and in <cit.>. The two simulations involve the emergence of the same twisted magnetic flux rope in the same stratified solar atmosphere, and differ only in the strength and orientation of the initial, background, coronal magnetic field. In the non-eruptive case the initial field is parallel to the emerging flux rope, while in the eruptive case it is anti-parallel (and smaller than the non-eruptive one), thus favoring magnetic reconnection between emerging and background fields. 

The magnetic field in both simulations is interpolated from the original stretched grid to a uniform one, that spans the volume [-100,100]×[-100,100]×[0.36,150] in the non-dimensional units of the MHD code. The resulting mesh consists of 233×233×174 grid points, with a pixel size of 0.859 in all directions. The simulations last from t=0 to t=200. In the eruptive case an eruption occurs around t=120. The morphology of the magnetic field and the way it changes during the simulation is shown in the top two panels of Fig. <ref> for both simulations. There, one can see the emerging flux rope (in orange), and the overlying arcade field (in blue), and the different behavior of their interaction in the two simulations.

The third dataset that we used is based on the simulation of <cit.> for the formation of a coronal jet, and is described in <cit.> and in <cit.>. In the simulation, there is initially uniform coronal plasma around an axisymmetric null point, that is created by embedding a vertical dipole below the simulation domain, and adding a uniform volume vertical magnetic field of opposite direction in the domain. As a result, the initial field in the volume is split into two connectivity domains, one closed and one open. Photospheric twisting motions eventually destabilize the configuration and magnetic reconnection between closed and open field lines occurs, with the final outcome the generation of a jet.

The magnetic field occupies the volume [-6,6]×[-6,6]×[0,12] (in non-dimensional units), and is discretized with 129×129×129 grid points, and a pixel size of 0.0938 in all directions. The simulation lasts from t=0 to t=1600, with an accumulation phase for t∈[0,700], and a dynamical phase for t∈[700,1600] that is sampled more frequently, while the non-ideal effects start to appear around t≈ 920. The evolution of the magnetic field morphology for this simulation is shown in the bottom panel of Fig. <ref>.






 §.§ Extrapolation data



To investigate the relation of field line helicity with the connectivity-based helicity flux density, dh_Φ/ dt, we use the same 3D magnetic-field data as in <cit.>. These comprise a potential and a non-linear force-free (NLFF) reconstruction of the 3D magnetic field of NOAA AR 11158. Both methods start from the same vector magnetogram, which is the average of the SDO/HMI ones at 06:22 UT and 06:34 UT of 14 February 2011, rebinned by a factor of two, to the resolution 1 per pixel. 

The first reconstruction produces a potential magnetic field through the scalar potential of <cit.>. This method uses only the normal component of the photospheric magnetic field. The scalar potential is obtained from the numerical solution of Laplace's equation with the Dirichlet boundary conditions along the six boundaries of the volume that are given by the actual Schmidt solution. The resulting potential field occupies the volume 204  Mm× 200  Mm× 144  Mm, which is discretized by 284× 277 × 200 grid points.

The second reconstruction is a NLFF one that uses a weighted optimization method <cit.>, after pre-processing the horizontal components of the field on the photosphere so that it becomes more compatible with the force-free assumption, and additionally smoothing of the original vector magnetogram. The resulting NLFF field occupies the volume 185  Mm× 185  Mm× 144  Mm, which is discretized by 256× 256 × 200 grid points. The full details on each method can be found in <cit.> and references therein. The morphology of the magnetic field for the two extrapolations is shown in Fig. <ref>.








§ APPLICATIONS



In this section we present the results from the application of the field line helicity method of Sect. <ref> to the magnetic field data of Sect. <ref>. Before that, we describe a few details of the implementation of the method.



 §.§ Implementation details of the RMFLH method



The calculation of relative magnetic helicity with the help of relative magnetic field line helicity is an instantaneous integration method that needs as input the 3D magnetic field in the volume under study. It can thus be considered as a finite-volume method according to the classification of <cit.>, and consequently it can be computed simultaneously with any method that employs the definition of Eq. (<ref>), although RMFLH needs additionally the computation of the field lines. 

Since all the test data of Sect. <ref> are in the Cartesian domain, we follow for each snapshot of the given 3D magnetic field the volume method described in <cit.>. We first compute numerically the potential field that satisfies the condition of Eq. (<ref>) as a solution of Laplace's equation. From the two magnetic fields, 𝐁 and 𝐁_p, we then compute their corresponding vector potentials by adopting the DeVore gauge, for which the vertical component is assumed to be null, A_z=0. This gauge was originally introduced by <cit.> and was then modified by <cit.> for use in finite volumes, and it has the advantage of being very accurate and fast to compute. Our computation of RMFLH is thus performed in the most efficient way and it does not assume any of the specific gauge choices presented in Sect. <ref>. The quantity (𝐀+𝐀_p) is then input to the field line integration part, along with the two magnetic fields.

The relative magnetic field line helicities 𝒜_r^+ and 𝒜_r^- are computed from Eqs. (<ref>) and (<ref>) by calculating the two terms separately and then taking their difference. Each of the terms in these relations is obtained by an integration along the respective field lines, and so this method involves two different field line integrations, one for 𝐁, and one for 𝐁_p. For these integrations we use as a starting point the code QSL Squasher <cit.> which is very fast and robust, and we modify it in three ways. First, we keep only the field-line integration part and omit any squashing factor calculations. Second, we modify the starting points of the field lines to be user-supplied instead of automatically determined by space-filling Hilbert curves. Finally, we augment the system of the three equations 

    dl/ ds=𝐁/B

that are solved by the code with one more, which describes the field line helicity change (dh) along a field line as

    dh/ ds=(𝐀+𝐀_p)·𝐁/B,

with s denoting the distance along the given field line.

For the starting points of the field lines (the footpoints) we consider separately the positive- and the negative-polarity boundary. Once the field lines are obtained, we compute either 𝒜_r^+ or 𝒜_r^- 
depending on whether the field lines start from the positive or negative magnetic sign domain, using Eq. (<ref>) or Eq. (<ref>), respectively, while for 𝒜_r^0 we simply take the average of these expressions as in Eq. (<ref>). All the results presented in the following use the grid points of the given magnetic field as the footpoints for the field lines. An alternative method which gives more weight to locations of higher magnetic field is discussed in the Appendix.




 §.§ Application to MHD data



The verification of the RMFLH-based helicity calculation method presented in Sect. <ref> is done with the help of the three MHD simulations. For each snapshot of each simulation we compute the relative magnetic helicity from its definition, Eq. (<ref>), and also through the field line method, using Eq. (<ref>) and the RMFLH given either by Eqs. (<ref>), (<ref>), or (<ref>). The resulting evolution of the relative magnetic helicity with the two methods for all simulations is shown in Fig. <ref>. 

We notice that the agreement between the two methods is very good for all cases with the curves being practically indistinguishable. To look closer at it, we denote with H_1 the relative magnetic helicity budget calculated from Eq. (<ref>) and H_2 the one from Eq. (<ref>), and we define their relative difference as

    η=H_2-H_1/H_1.

The evolution of this relative difference for all MHD simulations is also shown in Fig. <ref>. Except from the snapshots at the start of the simulations and a few more where helicity is very low, all differences are within ± 5%. The computation of helicity with the RMFLH method thus gives results very similar with the volume method in all cases. Additionally, this is true irrespective of whether the starting footpoints belong to the positive or the negative polarity. These observations indicate that the equations derived in Sect. <ref> are indeed correct, and also that they are properly implemented.




The main advantage of using RMFLH is that in addition to the value of helicity we can also infer its spatial distribution. We show that in two ways in Fig. <ref> using a snapshot from each MHD simulation. On the left column of Fig. <ref>, we present the 3D morphology of RMFLH by plotting representative field lines colour-coded according to the value of 𝒜_r^0 for that field line, while the 2D distribution of 𝒜_r^0 on the photospheric plane is displayed on the right column.

For the non-eruptive emergence simulation in the top panel of Fig. <ref>, and the shown snapshot at t=120, we notice that the emerging flux rope in the center of the image consists of field lines with high positive values of RMFLH. The flux rope is confined by the overlying arcade field which has mixed-signed, but mostly negative RMFLH of quite lower values, as can be seen in the 2D map of RMFLH on the right image.





For the eruptive emergence simulation and the snapshot at t=110 just before the onset of the eruption in the middle panel of Fig. <ref>, we notice a much more complex situation. The arcade field consists now mostly from positive RMFLH, again of lower values than the flux rope. Additionally, the flux rope itself has smaller values of RMFLH than in the non-eruptive case, confirming the smaller helicity budget shown in Fig. <ref>. 

<cit.> showed that the non-eruptive simulation had a larger positive helicity than the eruptive one. Using a toy model and the concept of “self” and “mutual” helicities, they explain these differences by the fact that the emerging flux rope, while having the same positive helicity in both cases, was globally sharing positive helicity with the surrounding arcade field in the non-eruptive case and negative helicity in the eruptive one. Within that toy model, the eruptive simulation would possess opposite signs of helicity, i.e., positive RMFLH in the field lines of the flux rope and negative RMFLH in the field lines of the surrounding arcade field. On the contrary, the non-eruptive simulation would have a distribution of RMFLH uniform in sign, positive for both the flux rope and the arcade field.

The results obtained here with RMFLH present a different view. Both eruptive and non-eruptive simulations present positive and negative RMFLH in the arcade field surrounding the flux rope. The spatial distribution of negative and positive RMFLH in that arcade field is more complex for the eruptive simulation than for the non-eruptive one. However, the main difference lies in the intensity of the positive and negative values of RMFLH. The eruptive case has a low total relative helicity mainly because all the domain possesses a weak RMFLH intensity. The non-eruptive case on the contrary, presents a high contrast of positively and negatively signed RMFLH. This further confirms that although “self” and “mutual” helicities are interesting theoretical tools, they are not directly relevant to relative magnetic helicity, and cannot be used to predict the distribution of RMFLH. The representation of a magnetic field as a collection of flux tubes is of course valid theoretically, and the relative magnetic helicity can then be expressed through sums over the self and mutual helicities under the specific gauge conditions described in <cit.>. In the general case however, the approach of RMH with the self and mutual helicities is of limited practical use.

For the jet formation simulation, we show in the bottom panel of Fig. <ref> the snapshot at t=920 when the non-ideal effects take in. The twisting motions on the photosphere lead to the increase of RMFLH, and also of twist, in the central structure that later reconnects with the overlying jet-like feature. The values of RMFLH are predominantly positive in accordance with the results of <cit.> and <cit.>.

We should mention at this point that all these conclusions depend on the chosen gauges for the vector potentials. If RMFLH was expressed in a different gauge, its magnitude and even its sign distribution could be quite different. A preliminary testing of this possibility showed that this is not the case, and that at least in intense-RMFLH areas, the sign and magnitude of RMFLH are robust to the choice of the gauge. Some evidence in favour of this result can also be found in <cit.>.

We also note that an alternative to removing the gauge dependency of RMFLH is to specify the gauge explicitly, although this would correspond to a redefinition of relative magnetic helicity less general than the one of <cit.>. Nevertheless, the resulting FLH can then be associated with a physically meaningful quantity. Such an example is given by the so-called winding gauge <cit.>, which is a modified, planar Coulomb gauge. The respective FLH, that is termed the flux function in <cit.>, expresses the average pairwise winding between the magnetic field lines. Nonetheless, it relies on a specific setup of the magnetic field,
where the lateral boundary consists only from flux surfaces, and cannot extend to the more general case considered here, where field lines starting from one side of the boundary can end in any side, lateral or not.




 §.§ Application to extrapolation data



Here we use the extrapolation data presented in Sect. <ref> to compare the 2D morphology of RMFLH with that of helicity flux density, dh_Φ/ dt, <cit.>. For the comparison to be meaningful we use the same footpoint locations in both calculations, i.e., only one method for tracing field lines is used, the one described in Sect. <ref>. Finally, only field lines starting and closing on the photosphere are considered, since dh_Φ/ dt is defined for closed field lines. The quantities 𝒜_r^0, as described in Sect. <ref>, and dh_Φ/ dt, as described in <cit.>, are then computed for this set of footpoints. The morphology of the two quantities on the photospheric plane for the two considered extrapolations is shown in Fig. <ref>. The comments in Sect. <ref> about the gauge dependence of RMFLH also apply here, where, moreover, the two quantities examined are computed under different gauges.

For the extrapolation using the potential field assumption, by definition relative magnetic helicity should be null since the potential field is used as a reference field. We note that indeed RMFLH is insignificant in that case as shown in the top-left panel of Fig. <ref>. This is another indication that the RMFLH method is consistent. In practice of course helicity is not null, but very low, because the potential field computed by our method differs slightly from the extrapolated one. The helicity budget we find with the volume method is H_1=-7.1 10^39 Mx^2, while with the RMFLH method it is H_2=-7.5 10^39 Mx^2, and so the two methods show an agreement of 6%. These values may indicate the noise level that the helicity method can estimate.

Helicity flux density on the other hand is not necessarily negligible even when the magnetic field is potential, with strong helicity fluxes possibly  injecting helicity in some regions and removing it in others. The helicity flux density calculations associated with Fig. <ref> were checked against those of <cit.>, and they were found to be consistent, despite the different footpoints and field line integration methods considered in the two cases. This is also evident from the qualitative agreement of the 2D helicity flux density map displayed in the bottom left panel of Fig. <ref>, with the one presented in the top right Fig. 3 of <cit.> for a similar quantity. This further confirms the results of <cit.> that the computation of the helicity flux is robust to the selection of the starting field-line footpoints.

In the case of the NLFF extrapolation there is an intense relative helicity  budget in the domain, three orders of magnitude larger than in the case of the potential field for the RMFLH method. The value obtained by the volume method is H_1=9.4 10^41 Mx^2, while the RMFLH method gives H_2=1.3 10^42 Mx^2. The agreement is lower in this case, with the RMFLH method overestimating helicity by ∼ 30%. This level of agreement can still be considered acceptable given that the NLFF field is of poorer quality in terms of solenoidality as compared to the MHD ones, and solenoidal errors are the most important source of errors in helicity computations <cit.>.

Although dh_Φ/ dt is a flux, and thus a quantity of a different nature than RMFLH, we see in Fig. <ref> (right panels) that the overall distributions of the two quantities agree quite well in the case of the NLFF field extrapolation. As an example, in the two central contours RMFLH and dh_Φ/ dt both exhibit the same sign and both are important, and so the positive helicity is increasing by the injection of more helicity there. There are regions where the two quantities are quite different of course, such as the negative RMFLH area centered at (x,y)=(60,120) in Fig. <ref>, where dh_Φ/ dt is mostly positive and not as strong. Nevertheless, the overall agreement of the two quantities is quite good.

If the helicity flux injection had been found to be strongly different from the volume helicity distribution, it would have implied that either at this particular time the helicity flux injection was very peculiar (something possible of course, e.g., for a twisted magnetic field being untwisted), or that the helicity flux method and the RMFLH were not carrying consistent information. However, these comparative results of the relative helicity distribution and relative helicity injection draws a coherent picture of the helicity properties in AR 11158, with helicity of a given sign being injected in regions having the same sign of helicity. This behaviour reasonably fits with what is expected to occur in solar active regions, helicity flux injection being relatively homogeneous and consistent in time. This is a first demonstration, that the common use of helicity flux and RMFLH can permit to deeper study the dynamics of helicity in solar active regions.








§ DISCUSSION




In this paper we defined the concept of relative magnetic field line helicity (RMFLH) and we examined some of its properties. We presented the mathematical derivation of RMFLH starting from the definition of RMH, without any assumption on the gauges of the vector potentials. A similar derivation was followed for the two gauge-invariant components of RMH, the non-potential and volume-threading ones. This decomposition of RMH has been shown to provide very interesting physical insights in the stability of magnetic structures <cit.>. All the derivations were based on the sole assumption that the magnetic field can be represented with flux tubes, a reasonable assumption for relatively smooth magnetic fields, and that these flux tubes start and end on the boundary of the volume, i.e., they do not form closed loops inside the volume.

The developed RMFLH does not pose any restriction on the vector potentials' gauge and so it can use the simplest possible gauge and/or the most economic in computational resources. By exploiting this flexibility in the choice of the gauge, we presented a fast and robust method for calculating RMFLH. We showed that the developed RMFLH can reproduce the system's relative magnetic helicity budget to high accuracy by using three different MHD simulations, and comparing with the results of a finite volume method of known good performance. 

A number of possible gauge combinations that simplify the resulting RMFLHs at the cost of more restrictive conditions for the computations of the vector potentials were also given. Within this framework, the recently proposed relative FLH of <cit.> is derived as a particular choice. 

Computations of RMFLH are performed for each snapshot separately as in any volume method. The computational cost for RMFLH is larger than a finite-volume method with the same gauge assumptions however, since it involves additionally the tracing of the field lines of two magnetic fields, original and potential. The information gained is also higher though, since RMFLH indicates the locations where helicity is more important, instead of providing a single value for the entire considered domain.

In the MHD simulations examined in this work for example, RMFLH reaffirmed the difference in the helicity budgets between the non-eruptive and the eruptive case, while in the jet case, more photospheric twisting lead to localized higher positive values for RMFLH in the region of twist injection. These results, and most notably the sign of RMFLH, are a function of the gauge of course, since RMFLH is a gauge-dependent quantity. Preliminary testing with different gauge combinations shows that locations of higher absolute values of RMFLH are unaffected by the gauge choice. This is also supported by the results of <cit.>. More detailed examination of this dependence goes beyond the aim of this paper which is to introduce the quantity RMFLH. However, a representation and/or visualization of RMFLH that is less-, or non-related from the gauge is something worth exploring in the future.

In a first application of the developed RMFLH method to solar observations, relative magnetic field line helicity was shown to relate to helicity flux density. In a NLFF reconstruction of the magnetic field of a solar active region the two quantities showed similar overall photospheric spatial distribution, although local differences were also observed. The examination of RMFLH in similar future studies may thus provide additional information on the physical conditions of solar active regions.

Consequently, the concept of relative magnetic field line helicity has important potential for use in plasma applications. Field line helicity seems as a promising tool to apply especially to situations such as the flux ropes of coronal mass ejections <cit.>, where magnetic helicity is known to play an important role.




EP and KM acknowledge the support of the French Agence Nationale pour la Recherche through the HELISOL project, contract n^o ANR-15-CE31-0001. GV acknowledges the support of the Leverhulme Trust Research Project Grant 2014-051. This work and KD were supported by the French Centre National d'Etudes Spatiales. The authors acknowledge access to HPC resources of CINES under the allocations 2016–046331, A0010406331 and A0040406331 made by GENCI (Grand Équipement National de Calcul Intensif). We also appreciate the support of the International Space Science Institute for the international team “Magnetic Helicity in Astrophysical Plasmas”.




aa









§ DEPENDENCE OF RMFLH ON THE CHOICE OF THE FOOTPOINTS


As mentioned in Sect. <ref> the default method for choosing the footpoint locations is by the grid points (GP) of the given magnetic field. Here we give an alternative method that assigns more footpoints to areas of stronger magnetic field strength. We refer to this method as the flux-based (FL) method.

In this, the magnetogram under study is first divided into weak and intense magnetic field areas. Typically, the division corresponds to the absolute value of B_z above which 90% of the flux in the magnetogram is taken into account. In the weak-field areas, a footpoint is assigned to each pixel as in the GP method. In the intense-field areas however, the footpoints assigned per pixel are proportional to the flux in that pixel. The lateral and top boundaries where the magnetic field is normally much weaker are treated as weak-field areas. We note also that this procedure results in the footpoints having similar values of magnetic flux, which is determined from the threshold value of B_z. As an example, we show in Fig. <ref> the photospheric footpoints obtained with the two methods for the snapshot at t=120 of the non-eruptive emergence simulation, and the positive-polarity boundary. The number of footpoints in the GP case are ∼ 27 000, while in the FL case almost three times that, ∼ 77 000.



The resulting helicity budget using these footpoints for the same simulation is shown in Fig. <ref>. For simplicity we have only considered the footpoints starting from the photospheric boundary. We notice in the bottom panel of Fig. <ref> that the relative (to the volume method) differences are very small, ≤ 1% for both cases. This means that the GP method that is mainly used in this paper works equally well as the more accurate FL one, and so the choice of the former as more convenient, is justified. Moreover, the differences in the form of the RMFLH 𝒜_r^+ computed with the two methods are very small, as is shown in Fig. <ref>.





To further examine the differences between the GP- and FL-based methods for choosing footpoints, we use the much more complex NLFF field reconstruction of AR 11158. In the top panel of Fig. <ref> we show the form of the RMFLH 𝒜_r^0 computed with the footpoints given by the FL method for the threshold B_z≃ 2 G between weak and intense magnetic field areas. The differences with the top right Fig. <ref> where the footpoints are given by the GP method are very small, as the bottom panel of Fig. <ref> confirms.








