Skip to main content

Advertisement

Log in

A Check on the Validity of Magnetic Field Reconstructions

  • Published:
Solar Physics Aims and scope Submit manuscript

Abstract

We investigate a method to test whether a numerically computed model coronal magnetic field \({\boldsymbol {B}}\) departs from the divergence-free condition (also known as the solenoidality condition). The test requires a potential field \({\boldsymbol {B}}_{0}\) to be calculated, subject to Neumann boundary conditions, given by the normal components of the model field \({\boldsymbol {B}}\) at the boundaries. The free energy of the model field may be calculated using \(\frac{1}{2\mu _{0}}\int ({\boldsymbol {B}}-{\boldsymbol {B}}_{0})^{2}\mathrm{d}V\), where the integral is over the computational volume of the model field. A second estimate of the free energy is provided by calculating \(\frac{1}{2\mu _{0}}\int {\boldsymbol {B}}^{2}\,\mathrm{d}V-\frac{1}{2\mu _{0}}\int {\boldsymbol {B}}_{0}^{2}\,\mathrm{d}V\). If \({\boldsymbol {B}}\) is divergence free, the two estimates of the free energy should be the same. A difference between the two estimates indicates a departure from \(\nabla \cdot {\boldsymbol {B}}=0\) in the volume. The test is an implementation of a procedure proposed by Moraitis et al. (Solar Phys. 289, 4453, 2014) and is a simpler version of the Helmholtz decomposition procedure presented by Valori et al. (Astron. Astrophys. 553, A38, 2013). We demonstrate the test in application to previously published nonlinear force-free model fields, and also investigate the influence on the results of the test of a departure from flux balance over the boundaries of the model field. Our results underline the fact that, to make meaningful statements about magnetic free energy in the corona, it is necessary to have model magnetic fields that satisfy the divergence-free condition to a good approximation.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6

Similar content being viewed by others

Notes

  1. Also known as the solenoidality condition.

  2. Further details of the CRUMP code are discussed in the Appendix.

  3. The solution volumes are available for download from http://dx.doi.org/10.7910/DVN/7ZGD9P .

  4. To make a meaningful comparison between the models, the analysis volume is chosen to be the largest common volume for all codes and resolutions. The volume does not include the entire available AR 10978 data.

  5. The parameter \(\alpha \) must be non-zero, so that the final field configuration has non-zero \({\boldsymbol{B}}_{\mathrm{c}}\), \(W_{\mathrm{f1}}\), and \(W_{\mathrm{f2}}\).

References

  • Alissandrakis, C.E.: 1981, On the computation of constant alpha force-free magnetic field. Astron. Astrophys. 100, 197. ADS .

    ADS  Google Scholar 

  • Amari, T., Boulmezaoud, T.Z., Aly, J.J.: 2006, Well posed reconstruction of the solar coronal magnetic field. Astron. Astrophys. 446, 691. DOI . ADS .

    Article  ADS  MATH  Google Scholar 

  • Barnes, G., Leka, K.D., Schrijver, C.J., Colak, T., Qahwaji, R., Ashamari, O.W., Yuan, Y., Zhang, J., McAteer, R.T.J., Bloomfield, D.S., Higgins, P.A., Gallagher, P.T., Falconer, D.A., Georgoulis, M.K., Wheatland, M.S., Balch, C., Dunn, T., Wagner, E.L.: 2016, A comparison of flare forecasting methods. I. Results from the “All-Clear” Workshop. Astrophys. J. 829, 89. DOI . ADS .

    Article  ADS  Google Scholar 

  • Briggs, W.L., Henson, V.E., McCormick, S.F.: 2000, A Multigrid Tutorial, 2nd edn. SIAM, Philadelphia ISBN 0-89871-462-1. DOI .

    Book  MATH  Google Scholar 

  • Chandra, R., Dagum, L., Kohr, D., Maydan, D., McDonald, J., Menon, R.: 2001, Parallel Programming in OpenMP, Morgan Kaufmann, San Francisco. ISBN 9781558606715.

    Google Scholar 

  • Chiu, Y.T., Hilton, H.H.: 1977, Exact Green’s function method of solar force-free magnetic-field computations with constant alpha. I – Theory and basic test cases. Astrophys. J. 212, 873. DOI . ADS .

    Article  ADS  Google Scholar 

  • DeRosa, M.L., Wheatland, M.S., Leka, K.D., Barnes, G., Amari, T., Canou, A., Gilchrist, S.A., Thalmann, J.K., Valori, G., Wiegelmann, T., Schrijver, C.J., Malanushenko, A., Sun, X., Régnier, S.: 2015, The influence of spatial resolution on nonlinear force-free modeling. Astrophys. J. 811, 107. DOI . ADS .

    Article  ADS  Google Scholar 

  • Metcalf, M., Reid, J., Cohen, M.: 2011, Modern Fortran Explained, 4th edn. Oxford University Press, New York. ISBN 9780199601417.

    MATH  Google Scholar 

  • Moraitis, K., Tziotziou, K., Georgoulis, M.K., Archontis, V.: 2014, Validation and benchmarking of a practical free magnetic energy and relative magnetic helicity budget calculation in solar magnetic structures. Solar Phys. 289, 4453. DOI . ADS .

    Article  ADS  Google Scholar 

  • Moraitis, K., Toutountzi, A., Isliker, H., Georgoulis, M., Vlahos, L., Chintzoglou, G.: 2016, An observationally-driven kinetic approach to coronal heating. Astron. Astrophys. 596, A56. DOI . ADS .

    Article  ADS  Google Scholar 

  • Press, W.H., Teukolsky, S.A., Vetterling, W.T., Flannery, B.P.: 1992, Numerical Recipes in FORTRAN. The Art of Scientific Computing. ADS .

    MATH  Google Scholar 

  • Su, J.T., Jing, J., Wang, S., Wiegelmann, T., Wang, H.M.: 2014, Statistical study of free magnetic energy and flare productivity of solar active regions. Astrophys. J. 788, 150. DOI . ADS .

    Article  ADS  Google Scholar 

  • Valori, G., Kliem, B., Fuhrmann, M.: 2007, Magnetofrictional extrapolations of low and Lou’s force-free equilibria. Solar Phys. 245, 263. DOI . ADS .

    Article  ADS  Google Scholar 

  • Valori, G., Kliem, B., Török, T., Titov, V.S.: 2010, Testing magnetofrictional extrapolation with the Titov–Démoulin model of solar active regions. Astron. Astrophys. 519, A44. DOI . ADS .

    Article  ADS  Google Scholar 

  • Valori, G., Démoulin, P., Pariat, E., Masson, S.: 2013, Accuracy of magnetic energy computations. Astron. Astrophys. 553, A38. DOI . ADS .

    Article  ADS  Google Scholar 

  • Wheatland, M.S.: 2007, Calculating and testing nonlinear force-free fields. Solar Phys. 245, 251. DOI . ADS .

    Article  ADS  Google Scholar 

  • Wheatland, M.S., Sturrock, P.A., Roumeliotis, G.: 2000, An optimization approach to reconstructing force-free fields. Astrophys. J. 540, 1150. DOI . ADS .

    Article  ADS  Google Scholar 

  • Wiegelmann, T., Inhester, B.: 2010, How to deal with measurement errors and lacking data in nonlinear force-free coronal magnetic field modelling? Astron. Astrophys. 516, A107. DOI . ADS .

    Article  ADS  Google Scholar 

  • Wiegelmann, T., Thalmann, J.K., Inhester, B., Tadesse, T., Sun, X., Hoeksema, J.T.: 2012, How should one optimize nonlinear force-free coronal magnetic field extrapolations from SDO/HMI vector magnetograms? Solar Phys. 281, 37. DOI . ADS .

    Article  ADS  Google Scholar 

Download references

Acknowledgements

This work was funded in part by an Australian Research Council Discovery Project (DP160102932). The authors thank Don Melrose and the referee for helpful comments.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to A. Mastrano.

Ethics declarations

Disclosure of Potential Conflicts of Interest

The authors declare that they have no conflicts of interest.

Appendix

Appendix

In this appendix we describe the code called Checkerboard Relaxation Method Used for Potential field reconstruction (CRUMP) and its application to a simple test case. We show that the numerical error for this case is consistent with the truncation error of the second-order scheme employed by the code.

1.1 A.1 Details of the CRUMP Code

The CRUMP code solves the scalar Laplace equation in a Cartesian box using a second-order finite-difference method. Specifically, second-order centered differences are used to approximate the Laplacian at interior points (Press et al., 1992). At the boundary, ghost points are used to enforce Neumann boundary conditions to second order. The code is implemented in the Fortran2003 language (Metcalf, Reid, and Cohen, 2011) and is parallelized for shared-memory parallel computers using the OpenMP standard (Chandra et al., 2001).

The discrete system is solved using the checkerboard (red-black) Gauss–Seidel relaxation method (Press et al., 1992; Briggs, Henson, and McCormick, 2000). Successive over-relaxation with Chebyshev acceleration is used to speed up convergence of the scheme (Press et al., 1992). In principle, to achieve convergence for a mesh with \(N\) mesh points in each dimension, over-relaxation takes on the order of \(N\) iterations to converge (Press et al., 1992). It is difficult to compute the exact number required a priori, so that in practice, the calculation is halted when the difference between successive iterations is below a user-defined threshold. The code computes the scalar potential, and the magnetic field is found numerically using the second-order centered-difference approximation to the gradient.

Since the code uses Neumann boundary conditions on all six boundaries of the Cartesian domain, there is no unique solution to the linear system: a constant can be added to any solution to produce another one that both solves Laplace’s equation and satisfies the boundary conditions (Briggs, Henson, and McCormick, 2000). To break this degeneracy, we pick the particular solution whose mean over the domain is zero. This condition is enforced at each iteration by making the replacement

$$ u \rightarrow u - \langle u \rangle , $$
(21)

where \(\langle u \rangle \) is the mean of \(u\) over all mesh points.

1.2 A.2 Numerical Error Scaling for the CRUMP Code

To demonstrate the accuracy of the code, we apply it to a simple analytic test case and measure the numerical error for different mesh resolutions. We show that the code achieves the expected second-order accuracy.

We measure the numerical error using two metrics. The first metric is the component-wise maximum difference between the numerical and analytic solutions, i.e.

$$ E_{\mathrm{diff}} = \text{max} ( \boldsymbol{B} - \boldsymbol{B}_{ \mathrm{ex}} ) , $$
(22)

where \(\boldsymbol{B}_{\mathrm{ex}}\) is the exact analytic field. The second metric is the maximum value of the divergence over the domain, i.e.

$$ E_{\mathrm{div}}(\boldsymbol{B}) = \text{max} ( \nabla \cdot \boldsymbol{B} ) . $$
(23)

The divergence is computed numerically using a second-order centered-difference scheme. As a result, an additional truncation error is introduced by this approximation. To measure this error, it is instructive to compute \(E_{\mathrm{div}}\) for the exact solution as well.

To test CRUMP, we apply it to the simple analytic magnetic field with components

$$\begin{aligned} &B_{x} = - \frac{k}{A} \sin {(kx)}\cos {(ky)}\cosh \bigl[l(z-L_{z})\bigr], \end{aligned}$$
(24)
$$\begin{aligned} & B_{y} = -\frac{k}{A}\cos {(kx)}\sin {(ky)}\cosh \bigl[l(z-L_{z})\bigr], \end{aligned}$$
(25)

and

$$ B_{z} = +\frac{l}{A}\cos {(kx)}\cos {(ky)}\sinh \bigl[l(z-L_{z})\bigr]. $$
(26)

We set \(A = \sinh (l)l\), \(k = 2\pi \), and \(L_{z}=1\). The variable \(l\) must take the value \(l = \sqrt{2}k\) to ensure that \(\nabla \cdot \boldsymbol{B} = 0\).

We construct Neumann boundary conditions for CRUMP from Equations 24 – 26. We compute the solution in a domain that has a length of unity in each dimension and the same number of mesh points in each dimension. We perform tests at different resolutions by increasing the number of mesh points.

Figure 7 shows the values of the metrics defined by Equations 22 and 23 computed from the numerical solutions produced by CRUMP for different values of the mesh spacing \(h\). For each test, we terminate the relaxation when the difference between iterations is below \(10^{-15}\), which is close to the double-precision machine epsilon.

Figure 7
figure 7

Numerical error metrics for the CRUMP code at different resolutions. The metrics measure the maximum difference between the numerical and analytic solutions (\(E_{\mathrm{diff}}\)) and the maximum value of the divergence (\(E_{\mathrm{div}}(\boldsymbol{B})\)). Dataset \(E_{\mathrm{div}}(\boldsymbol{B}_{\mathrm{ex}})\) shows the divergence metric computed for the analytic magnetic field. Because the evaluation of this metric involves numerical derivatives, its value is non-zero even for the exact solution. The straight lines show power-law fits to the data. The power-law indices are close to two in each case, indicating that the code achieves second-order scaling, as expected for a second-order scheme.

Figure 7 also shows the value of the metric \(E_{\mathrm{div}}\) computed for the analytic solution. For all resolutions, the value of \(E_{\mathrm{div}}\) for the numerical solution is lower than that obtained by applying the second-order centered-difference scheme directly on the analytic solution, implying that we achieve a small error in the actual divergence for this particular test case.

Figure 7 shows power-law fits to each of the datasets (straight lines). We find that the power-law indices are close to a value of two. This indicates that the numerical error for CRUMP is consistent with the truncation error of the second-order difference scheme used.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Mastrano, A., Wheatland, M.S. & Gilchrist, S.A. A Check on the Validity of Magnetic Field Reconstructions. Sol Phys 293, 130 (2018). https://doi.org/10.1007/s11207-018-1351-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11207-018-1351-0

Keywords

Navigation