Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation
Abstract
Expanding on an earlier work that relied on linear forcefree magnetic fields, we selfconsistently derive the instantaneous free magnetic energy and relative magnetic helicity budgets of an unknown threedimensional nonlinear forcefree magnetic structure extending above a single, known lowerboundary magnetic field vector. The proposed method does not rely on the detailed knowledge of the threedimensional field configuration but is general enough to employ only a magnetic connectivity matrix on the lower boundary. The calculation yields a minimum free magnetic energy and a relative magnetic helicity consistent with this free magnetic energy. The method is directly applicable to photospheric or chromospheric vector magnetograms of solar active regions. Upon validation, it basically reproduces magnetic energies and helicities obtained by wellknown, but computationally more intensive and nonunique, methods relying on the extrapolated threedimensional magnetic field vector. We apply the method to three active regions, calculating the photospheric connectivity matrices by means of simulated annealing, rather than a modeldependent nonlinear forcefree extrapolation. For two of these regions we correct for the inherent linear forcefree overestimation in free energy and relative helicity that is larger for larger, more eruptive, active regions. In the third studied region, our calculation can lead to a physical interpretation of observed eruptive manifestations. We conclude that the proposed method, including the proposed inference of the magnetic connectivity matrix, is practical enough to contribute to a physical interpretation of the dynamical evolution of solar active regions.
1 Introduction
Several decades have elapsed since the notion of magnetic helicity and its application to solar magnetic fields were introduced. This considerable time has been marked by an impressive volume of published works on the subject. Yet, we are still lagging behind in understanding, first, how to practically calculate magnetic helicity in the Sun and, second, what is the actual role of magnetic helicity in solar eruptions.
Undoubtedly, the apparent lack of a breakthrough in this topic stems from our crucially incomplete knowledge of solar magnetic fields: unable to observe their generation at the solar interior and to precisely measure them in the solar atmosphere, we can routinely detect and measure them only in the photospheric and/or lowchromospheric interface. To calculate magnetic helicity, however, we need either the threedimensional magnetic field in all or part of the solar coronal volume, including its lower boundary (Woltjer, 1958; Berger, 1984; Finn & Antonsen, 1985; Berger, 1999) or the flow velocity field on this lower boundary (Berger & Field, 1984; Chae, 2001; Démoulin & Berger, 2003). Both defy a unique calculation, showing critical modeldependent ambiguities either when extrapolating for the coronal magnetic field (see the comprehensive comparisons of Schrijver et al. (2006) and Metcalf et al. (2008)) or when inferring a reliable photospheric velocity field (November & Simon, 1988; Kusano et al., 2002; Nindos & Zhang, 2002; Nindos et al., 2003; Longcope, 2004; Schuck, 2005, 2008; Georgoulis & LaBonte, 2006; Welsch et al., 2007; Ravindra et al., 2008; Chae & Sakurai, 2008). Knowledge of the threedimensional coronal magnetic field of, say, an active region, is needed to calculate the instantaneous magnetic helicity (and energy) budgets in the region, while knowledge of the local flow field at the lower atmospheric boundary is necessary to calculate the injection rate of magnetic helicity in the solar atmosphere due to the region’s temporal evolution. The accumulated helicity budgets are then obtained by integrating the helicity injection rate in time (e.g., Green et al., 2002; Nindos et al., 2003; LaBonte et al., 2007).
When the role of magnetic helicity in solar eruptions is examined, there are studies suggesting that helicity is not necessary for flares and coronal mass ejections (CMEs) (Phillips et al., 2005; Zuccarello et al., 2009). At the same time, other studies suggest that helical (or helical by proxy) active regions tend to be the most eruptive ones (Nindos & Andrews, 2004; LaBonte et al., 2007; Nindos, 2009; Georgoulis et al., 2009). One should acknowledge the fact that solar eruptions can occur, at least in models, in the absence of significant magnetic helicity accumulations. However, since helicity is a signed quantity with righthanded (positive) and lefthanded (negative) senses, absence of a significant helicity budget could also mean significant helicity accumulation of both senses at roughly similar amounts – this can lead even to the socalled “helicity annihilation” that is a proposed eruption mechanism (Kusano et al., 2003). Moreover, several eruption mechanisms stem from instabilities that do not explicitly rely on helicity. Such mechanisms are the magnetic flux cancellation (van Ballegooijen & Martens, 1989); “hoop” force (Chen, 1996); breakout (Antiochos et al., 1999); tethercutting (Moore et al., 2001); and the torus instability (Kliem & Török, 2006), among others. On the other hand, a popular eruption mechanism that relies on magnetic helicity is the helical kink instability (Rust & Kumar, 1996; Baty et al., 1998; Török & Kliem, 2005; Kliem et al., 2012). Moreover, it has been shown that injection of helicity in a modeled eruption results in faster CMEs after a helicity threshold is exceeded (Zuccarello et al., 2009).
In theory, therefore, solar eruptions can occur with or without a significant magnetic helicity budget, namely without a dominant helicity sense, although eruptions may be necessary to diffuse into the heliosphere the excess helicity produced in the Sun (Low, 1994; Rust, 1994, 2003). This is because helicity is known to be roughly invariant in a volume enclosing an isolated magnetic structure even under resistive manifestations such as magnetic reconnection (e.g., Berger (1999) and references therein). On the other hand, virtually all eruption mechanisms, regardless of helicity dependence, result in strongly helical eruption ejecta widely known as flux ropes. As to the preeruption situation, we cannot collect clues about the actual role played by helicity unless we (i) compare the helicity budgets between noneruptive and eruptive active regions in the preeruption state, and (ii) assess the relevance of proposed eruption initiation mechanisms with observations in a very detailed manner.
A prerequisite of both objectives above is the practical and reliable calculation of magnetic helicity in observed solar magnetic structures. A first step in this direction was taken by Georgoulis & LaBonte (2007) – hereafter Paper I. In Paper I we described a methodology to simultaneously calculate the relative magnetic helicity and the free magnetic energy, with respect to a potentialfield reference, of a magnetic structure represented by a single solar vector magnetogram. The underlying assumption was the validity of the linear forcefree (LFF) field approximation in the magnetic structure. Calculation of both the relative helicity and the free energy was physically consistent and did not rely on a prescribed flow velocity field or the detailed threedimensional coronal field above the lowerboundary magnetogram. In essence, it was a convenient surface calculation of physical quantities that stem from the threedimensional magnetic field on and above the surface. The main drawback of the methodology, however, was its central assumption of a constant, LFF magnetic structure – an assumption that is known to be unrealistic in both the solar surface and the overlying corona (Metcalf et al., 1995; Georgoulis & LaBonte, 2004; SocasNavarro, 2005). Nonetheless, comparison between a noneruptive and an eruptive solar active region revealed, even beyond large uncertainties inherent to the LFF field approximation, that the most profound differences between the two regions occurred in their budgets of free energy and relative helicity: for a factor of difference in unsigned magnetic flux between the two regions the energies and relative helicities were different by a factor of , with the largest values assigned to the eruptive active region. As we show in this work this very large difference is partly due to the adopted LFF field approximation.
In Paper I we explicitly stated that the proposed methodology would serve as the basis for a more realistic, nonlinear forcefree (NLFF) field approximation in calculating the magnetic energy and relative magnetic helicity. We take this step in this work. The analysis of Paper I is extended to derive the self terms of free energy and relative helicity, while we draw from the study of Demoulin et al. (2006) to derive the mutual terms of these quantities. By construction, the LFF field methodology of Paper I treated a given magnetic structure as a single, isolated, forcefree flux tube and hence it was unable to predict mutual energy and helicity terms occurring due to the interaction between different flux tubes. This work assumes a collection of discrete, slender forcefree flux tubes with variable forcefree parameters and hence calculates both self and mutual terms of energy and helicity. As in Paper I, this NLFF field approach is a surface calculation that does not use threedimensional field extrapolations or velocity fields. Instead, the proposed method uses a magnetic connectivity matrix on the boundary where the vector magnetogram is obtained. This matrix can be obtained in any way possible, be it a field extrapolation or not. Therefore, our method is general and applies to any connectivity matrix, regardless of inference. To provide perspective, we apply the method to the same active region magnetograms as in Paper I and compare the results.
The study is structured as follows: the methodology of the calculation is given in Section 2. The adopted validation procedure and its results are given in Section 3. Section 4 provides the numerical results obtained by applying the method to three different solar active regions. Section 5 discusses our findings and provides our conclusion and future perspective.
2 Methodology
2.1 Magnetic connectivity matrix and distribution
The first task is to translate a continuous vector magnetogram into a collection of discrete forcefree flux tubes with known footpoints, flux contents, and different forcefree parameters . If the threedimensional coronal magnetic field configuration was available, then one would be able to trace each magnetic field line separately (here the footpoint of a “field line” is restricted to the resolution element [pixel] of the studied magnetogram). The coronal configuration may be assessed by extrapolations of various sophistication levels (i.e., currentfree, LFF or NLFFfield) but the true configuration is unknown. Moreover, tracing and analyzing each field line separately would be impractical and unnecessary. For this reason we simplify the vector magnetogram into a collection of thin flux tubes as follows:

We translate the magnetic field configuration into an ensemble of “magnetic charges” using the flux partition method introduced in the magnetic charge topology model of Barnes et al. (2005). This is a flux tessellation scheme that relies on a modified downhillgradient minimization algorithm with certain provisions about saddle points. This step requires only the normal (vertical) magnetic field component . The chosen thresholds for partitioning a magnetogram for this work are (i) a threshold of in , (ii) a minimum magnetic flux of per partition, and (iii) a minimum area of 40 magnetogram pixels per partition. These criteria are set to prevent the inclusion of quietSun, weakfield, and very smallscale structures, respectively, into the calculation, unnecessarily adding to both complexity and required computing time. Only partitions that satisfy all three threshold criteria are selected for further analysis. Upon completion, we can readily assess the flux content and fluxweighted centroid position of each magnetic flux partition.

Assuming that flux partitioning returned positivepolarity and negativepolarity magnetic partitions, together with their respective fluxes ; and ; , one may define a magneticflux connectivity matrix. The matrix will contain the fluxes committed to the connection between the positivepolarity and the negativepolarity partition. Obviously, in case the two partitions are not connected. Along with the flux connectivity matrix we construct one more matrix containing the vector positions of the two fluxweighted centroids of connected partitions.

Each magnetic connection is hereafter assumed a slender flux tube with flux content and footpoints corresponding to the fluxweighted centroids of the two involved partitions. To determine the forcefree parameter of this tube we find the parameters for each partition. From the forcefree approximation one may easily deduce that the fluxweighted mean value over a magnetic partition of flux is given by
(1) where is the total electric current of the partition and is the speed of light. The total current can be calculated by using the integral form of Ampére’s law on the lower boundary magneticfield vector , i.e.
(2) where integration occurs along the closed contour surrounding the partition.
On the practical side, a valid question is how to determine the bounding contour of the partition in order to evaluate Equations (1), (2). The partition shapes cannot be modeled easily since a partition can assume any closedcurve shape without restriction. To determine and its contiguous order of points we have developed an “edge tracker” that minimizes the length of the curve bounding the partition. Minimization is performed by iteratively choosing pairs of neighboring boundary points. This is a classical optimization problem that we solve iteratively via a simulated annealing method (Press et al., 1992).
Let , be the calculated forcefree parameters of the two partitions and . We assign a forcefree parameter
(3) for the resulting connection. For each of the two values , there are respective uncertainties due to the uncertainties in the calculation of the total current (Equation 1), assuming that the magnetic flux is known without uncertainty. The respective uncertainty is, then,
(4)
The flux connectivity matrix described, we now discuss how we populate it. Obviously, the result of any magnetic field extrapolation can be translated into a connectivity matrix by tracing all extrapolated field lines that open and close within the lower boundary. At this stage, we ignore magnetic connections closing beyond the limits of the finite lower boundary. Tracing closed field lines from footpoint to footpoint, we add the flux contents of field lines that are rooted in the same pair of partitions, thus constructing . The simplest connectivity matrix, , is the one obtained by a currentfree (potential) field extrapolation (e.g., Schmidt, 1964; Alissandrakis, 1981). Any nonpotential extrapolation can also be used here, but if we use a NLFF field extrapolation we will reach a nonunique result subject to the details of the extrapolation method. For this reason, our method of choice is the simulated annealing method introduced by Georgoulis & Rust (2007). The method minimizes the magnetic flux imbalance simultaneously with the separation length (footpoint distance) of the chosen flux tubes thus emphasizing connections between tightly arranged ensembles of flux partitions, most notably in active regions with pronounced magnetic polarity inversion lines. We have revised the original concept of Georgoulis & Rust (2007) to (i) include a mirror flux distribution with as much positive and negativepolarity magnetic flux as the negative and positivepolarity magnetic flux of the original magnetogram at large (more than twice the diagonal length of the original magnetogram) distances, thus producing an exactly fluxbalanced magnetic structure and treating largescale, “open” magnetic connections, and (ii) include a constant normalization length equal to the largest length scale of the enlarged, fluxbalanced magnetogram. These revisions result in a unique connectivity matrix for the chosen minimization functional
(5) 
The above revisions to the original simulated annealing scheme of Georgoulis & Rust (2007) alleviate the criticism applied by Barnes & Leka (2008). First, these authors argued that the connectivity result of Georgoulis & Rust (2007) was not unique, depending on the origin of the coordinate system used, because in Equation (5) was originally . Although tests with different system origins showed little, if any, impact for the resulting connectivity, the introduction of the fixed puts this issue to rest. Moreover, Barnes & Leka (2008) claimed that simulated annealing yields an unphysical connectivity matrix that matches neither the potentialfield connectivity nor the true coronal connectivity. Due to our inability to measure the threedimensional magnetic field vector in the corona, however, the ”true” connectivity is unknown. Therefore, one cannot comment on its similarity, or difference thereof, with the connectivity revealed by simulated annealing. We continue to rely on annealing because it emphasizes connectivity in tightly organized active regions, that are statistically the most eruptive ones. Point taken, the methodology discussed here is more general and can accommodate any connectivity matrix.
In Figure References we show an example of connectivity calculation in NOAA active region (AR) 10254, recorded by the Imaging Vector Magnetograph (IVM; Mickey et al. 1996; LaBonte et al. 1999) on 2003 January 13. The difference between the potentialfield and the simulatedannealing connectivity is obvious with the latter committing more flux to fewer, more closely seated, partitions. Also shown is the map of the fluxweighted value of each flux partition (Equation (1)).
2.2 Magnetic Energy and Relative Magnetic Helicity Budgets in the NLFF Field Approximation
Consider a set of discrete magnetic flux tubes in forcefree equilibrium. The magnetic helicity of this set can be viewed as the sum of all terms present in a diagonal matrix . Diagonal terms () correspond to selfhelicity terms and are due to the helical features of each flux tube independently. Offdiagonal terms are due to the interaction between pairs of flux tubes and correspond to mutualhelicity terms. For an open volume, where the set of flux tubes permeates a lower boundary and extends in the half space above it, Demoulin et al. (2006) showed that the relative (with respect to that of a potential field) magnetic helicity of the set can be written as
(6) 
The two terms of the rhs of Equation (6) correspond to the self and mutual helicity of the set of flux tubes, respectively. Here is the selfhelicity factor of the flux tube with a magnetic flux content and is due to its internal structure (twist and writhe). Furthermore, is the mutualhelicity factor due to the interaction of a given pair of different flux tubes. For the studied open volume, Demoulin et al. (2006) further found
(7) 
where is the Gauss linking number, a signed integer reflecting the number and sense of the turns a flux tube winds around a flux tube and vice versa (see also Moffatt & Ricca (1992)), and is the mutualhelicity factor of two archlike flux tubes that are not winding around each other. This factor is a real number and can be attributed to the translational motions needed to bring the tubes from infinity to their prescribed footpoint positions. Derivation of various values was described by Demoulin et al. (2006) and is further explained in Appendix A, where additional cases pertinent to our analysis appear.
Further assuming slender flux tubes, i.e. flux tubes with typical diameter that is much smaller than their footpoint separation, to make use of the outcome of the connectivity matrix of Section 2.1, the mutualhelicity term of Equation (6) describes the mutual helicity of the set calculated by the fluxtube axes (Demoulin et al., 2006). However, both and are unknown unless knowledge of the subphotospheric closures and coronal shapes of the flux tubes is available.
After defining the relative magnetic helicity of the set of flux tubes, it is necessary to define the corresponding free magnetic energy . Demoulin et al. (2006) provided an expression for only in the case of a closed volume, where the entire length of the closed flux tubes is known and visible. This expression cannot be used here. This being said, Paper I and Berger (1988) defined an energyhelicity formula in the NLFF field approximation. The free magnetic energy in this formula reads
(8) 
where is the integration volume. Obviously , where is the vector potential (), reflects the volume density of the relative magnetic helicity provided that obeys the Coulomb gauge (Paper I). In the simplified, constant (LFF field) approximation, Equation (8) reduces to . From Equation (8), but also from the necessity to ensure that when , we approximate the free magnetic energy in our set of discrete, slender flux tubes by the expression
(9) 
thus employing different forcefree parameters for different flux tubes . Besides ensuring selfconsistency, Equation (9) makes sure that faster than , because in case of a potential magnetic field, tends to zero and terms algebraically sum to zero, at least in a fluxbalanced magnetic structure (see Section 2.3). That both and must tend to zero for potential fields is also a necessity: to view this simply, consider the LFF field approximation again where . In case of nearly potential fields, where , if tends to zero slower than then . We have shown in Paper I that indeed when .
Its advantages given, a weakness of Equation (9) is that it is qualitatively similar to the currentchannel description of Melrose (2004). Demoulin et al. (2006) argued convincingly that this description is not equivalent to the fluxtube description attempted here. This is because each existing flux tube () should spawn a number of additional potential flux tubes beyond it in a spacefilling, forcefree configuration. These additional flux tubes induce additional terms in Equation (9) when interacting with the nonpotential flux tubes of the set. Otherwise put, for Equation (9) to be valid, the field should not be spacefilling, that is, ”sheath” currents should contain each of the flux tubes that become then embedded in a fieldfree space occupied by nonmagnetized plasma. This might be valid in the photosphere but is not the case in the corona (e.g., Longcope & Welsch, 2000; Georgoulis et al., 2012), where fields are thought to be forcefree. Therefore, Equation (9) is not fully consistent with the NLFF field approximation that we pursue in this study.
Despite shortcomings, however, Equation (9) can still serve as a lower limit of the magnetic free energy. This is because the additional terms induced by the spawned potential flux tubes should only add positive increments to . Validating our results in Section 3, we show that from Equation (9) is indeed a realistic lower limit for the magnetic free energy of the NLFF field.
The description of magnetic energy budgets of the set of flux tubes is complete when the reference (potential) energy is calculated. This can be done in more than one ways, by simply using the normal field component at the anchoring, boundary plane of the flux tubes. In particular, using the Virial theorem (Molodensky, 1974; Aly, 1984) in its frequentlyused form (see Paper I for a discussion), we have
(10) 
where is a vector position with arbitrary origin in the anchoring plane and is the potentialfield vector on . Moreover, by means of the expression
(11) 
derived in Paper I, where and is the upwardpointing unit vector normal to the plane . For a reliable calculation of on one needs a magnetic structure as fluxbalanced as possible. Finally, by volumeintegrating the energy density of the potential field . In Paper I all methods were shown to provide nearly identical values. Then, the total magnetic energy of the studied magnetic structure becomes
(12) 
In conclusion, the common, selfconsistent definition of and will allow us to derive both quantities from observed solar vector magnetograms without requiring subphotospheric or coronal information. This practical way of calculating NLFF field freeenergy and relativehelicity budgets is described in the following.
Self terms
The self terms of the magnetic free energy and the relative magnetic helicity refer exclusively to the twist and writhe of each magnetic flux tube independently and are given by
(13) 
respectively. Both terms will be calculated, not by the above formulas, but by generalizing the linear analysis of Paper I.
For the free energy of a single forcefree flux tube we derived in Paper I the linearized expression
(14) 
where is the unique forcefree parameter, is the linear size element (the pixel size, in case of observed magnetograms), and is a linearized scale factor calculated in Fourier space. Assuming a collection of forcefree flux tubes rather than a single tube, Equation (14) describes the self term of the free energy under the condition that is fixed, i.e. the same for all tubes. For different values per tube, that is, in case of the NLFF field approximation, Equation (14) would need to be evaluated for each tube. This is untenable, however, because the potential energy (Equations (10), (11)) and are calculated once, for the entire plane of the magnetogram and not for each flux tube separately. To address this problem, thus generalizing the analysis of Paper I, we investigate the relation between the “scaled” potential energy and the magnetic flux , in case of a single flux tube, or a magnetogram envisioned as a single flux tube. For a large number of magnetograms this relation is shown in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation. The straight line represents the leastsquares best fit and reveals a robust powerlaw scaling of the form
(15) 
where and are
the scaling constants. The substantial statistics of Figure
Magnetic Energy and Helicity Budgets in the ActiveRegion Solar
Corona. II. Nonlinear ForceFree Approximation stem from the fact that, to calculate
, , and , one does not need vector
magnetograms; therefore we have used tens of thousands of
activeregion magnetograms recorded by the Michelson Doppler Imager
(MDI; Scherrer et al. 1995) onboard the Solar and Heliospheric
Observatory (SoHO) mission. All these magnetograms were located within
from the central solar meridian; hence, the lineofsight field
corresponds to the vertical field component within
15%. The correction of Berger & Lites (2003) was applied
to compensate for the underestimation of the magnetic fluxes in these
magnetograms
(16) 
The key assumption hereafter is that the scaling relation of Equation (15) holds for individual flux tubes embedded into a collection of discrete flux tubes with different values. Indeed, assuming that each magnetogram in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation corresponds to a flux tube with flux content (the unsigned magnetic flux of the magnetogram) and forcefree parameter (inferred by the linear forcefree approximation applied to the magnetogram), Equation (16) would provide the free magnetic energy of the flux tube. This energy would be independent from the free energy of another flux tube if mutual effects are ignored. Under these conditions, we generalize Equation (16) for a collection of flux tubes to provide the self term of the free magnetic energy of the ensemble:
(17) 
Equation (17) can replace the respective Equation (13) for , hence accounting for the unknown in each flux tube .
Regarding the self term of the relative magnetic helicity (Equation (13)), the linear forcefree approximation of Paper I gives
(18) 
Applying the scaling relation of Equation (15) we find
(19) 
which is, again, independent for each flux tube if mutual terms are neglected. Assuming that this scaling holds for individual flux tubes, we generalize Equation (19) for a collection of flux tubes to obtain the selfhelicity of the ensemble:
(20) 
This can also replace the respective expression for in Equation (13), thus accounting for the unknown in each flux tube .
Mutual terms
By construction, the linear analysis of Paper I cannot be used to calculate any mutual energy or helicity terms. For these terms we will implement the analysis of Demoulin et al. (2006).
Combining Equations (7) and (9), the mutual term of the magnetic free energy in our set of discrete, slender flux tubes is given by
(21) 
As a first step to calculate we acknowledge that each term contributed by the interaction of a pair of flux tubes provides a positive increment for . This increment is given by
(22) 
To provide Equation (22) we have also taken into account that , and this is the case for both and and for every . This simply means that the helicity matrix is symmetric. Further, we know from theory that and (Appendix A). In our pursuit for a minimum magnetic free energy, therefore, we assume that the interacting flux tubes do not wind around each other, so for every . This leads to a freeenergy increment per interaction
(23) 
According to Demoulin et al. (2006) and Appendix A there are only two possible values of in every possible case of interaction for a pair of flux tubes. These values depend on whether flux tube is ”above” flux tube () or viceversa (). The possible cases of fluxtube interaction (see Figure References) are (i) intersecting footpoint segments of the interacting flux tubes, (ii) nonintersecting footpoint segments (there the two values coincide, i.e., ), and (iii) “matching” footpoint segments. A discussion of “matching” footpoints, where we assume that these footpoints are located within unresolved distances to raise the apparent physical inconsistency, is provided in Appendix A.
In summary, we have the following possibilities for :

for one possible value and for the other. This is always true for intersecting footpoint segments and segments with “matching” footpoints. In this case we naturally select the value for which .

for both values. This can only be found in case of nonintersecting footpoint segments, where . In this case, therefore, we naturally select this unique value.

for both values. This also happens exclusively in cases of nonintersecting fluxtube footpoint segments, and is because the connectivitymatrix calculation of Section 2.1 relies only on and is hence independent of values. One may envision an improved connectivitymatrix calculation in which the minimization functional of Equation (5) is modified to include values  this will aim toward connecting closely seated, oppositepolarity partitions with likesign forcefree parameters. At the present stage, however, we cannot physically accommodate negative freeenergy increments, so we enforce in these cases. Point taken, from practical experience this assumption does not incur a large change in the free energy as this energy term is dominantly influenced by flux tube pairs with intersecting or ”matching” footpoint segments.
Therefore, by means of Equation (23) we both determine a unique value for all offdiagonal helicitymatrix elements and ensure a symmetric helicity matrix. Hence, our pursuit for a minimum free magnetic energy has also led to a corresponding value for the relative magnetic helicity.
Can we reach an even smaller, but still positive, value for the mutual term of the free magnetic energy ? The answer is yes, if we relax the assumption . In case , for example, applying such that , one may find smaller, and in some cases positive, increments . Moreover, even for cases where for both values and , we can always achieve if we set or . All these possibilities are mathematically feasible. However, they lead to rather “exotic” physical situations of flux tubes winding around each other without necessarily intersecting footpoint segments. More importantly, they give rise to potentially uncontrollably high values of the mutualhelicity magnitude or to helicity senses (chiralities) that run counter to the expected ones from observations of the activeregion corona. We therefore follow the most conservative approach of keeping and setting in case it only yields a negative . In essence, our approach suggests that a realistic state for a nonpotential, forcefree magnetic configuration is achieved when the free magnetic energy is assumed minimum and the relative magnetic helicity is allowed to evolve in this respect, considering only arched and not braided flux tubes. Whether solar magnetic fields are in a minimum freeenergy state is, of course, an open question. In Section 3 we show, however, that validating our approach with existing, generally accepted energy and helicity formulas leads to a fairly good agreement.
Summarizing, given a collection of discrete, slender, forcefree flux tubes with flux contents and forcefree parameters , where , we write

the total magnetic energy as , where is the potential magnetic energy, and is the free magnetic energy. The latter term is given by
(24) 
The relative magnetic helicity is given by
(25)
The scaling constants , are given by the leastsquares best fit of Equation (15), the mutualhelicity terms are explained and calculated in Appendix A, and is the size element. The forcefree parameters and flux contents of the flux tubes are inferred as described in Section 2.1.
It should be mentioned here that the methodology we describe is more general than Equations (24), (25) in the sense that a nonzero Gauss linking number can always be accommodated in different physical settings. Moreover, our method can work for any given connectivity matrix. In this application, we physically favor both the connectivity matrix calculation of Section 2.1 and , thus reaching Equations (24), (25).
A detailed error propagation analysis leading to the uncertainties and for and , respectively, is provided in Appendix B.
In addition, one may infer the lowest possible free magnetic energy that corresponds to a given amount of relative helicity for the NLFF field. This is simply the LFF free magnetic energy corresponding to this helicity, per the WoltjerTaylor theorem (Woltjer, 1958; Taylor, 1974, 1986). To calculate we use the NLFF relative helicity inferred by Equation (25) and we calculate an effective constant value from Equation (18), i.e.
(26) 
Substituting from Equation (26) into Equation (14) for the LFF free energy, then, we obtain
(27) 
due to Equation (15). The WoltjerTaylor free magnetic energy of Equation (27) will be used as sanity check in the following; all calculated free magnetic energies must be larger than this limiting value.
2.3 A special case: potentialfield configurations
Our choice to calculate the magnetic connectivity matrix via simulated annealing (Section 2.1) implicitly assumes that the studied vector magnetograms are nonpotential, that is, they include significant electric currents and forcefree parameters for at least one of the major partitions identified. Although the nonpotentiality of solar active regions is a longknown fact (e.g., Zirin & Wang, 1993; Leka et al., 1996), our methodology includes a physical inconsistency in case a potentialfield configuration, observed or modeled, is subjected to the analysis: the simulated annealing method, favoring strong magnetic polarity inversion lines, provides a connectivity that is generally incompatible with that of the potential field. The question to ask, then, is how to determine whether a vector magnetogram is basically potential.
One might argue that mutualhelicity terms algebraically cancel to zero in case of potential fields, along with individual selfhelicity factors that tend to zero – otherwise, the relativehelicity expression of Demoulin et al. (2006) (Equation (6)) and our final formula (Equation (25)) are not valid. In practice, however, an observed activeregion magnetogram is not fluxbalanced. This will inhibit an algebraic cancellation of mutualhelicity terms that may sum up to significant nonzero helicity values. At the same time, our expression for the free magnetic energy (Equation (24)) will give values close to zero because for all partitions, and hence for all possible fluxtube connections. Hence, the physical inconsistency mentioned above leads to another inconsistency, namely to situations of nearzero magnetic free energy and strongly nonzero relative helicity.
There are several methods to determine the degree of nonpotentiality in observed active regions. We are currently in the process of identifying the most viable and practical of them, that will be reported in a future publication. One of these methods is to compare the observed horizontalfield components with those of the potential field obeying to the observed verticalfield distribution. Such a comparison may rely on scaling indices, correlation coefficients, and/or standard deviations between the observed and modeled components. Another method is to provide a fluxweighted mean value and a respective uncertainty from the values of all partitions. In case , where is a given significance level, the active region may be considered potential. Further, a fluxweighted mean magneticshear angle in the region is certainly another index of nonpotentiality. In case of a nearly potential activeregion magnetogram, rather than performing simulated annealing, one might perform a potentialfield extrapolation and infer the connectivity matrix by linetracing of the resulting magnetic field lines. Alternatively, one might stop the calculation at this point and set and for the active region of interest, thus saving computing time and avoiding large uncertainties owning to the magneticflux imbalance.
3 Method validation
3.1 Benchmarking: volume formulas for magnetic energy and helicity
Wellknown formulas for magnetic energy and helicity can be used in case one knows the threedimensional magnetic configuration above a twodimensional planar boundary, where the magnetic field vector is fully known. For a threedimensional fluxbalanced magnetic structure the energy budgets are
(28) 
where is the magnetic field strength in the calculation volume and is the respective (also fully known) field strength of the potential field in , where and share the same normal component on the lower boundary.
For the relative magnetic helicity in , Berger & Field (1984) and Finn & Antonsen (1985) derived two equivalent analytical forms valid for NLFF fields, namely
(29) 
where and are the vector potentials for and , respectively. Although and may be exactly known, proper knowledge of , and especially , is a much more demanding task. Point taken, the substantial value of Equation (29) is that one may use two gaugedependent, nonunique expressions for and to obtain a gaugeinvariant, unique expression for (see also Berger 1999). This paved the way for implementations such as the vectorpotential expressions of DeVore (2000) and Longcope & Malanushenko (2008), among others. These expressions, however, are valid for the semiinfinite space (halfspace) above the lowerboundary plane. Recently, Valori et al. (2011) showed that if the vector potentials and are corrected for the fact that the calculation volume , wherein and are known, is finite, then the resulting values from Equation (29) may be significantly different in amplitude and sometimes even in sign. In particular, these authors extended the analysis of DeVore (2000) and found that if extends between , , in a cartesian coordinate system, then
(30) 
where is the scalar potential generating () and , with
(31) 
and
(32) 
by choosing a gauge such that everywhere in .
To test our NLFF expressions we will apply the derivations of Valori et al. (2011) for and to Equation (29) for relative helicity in cases where we have performed NLFF field extrapolations on photospheric vector magnetograms. From these extrapolations and their potentialfield counterparts we will also calculate the magnetic energy budgets of Equations (28). To be perfectly consistent with the purposes of this validation test, the connectivity matrix will not be inferred by simulated annealing (in this particular case only), but by tracing the NLFFfieldextrapolated lines.
3.2 Validation results
Validating our NLFF energy and helicity calculation method is a nontrivial exercise. At first glance, one might rely on analytical NLFF field models (e.g., Low & Lou, 1990; Régnier et al., 2005; Régnier, 2011). However, there are two shortcomings in this approach: first, in some of these models the vector potential is unknown, so one still needs to calculate gaugedependent values of it to infer helicity. Second, and most importantly, the lowerboundary configuration is very simple in these models resulting in a very limited magnetic connectivity matrix. As we intend to emphasize the practical aspect of the methodology presented here, we choose to validate the method on real vector magnetograms, using generally accepted energy and helicity formulas applicable to the coronal volume above the lowerboundary magnetogram (Section 3.1). This volume is determined by a NLFF field extrapolation. We use the cartesian optimization method developed by Wiegelmann (2004), where the divergence of the magnetic field vector and the Lorentz force are simultaneously minimized for the configuration to converge to a NLFF state. No preprocessing of the boundary vector magnetogram (Wiegelmann et al., 2006) was attempted in this case.
Browsing through a sizable collection of vector magnetograms (Tziotziou et al., 2012) we carefully selected 19 of them in which (i) the fractional magnetic flux imbalance is relatively low, thus allowing the majority of the unsigned flux to participate in the connectivity matrix, and (ii) the NLFF field extrapolation has worked well, with acceptable minimizations of the divergence of the field vector and the Lorentz force, and with a convergent solution exhibiting a total magnetic energy larger than the potentialfield energy. To ensure that the extrapolated threedimensional field solution is valid we consider the dimensionless parameter
(33) 
The fluxweighted mean of for all used magnetograms is indicating roughly divergencefree, and hence valid, field solutions. The data were acquired by the IVM, with a binned pixel size of , and the Spectropolarimeter (SP; Lites et al. 2008) of Hinode’s Solar Optical Telescope (SOT; Tsuneta et al. 2008). SOT/SP is a spectrograph observing in two magnetically sensitive photospheric spectral lines; Fe I at 6301.5 Å and 6302.5 Å, respectively, with a spectral sampling of mÅ. Full instrument resolution () corresponds to a pixel size of . The data used here, however, have been acquired in fast scanning mode, corresponding to per pixel. We have resolved the azimuthal ambiguity in these data using the NonPotential Field Calculation (NPFC) method of Georgoulis (2005)  see also Georgoulis (2012). Then, to further expedite the extrapolations, we have spatially binned the data to per pixel, indicating a spatial resolution of . Lites et al. (2008) reported lineofsight and transversefield uncertainties equal to 2.4 and 41 , respectively, for the quiet Sun. In the following calculations we use uncertainties of and , respectively, for SOT/SP, and and , respectively, for IVM data. The same uncertainties apply for the calculations performed in the following Sections.
Each vector magnetogram is then subjected to both volumeintegral energy and helicity calculations (Section 3.2) and the NLFF surface calculations of this work. A crucial point here is that, for a direct comparison between the resulting energy and helicity budgets, one must use the connectivity matrix inferred by the NLFF field extrapolations. This is what we have done for this test only, inferring the various connectivity matrices by linetracing the respective extrapolation results. The results of the comparison for the relative magnetic helicity and the free magnetic energy are given in Figures Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa and Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb, respectively. Error bars correspond to uncertainties calculated by our NLFF field method while the red lines denote equality between the compared budgets.
In terms of the relative magnetic helicity magnitude (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa) we notice a fairly good agreement between the volumecalculated and the surfacecalculated values – most points are within uncertainties from the equality line. The inferred helicity sense for extrapolations and our surface calculations agree in all 19 cases. For relatively small relative helicities ( ), our method appears to overestimate the relative helicity, albeit generally within applicable error bars. The linear (Pearson) and rank order (Spearman) correlation coefficients are significant, ranging between 0.63 and 0.74.
The results of the comparison in magnetic free energy (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb) are similar to that of the relative helicity magnitudes. For small free energies ( erg), our surface calculation seems to overestimate, within error bars, the respective values while the opposite, beyond error bars, occurs for free energies . The Pearson and Spearman correlation coefficients are also significant, higher than in the case of relative helicity, and ranging between 0.74 and 0.75. We therefore conclude that the approximation of the free magnetic energy with the expression of Equation (9) is a reasonable choice, despite shortcomings, given the circumstances and the incomplete information.
It is worth noting at this point that discrepancies between the volume and the surface calculation of magnetic free energy and relative helicity may be due to errors and ambiguities inherent to both our calculations, given the assumptions adopted, and the NLFF field extrapolations, including the calculation of the vector potentials that participate in the relative helicity formula of Equation (29). Given the numerical methods involved, the derived vector potentials and reproduce the magnetic field vectors and , respectively, within nonnegligible differences.
In Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb we have also plotted the WoltjerTaylor free magnetic energy of Equation (27) (crosses). These energies are to be viewed as sanity checks since the NLFFfield free magnetic energy cannot be smaller than them. In only one case in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb does exceed (fourth point from left). This, however, is within the applicable error bar. We further notice that some values are up to orders of magnitude smaller than , hence being unrealistically low, while some are quite close to their respective values. This may suggest the plausibility of the Taylor relaxation in at least some active regions. Although this discussion exceeds the scope of this work, we note in passing that the validity of the Taylor relaxation in the solar corona, according to which a relatively isolated magnetic configuration may relax in a state of minimum free (LFFfield) magnetic energy for a given magnetic helicity budget, is still a subject of debate. Perhaps calculation methods such as the one proposed here can provide further clues to judge the validity of this hypothesis.
In brief, we conclude that our surfacebased NLFF field calculation method manages to provide both magnetic free energies and relative helicities in fairly good agreement with generally accepted, but computationally much more intensive and modeldependent, volumecalculation techniques. It is, therefore, a viable method that can be exploited further and in larger data sets of solar vector magnetograms.
4 Results: NLFF field energy and helicity calculations
4.1 NOAA ARs 8844 and 9165, in comparison with Paper I
For the purposes of comparison with Paper I we use here the same two vector magnetogram timeseries, namely those of NOAA ARs 8844 and 9165, both acquired during daily observing cycles of the IVM on 2000 January 25 and September 15, respectively. The IVM data acquisition and selection and the properties of each AR are described in detail in Section 5.1 of Paper I. In brief, NOAA AR 8844 was a small emerging flux region, visible in the solar disk between 2000 January 24 and 27. No significant eruptive activity originated from this AR. On the other hand, NOAA AR 9165 was a complex, persistent, and eruptive region hosting a number of eruptive Mclass flares (see Figure 2 of Paper I). Both ARs were fairly well fluxbalanced within the IVM field of view: flux imbalance was % for NOAA AR 8844 and % for NOAA AR 9165 (Figure 3 of Paper I). The mean unsigned flux was Mx for NOAA AR 8844 and Mx for NOAA AR 9165, so with a unsignedflux ratio . Perhaps more relevant in this case is the total flux that participates in the connectivity matrices (Section 2.1), where NLFF free energies and helicities stem from. The mean connectedflux values are Mx and Mx for NOAA ARs 8844 and 9165, respectively, so with a connectedflux ratio of . We notice that most of the unsigned flux for both ARs participates in the connectivity matrices. This is because both ARs are nearly fluxbalanced. The little remaining flux that does not participate is either too disperse to be included in the flux partitioning or is judged to be connected with oppositepolarity flux concentrations seated beyond the field of view.
Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation provides the timeseries of the calculated NLFF relative helicity (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa) and free energy (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb) for NOAA AR 8844. For an immediate comparison we have also plotted the respective LFF values from Paper I (gray curves and shades) while the NLFF field calculations of this work are shown with blue curves and shades. Assuming that within the observing interval of hours there was no significant change in and we define mean values and for and , respectively, accompanied by the respective standard deviations. We find and in the NLFF field approximation. Mean values are shown by the blue and gray straight lines for the NLFF and LFF calculation, respectively, while the respective standard deviations are shown by the blue and grayshaded areas. We notice that (i) the LFF and the NLFF approaches give values of and that are fairly close to each other (generally within uncertainties) at least for this small AR, and (ii) the NLFF field approximation gives an overall smoother evolution with smaller standard deviations. A summary of the values and uncertainties for the NLFF and is provided in Table 1.
Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation provides the timeseries of the calculated NLFF relative helicity (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa) and free energy (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb) for NOAA AR 9165. In this case the mean values and are higher than in NOAA AR 8844 ( and ). The differences between the LFF and the NLFFfield approximations in NOAA AR 9165 are also larger: in, general, the LFFfield approximation tends to overestimate both the magnitude of the relative magnetic helicity and the free magnetic energy. The overestimation caused by adopting the LFFfield approximation is for and for . This is understandable and expected as the LFFfield approximation assigns a fixed forcefree parameter with a value determined by the strongest (most fluxmassive) nonpotential field configurations in the AR (see the analysis of deriving a single maximumlikelihood value in Paper I). In addition, the effect of obtaining smaller uncertainties for and in the NLFFfield approximation is more evident in NOAA AR 9165. A summary of the mean values and respective uncertainties for NOAA AR 9165 is also provided in Table 1.
Comparing the mean values and for the two studied NOAA ARs 8844 and 9165 we find a ratio of for and for between the flaring and the nonflaring regions. These ratios are roughly similar to the unsigned and connectedflux ratios ( and , respectively) but smaller than those reported in Paper I for the LFFfield calculations of and . In that work, both ratios were . We conclude that the overestimation of the magnetic free energy and relative magnetic helicity in the LFF field approximation is higher for larger, more complex active regions. Point taken, the flaring NOAA AR 9165 still shows much larger freeenergy and relativehelicity budgets compared to the flarequiet NOAA AR 8844. This quantitative distinction between eruptive and noneruptive active regions is studied by Tziotziou et al. (2012).
Concluding our calculations on NOAA ARs 8844 and 9165, we comment on the contributions of the self and mutual terms to the free energy and relative helicity budgets (Equations (24), (25), respectively) in the two studied ARs. We find that mutual terms overwhelmingly dominate these budgets: on average, for NOAA AR 8844 self terms contribute % of the free magnetic energy and % of the relative magnetic helicity. The respective percentages for NOAA AR 9165 are % and %. These findings are in qualitative agreement with previous works (Régnier et al., 2005; Régnier & Canfield, 2006) and suggest that twist and writhe (contributing to self helicity) are numerically far less important than the mutual helicity caused by the interaction between different flux tubes.
4.2 Noaa Ar 10930
An appealing aspect of our analysis is that it can be applied to longterm timeseries of activeregion vector magnetograms in order to reveal the temporal variation of magnetic energy and helicity budgets in the studied regions. The input vector magnetograms for this purpose should ideally exhibit constant quality and a fixed, high cadence. This is a big challenge for aging groundbased magnetographs such as the IVM. The Vector Spectromagnetograph (VSM; Henney et al. 2009) of the SOLIS facility (Keller et al., 2003) has achieved important advances on the quality front but, by design, it does not exhibit a cadence higher than a few hours. The spacebased SOT/SP onboard Hinode exhibits unprecedented spatial resolution and a constant data quality due to the lack of atmospheric interference but, again, by design it only allows a cadence of a few hours. A lasting solution will have been achieved when the Helioseismic and Magnetic Imager (HMI; Scherrer et al. 2011) onboard the Solar Dynamics Observatory (SDO) releases constantquality vector magnetograms of solar active regions with a fixed cadence of 12 minutes (see Sun et al. (2012) for an example). At this time, however, for the purpose of showing the magnetic energy and helicity variations in an active region over a period of days, we present results obtained by processing a timeseries of SOT/SP vector magnetograms of NOAA AR 10930.
NOAA AR 10930 appeared in the earthward solar hemisphere in 2006 December. It was an intensely flaring (and eruptive) region hosting Cclass, 5 Mclass and 4 Xclass flares before rotating beyond the western solar limb. The AR has been studied in extreme detail by dozens of works; in some of them estimates of the magnetic free energy and the relative magnetic helicity in the region have been published. For example, Ravindra et al. (2011) reported that, by 2006 December 13, when the AR hosted a X3.4 flare, more than of relative helicity had been injected in the AR. A slightly more conservative estimate was published by Park et al. (2010), with a relative helicity before the flare. As to the free magnetic energy of the AR, He et al. (2011) estimated it within erg, while Guo et al. (2008) reported a value of erg.
We have selected 30 vector magnetograms of the region acquired by Hinode’s SOT/SP between 2006 December 8 and December 14. The heliographic vertical magnetic field component of six of them is shown in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation with Figures Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa and Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationf corresponding to the first and last magnetogram of the series, respectively. The magnetograms were first disambiguated using the NPFC method and then were spatially binned to per pixel, or to a spatial resolution of .
The evolution of the relative magnetic helicity in NOAA AR 10930 is shown in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa. A distinct feature of the preeruption evolution in the AR is that, before 12/10, the relativehelicity budget is rather low, of the order . Over the next two days (12/11  12/12), however, the helicity budget increases drastically to reach . This peak coincides with a cluster of Cclass flares (see the respective GOES 18 ÅXray flux in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationd) that appear to be eruptive, as can be judged by the repetitive TypeII bursts recorded in the frequencytime radio spectra of the WAVES instrument onboard the WIND mission (Bougeret et al., 1995). Type II activity implies shockfronted CME occurrences (e.g., Nelson & Melrose, 1985). Although neither GOES nor WIND/WAVES have spatial resolution, there is little doubt that the observed eruptions originate from NOAA AR 10930, as it was the only AR present in the visible solar disk at the time. The CMEs and their locations are also confirmed by the SoHO/LASCO CME database (Yashiro et al., 2004).
Around the start of 12/12, perhaps due to eruptive activity, the helicity budget appears generally smaller, of the order . Hours before the X3.4 flare, early on 12/13, however, the relative helicity budget increases substantially to exceed . At this time of peak helicity the eruptive flare occurs, accompanied by a fast halo CME. Immediately after the eruption, late on 12/13, the AR appears to have lost of helicity, perhaps in the CME. For a period of hours until the end of the observing interval the helicity budget appears to be of the order .
Around the time of the Xclass flare we calculate a relative magnetic helicity budget that is a factor of lower than the estimate of Park et al. (2010) and a factor of lower than the estimate of Ravindra et al. (2011). Our lower helicity estimate is consistent with (i) the fact that we calculate helicity from closedfield connections only, thus using only a fraction of the unsigned flux (a small fraction in this case, as the AR shows significant flux imbalance – Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationc) and (ii) our methodology, that minimizes the free magnetic energy first, and then keeps a consistent helicity magnitude. In addition, our study is qualitatively consistent with the assessment of Park et al. (2010) that helicity magnitude abruptly increases on 12/10 and thereafter. A detailed discussion of the process exceeds the scope of this work that mainly focuses on the proposed calculation methodology.
The evolution of the magnetic energy budgets in NOAA AR 10930 is shown in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb. Here we notice that while the potential energy is linearly increasing over the observing interval, in agreement with the increase of the unsigned flux (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationc), the free magnetic energy increases with a faster rate on 12/10 and thereafter, when the relative helicity magnitude increases. The peak helicity at the time of the multiple eruptive Cclass flares coincides with a free energy of erg. The free energy is kept at approximately these levels, albeit showing a moderate increasing trend, until late on 12/12. Thereafter, it increases significantly to peak at erg around the time of the Xclass flare. After the flare, following the decrease of the helicity budget, the free energy decreases to erg, to remain at these levels until the end of the observing interval. Given the small uncertainties, the decrease of erg in the course of the eruption appears significant.
Our freeenergy estimates agree qualitatively with those of Guo et al. (2008) but they are significantly lower than those of He et al. (2011). This is in agreement with our effort to keep the free energy minimum, at the same time excluding from calculation all magnetic connections that close beyond the field of view. This being said, the postflare free energy decrease is quite consistent with Hudson’s (2011) assessment that Xclass flares typically dissipate erg of magnetic energy.
In summary, we find that a plausible physical interpretation of the dynamical evolution of the eruptive NOAA AR 10930 can rely on our calculation of the relative magnetic helicity and free magnetic energy in the region. Moreover, the estimated magnetic energy and relative helicity budgets are consistent with the lowest published estimates, as expected. Given that our calculations (i) stem from a unique solution for the magnetic connectivity matrix, (ii) do not depend on magnetic field extrapolations, and (iii) are relatively inexpensive computationally, we argue that the proposed method is both viable and practical.
5 Discussion and Conclusions
Motivated by the need to achieve a practical, realistic, and selfconsistent assessment of the magnetic energy and relative magnetic helicity budgets in solar active regions we first tackled the problem in the simplified LFF field approximation (Georgoulis & LaBonte 2007 – Paper I). In this case the solution was unique and dependent on the single, fixed forcefree parameter used. However, it is known that there are multiple ways to infer this single value (i.e., Leka & Skumanich, 1999; Leka, 1999) and the one used in Paper I was but one of several methods. Different values give different solutions for the magnetic energy and helicity budgets. Moreover, the LFF field approximation is generally unrealistic in activeregion scales (see, however, Moon et al. (2002) for a different view). For this reason the analysis of Paper I was conceived as the first step toward a more realistic approach of performing magnetic energy and helicity calculations. This step, relying on a NLFF field approximation, is taken in this work.
Multiple methods to calculate the magnetic energy and relative helicity budgets of solar active regions assuming NLFF magnetic fields are long present in the literature. Virtually all of them rely either on a photospheric velocity flow field or on a threedimensional NLFF field of the activeregion corona (for a review, see Démoulin (2007) and references therein). Both the photospheric flow field and the threedimensional coronal NLFF field, however, are not uniquely defined. Therefore, the resulting NLFFfield energy and helicity budgets are, again, modeldependent. An apparently more robust method to calculate the spinning and braiding helicity in observed solar active regions was introduced by Longcope et al. (2007) and applied to NOAA AR 10930 by Ravindra et al. (2011). The method also uses a velocity field but now this field is obtained by tracking the motions of photospheric flux partitions. These partitions are inferred as described in Section 2.1 and Figure References. Feature tracking on individual partitions should be more stable than calculating the entire flow field, although limitations have been reported for this case, as well.
Here we follow a different approach depending on neither photospheric flow fields nor the unknown coronal threedimensional field. Our method depends on a lowerboundary (photospheric or chromospheric) magnetic connectivity matrix that can be inferred either by a NLFF field extrapolation or otherwise. Had we used an extrapolation, our results would also be modeldependent. Although our method is general enough to accommodate any connectivity matrix, we propose and use a unique connectivitymatrix solution for a given fluxpartition map. This solution relies on a simulatedannealing algorithm designed to minimize the distances of connected oppositepolarity partitions, thus emphasizing strong polarity inversion lines. This connectivity methodology has been successful in distinguishing flaring from nonflaring active regions (Georgoulis & Rust, 2007) and will be shown to be of further such importance in a much larger statistical sample (work in preparation). Besides the boundary connectivity, our method alleviates the need for flow fields and threedimensional coronal field vectors by, first, minimizing the magnetic free energy of the activeregion corona and, second, keeping the dominant mutualhelicity terms consistent with the global (within activeregion scales) energyminimization principle. Self terms of magnetic energy and helicity are calculated by generalizing the LFF field analysis of Paper I, while mutual terms are calculated by a practical implementation of the method introduced by Demoulin et al. (2006).
To validate the proposed method we use connectivity matrices derived from NLFF field extrapolations because comparison is then based on the NLFF modeldependent energies and helicities. For the validation we use real activeregion magnetograms, thus avoiding synthetic NLFF fields with a simpler lower boundary and hence a smaller and cruder connectivity matrix. At the same time, the approximate validity of the volumecalculated energies and helicities is guaranteed by the use of wellknown and accepted energy and helicity formulas. We find (Section 3.2) that the results of known volume formulas that require a detailed threedimensional field configuration are generally reproduced by our surface formulas that use only the connectivity matrices inferred from the extrapolations. This justifies the use of the freemagneticenergy formula of Equation (24) as a lower limit of the true free energy, in spite of its weakness to fully describe spacefilling, forcefree fields (Section 2.2).
Following validation, we apply our method to the same set of active regions with Paper I and compare the results (Section 4.1). We find them to be consistent, in general, but with the LFF field approximations overestimating the free magnetic energy and relative magnetic helicity budgets in such a way that overestimation is higher for larger, more complex active regions. In the NLFF field approximation the ratios of the free magnetic energy and the relative magnetic helicity between the two ARs are roughly similar to the ratio of the unsigned flux participating in the magnetic connectivity matrices ( – see Table 1), as opposed to , i.e., the square of the unsigned magnetic flux, obtained by the LFF field approximation of Paper I. In addition, we find that mutualenergy and helicity terms overwhelmingly dominate the respective budgets in both active regions with contributions in excess of 99.5%.
Our NLFF field approach is then applied to a timeseries of vector magnetograms of the eruptive NOAA AR 10930, observed over a period of days (Section 4.2). The results corroborate the findings of Ravindra et al. (2011) that the relative helicity in the region increased abruptly within hours, resulting in significant lefthanded helicity in the region. The peak helicity magnitude we find, however, is times smaller than that of Ravindra et al. (2011) and times smaller than that of Park et al. (2010). We also find that (i) an initial helicity magnitude decrease is associated in time with a cluster of eruptive Cclass flares, and (ii) a more abrupt helicity decrease of relates closely in time with the eruptive X3.4 flare that climaxes the eruptive activity in the region over the observing interval. A similar decrease of erg in the region’s free magnetic energy was also calculated at that time. Both the relative helicity and the free energy remained at these lowerbudget levels until the end of the observing interval. To firmly establish these findings, however, more vector magnetogram data are necessary.
The practical energy and helicity calculations in observed solar active regions being the scope of this work, the ultimate objective, also posed in Paper I, is to acknowledge and outline the possible role of magnetic helicity in the triggering of solar eruptions. We take a first step in this direction in Tziotziou et al. (2012), where the method introduced here is applied to 162 activeregion vector magnetograms to yield the first energyhelicity diagram of solar active regions. This diagram demonstrates a monotonic correlation between the free magnetic energy and the relative magnetic helicity in active regions, at the same time showing a segregation between flaring/eruptive regions and noneruptive ones. This finding reinforces the results of previous works in observed active regions (Nindos & Andrews, 2004; LaBonte et al., 2007; Georgoulis et al., 2009) and in theory (Zhang & Low 2001, 2003 – see also Nindos (2009) for a review) that eruptions leading to CMEs effectively transfer excess magnetic helicity from the Sun outward to the heliosphere. One is tempted to assert, therefore, that if CMEs are means to relieve the Sun from its excess helicity, then helicity itself may play a key role in solar eruptions. Other than the helical kink instability, known to lead to eruptions in some observed filament destabilizations (Rust & LaBonte, 2005), however, and the helicityannihilation mechanisms of Kusano et al. (2003) that remains to be proved, the alleged role of helicity is unknown. Only very recently, Kliem et al. (2012) demonstrated that weakly kinkunstable magnetic configurations can represent observed solareruption features. Moreover, Raouafi et al. (2010) presented evidence that several Xray jets observed by Hinode’s XRay Telescope (XRT; Golub et al. 2007) are preceded my microsigmoids, thus elucidating the possible role of the helical kink instability even in smallscale eruptive activity. Finally, Patsourakos & Vourlidas (2009) stereoscopically observed a small transient sigmoid that erupted giving rise to an observed EIT wave. In view of the above and other results, a detailed investigation of the role of helicity in the preeruption configuration of eruptionprolific solar active regions is well justified. Such an investigation was sketched by Georgoulis (2011) and will be the subject of a study currently in preparation.
Appendix A Calculation of possible values for two discrete magnetic flux tubes and
Per Demoulin et al. (2006), the mutualhelicity parameter of a pair of flux tubes and can be calculated by progressively bringing the interacting pair from infinity to its prescribed position and geometry. This can be generalized for any set of discrete flux tubes, where is now any given pair of tubes belonging to the set. For each case of interaction there are only two possible values of that depend on (i) the geometry of the pair, as reflected by the line segments formed by the footpoint locations of each tube, and (ii) whether tube is “above” tube () or tube is above tube (). By stating that a tube is “above” another tube we imply that its apex is higher than the appex of its mate, with respect to the anchoring boundary that defines the open volume. Demoulin et al. (2006) further demonstrated a practical way of calculating , namely by means of interior angles of the triangles formed by footpoint segments on the anchoring boundary plane. In the following we calculate for all cases pertinent to our study, both reproducing the values of Demoulin et al. (2006), and deriving values for cases that were not examined by these authors.
In practice, is the mean angle by which each line segment ”sees” the other, normalized over . Therefore, assuming a flux tube with positive and negativepolarity footpoints and , respectively (so its footpoint segment is ), each footpoint “sees” the dipole (with footpoint segment ) by angles and , respectively. Then, in case is “above” we have
(A1) 
Similarly, footpoints and of tube will “see” the segment with angles and , respectively. In case is “above” we have
(A2) 
It should be mentioned that interior angles () do not necessarily follow the trigonometric (counterclockwise) convention, so they can be positive or negative. Moreover, it is clear from Equations (A1) and (A2) that .
All possible footpointsegment configurations in our calculations appear in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation. Cases of nonintersecting (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa) and intersecting (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb) segments were also examined by Demoulin et al. (2006). Given that our connectivity matrix has been constructed by connecting magnetic partitions, however, it is very common to find multiple connections connecting a given partition with others. Since all connections are viewed as slender flux tubes originating from the partition’s fluxweighted centroid (Figures Referencesa, Referencesb) we have cases of “matching” footpoints, as well (Figures Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationc, Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationd). The apparent conflict with the principle that magnetic field lines cannot intersect may be raised by clarifying that these “matching” footpoints are, in fact, distinct footpoints but with distances falling into unresolved length scales within a given partition. Therefore, for the sake of simplicity they are thought to originate from the same wellknown location, i.e., the partition’s fluxweighted centroid. This introduces some modifications in values and we calculate these modifications here.
The four possible locations of footpointsegment geometry, as illustrated in Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximation, are as follows:

Nonintersecting footpoints (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationa). It can then be found that the footpoints of flux tube “see” flux tube by the angles
where () are the azimuth angles of the segments (that is, with the trigonometriccircle origin at ). Correspondingly, the footpoints of flux tube “see” flux tube by the angles
Obviously, then, from equations (A1), (A2) we obtain
(A3) reproducing Demoulin et al. (2006). In essence, in case of nonintersecting footpoint segments the two possible values collapse to a single value, regardless of appex heights for the two flux tubes.

Intersecting footpoints (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationb). In case is “above” (upper configuration) we find
In case is “above” (lower configuration), we further have
From Equations (A1) and (A2), then, we find
(A4) also reproducing Demoulin et al. (2006).

Positive “matching” footpoints (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationc). In this case we obviously have
To calculate the remaining interior angles and we first notice that the formed triangle dictates
(A5) The orientation (sign) of , depends on the orientation of the angle between segments and . Angle always follows the sign of while angle always shows opposite orientation. Depending on the orientation of the triangle as a rigid shape, one may further find from trigonometric analysis that the magnitudes of , are given by
(A6) It then becomes trivial to find which of the six possible cases applies for , so that Equations (A6) satisfy Equation (A5). The orientation of , is then found when the respective orientation of is found, that is, by determining whether one forms an interior (hence ) angle from to following (+) or opposing () the trigonometric convention. For the example of Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationc we obviously have , so and .
Calculating the values in this case we always find
(A7) which makes it straightforward to determine the preferred value so that in Equation (23).

Negative “matching” footpoints (Figure Magnetic Energy and Helicity Budgets in the ActiveRegion Solar Corona. II. Nonlinear ForceFree Approximationd). In this case we have
The analysis is symmetric to that of Case C in the sense that always follows the orientation of and