GiRaFFE_NRPy
: Basic Equations¶In this tutorial, we introduce the basic GRFFE equations that we wish to solve.
Throughout this section and beyond, we will work in geometrized units such that G=c=1. As is standard in NRPy+,
As a corollary, any expressions involving mixed Greek and Latin indices will need to offset one set of indices by one: A Latin index in a four-vector will be incremented and a Greek index in a three-vector will be decremented. For further detail and examples, see this notebook.
To describe spacetime, we will use a standard 3+1 decomposition in which the line element is given as ds2=−α2dt2+γij(dxi+βidt)(dxj+βjdt).
We will use the pure electromagnetic stress energy tensor, TμνEM=b2uμuν+12b2gμν−bμbν,
Derivation from Fμν, including the constraints of GRFFE
In place of the magnetic field Bi, we choose to evolve the vector potential Ai. By doing so, we guarantee that the magnetic field is divergenceless to round-off level. We also evolve the Poynting flux ˜Si, which in GRFFE, represents the momentum flux in the plasma, and ψ6Φ, where ψ6=√γ and γ is the determinant of the three metric.
We thus arrive at the following set of equations to evolve: ∂t˜Si+∂j(α√γTjEMi)=12α√γTμνEM∂igμν∂t[√γΦ]=−∂j(α√γAj−βj[√γΦ])−ξα[√γΦ]∂tAi=ϵijkvjBk−∂i(αΦ−βjAj)
Here, the four velocity uμ is the velocity of the plasma as measured by a normal observer. There are several possible choices of three-velocity that can be made; the ones which we will use here are the drift velocity vi and the Valencia three-velocity ˉvi. While we have chosen to use the Valencia three-velocity in this version of GiRaFFE
, we have also frequently made use of a relationship expressing this in terms of the drift velocity, which was used in the original GiRaFFE
. The usefulness of this relationship to drift velocity extends beyond merely translating the original code. As discussed in Paschalidis, et al., Sec. III.A (just above Eq. 45, with a proof in Appendix A), there is a one-parameter family of velocity definitions that fulfill the GRFFE conditions. The drift velocity sets this parameter to 0, which minimizes the Lorentz factor and guarantees that the four-velocity and magnetic fields are orthogonal to each other. This simplifies the form of bμ and quantities that depend on it.
This must be taken into account in developing unit tests, because NRPy+'s GRFFE module defaults to using a definition of bμ that does not assume that this criterion is met, while the original GiRaFFE
code assumes this in its C2P and P2C solvers. So, if we do not guarantee that our test data fulfills this criterion, these two different routines will produce different results. We will now go through the derivation of the equation used by GiRaFFE
from first principles to show where this extra term appears.
Terrence says: What extra term?
This is the equation used by GiRaFFE
, pulled from Eqs. 47 and 85 of this paper:
˜Si=γijˉvj√γB24π,
In IllinoisGRMHD (IGM), the expression used is ˜Si=α√γT0EMi, where TμνEM=b2uμuν+12b2gμν−bμbνb0=ujBj√4παbi=Bi+(ujBj)ui√4παu0ui=u0vi.
Terrence says: Can we remove the above?
We also use the Valencia three-velocity ˉvi and the magnetic field Bi as primitives, which can be defined in terms of the conservative variables: Bi=ϵijk∂jAkˉvi=4πγij˜Sj√γB2
import os,sys
nrpy_dir_path = os.path.join("..")
if nrpy_dir_path not in sys.path:
sys.path.append(nrpy_dir_path)
import cmdline_helper as cmd # NRPy+: Multi-platform Python command-line interface
cmd.output_Jupyter_notebook_to_LaTeXed_PDF("GiRaFFE_NRPy_Tutorial",location_of_template_file=os.path.join(".."))