GiRaFFE: An Open-Source General Relativistic Force-Free Electrodynamics Code
Zachariah B. Etienne, Mew-Bing Wan, Maria C. Babiuc, Sean T., McWilliams, Ashok Choudhary

TL;DR
GiRaFFE is the first open-source code for simulating force-free electrodynamics in dynamical, relativistic spacetimes, enabling large-scale astrophysical plasma simulations.
Contribution
It introduces GiRaFFE, a novel open-source GRFFE code based on IllinoisGRMHD, compatible with the Einstein Toolkit for scalable, dynamical spacetime simulations.
Findings
Successfully passes flat and curved spacetime tests
Compatible with adaptive-mesh refinement grids
Ready for large-scale astrophysical simulations
Abstract
We present GiRaFFE, the first open-source general relativistic force-free electrodynamics (GRFFE) code for dynamical, numerical-relativity generated spacetimes. GiRaFFE adopts the strategy pioneered by McKinney and modified by Paschalidis and Shapiro to convert a GR magnetohydrodynamic (GRMHD) code into a GRFFE code. In short, GiRaFFE exists as a modification of IllinoisGRMHD, a user-friendly, open-source, dynamical-spacetime GRMHD code. Both GiRaFFE and IllinoisGRMHD leverage the Einstein Toolkit's highly-scalable infrastructure to make possible large-scale simulations of magnetized plasmas in strong, dynamical spacetimes on adaptive-mesh refinement (AMR) grids. We demonstrate that GiRaFFE passes a large suite of both flat and curved-spacetime code tests passed by a number of other state-of-the-art GRFFE codes, and is thus ready for production-scale simulations of GRFFE phenomena of…
| Test name | ||
| (wave speed) | Vector potential | Electric field |
| Fast wave | ||
| () | ||
| Alfvén wave | ||
| () | ||
| Degenerate Alfvén wave | ||
| () | ||
| Three waves | ||
| (stationary Alfvén: , | ||
| fast right-going: | ||
| , | ||
| fast left-going: | ||
| ) | ||
| FFE breakdown | ||
| (none) |
| Test name | & | CFL factor | ||
|---|---|---|---|---|
| Fast wave | ||||
| Alfvén wave | ||||
| Degen. Alfvén | ||||
| Three waves | ||||
| FFE breakdown |
| Test name | Vector potential | Electric field |
|---|---|---|
| Split Monopole | ||
| Exact Wald | ||
| Magnetospheric Wald |
| Test name | CFL factor | |
| Split Monopole | ||
| Exact Wald | ||
| Magnetospheric Wald | ||
| Aligned Rotator |
| Res. | ||||
|---|---|---|---|---|
| H | ||||
| M | H | H | H | H |
| L | H | H | H | H |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
GiRaFFE: An Open-Source General Relativistic Force-Free
Electrodynamics Code
Zachariah B. Etienne1,2,∗, Mew-Bing Wan3, Maria C. Babiuc2,4, Sean T. McWilliams2,5, Ashok Choudhary5
1 Department of Mathematics, West Virginia University, Morgantown, WV 26506, USA
2 Center for Gravitational Waves and Cosmology, West Virginia University, Chestnut Ridge Research Building, Morgantown, WV 26505, USA
3 Institute for Advanced Physics and Mathematics, Zhejiang University of Technology, Hangzhou, 310032, China
4 Department of Physics, Marshall University, Huntington, WV 25755, USA
5 Department of Physics & Astronomy, West Virginia University, Morgantown, WV 26506, USA
∗ E-mail:
Abstract
We present GiRaFFE, the first open-source general relativistic force-free electrodynamics (GRFFE) code for dynamical, numerical-relativity generated spacetimes. GiRaFFE adopts the strategy pioneered by McKinney [32] and modified by Paschalidis and Shapiro [45] to convert a GR magnetohydrodynamic (GRMHD) code into a GRFFE code. In short, GiRaFFE exists as a modification of IllinoisGRMHD [20], a user-friendly, open-source, dynamical-spacetime GRMHD code. Both GiRaFFE and IllinoisGRMHD leverage the Einstein Toolkit’s highly-scalable infrastructure [19, 12] to make possible large-scale simulations of magnetized plasmas in strong, dynamical spacetimes on adaptive-mesh refinement (AMR) grids. We demonstrate that GiRaFFE passes a large suite of both flat and curved-spacetime code tests passed by a number of other state-of-the-art GRFFE codes, and is thus ready for production-scale simulations of GRFFE phenomena of key interest to relativistic astrophysics.
pacs:
52.30.-q, 52.27.Ny, 04.25.D-, 04.25.dg, 04.30.-w, 95.85.Sz, 04.70.Bw
1 Introduction
With LIGO’s first detections of gravitational waves [1, 2], the era of gravitational wave (GW) astronomy has arrived, and an exciting new window on the Universe has been opened. The prospect of multimessenger observations stemming from an observed gravitational wave source with coincident electromagnetic (EM) and/or neutrino signals promises to provide far deeper insights into the extremely violent processes that generate these GW signals.
0.4 seconds after the first GW detection, a weak gamma-ray burst (GRB) lasting 1 second was observed in the hard X-ray band (keV) by the Fermi Gamma-ray Burst Monitor, in a region of the sky overlapping the very large LIGO localization area [14]. Stellar-mass black hole binaries (BHBs) are not generally expected to exist in matter-rich environments assumed necessary to power such a GRB, suggesting that the coincidence is most likely due to a statistical/systematic fluke in the Fermi data, but would indicate the unexpected presence of a tenuous plasma surrounding the BHB if the coincidence proved genuine [6]. Regardless, if Nature does provide an electromagnetic (EM) counterpart to the GW emission from BHBs—whether from a stellar-mass binary observable by Advanced LIGO, intermediate-mass or massive BHBs observable by the Laser Interferometer Space Antenna (LISA), or supermassive BHBs observable by pulsar timing arrays—it will most likely be driven by the interaction of the BHB with a tenuous plasma.
BHBs are not the only systems in which strong-field gravitation could affect the dynamics of a tenuous, magnetically-dominated plasma. Neutron star (NS) and pulsar magnetospheres are other prime examples in which magnetic field lines originating from the intense gravitational fields at the stellar surface continue into the magnetosphere just outside the NS. So just as in the case of BHBs, fully self-consistent modeling of these systems requires that the plasma dynamics be followed in the context of nonperturbative solutions to the general relativistic field equations.
Future gravitational wave detections by LIGO may originate from binary NSs or black hole–neutron star (BHNS) binary mergers. Observing an electromagnetic counterpart to these incredibly violent processes may provide deep insights not only into the behavior of matter at extreme densities, but also the mechanism behind short GRBs. The behavior of binary NS magnetospheres during their late-inspiral phase may launch EM counterparts prior to and during a GW detection. In the case of BHNS binaries, the motion of the BH through the magnetic field of its NS companion during the inspiral can form a unipolar inductor, beaming radiation over the full sky each orbit [18, 23, 35, 43]. At the end of the inspiral, either for a BHNS with a sufficiently light, highly-spinning BH or a BNS with sufficiently high mass, NS disruption and subsequent accretion onto the BH (formed from hypermassive NS collapse in the case of BNS) can launch a classic short GRB jet [7, 36, 44, 42, 48].
In all of the aforementioned systems, the dynamics driving the EM signal involve a strongly magnetized tenuous plasma accelerating within a curved, often highly-dynamical spacetime. Properly modeling such dynamics will require that the appropriate general relativistic versions of the equations governing plasma dynamics be chosen. For regions in which the magnetic-to-gas-pressure ratios are less than or are of order unity, such as the interior of a NS or an accretion disk surrounding a BH or BHB, the plasma dynamics are well-described by the equations of ideal general relativistic magnetohydrodynamics (GRMHD). But as these ratios far exceed unity—as is the case for tenuous plasma outside BHs, BHBs, and NSs—the GRMHD equations become stiff, and solving instead the equations of general relativistic force-free electrodynamics (GRFFE) is far more numerically tractable. The equations of GRFFE are a limiting case of ideal GRMHD, in which the magnetic fields (as opposed to hydrodynamic densities and pressures) entirely drive the plasma dynamics.
While technically it would be best to employ an algorithm that can accommodate arbitrary magnetic-to-gas-pressure ratios, in practical terms, the dynamics of many systems of interest are well approximated by either the GRMHD or GRFFE limits. In exceptional cases such as the boundary between a NS and its magnetosphere, an optimal method would allow for feedback from the ideal GRMHD region into the GRFFE region, and vice-versa. To this end, methods have been developed for feeding information from the ideal GRMHD region of the NS interior into the magnetosphere, which is well-described by the equations of GRFFE (see [31, 43, 45]). These methods effectively impose a dynamical boundary condition for the surface of the magnetosphere (i.e., the surface outside of which the equations of GRFFE are solved). While GRMHD flows can inform regions well-described by the GRFFE equations, the reverse is not yet possible with current GRFFE prescriptions, as the GRFFE equations destroy information about hydrodynamic pressures and densities—two essential quantities that must be specified within the ideal GRMHD framework.
The GRFFE equations and their application in modeling important astrophysical scenarios have a long history in the literature and continue to be an active area of study by many independent groups. Komissarov [26] was one of the first to develop a conservative GRFFE formalism and numerical code in the context of strong-field spacetimes to study the properties of the plasma-filled magnetospheres of black holes [27, 28, 29]. Later, McKinney would introduce a general relativistic force-free (GRFFE) numerical formulation that, through minimal modification of a general relativistic magnetohydrodynamic (GRMHD) code, enables evolutions of the GRFFE equations of motion [32, 33, 34]. Adopting such a prescription, Palenzuela et al [38, 39, 40] studied the interaction of binary and single black holes with ambient magnetic fields within the GRFFE approximation, observing the formation of a dual jet morphology when BHBs orbited within a uniform background magnetic field, and a single jet in the context of a single, spinning black hole—a dramatic confirmation of the Blandford-Znajek mechanism [8] (see also [49]). Motivated in part by these results, as well as a desire to more deeply explore important GRFFE phenomena in this age of multimessenger astrophysics, multiple other independent groups have developed GRFFE codes [3, 10, 11, 37, 41, 46, 47, 54, 49].
One GRFFE code of particular interest to work presented here is that of Paschalidis and Shapiro [45], who extended McKinney’s prescription for GRMHD-to-GRFFE code conversion. In part this extension focused on smoothly matching general relativistic ideal MHD to its force-free limit, so that GRMHD dynamics can inform regions of the physical domain more accurately modeled by a GRFFE code. IllinoisGRMHD is an open-source rewrite of the GRMHD code on which Paschalidis and Shapiro’s GRFFE code is based, and the code we present here, GiRaFFE 111GiRaFFE and both initial data modules (GiRaFFEfood and ShiftedKerrSchild) are open source (under the 2-clause BSD or GNU General Public License, version 2.0 or greater) and can be downloaded from https://bitbucket.org/zach_etienne/wvuthorns/., is based on IllinoisGRMHD. Unlike the code of Paschalidis and Shapiro, GiRaFFE is a pure GRFFE code, not currently designed to match the equations of GRMHD to its force-free limit.
GiRaFFE represents the first open-source GRFFE code designed for dynamical spacetime simulations. Based on IllinoisGRMHD, GiRaFFE employs the prescription devised by McKinney [32] and refined by Paschalidis and Shapiro [45] for converting a GRMHD code into a GRFFE code. Like the code on which it was based, GiRaFFE is fully compatible with the Einstein Toolkit adaptive-mesh refinement (AMR) Cactus/Carpet infrastructure [19, 12], and is therefore highly scalable, to tens of thousands of cores. Also, GiRaFFE is quite compact, existing in only about 1,600 lines of code. For dynamical-spacetime GRFFE simulations, GiRaFFE may be immediately coupled to McLachlan [9], a state-of-the-art, open-source, Kranc-generated [25, 30] spacetime evolution module within the Einstein Toolkit.
The rest of the paper is structured as follows. In Sec. 2, we review our adopted GRFFE formalism and in Sec. 3 how these equations are solved within the GiRaFFE code. Then in Sec. 4, we present a large suite of GRFFE code tests, and finally in Sec. 5 we summarize the paper and present plans for future work.
2 Adopted GRFFE Formalism
All equations are written in geometrized units, such that , and Einstein notation is chosen for implied summation. Greek indices span all 4 spacetime dimensions, and Latin indices span only the 3 spatial dimensions.
The line element for our spacetime in standard 3+1 form is given by
[TABLE]
where denotes the proper time interval between adjacent spatial hypersurfaces separated by coordinate times and , the magnitude of the spatial coordinate shift between adjacent hypersurfaces, and is the three-metric within a given hypersurface at coordinate time .
Our 3+1 GRFFE formalism is written in terms of electric and magnetic fields as measured by an observer co-moving and normal to the spatial hypersurface, with 4-velocity . The stress-energy tensor of the electromagnetic field is defined as:
[TABLE]
where is the electromagnetic (or Faraday) tensor:
[TABLE]
In terms of the Faraday tensor, the electric and magnetic fields in this frame are given by
[TABLE]
where is the dual of the Faraday tensor, and is the rank-4 Levi-Civita tensor, with the regular permutation symbol. In ideal MHD, the electric field vanishes for observers moving parallel to the plasma with 4-velocity :
[TABLE]
I.e., when an observer moves in a direction parallel to the magnetic field lines, the electric field vanishes. This is simply a statement of Ohm’s law for the case of perfect conductivity. One implication of perfect conductivity is that “magnetic field lines remain attached to the fluid elements they connect”—the so-called “frozen-in condition of MHD”. In addition, so long as , the ideal MHD condition implies that
[TABLE]
See, e.g., [26, 45] for further discussion.
In addition to the ideal MHD condition , force-free electrodynamics also assumes that the plasma dynamics are completely driven by the electromagnetic fields (as opposed to, e.g., hydrodynamic pressure gradients). This implies that the stress-energy of the plasma: , is completely dominated by the electromagnetic terms, which yields the conservation equation [39, 41]:
[TABLE]
where is the 3-current, and the charge density. This formalism is valid in the tenuous plasma of the stellar magnetosphere, where the rest-mass density is vanishingly small and assumed to be zero. From these, the 4-current can be expressed
The left-hand side of Eq. 10 is simply the general relativistic expression for the Lorentz force, indicating that indeed the Lorentz force is zero in GRFFE. Notice that if we assume we are not in electrovacuum (), multiplying Eq. 10 by yields the familiar constraint of force-free electrodynamics (see [26, 45] for full derivation).
In summary, the force-free constraints can be written
[TABLE]
Under these constraints, the GRFFE evolution equations consist of the Cauchy momentum equation and the induction equation (see [26, 32, 45] for derivation):
The Cauchy momentum equation follows directly from the spatial components of (the time component yields the energy equation, which in GRFFE is redundant). We choose to write the momentum equation in conservative form and in terms of the densitized spatial Poynting flux one-form ,
[TABLE]
where can be derived from the expression of the Poynting one-form,
[TABLE] 2. 2.
The induction equation in the force-free limit is derived from the spatial components of (the time components yield the “no-monopoles” constraint), and can be written in terms of the densitized magnetic field as
[TABLE]
where . As detailed in Appendix A of[45], the force-free conditions do not uniquely constrain , allowing for the freedom to choose from a one-parameter family. As in [32, 45], we choose to correspond to the minimum plasma 3-velocity that satisfies . This choice of is often referred to as the drift velocity, which can be defined in terms of known variables as
[TABLE]
3 Numerical Algorithms
We briefly review the numerical algorithms employed in GiRaFFE to solve the equations of GRFFE as outlined in Sec. 2.
GiRaFFE fully supports Cartesian adaptive mesh refinement (AMR) grids via the Cactus/Carpet [12] infrastructure within the Einstein Toolkit [19].
As in IllinoisGRMHD, GiRaFFE guarantees that the magnetic fields remain divergenceless to roundoff error even on AMR grids by evolving the vector potential , where is spatial (), instead of the magnetic fields directly. The vector potential fields exist on a staggered grid (as defined in Table 1 of Ref. [20]) such that our magnetic fields are evolved according to the flux constrained transport (FluxCT) algorithm of Refs. [5, 52].
Our choice of vector potential requires that we solve the vector potential version of the induction equation
[TABLE]
where is the anti-symmetric Levi-Civita tensor and is the 3-metric determinant, which in a flat spacetime in Cartesian coordinates reduces to 1. in Eq. 17 is computed from the vector potential via
[TABLE]
is evolved via an additional electromagnetic gauge evolution equation, which was devised specifically to avoid the buildup of numerical errors due to zero-speed characteristic modes [21] on AMR grids. Our electromagnetic gauge is identical to the Lorenz gauge, but with an exponential damping term with damping constant [22]:
[TABLE]
Step 0: Initial data: In addition to 3+1 metric quantities in the Arnowitt-Deser-Misner (ADM) formalism [4], GiRaFFE requires that the “Valencia” 3-velocity and vector potential one-form be set initially. Regarding the former, the “Valencia” 3-velocity is related to the 3-velocity appearing in the induction equation via
[TABLE]
As for , for all cases in this paper, we set the evolution variable initially, and is set based on our initial physical scenario.
After and are set, is computed via Eq. 18, and then the evolution variable is given by
[TABLE]
Step 1: Evaluation of evolution equations: In tandem with the high-resolution shock-capturing (HRSC) scheme within GiRaFFE, the Runge-Kutta fourth-order (RK4) scheme is chosen to march our evolution variables and forward in time from their initial values, adopting precisely the same reconstruction and Riemann solver algorithms as in IllinoisGRMHD (see Ref. [20] for more details). In short, and are evolved forward in time using the Piecewise Parabolic Method (PPM) [13] for reconstruction and a Harten-Lax-van Leer (HLL)-based algorithm [24, 17] for approximately solving the Riemann problem. Meanwhile, spatial derivatives within ’s evolution equation (Eq. 19) are evaluated via finite difference techniques (as in IllinoisGRMHD).
Step 2: Boundary conditions on : At the end of each RK4 substep, the evolved variables and have been updated at all points except the outer boundaries. So next the outer boundary conditions on and are applied. As no exact outer boundary conditions typically exist for systems of interest to GiRaFFE, we typically take advantage of AMR and push our outer boundary out of causal contact from the physical system of interest. However, to retain good numerical stability, we apply “reasonable” outer boundary conditions. Specifically, values of and in the interior grid are linearly extrapolated to the outer boundary.
Step 3: Computing : is next computed from via Eq. 18.
Step 4: Applying GRFFE constraints & computing : Truncation, roundoff, and under-sampling errors will at times push physical quantities into regions that violate the GRFFE constraints. To nudge the variables back into a physically realistic domain, we apply the same strategy as was devised in Ref. [45] to guarantee that the GRFFE constraints remain satisfied:
First, we adjust via
[TABLE]
to enforce , which as shown by Ref. [45], is equivalent to the GRFFE constraint Eq. 11.
Next, we limit the Lorentz factor of the plasma, typically to be 2,000, by rescaling according to Eq. 92 in Ref. [45]. After is rescaled the 3-velocity is recomputed via Eq. 16.
Finally, errors within our numerical scheme dissipate sharp features, so when current sheets appear, they are quickly and unphysically dissipated. This is unfortunate because current sheets lie at the heart of many GRFFE phenomena. So to remedy the situation, we apply the basic strategy of McKinney [32] (that was also adopted by Paschalidis and Shapiro [45]) and set the velocity perpendicular to the current sheet to zero. For example, if the current sheet exists on the plane, then , which we set to zero via , where is a unit normal one-form with . Specifically, in the case of a current sheet on the plane, we set
[TABLE]
at all gridpoints that lie within of the current sheet.
At present the code addresses numerical dissipation of current sheets only if they appear on the equatorial plane. For cases in which current sheets appear off of the equatorial plane or spontaneously, [32] suggest the development of algorithms akin to reconnection-capturing strategies [50]. We intend to explore such approaches in future work.
Step 5: Boundary conditions on : is set to zero at a given face of our outermost AMR grid cube unless the velocity is outgoing. Otherwise the value for the velocity is simply copied from the interior grid to the nearest neighbor on a face-by-face basis.
After boundary conditions on are updated, all data needed for the next RK4 substep have been generated, so we return to Step 1.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] B. P. Abbott, R. Abbott, T. D. Abbott, M. R. Abernathy, F. Acernese, K. Ackley, C. Adams, T. Adams, P. Addesso, R. X. Adhikari, and et al. GW 151226: Observation of Gravitational Waves from a 22-Solar-Mass Binary Black Hole Coalescence. Phys. Rev. Lett. , 116(24):241103, June 2016.
- 2[2] B. P. Abbott, R. Abbott, T. D. Abbott, M. R. Abernathy, F. Acernese, K. Ackley, C. Adams, T. Adams, P. Addesso, R. X. Adhikari, and et al. Observation of Gravitational Waves from a Binary Black Hole Merger. Phys. Rev. Lett. , 116(6):061102, February 2016.
- 3[3] D. Alic, P. Moesta, L. Rezzolla, O. Zanotti, and J. L. Jaramillo. Accurate simulations of binary black-hole mergers in force-free electrodynamics. Astrophys. J. , 754:36, 2012.
- 4[4] R. Arnowitt, S. Deser, and C. W. Misner. Dynamical Structure and Definition of Energy in General Relativity. Phys. Rev. , 116:1322–1330, December 1959.
- 5[5] D. Balsara and D. S. Spicer. A staggered mesh algorithm using high order godunov fluxes to ensure solenoidal magnetic fields in magnetohydrodynamic simulations. J. Comp. Phys. , 149(2):270292, 1999.
- 6[6] K. Belczynski, V. Kalogera, and T. Bulik. A Comprehensive Study of Binary Compact Objects as Gravitational Wave Sources: Evolutionary Channels, Rates, and Physical Properties. Astrophys. J. , 572:407–431, June 2002.
- 7[7] E. Berger. Short-Duration Gamma-Ray Bursts. Ann. Rev. Astron. Astrophys. , 52:43–105, 2014.
- 8[8] R. D. Blandford and R. L. Znajek. Electromagnetic extraction of energy from Kerr black holes. Mon. Not. R. Astron. Soc. , 179:433, 1977.
