
5
The fluxes along the y- and z-directions take a similar
form, but we instead consider finite differencing along
the jand kindices, respectively.
The evolution equation for Yedoes not include source
terms in the absence of neutrinos, so the right-hand-side
of Eq. (18) is then passed to the method of lines (MoL)
thorn, which integrates the conservative variable ˜
Yefor-
ward in time. At this point, the updated conservative
variables would be known at all grid points except the
outer boundary. The next step is to recover the primi-
tive variables given these evolved conservative variables
(see Sec. III B). After the primitives have been recovered,
they are checked for physicality and marginally modified
if they are outside of their physical ranges [83]. For ex-
ample, in the case of the electron fraction, we check that
Ye,lower ≤Ye≤Ye,upper,(19)
where Ye,lower (Ye,upper) corresponds to the lowest (high-
est) value for Yeavailable in an EOS table. Next, outer
boundary conditions are placed on the recovered primi-
tives to fill the necessary 3 ghost-zones in each direction.
We apply zero-derivative outflow outer boundary condi-
tions as described in [56]. Up to this point, the primitives
Pare known at the new time step on all grid points. The
final step we take is to recompute the conservatives on all
grid points using Eq. (10) for consistency between Pand
C, and the evolution algorithm is allowed to proceed.
B. Conservative-to-primitive solvers
At every step of the evolution an inversion from the
evolved conservative variables Cto the physical primi-
tive variables Pis required to know the state of the fluid.
Eq. (10) presents a system of non-linear algebraic expres-
sions which can be solved for 9 relevant fluid variables
(ρb,vi,Bi,Ye, and either h, or ). These 9 variables,
along with an EOS, in turn provide all of the informa-
tion required to determine P, along with other fluid vari-
ables of interest. For example, a solution to Eq. (10) can
provide the 5 main variables (ρ0,vi,) and, trivially, Bi
and Ye. We can then determine the remaining variable,
Pwith the use of an EOS and incidentally obtain infor-
mation on other physical variables such as the tempera-
ture Tand specific entropy sb. As we require a solution
for 5 main variables in order to determine P, the primi-
tives inversion problem is fundamentally a non-trivial 5D
problem that cannot be solved analytically. 5D schemes
which solve Eq. (10) were originally implemented in early
MHD codes such as HARM [87]. However, these schemes
were eventually found to be inefficient and inaccurate,
which led to the development of methods which solve for
only two auxiliary variables [88] and thereby reduce the
dimensionality of the problem to 2D. The dimensional-
ity of the problem can be further reduced to 1D; modern
1D algorithms which provide reliable and efficient solu-
tions have been developed [17,89] and are widely used
in GRMHD codes.
In order to consider strongly magnetized systems
which include realistic descriptions of the dense mat-
ter EOS, we implement state-of-the-art conservative-to-
primitive solvers within MIL. Our implementation in-
cludes porting the solvers discussed in [84] for use in
the EinsteinToolkit, packaged within a new thorn
ConservativeToPrimitive which can interface with MIL
and its associated thorns, but also works as a standalone
thorn which can be used with other GRMHD codes that
operate within the Cactus infrastructure. We focus on
a subset of the solvers implemented in [84], due to their
reliability, speed, and algorithmic similarity to the origi-
nal solvers used in OIL (see [90] for another possible ap-
proach). In particular we focus on the 2D solver of [88]
(which we label Noble), the 1D solver of [17] (which
we label Palenzuela), and the 1D solver of [89] (which
we label Newman). We note that the Noble solver uses
the same algorithm as the solvers in the original ver-
sion of IllinoisGRMHD and that other GRMHD codes
with realistic EOS capability rely on the Palenzuela
algorithm [58,91,92]. We refer the reader to [84] for
a review of the algorithms used in each solver within
ConservativeToPrimitive1.
We employ a set of preliminary tests to confirm that
our port of these solvers to the EinsteinToolkit be-
haves as intended. In particular, we test the aforemen-
tioned solvers using the same tests as [84] where a set of
primitives Pare initialized, randomly perturbed, used to
calculate a set of conservatives C, and finally recovered
into a new set P’. The primitives recovery for each solver
is then assessed by considering the relative error between
the original set Pand the recovered set P0(along with
other diagnostics including the number of interpolation
calls to the EOS table and number of algorithm itera-
tions). In these tests, a subset of the primitives is varied
over the physically allowed range while holding others
constant. We focus on the case of the LS220 realistic,
finite temperature, tabulated EOS [85,86] and employ
tests where we prescribe the ratio of magnetic to fluid
pressure Pmag/P =b2/(2P)=0.001, the Lorentz factor
W= 2, and the electron fraction Ye= 0.1, while scan-
ning over the allowed range of rest mass density ρband
1We point out that [84] appears to have typographical errors in
the algorithm description for the Newman solver, when compared
to the original paper of [89]. In particular, there is a difference
in the calculation of the auxiliary variable M2(see Eq. (47)
of [84] as compared to Eq. (4.7) of [89]), where [89] correctly
calculates it as M2=mimi=˜
Si˜
Si, where ˜
Siis the conservative
variable associated with the momentum density which appears
in the left-hand-side of Eq. (15). Eq. (47) of [84] inconsistently
calculates this variable as M2= (Bivi)2/√γ, where γis the
determinant of the 3-metric γij ,Biis the magnetic field, and
viis the fluid 3-velocity. We also note that the first term of
Eq. (55) in [84] misses a factor of the auxiliary variable a, when
compared to the analogous Eq. (5.11) in [89]. We point out that
despite these typographical errors, the numerical implementation
of the Newman solver within the code of [84] is consistent with the
correct algorithmic steps presented in [89].