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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
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.
Coleman, T.F., Garbow, B.S., Moré, J.J.: Software for estimating sparse Jacobian matrices. ACM Trans. Math. Software 10(3), 329–345 (1984)
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
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
Hindmarsh, A.C. et al.: SUNDIALS, suite of nonlinear and differential/algebraic equation solvers. ACM Trans. Math. Softw. 31(3), 363–396 (2005)
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”
Kelley, C.T.: Iterative Methods for Linear and Nonlinear Equations. SIAM, Philadelphia (1995)
Knoll, D.A., Keyes, D.E.: Jacobian-free Newton-Krylov methods: a survey of approaches and applications. J. Comput. Phys. 193, 357–397 (2004)
Reynolds, D., Samtaney, R., Woodward, C.: A fully implicit numerical method for single-fluid resistive magnetohydrodynamics. J. Comput. Phys. 219, 144–162 (2006)
Reynolds, D., Samtaney, R., Woodward, C.: Operator-based preconditioning of stiff hyperbolic systems. SIAM J. Sci. Comput. 32, 150–170 (2010)
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)
Utke, J.: OpenAD. http://www.mcs.anl.gov/OpenAD
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
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
Woods, L.C.: Principles of Magnetoplasma Dynamics. Clarendon Press, Oxford (1987)
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
Corresponding author
Editor information
Editors and Affiliations
Rights 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
DOI: https://doi.org/10.1007/978-3-642-30023-3_2
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-30022-6
Online ISBN: 978-3-642-30023-3
eBook Packages: Mathematics and StatisticsMathematics and Statistics (R0)