Skip to main content

Sparse Jacobian Construction for Mapped Grid Visco-Resistive Magnetohydrodynamics

  • Conference paper
  • First Online:
Book cover Recent Advances in Algorithmic Differentiation

Part of the book series: Lecture Notes in Computational Science and Engineering ((LNCSE,volume 87))

  • 1843 Accesses

Abstract

We apply the automatic differentiation tool OpenAD toward constructing a preconditioner for fully implicit simulations of mapped grid visco-resistive magnetohydrodynamics (MHD), used in modeling tokamak fusion devices. Our simulation framework employs a fully implicit formulation in time, and a mapped finite volume spatial discretization. We solve this model using inexact Newton-Krylov methods. Of critical importance in these iterative solvers is the development of an effective preconditioner, which typically requires knowledge of the Jacobian of the nonlinear residual function. However, due to significant nonlinearity within our PDE system, our mapped spatial discretization, and stencil adaptivity at physical boundaries, analytical derivation of these Jacobian entries is highly nontrivial. This paper therefore focuses on Jacobian construction using automatic differentiation. In particular, we discuss applying OpenAD to the case of a spatially-adaptive stencil patch that automatically handles differences between the domain interior and boundary, and configuring AD for reduced stencil approximations to the Jacobian. We investigate both scalar and vector tangent mode differentiation, along with simple finite difference approaches, to compare the resulting accuracy and efficiency of Jacobian construction in this application.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD 109.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Bischof, C.H., Green, L., Haigler, K., Knauff, T.: Calculation of sensitivity derivatives for aircraft design using automatic differentiation. In: Proceedings of the 5th AIAA/NASA/USAF/ISSMO Symposium on Multidisciplinary Analysis and Optimization, AIAA 94-4261, pp. 73–84. American Institute of Aeronautics and Astronautics (1994). Also appeared as Argonne National Laboratory, Mathematics and Computer Science Division, Preprint MCS-P419-0294.

    Google Scholar 

  2. Coleman, T.F., Garbow, B.S., Moré, J.J.: Software for estimating sparse Jacobian matrices. ACM Trans. Math. Software 10(3), 329–345 (1984)

    Google Scholar 

  3. Gebremedhin, A.H., Manne, F., Pothen, A.: What color is your Jacobian? graph coloring for computing derivatives. SIAM Review 47(4), 629–705 (2005). DOI 10.1137/S0036144504444711. URL http://link.aip.org/link/?SIR/47/629/1

  4. Griewank, A., Walther, A.: Evaluating Derivatives: Principles and Techniques of Algorithmic Differentiation, 2nd edn. No. 105 in Other Titles in Applied Mathematics. SIAM, Philadelphia, PA (2008). URL http://www.ec-securehost.com/SIAM/OT105.html

  5. Hindmarsh, A.C. et al.: SUNDIALS, suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw. 31(3), 363–396 (2005)

    Google Scholar 

  6. Hovland, P.D., McInnes, L.C.: Parallel simulation of compressible flow using automatic differentiation and PETSc. Tech. Rep. ANL/MCS-P796-0200, Mathematics and Computer Science Division, Argonne National Laboratory (2000). To appear in a special issue of Parallel Computing on “Parallel Computing in Aerospace”

    Google Scholar 

  7. Kelley, C.T.: Iterative Methods for Linear and Nonlinear Equations. SIAM, Philadelphia (1995)

    Google Scholar 

  8. Knoll, D.A., Keyes, D.E.: Jacobian-free Newton-Krylov methods: a survey of approaches and applications. J. Comput. Phys. 193, 357–397 (2004)

    Google Scholar 

  9. Reynolds, D., Samtaney, R., Woodward, C.: A fully implicit numerical method for single-fluid resistive magnetohydrodynamics. J. Comput. Phys. 219, 144–162 (2006)

    Google Scholar 

  10. Reynolds, D., Samtaney, R., Woodward, C.: Operator-based preconditioning of stiff hyperbolic systems. SIAM J. Sci. Comput. 32, 150–170 (2010)

    Google Scholar 

  11. Tadjouddine, M., Forth, S., Qin, N.: Elimination AD applied to Jacobian assembly for an implicit compressible CFD solver. Int. J. Numer. Meth. Fluids 47, 1315–1321 (2005)

    Google Scholar 

  12. Utke, J.: OpenAD. http://www.mcs.anl.gov/OpenAD

  13. Utke, J., Naumann, U., Fagan, M., Tallent, N., Strout, M., Heimbach, P., Hill, C., Wunsch, C.: OpenAD/F: A modular, open-source tool for automatic differentiation of Fortran codes. ACM Transactions on Mathematical Software 34(4), 18:1–18:36 (2008). DOI 10.1145/1377596. 1377598

    Google Scholar 

  14. Utke, J., Naumann, U., Lyons, A.: OpenAD/F: User Manual. Tech. rep., Argonne National Laboratory. Latest version available online at http://www.mcs.anl.gov/OpenAD/openad.pdf

  15. Woods, L.C.: Principles of Magnetoplasma Dynamics. Clarendon Press, Oxford (1987)

    Google Scholar 

Download references

Acknowledgements

The work of D. Reynolds was supported by the U.S. Department of Energy, in grants DOE-ER25785 and LBL-6925354. R. Samtaney acknowledges funding from KAUST for the portion of this work performed at KAUST.

We would also like to thank Steve Jardin for insightful discussions on preconditioning techniques for toroidal plasmas, and Mike Fagan for help in building and using OpenAD for this work.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Daniel R. Reynolds .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Reynolds, D.R., Samtaney, R. (2012). Sparse Jacobian Construction for Mapped Grid Visco-Resistive Magnetohydrodynamics. In: Forth, S., Hovland, P., Phipps, E., Utke, J., Walther, A. (eds) Recent Advances in Algorithmic Differentiation. Lecture Notes in Computational Science and Engineering, vol 87. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-30023-3_2

Download citation

Publish with us

Policies and ethics