Finite volume methods require the knowledge of the magnetic field \(\mathbf{B}\) in the entire volume \(\mathcal{V}\), and differ essentially in the way in which the vector potentials are computed. The methods presented here compute vector potentials employing either the Coulomb gauge (\(\boldsymbol{\nabla}\cdot\mathbf{A}=0\)) or the DeVore gauge (\(A_{\mathrm {z}}=0\), DeVore 2000). Due to the gauge-invariant property of Eq. (3), the employed gauge should be irrelevant for the helicity value. It may have, however, consequences on the number and type of equations to be solved for that purpose. Methods using the Coulomb gauge differ in the way in which the magnetic fields and the corresponding vector potentials are split into potential and current-carrying parts. Hence, they differ to some extent in the equations that they solve. Methods applying the DeVore gauge are applications of the method in Valori et al. (2012) that differ only in the details of the numerical implementation. In the following, different FV methods are identified by the gauge they employ (DeVore or Coulomb), followed by the initial of the author of the reference article describing its implementation (e.g., Coulomb_GR labels the Coulomb method described in Rudenko and Myshyakov 2011), see Table 2.
All the FV methods considered in this article, except for the Coulomb_GR method, define the reference potential field as \(\mathbf{B}_{\mathrm {p}}=\boldsymbol{\nabla}\phi\), with \(\phi\) being the scalar potential, solution of
$$\begin{aligned} \nabla^{2} \phi =&0, \end{aligned}$$
(8)
$$\begin{aligned} (\hat{\mathbf{n}}\cdot\boldsymbol{\nabla}\phi ) \vert _{\partial\mathcal{V}} =& ( \hat{\mathbf{n}}\cdot\mathbf{B} )\vert _{\partial \mathcal{V}}, \end{aligned}$$
(9)
such that the constraint equation (4) is satisfied. Errors in solving equations (8), (9) are a first source of inaccuracy for the methods.
Methods Employing the Coulomb Gauge
Vector potentials in the Coulomb gauge satisfy
$$\begin{aligned} \nabla^{2}\mathbf{A}_{\mathrm {p}} =&0, \end{aligned}$$
(10)
$$\begin{aligned} \boldsymbol{\nabla}\cdot\mathbf{A}_{\mathrm {p}} =&0, \end{aligned}$$
(11)
$$\begin{aligned} \hat{\mathbf{n}}\cdot (\nabla\times\mathbf{A}_{\mathrm {p}} ) \vert _{\partial\mathcal{V}} =& ( \hat{\mathbf{n}}\cdot\mathbf{B} ) |_{\partial\mathcal {V}}, \end{aligned}$$
(12)
for the vector potential of the potential field, and
$$\begin{aligned} \nabla^{2} \mathbf{A} =&-\mathbf{J}, \end{aligned}$$
(13)
$$\begin{aligned} \boldsymbol{\nabla}\cdot\mathbf{A} =&0, \end{aligned}$$
(14)
$$\begin{aligned} \hat{\mathbf{n}}\cdot (\nabla\times\mathbf{A} ) \vert _{\partial\mathcal{V}} =& ( \hat{\mathbf{n}}\cdot\mathbf{B} ) |_{\partial\mathcal {V}}, \end{aligned}$$
(15)
for the vector potential of the input field, where \(\mathbf{J}=\boldsymbol{\nabla}\times \mathbf{B}\). The conditions Eqs. (12) and (15) are the translation into vector potential representation of Eq. (4). The accuracy of Coulomb methods depend on the accuracy in solving numerically the above Laplace and Poisson problems. This includes the accuracy in fulfilling numerically the gauge condition, i.e., the solenoidal property of the vector potentials \(\mathbf{A}_{\mathrm {p}}\) and \(\mathbf{A}\).
From the computational point of view, the numerical effort required to solve for the vector potentials consists, in general, in the solutions of Eqs. (10)–(12) and (13)–(15), i.e., of six 3D Poisson/Laplace problems, one for each Cartesian component of the vector potentials \(\mathbf{A}_{\mathrm {p}}\) and \(\mathbf{A}\).
Coulomb_JT
In order to solve Eqs. (10)–(12) and (13)–(15), appropriate additional boundary conditions for \(\mathbf{A}\) and \(\mathbf{A}_{\mathrm {p}}\) on the boundaries of the 3D-rectangular computational domain need to be specified. For this purpose, the method of Thalmann et al. (2011), decomposes \(\mathbf{A}\) into a current-carrying and a potential (current-free) part, in the form \(\mathbf{A}=\mathbf{A}_{\mathrm {c}}+\mathbf{A}_{\mathrm {p}}\). The reproduction of the input fields’ flux at the volume’s boundaries, \({\partial\mathcal{V}}\), is entirely dedicated to \(\mathbf{A}_{\mathrm {p}}\) (obeying Eqs. (10)–(12)). The electric current distribution in \(\mathcal{V}\) and on \({\partial \mathcal{V}}\), on the other hand, are delivered by \(\mathbf{A}_{\mathrm {c}}\) (Eqs. (13), (14) with \(\mathbf{A} _{\mathrm {c}}\) instead of \(\mathbf{A}\) and Eq. (15) replaced by \(\hat{\mathbf{n}} \cdot (\nabla\times\mathbf{A}_{\mathrm {c}} ) \vert _{\partial\mathcal{V}}=0\)).
In particular, the tangential components of \(\mathbf{A}_{\mathrm {p}}\) on a particular face, \(f\), of the 3D computational domain are specified to be the 2D stream function of a corresponding Laplacian field, \(\phi_{f}\), in the form \(\mathbf{A}_{{\mathrm {p}}, \mathbf{t}}=-\hat{\mathbf{n}}\times\boldsymbol{\nabla}_{t}\phi_{f}\), where \(\boldsymbol{\nabla} _{t}\) is the 2D-gradient tangential operator on the face \(f\). The Laplacian field itself is gained by substituting in Eq. (12) and seeking the solution of the derived 2D Laplace problem \(\nabla ^{2}_{t}\phi_{f}=-\hat{\mathbf{n}}\cdot\mathbf{B}\), for which boundary conditions on the four edges of each face \(f\) need to be specified. This approach of defining \(\mathbf{A}_{\mathrm {p}}\) on \({\partial\mathcal {V}}\) is in principle used by all Coulomb methods considered in the present study, but the specific way in which the 2D Laplace problems are formulated is different.
Thalmann et al. (2011) use Neumann conditions in the form \(\partial _{n}\phi_{f}=c_{f}\), where \(c_{f}\) is a constant along a particular face and \(\partial_{n}\) is the derivative in the direction normal to the edge of the face \(f\) (see their Sect. 2.1 for details). The different \(c_{f}\) are constructed in such a way that the total outflow through the volume’s bounding surface \({\partial\mathcal{V}}\) is minimized. In this way, a vanishing tangential divergence (\(\nabla_{t}\cdot\mathbf{A}_{{\mathrm {p}},\mathbf{t}}=0\)) is enforced on \({\partial\mathcal{V}}\), and following Gauss’ theorem, Eqs. (10)–(12) are approximately fulfilled.
Another difference of the applied Coulomb methods is how the current-carrying vector potential \(\mathbf{A}_{\mathrm {c}}\) is calculated and its solenoidality enforced. Thalmann et al. (2011) solves Eq. (13) for \(\mathbf{A}_{\mathrm {c}}\) numerically, similar to Yang et al. (2013a), just with differing boundary conditions. In the Coulomb_JT case, \(\nabla_{t}\cdot\mathbf{A}_{\mathrm{c}, \mathbf{t}}=0\) on \({\partial\mathcal{V}}\) is explicitly enforced in order to fulfill the Coulomb gauge for \(\mathbf{A} _{\mathrm {c}}\).
The method discussed in Thalmann et al. (2011) is implemented in C. The Poisson and Laplace problems are solved numerically using the Helmholtz solver in Cartesian coordinates of the Intel® Mathematical Kernel Library.
Coulomb_SY
The Coulomb_SY method is described in Yang et al. (2013a,b). In the original formulation of Yang et al. (2013a), the method requires a balanced magnetic flux through each of the side boundaries of the volume. This restriction has been further removed in Yang et al. (2013b). In order to solve Eqs. (10), (12) and (13), (15), the Coulomb_SY method additionally enforces the boundary condition \((\hat{\mathbf{n}}\cdot\mathbf{A}_{\mathrm {p}} )|_{\partial\mathcal{V}}=(\hat{\mathbf{n}}\cdot\mathbf{A})|_{\partial \mathcal{V}}=0\) at all boundaries. Then, the transverse vector potential at the boundaries and the vector potential at the edges is obtained by using Gauss’ theorem. After obtaining the boundary values, Yang et al. (2013a,b) firstly resolve the Laplace equation (10) and the Poisson equation (13) to obtain an initial guess of the solution, \(\mathbf{A}_{\mathrm {p}}'\) and \(\mathbf{A}'\). These preliminary solutions satisfies Eqs. (12) and (15), but not the Coulomb gauge condition. The Coulomb_SY method then uses a divergence-cleaning technique based on the Helmholtz vector decomposition to iteratively impose the Coulomb constraint to the vector potentials, without modifying their values at the boundaries. Comparing with the Coulomb_JT method, in Coulomb_SY are the vector potentials that are decomposed, rather than the boundary contributions. The method is implemented in Fortran; Poisson and Laplace problems are solved numerically using the Helmholtz solver in Cartesian coordinates of the IMSL® (International Mathematics and Statistics Library).
Coulomb_GR
The Coulomb_GR method is described in Rudenko and Myshyakov (2011). A distinctive feature of the algorithm is that the Coulomb_GR method defines the reference potential field in terms of vector potential \(\mathbf{B}_{\mathrm {p}} =\boldsymbol{\nabla}\times\mathbf{A}_{\mathrm {p}}\), rather than using Eqs. (8), (9). The corresponding boundary value problem, Eq. (10), is solved with the constraint equation (11) and the boundary condition \((\mathbf{A}_{\mathrm {p}} \cdot\hat{\mathbf{n}}) |_{\partial\mathcal{V}}=0\). The Laplace problem is divided into six sub-problems, one for each side of \(\mathcal{V}\). Such a splitting of the Laplace problem is correct only if the total magnetic flux is zero (balanced) on each side of the box independently. To satisfy this requirement, a compensation field \(\mathbf{B}_{\mathrm {p}}^{\mathrm{m}} = {\boldsymbol{\nabla}}\times\mathbf{A}_{\mathrm {p}}^{\mathrm{m}}\) is introduced. It is built as a field of 5 magnetic monopoles located outside of the box. Positions and charge of the monopoles are selected such as to compensate unbalanced flux on each side of the volume independently. The modified magnetic field \(\mathbf{B}'= \mathbf{B}- \mathbf{B}_{\mathrm {p}}^{\mathrm{m}} \) has zero total flux on each face independently and can be correctly used as a boundary condition for the sub-problems
$$ \hat{\mathbf{n}}\cdot \bigl(\boldsymbol{\nabla} \times\mathbf{A}_{\mathrm {p}}^{f_{i}} \bigr) \big\vert _{f_{j}} = \delta _{ij}\bigl(\hat{\mathbf{n}}\cdot \mathbf{B}'\bigr)\big\vert _{f_{j}}, $$
(16)
where \(\mathbf{A}_{\mathrm {p}}^{f_{i}}\) is the vector potential of sub-problem solution corresponding to the side \(f_{i}\).
After solving all sub-problems, the full solution is then obtained by summation of the solutions of the six sub-problems \(\mathbf{A}^{f_{i}}\) and the vector potential of a compensation field, \(\mathbf{A}^{\mathrm{m}}\), as
$$ \mathbf{A}_{\mathrm {p}}= \mathbf{A}_{\mathrm {p}}^{\mathrm{m}} + \sum _{i =1}^{6}\mathbf{A}_{\mathrm {p}}^{f_{i}}. $$
(17)
The field described by the first term of Eq. (17), instead, is flux balanced on each side of the box independently.
Instead of solving numerically the Poisson problem equations (13)–(15), the Coulomb_GR methods adopts a decomposition similar to the one in Coulomb_JT method, i.e., \(\mathbf{A}=\mathbf{A}_{\mathrm {c}}+\mathbf{A}_{\mathrm {p}}\), but the vector potential of the current-carrying part of the field is computed as
$$ \mathbf{A}_{\mathrm {c}}(\mathbf{r})=-\frac{1}{4\pi} \int_{\mathcal{V}}\frac {\mathbf{r}-\mathbf{r}'}{|\mathbf{r} -\mathbf{r} '|^{3}} \times ( \mathbf{B}- \mathbf{B}_{\mathrm {p}} ) \,{\mathrm {d}}\mathcal {V}. $$
(18)
In contrast to other methods, the solutions of the Laplace and Poison problems for the \(\mathbf{A}^{f_{i}}\) components are derived analytically as decompositions into a set of orthonormal basis functions. The detailed description of the strategy for solving these equations can be found in the original paper by Rudenko and Myshyakov (2011).
In the current implementation the method is relatively demanding in terms of running time. Therefore, it is applied here only to a subset of test cases.
Methods Employing the DeVore Gauge
Using DeVore gauge \(A_{\mathrm {z}}=0\) (DeVore 2000), Valori et al. (2012) derived the expression for the vector potential of the magnetic field \(\mathbf{B}\) in the finite volume \(\mathcal{V} =[x_{1},x_{2}]\times [y_{1},y_{2}]\times[z_{1},z_{2}]\) as
$$ \mathbf{A}=\mathbf{b}+\hat{\mathbf{z}}\times \int_{z}^{z_{2}}\mathbf{B}\,{\mathrm {d}} z', $$
(19)
where the integration function \(\mathbf{b}(x,y)=\mathbf{A}(z=z_{2})\) obeys to
$$ \partial_{x} b_{\mathrm {y}}-\partial_{y} b_{\mathrm {x}}=B_{\mathrm {z}}(z=z_{2}), $$
(20)
and \(b_{\mathrm {z}}=0\). The particular solution of Eq. (20) employed here is
$$\begin{aligned} b_{\mathrm {x}} =&-\frac{1}{2} \int_{y_{1}}^{y} B_{\mathrm {z}}\bigl(x,y',z=z_{2} \bigr) \,{\mathrm {d}} y', \end{aligned}$$
(21)
$$\begin{aligned} b_{\mathrm {y}} =& \frac{1}{2} \int_{x_{1}}^{x} B_{\mathrm {z}}\bigl(x',y,z=z_{2} \bigr) \,{\mathrm {d}} x', \end{aligned}$$
(22)
but see Valori et al. (2012) for alternative options. The above equations are applied in the computation of the vector potential of the potential field too by substituting \(\mathbf{B}\) with \(\mathbf{B}_{\mathrm {p}}\) everywhere in Eqs. (19)–(22). In particular, using Eqs. (21), (22) for both \(\mathbf{A}_{\mathrm {p}}\) and \(\mathbf{A}\) implies \(\mathbf{A}_{\mathrm {p}}=\mathbf{A}\) at \(z=z_{2}\), although this is not necessarily required by the method.
The DeVore gauge can be exactly imposed also in numerical applications, which is generally not the case for the Coulomb gauge. On the other hand, since \(A_{\mathrm {z}}=0\), then
$$ B_{\mathrm {x}}=-\partial_{z} A_{\mathrm {y}}= \partial_{z} \int _{z}^{z_{2}}B_{\mathrm {x}}\,{\mathrm {d}} z', $$
(23)
where Eqs. (20) and (21), (22) where used; a similar expression holds for \(B_{\mathrm {y}}\). Hence, the accuracy of DeVore method in reproducing \(B_{\mathrm {x}}\) and \(B_{\mathrm {y}}\) from \(\mathbf{A}\) of Eq. (19) depends only on how accurately the relation
$$ \partial_{z} \int_{z}^{z_{2}}= \mbox{ identity} $$
(24)
is verified numerically. On the other hand, even when Eq. (24) is obeyed to acceptable accuracy, one can easily show that, for a non-perfectly solenoidal field \(\mathbf{B}_{\mathrm{ns}}\), it is
$$ \mathbf{B}_{\mathrm{ns}}-\boldsymbol{\nabla}\times\mathbf{A}=\hat{\mathbf{z}} \int _{z}^{z_{2}} ( \boldsymbol{\nabla}\cdot \mathbf{B}_{\mathrm{ns}} ) \,{\mathrm {d}} z', $$
(25)
as derived in Eq. (B.4) of Valori et al. (2012). Hence, the accuracy in the reproduction of the \(z\)-component of the field depends on the solenoidal level of the input field (and on how accurately Eq. (20) is solved).
All DeVore-gauge methods discussed in this study employs Eqs. (8), (9) and (19)–(22), but they differ in the way integrals are defined, and in the way the solution to Eq. (8) is implemented. The computationally most demanding part of the method is the solution of the 3D scalar Laplace equation for the computation of the potential field, Eq. (8). This makes DeVore methods computationally appealing since they require very little computation time.
DeVore_GV
DeVore_GV is the original implementation described in Valori et al. (2012), where the requirement equation (24) is enforced by defining the \(z\)-integral operator as the numerical inverse operation of the second order central differences operator, see Sect. 4.2 in Valori et al. (2012). The Poisson problem for the determination of the scalar potential \(\phi \) in Eqs. (8), (9) is solved numerically using the Helmholtz solver in the proprietary Intel® Mathematical Kernel Library (MKL).
Following Eq. (39) in Valori et al. (2012), the DeVore gauge for the potential field can be reduced to the Coulomb gauge. We checked the effect of this gauge choice in the tests below, and found no significant difference with the standard DeVore gauge. The DeVore-Coulomb gauge for the potential field is thus no further discussed here.
DeVore_KM
DeVore_KM is described in Moraitis et al. (2014). This implementation has two main differences with the one of DeVore_GV. The first is in the solver of Laplace’s equation. DeVore_KM uses the routine HW3CRT that is included in the freely available FISHPACK library (Swartztrauber and Sweet 1979). A test, however, with the corresponding Intel MKL solver revealed minor differences in the solutions obtained with the two routines, and a factor of \(\leq2\) more computational time required by the FISHPACK solver. The second and most important difference with the DeVore_GV method is in the numerical calculation of integrals and derivatives in Eqs. (19)–(22). In DeVore_KM integrations are made with the modified Simpson’s rule of error estimate \(1/N^{4}\) (Press et al. 1992), with \(N\) being the number of integration points, and, in the special case \(N=2\), with the trapezoidal rule instead. In addition, differentiations are made using the appropriate (centered, forward or backward) second-order numerical derivative, without trying to numerically realize Eq. (24). Finally, Eqs. (19)–(22) in DeVore_KM are used in the same way for both the potential and the reference fields.
DeVore_SA
DeVore_SA follows the general scheme of the DeVore_GV method with two differences. The first one is that Eqs. (8), (9) for the potential \(\phi \) are solved in Fourier space separately for all faces of the box. In particular, the problem is divided into six sub-problems using
$$ \phi= \phi^{c} + \sum_{i=1}^{6} \phi_{i}, $$
(26)
where \(\phi^{c}\) is the 3D scalar potential of the compensation field \(\mathbf{B} ^{\mathrm{c}}=\boldsymbol{\nabla}\phi_{c}\) and \(\phi_{i}\) are 3D solutions for the potential field with the normal component given on \(i\)st side of \(\mathcal{V}\) and vanishing boundary conditions on the other sides of \(\mathcal{V}\). The individual Laplace problems for each \(\phi_{i}\) are then solved in Fourier space following the general scheme of the potential and linear force-free field extrapolation employing the fast Fourier transform by Alissandrakis (1981). For the application here, the original extrapolation algorithm is modified to take into account the imposed boundary conditions. This method of solving equations (8), (9) will be described in a dedicated forthcoming paper.
The second difference with the DeVore_GV method is that Eq. (19) is modified by introducing a new integration function \(\mathbf{c}\) that is computed using \(B_{z}\) from any level \(z_{r}\) inside the data cube. In particular, by addition and subtraction to Eq. (19), one has
$$ \mathbf{A} =\mathbf{b} +\hat{\mathbf{z}} \times \biggl( \int_{z}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}+ \int_{z_{r}}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}- \int_{z_{r}}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}\biggr), $$
(27)
which can be re-casted as
$$ \mathbf{A} = \mathbf{c} +\hat{\mathbf{z}} \times \biggl( \int_{z}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}- \int_{z_{r}}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}\biggr), $$
(28)
where we have defined
$$ \mathbf{c}=\mathbf{b}+ \hat{\mathbf{z}} \times \int_{z_{r}}^{z_{2}} \mathbf{B} \,\mathrm{d}z^{\prime}. $$
(29)
Taking the \(x\)- and \(y\)-derivatives of Eq. (29), and using Eq. (20) and \(\boldsymbol{\nabla}\cdot\mathbf{B}=0\), one derives
$$ \partial_{x} c_{y} - \partial_{y} c_{x} = B_{z}(z = z_{r}). $$
(30)
The solution of Eq. (30) is then analogous to Eqs. (21), (22), where \(B_{z}(z =z_{2})\) is replaced by \(B_{z}(z=z_{r})\). Tests using the LL case of Sect. 4.1 shown that the minimal error in \(\mathbf{A}_{\mathrm {p}}\) and \(\mathbf{A}\) is obtained for \(z_{r} = (z_{2}-z_{1})/2\). The vector potential is finally computed following Eq. (28).
This scheme coincides with the original one of DeVore_GV if \(z_{r}\) is taken at the top boundary of the box, i.e., for \(\mathbf{c}(z_{r} = z2) = \mathbf{b}\).
Discrete Flux-Tubes Methods
Berger and Field (1984) and Démoulin et al. (2006) have shown that the relative magnetic helicity can be approximated as the summation of the helicity of \(M\) flux tubes:
$$ \mathscr{H}\simeq\sum_{i=1}^{M} \mathcal{T}_{i} \varPhi_{i}^{2} + \sum _{i=1}^{M} \sum_{j=1, j\neq i}^{M} \mathcal{L}_{i,j} \varPhi_{i} \varPhi_{j}, $$
(31)
where \(\mathcal{T}_{i}\) denotes the twist and writhe of magnetic flux tube \(i\) with flux \(\varPhi_{i}\), and \(\mathcal{L}_{i,j}\) is the linking number between two magnetic flux tubes \(i\) and \(j\) with fluxes \(\varPhi_{i}\) and \(\varPhi_{j}\), respectively. The first and second term on the right hand side of Eq. (31) represents the self and mutual helicity, respectively. With the approximation of discrete magnetic flux tubes, the physical quantity of the magnetic helicity is related to the topological concept of the writhe, twist and linking number of curves, and the magnetic flux associated with those curves. The formulae of computing these topological quantities for both close and open curves have been derived in Berger and Prior (2006) and Démoulin et al. (2006). For the purpose of our comparison it must be noticed that discrete flux-tubes methods do not provide the vector potentials and potential fields in the considered volumes like FV methods. Therefore, the comparison between DT methods and FV methods is necessarily restricted to the helicity values only. The twist-number method and connectivity-based method presented in this section adopt different assumptions in the helicity formulae and the magnetic field models to compute the magnetic helicity.
Twist-Number
The TN method is described in Guo et al. (2010, 2013). This method is aimed at computing the helicity of a highly twisted magnetic structure, such as a magnetic flux rope. A magnetic flux rope is considered as an isolated, single flux tube such that only the self magnetic helicity is computed. The helicity contributed by the writhe is also omitted assuming that the flux rope is not highly kinked. With these two assumptions, the magnetic helicity of a single highly twisted structure is simplified as
$$ \mathscr{H}_{\mathrm{twist}}\simeq\mathcal{T} \varPhi^{2}, $$
(32)
where \(\mathcal{T}\) is the twist number of the considered magnetic flux rope with flux \(\varPhi\). In order to estimate \(\mathcal{T}\), the formula derived in Berger and Prior (2006) to compute the twist number of a sample curve referred to an axis is employed. Practically, the axis can be determined by the symmetry of a magnetic configuration or by other assumptions, such as requiring it to be horizontal and to follow the polarity inversion line (Guo et al. 2010). The boundary of the flux rope is determined by the quasi-separatrix layer (QSL) that is found to wrap the flux rope (Guo et al. 2013). Then the twist density, \({\mathrm {d}}\mathcal{T}/{\mathrm {d}} s\), at an arc length \(s\) is:
$$ \frac{{\mathrm {d}}\mathcal{T}}{{\mathrm {d}} s} = \frac{1}{2 \pi} \mathbf{T} \cdot \mathbf{V} \times \frac{{\mathrm {d}}\mathbf{V}}{{\mathrm {d}} s}. $$
(33)
Two unit vectors are used in Eq. (33): \(\mathbf{T}(s)\), that is tangent to the axis curve, and \(\mathbf{V}(s)\), that is normal to \(\mathbf{T}\) and pointing from the axis curve to the sample curve. By integrating the equation along the axis curve the total twist number is derived. Equation (33) is suitable for smooth curves in arbitrary geometries without self intersection. Since it makes no assumption about the magnetic field, it can be applied to both force-free and non-force-free magnetic field models.
Connectivity-Based
The CB method was introduced by Georgoulis et al. (2012) and was used by a number of studies thereafter. In principle, the method requires only the full (vector magnetic field) photospheric boundary condition to self-consistently estimate a lower limit of the free energy and the corresponding relative helicity.
A key element of the method is the discretization of a given, continuous photospheric flux distribution into a set of partitions with known spatial extent and flux content. Each partition is then treated as the collective footprint of one or more flux tubes. To map the relative locations of these footprints, one either infers or calculates the coronal magnetic connectivity that distributes the partitioned magnetic flux into opposite-polarity connections, treated thereafter as discrete magnetic flux tubes. The flux content of these connections, with both ends within the photospheric field of view (FOV), constitutes the magnetic connectivity matrix corresponding to the given photospheric boundary condition.
The unknown coronal connectivity is either inferred by any explicit solution of the volume magnetic field or calculated with respect to the existing photospheric boundary condition. In the first case, individual field-line tracing associates connected flux with photospheric partitions, providing the magnetic connectivity matrix upon summation of individual field-line contributions. Obviously, only magnetic field lines entirely embedded in the finite volume are taken into account. In the second case, a simulated-annealing method is used to absolutely and simultaneously minimize the flux imbalance (hence achieving connections between opposite-polarity partitions) and the (photospheric) connection length. This criterion is designed to emphasize photospheric magnetic polarity inversion lines by assigning higher priority to connections alongside them. The converged simulated-annealing solution, that provides the connectivity matrix, is unique for a given photospheric partition map. More information and examples are provided in Georgoulis et al. (2012) and Tziotziou et al. (2012, 2013).
The connectivity matrix in a collection of partitions of both polarities will reveal a number of \(M\) discrete, assumed slender, flux tubes with flux contents \(\varPhi_{i}\); \(i \equiv\{ 1, \ldots, M \}\). The respective force-free parameters \(\alpha_{i}\) are assumed constant for a given flux tube but vary between different tubes, thus implementing the nonlinear force-free (NLFF) field approximation. Force-free parameters for each flux tube are the mean values of the force-free parameters of the tubes’ respective footprints, each calculated by the relation \(\alpha_{i}={{4 \pi} \over {c}} {{I_{i}} \over {\mathcal{F}_{i}}}\); \(i \equiv\{ 1, \ldots, M' \}\) for \(M'\) magnetic partitions, where \(I_{i}\) is the total electric current of the \(i\)-partition and \(\mathcal{F}_{i}\) its flux content. The total current is calculated by applying the integral form of Ampére’s law along the outlining contour of the partition.
Knowing \(\mathcal{F}_{i}\), \(\alpha_{i}\), and the relative positions of each flux tube’s footpoints, Georgoulis et al. (2012) showed that a lower limit of the free magnetic energy for a collection of \(M\) flux tubes is
$$ E_{c_{CB}} \equiv E_{c_{(CB; \mathit{self})}} + E_{c_{(CB; \mathit{mutual})}} = A \lambda^{2} \sum_{i=1}^{M} \alpha_{i}^{2} \varPhi_{i}^{2 \delta} + {{1} \over {8 \pi}} \sum_{l=1}^{M} \sum _{m=1; l \ne m}^{M} \alpha_{l} \mathcal{L}_{lm} \varPhi_{l} \varPhi_{m}, $$
(34)
where \(A\), \(\delta\) are known fitting constants, \(\lambda\) is the length element (the pixel size in observed photospheric magnetograms), and \(\mathcal{L}_{lm}\) is the mutual-helicity parameter for a pair \((l, m)\) of flux tubes. This parameter is inferred geometrically, by means of trigonometric interior angles for the relative positions of the two pairs of flux-tube footpoints. The locations of point-like footpoints of the slender flux tubes coincide with the flux-weighted centroids of the respective flux partitions. As included in Eq. (34), the parameter \(\mathcal{L}_{lm}\) does not include braiding between the two flux tubes, that can be found only by the explicit knowledge of the coronal connectivity. Additional complexity via braiding will only add to the free energy \(E_{c_{CB}}\) in Eq. (34). Therefore, the above \(E_{c_{CB}}\) is already a lower limit of the actual \(E_{c}\), assuming only “arch-like” (i.e., one above or below the other) flux tubes that do not intertwine around each other. In addition, Eq. (34) does not include an unknown free-energy term that is due to the generation, caused by induction, of potential flux tubes around the collection of non-potential ones (Démoulin et al. 2006). Such a term would again contribute to the mutual term of the free energy.
The corresponding self-consistent relative helicity is, then,
$$ H_{m_{CB}} \equiv H_{m_{(CB; \mathit{self})}} + H_{m_{(CB; \mathit{mutual})}} = 8 \pi A \lambda^{2} \sum_{i=1}^{M} \alpha_{i} \varPhi_{i}^{2 \delta} + \sum _{l=1}^{M} \sum_{m=1; l \ne m}^{M} \mathcal{L}_{lm} \varPhi_{l} \varPhi_{m}. $$
(35)
From Eqs. (34), (35) we identically have \(E_{c_{CB}} \equiv0\) for potential flux tubes (\(\alpha_{i} =0\); \(i \equiv\{ 1,\ldots,M \}\)). For \(H_{m_{CB}}=0\) in this case, we further require \(\sum_{l=1}^{M_{p}} \sum_{m=1; l \ne m}^{M_{p}} \mathcal{L}_{lm_{P}} \varPhi _{l} \varPhi_{m} =0\), where \(\mathcal{L}_{lm_{P}} \ne\mathcal{L}_{lm}\) is the mutual-helicity factor for a collection of \(M_{p} \ne M\) collection of potential flux tubes. As Démoulin et al. (2006) discuss, this can be the case for a flux-balanced potential-field boundary condition. In practical situations of not-precisely flux-balanced magnetic configurations, however, one may approximate \(H_{m_{CB; \mathit{mutual}}} =0\), in case all
\(\alpha_{i}\); \(i \equiv\{ 1,\ldots,M \}\) are zero within uncertainties \(\delta\alpha_{i}\), which are fully defined in this analysis. More generally, one may use the “energy-helicity diagram” correlation of Tziotziou et al. (2012, 2014) to infer \(| H_{m_{CB}}| \propto E_{c_{CB}}^{0.84 \pm0.05}\) for \(E_{c_{CB}} \longrightarrow0\).