A Caltech Library Service

GRHydro: a new open-source general-relativistic magnetohydrodynamics code for the Einstein toolkit

Mösta, Philipp and Mundim, Bruno C. and Faber, Joshua A. and Haas, Roland and Noble, Scott C. and Bode, Tanja and Löffler, Frank and Ott, Christian D. and Reisswig, Christian and Schnetter, Erik (2014) GRHydro: a new open-source general-relativistic magnetohydrodynamics code for the Einstein toolkit. Classical and Quantum Gravity, 31 (1). Art. No. 015005. ISSN 0264-9381. doi:10.1088/0264-9381/31/1/015005.

PDF - Submitted Version
See Usage Policy.


Use this Persistent URL to link to this item:


We present the new general-relativistic magnetohydrodynamics (GRMHD) capabilities of the Einstein toolkit, an open-source community-driven numerical relativity and computational relativistic astrophysics code. The GRMHD extension of the toolkit builds upon previous releases and implements the evolution of relativistic magnetized fluids in the ideal MHD limit in fully dynamical spacetimes using the same shock-capturing techniques previously applied to hydrodynamical evolution. In order to maintain the divergence-free character of the magnetic field, the code implements both constrained transport and hyperbolic divergence cleaning schemes. We present test results for a number of MHD tests in Minkowski and curved spacetimes. Minkowski tests include aligned and oblique planar shocks, cylindrical explosions, magnetic rotors, Alfvén waves and advected loops, as well as a set of tests designed to study the response of the divergence cleaning scheme to numerically generated monopoles. We study the code's performance in curved spacetimes with spherical accretion onto a black hole on a fixed background spacetime and in fully dynamical spacetimes by evolutions of a magnetized polytropic neutron star and of the collapse of a magnetized stellar core. Our results agree well with exact solutions where these are available and we demonstrate convergence. All code and input files used to generate the results are available on This makes our work fully reproducible and provides new users with an introduction to applications of the code.

Item Type:Article
Related URLs:
URLURL TypeDescription Paper
Mösta, Philipp0000-0002-9371-1447
Faber, Joshua A.0000-0003-1724-3474
Haas, Roland0000-0003-1424-6178
Ott, Christian D.0000-0003-4993-2055
Schnetter, Erik0000-0002-4518-9017
Additional Information:© 2014 IOP Publishing Ltd. Received 16 May 2013, in final form 23 September 2013. Published 15 November 2013. We thank Bruno Giacomazzo for use of his exact Riemann solver code, as well as helpful conversations on a number of topics related to the work here. We also thank E Abdikamalov, M Campanelli, M Duez, Z Etienne, B Farris, U Gamma, P Laguna, L Lehner, C Lousto, C Palenzuela, V Paschilidis, J Penner and Y Zlochower for useful conversations related to various aspects of the presented work. The Einstein Toolkit is directly supported by the National Science Foundation in the USA under the grant nos. 0903973 / 0903782 / 0904015 (CIGR) and 1212401 / 1212426 / 1212433 / 1212460 (Einstein Toolkit). Related grants contribute directly and indirectly to work in support of the Einstein Toolkit, including NSF AST-1028087, NSF PHY-1214449, NSF AST-1212170, CAREER NSF PHY-0969855, NSF OCI-0905046, DMS-0820923, NASA 08-ATFP08-0093, an NSERC grant to Erik Schnetter, and Deutsche Forschungsgemeinschaft grant SFB/Transregio 7 ‘Gravitational-Wave Astronomy’. Christian Ott acknowledges support from the Alfred P Sloan Foundation. Roland Haas acknowledges support by the Natural Sciences and Engineering Council of Canada. Christian Reisswig acknowledges support by NASA through Einstein Postdoctoral Fellowship grant no. PF2-130099 awarded by the Chandra X-ray center, which is operated by the Smithsonian Astrophysical Observatory for NASA under contract NAS8-03060. Tanja Bode acknowledges support from NSF grants 0941417/12058564. Portions of this research were conducted with computational resources provided by Louisiana State University (allocations hpc_cactus, hpc_numrel and hpc_hyrel), by the Louisiana Optical Network Initiative (allocations loni_cactus and loni_numrel), by the National Science Foundation through XSEDE resources (allocations TG-PHY060027N, TGASC120003, TG-PHY100033, TG-MCA02N014, and TG-PHY120016), the Georgia Tech FoRCE cluster, and the Caltech compute cluster Zwicky (NSF MRI award PHY-0960291).
Funding AgencyGrant Number
Natural Sciences and Engineering Research Council of Canada (NSERC)UNSPECIFIED
Deutsche Forschungsgemeinschaft (DFG)SFB/Transregio 7
Alfred P. Sloan FoundationUNSPECIFIED
NASA Einstein Postdoctoral FellowshipPF2-130099
Georgia Tech FoRCE clusterUNSPECIFIED
NSF MRIPHY-0960291
Subject Keywords:general-relativistic MHD, Einstein toolkit
Issue or Number:1
Classification Code:PACS: 04.25.D−, 04.30.−w, 04.70.−s, 07.05.Tp, 95.75.Pq, 97.60.Lf, 95.30.Qd, 95.30.Sf, 04.20.Gz. MSC: 83C05, 83C57, 83C75
Record Number:CaltechAUTHORS:20131224-073746921
Persistent URL:
Official Citation:GRHydro: a new open-source general-relativistic magnetohydrodynamics code for the Einstein toolkit Philipp Mösta et al 2014 Class. Quantum Grav. 31 015005
Usage Policy:No commercial reproduction, distribution, display or performance rights in this work are provided.
ID Code:43158
Deposited By: Ruth Sustaita
Deposited On:24 Dec 2013 16:27
Last Modified:10 Nov 2021 16:33

Repository Staff Only: item control page