EOS Models
The mathematical descriptions of these models are presented below while the details of using them is presented in the description of the EOS API.
EOS Theory
An equation of state (EOS) is a constituitive model that generally relates thermodynamic quantities such as pressure, temperature, density, internal energy, free energy, and entropy consistent with the constraints of equillibrium thermodynamics.
singularity-eos
contains a number of equations of state that are most useful
in hydrodynamics codes. All of the equations of state presented here are
considered “complete” equations of state in the sense that they contain all the
information needed to derive a given thermodynamic quantity. However, not all
variables are exposed since the emphasis is on only those that are needed for
hydrodynamics codes. An incomplete equation of state is often sufficient for
pure hydrodynamics since it can relate pressure to a given energy-density state,
but it is missing thermal information (see the section on complete
equations of state).
An excellent resource on equations of state in the context of hydrodynamics is
the seminal work from Menikoff and Plohr. In particular,
Appendix A contains a number of thermodynamic relationships that can be useful
for computing additional quantities from those output in singularity-eos
.
The Mie-Gruneisen form
Many of the following equations of state are considered to be of the “Mie-Gruneisen form”, which has many implications but for our purposes means that the general form of the EOS is
where ‘ref’ denotes quantities along some reference curve, \(P\) is the pressure, \(\rho\) is the density, \(\Gamma\) is the Gruneisen parameter, and \(e\) is the specific internal energy. In this sense, an EOS of this form uses the Gruneisen parameter to describe the pressure behavior of the EOS away from the reference curve. Coupled with a relationship between energy and temperature (sometimes as simple as a constant heat capacity), the complete equation of state can be constructed.
To some degree it is the complexity of the reference state and the heat capacity that will determine an EOS’s ability to capture the complex behavior of a material. At the simplest level, the ideal gas EOS uses a reference state at zero pressure and energy, while more complex equations of state such as the Davis EOS use the material’s isentrope. In ths way, the reference curve indicates the conditions under which you can expect the EOS to represent the intended behavior.
Some Notes on Thermodynamic Consistency
For the pure purpose of solving the Euler equations, an incomplete equation of state of the form \(P(\rho, e)\) is sufficient. In essence, this provides the mechanical response of a material subjected to different types of compression and expansion. However, this EOS is lacking thermal information without an appropriate heat capacity relationship.
As discussed by Mattsson, an equation of state can be considered “complete” if it is constructed from one of the thermodynamic potentials using their natural variables, i.e.
where all potentials are specific. Here \(e\) is again the internal energy, \(h\) is the enthalpy, \(F\) is the Helmholtz free energy, and \(G\) is the Gibbs free energy. While equations of state formulated using the Helmholtz free energy can be particularly attractive (such as the sesame tables), finding a convenient form can be difficult. As such, it becomes imperitive to extend the Mie-Gruneisen form so that it can form a complete EOS.
The heat capacity is defined as
which provides a natural means by which to relate the entropy/energy to the temperature and form a complete equation of state. However, there are specific requirements placed on the functional form of the heat capacity described below.
The Maxwell relations are the consequence of the requirement that mixed partial second derivatives of the thermodynamic potentials should be independent of the order of differentiation. This concept can be extended to third derivatives (as Davis does in his Appendix B here) to produce the relationship,
This is often referred to as a “compatibility condition” (see also Menikoff) and provides an important connection between the Gruneisen parameter, \(\Gamma\), and the constant volume heat capacity, \(C_V\), in the context of a complete equation of state developed from the internal energy. Importantly, if the Gruneisen form forces us to assume that the Gruneisen parameter is a sole function of density/volume, then the implication is that the heat capacity *must* then be a sole function of entropy.
Again from Menikoff, it can be shown that even in the simplest possible case of a constant heat capacity, the temperature is related to the energy through
where \(T_0\) represents a reference temperature, \(e_{S,0}\) is the energy along the isentrope that passes through the reference temperature, and \(\phi(\rho)\) is an integrating factor given by
As an EOS of a Mie-Gruneisen form becomes more complicated with more complex functional forms for \(\Gamma\) and the reference curves, the task of calculating a thermodynamically consistent temperature becomes more complicated.
Available EOS Information and Nomenclature
The EOS models in singularity-eos
are defined for the following sets of
dependent and independent variables through various member functions described
in the EOS API.
Function |
Dependent Variable |
Independent Variables |
---|---|---|
\(T(\rho, e)\) |
Temperature |
Density, Specific Internal Energy |
\(P(\rho, e)\) |
Pressure |
|
\(S(\rho, e)\) |
Specific Entropy |
|
\(e(\rho, T)\) |
Specific Internal Energy |
Density, Temperature |
\(P(\rho, T)\) |
Pressure |
|
\(S(\rho, T)\) |
Specific Entropy |
|
\(\rho(P, T)\) [1] |
Density |
|
\(e(P, T)\) [1] |
Specific Internal Energy |
|
\(C_V(\rho, T)\) |
Constant Volume Specific Heat Capacity |
Density, Temperature |
\(C_V(\rho, e)\) |
Density, Specific Internal Energy |
|
\(B_S(\rho, T)\) |
Isentropic Bulk Modulus |
Density, Temperature |
\(B_S(\rho, e)\) |
Density, Specific Internal Energy |
|
\(\Gamma(\rho, T)\) |
Gruneisen Parameter |
Density, Temperature |
\(\Gamma(\rho, e)\) |
Density, Specific Internal Energy |
A point of note is that “specific” implies that the quantity is intensive on a per unit mass basis. It should be assumed that the internal energy and entopry are always specific since we are working in terms of density (the inverse of specific volume).
Entropy availability
For an arbitrary equation of state, a change in entropy in terms of temperature and volume is given by
which can be simplified using a definition of the heat capacity and a Maxwell relation to become
Similarly, expressing the entropy in terms of energy and volume yields
after substituting for the appropriate derivatives using the first law of thermodynamics.
Importantly for the analytic EOS, these integrals will tend to diverge as the temperature and volume approach zero if the heat capacity does not also approach zero. This necessitates appropriate choices for the reference states \(T_0\) and \(V_0\).
Note
All EOS objects will expose the functions
EntropyFromDensityInternalEnergy ()
and
EntropyFromDensityTemperature()
but many EOS cannot currently
calculate entropy, either because the EOS is not thermodynamically
consistent or because the feature has not yet been implemented. In these
cases, the use of these functions will abort the calculation or raise an
exception depending on the execution space (host or device). The cases where
this occurs are noted below.
Nomenclature Disambiguation
The Gruneisen Parameter
In this description of the EOS models, we use \(\Gamma\) to represent the Gruneisen coeficient since this is the most commonly-used symbol in the context of Mie-Gruneisen equations of state. The definition of the Gruneisen parameter is
\[\Gamma := \frac{1}{\rho} \left( \frac{\partial P}{\partial e} \right)_\rho\]
This should be differentiated from
\[\gamma := \frac{V}{P} \left( \frac{\partial P}{\partial V} \right)_S = \frac{B_S}{P}\]
though, which is the adiabatic exponent.
For an ideal gas, the adiabatic exponent is simply the ratio of the heat capacities,
\[\gamma_\mathrm{id} = \frac{C_P}{C_V} = \frac{B_S}{B_T}.\]
Here \(C_P\) is the specific heat capacity at constant pressure and \(B_T\) is the isothermal bulk modulus.
Units and conversions
The default units for singularity-eos
are cgs which results in the following
units for thermodynamic quantities:
Quantity |
Default Units |
cgµ conversion |
mm-mg-µs conversion |
---|---|---|---|
\(P\) |
µbar |
10-12 Mbar |
10-10 GPa |
\(\rho\) |
g/cm3 |
1 |
1 mg/mm3 |
\(e\) |
erg/g |
10-12 Terg/g |
10-10 J/mg |
\(S\) |
erg/g-K |
10-12 Terg/g-K |
10-10 J/mg-K |
\(T\) |
K |
1 |
1 |
\(C_V\) |
erg/g/K |
10-12 Terg/g/K |
10-10 J/mg/K |
\(B_S\) |
µbar |
10-12 Mbar |
10-10 GPa |
\(\Gamma\) |
unitless |
– |
– |
Note: sometimes temperatures are measured in eV for which the conversion is 8.617333262e-05 eV/K.
Sesame units are equivalent to the mm-mg-µs unit system.
Implemented EOS models
Ideal Gas
The ideal gas (aka perfect or gamma-law gas) model in singularity-eos
takes
the form
where quantities are defined in the nomenclature section. A common point of confusion is \(\Gamma\) versus \(\gamma\) with the latter being the adiabatic exponent. For an ideal gas, they are related through
Although this formulation differs from the traditional representation of the ideal gas law as \(P\tilde{V} = RT\), the forms are equivalent by recognizing that \(\Gamma = \frac{R}{\tilde{C_V}}\) where \(R\) is the ideal gas constant in units of energy per mole per Kelvin and \(\tilde {C_\mathrm{V}}\) is the molar heat capacity, relatable to the specific heat capacity through the molecular weight of the gas. Since \(\tilde{C_\mathrm {V}} = \frac{5}{2} R\) for a diatomic ideal gas, the corresponding Gruneisen parameter should be 0.4.
The entropy for an ideal gas is given by
Note
The entropy diverges to negative infinity at absolute zero due to the constant heat capacity assumption. Care should be taken when using temperatures significantly below that of the reference state.
we have assumed that the entropy is zero at the reference state given by \(T_0\) and \(\rho_0\). By default, \(T_0 = 298\) K and the reference density is given by
where \(P_0 = 1\) bar.
It should be noted that this equation diverges as the temperature approaches zero or the density approaches infinity. From a physical perspective, this is a limitation of the constant heat capacity assumption and would be remedied if the heat capacity went to zero at absolute zero. However, this represents a significant deviation from true ideal gas physics so we do not include it here.
The settable parameters for this EOS are the Gruneisen parameter and specific heat capacity. Optionally, the reference state for the entropy calculation can be provided by setting both the reference density and temperature.
The IdealGas
EOS constructor has two arguments, gm1
, which is
the Gruneisen parameter \(\Gamma\), and Cv
, which is the
specific heat \(C_V\):
IdealGas(Real gm1, Real Cv)
Optionally, the reference temperature and density for the entropy calculation,
can be provided in the constructor via EntropyT0
and EntropyRho0
:
IdealGas(Real gm1, Real Cv, Real EntropyT0, Real EntropyRho0)
Note that these parameters are provided solely for the entropy calculation. When
these values are not set, they will be the same as those returned by the
ValuesAtReferenceState()
function. However, if the entropy reference
conditions are given, the return values of the ValuesAtReferenceState()
function will not be the same.
Stiffened Gas
The following implementation was guided by the reference StiffGas. The stiffened gas model in singularity-eos
takes
the form
where quantities are largely the same as ideal gas with the exception of \(P_{\infty}\) and \(q\), which can be thought of as an offset pressure and internal energy, respectively.
The entropy for a stiffened gas can be expressed as
where \(S(\rho_0,T_0)=q'\). By default, \(T_0 = 298\) K and the reference density is given by
where the reference pressure, \(P_0\), is 1 bar by default.
The settable parameters for this EOS are the Gruneisen parameter, \(\gamma-1\), specific heat capacity, \(C_V\), offset pressure, \(P_{\infty}\), and the offset internal energy, \(q\). Optionally, the reference state for the entropy calculation can be provided by setting values for the reference temperature, pressure, and offset entropy (\(q'\)).
The StiffGas
EOS constructor has four arguments, gm1
, which is
the Gruneisen parameter \(\Gamma\), Cv
, which is the
specific heat \(C_V\), P_{\infty}
which is the offset pressure, and q
which is the offset internal energy:
StiffGas(Real gm1, Real Cv, Real Pinf, Real q)
Optionally, the reference temperature and density for the entropy calculation,
can be provided in the constructor via qp
, T0
, and P0
:
StiffGas(Real gm1, Real Cv, Real Pinf, Real q, Real qp, Real T0, Real P0)
Note that these parameters are provided solely for the entropy calculation. When
these values are not set, they will be the same as those returned by the
ValuesAtReferenceState()
function. However, if the entropy reference
conditions are given, the return values of the ValuesAtReferenceState()
function will not be the same.
Noble-Abel
The implementation here was influenced by the reference NobleAbel. The Noble-Abel (aka Clausius I or Hirn) model in singularity-eos
takes
the form
where quantities are similar to the ideal gas law with the exception of covolume (\(b\)) and offset internal energy (\(q\)). It should be noted that covolume is physically significant as it represents the maximum compressibility of the gas, and as a result it should be non-negative.
The entropy for the Noble-Abel EoS is given by
where \(S(\rho_0,T_0)=q'\). By default, \(T_0 = 298\) K and the reference density is given by
where \(P_0\) is by default 1 bar.
The settable parameters for this EOS are \(\gamma-1\), specific heat capacity (\(C_V\)), covolume (\(b\)) and offset internal energy (\(q\)). Optionally, the reference state for the entropy calculation can be provided by setting the reference temperature, pressure, and entropy offset.
The NobleAbel
EOS constructor has four arguments: gm1
, which is \(\gamma-1\); Cv
, the
specific heat \(C_V\); \(b\), the covolume; and \(q\), the internal energy offset.
NobleAbel(Real gm1, Real Cv, Real b, Real q)
Optionally, the reference state for the entropy calculation,
can be provided in the constructor via qp
, T0
and P0
:
NobleAbel(Real gm1, Real Cv, Real b, Real q, Real qp, Real T0, Real P0)
Note that these parameters are provided solely for the entropy calculation. When
these values are not set, they will be the same as those returned by the
ValuesAtReferenceState()
function. However, if the entropy reference
conditions are given, the return values of the ValuesAtReferenceState()
function will not be the same.
Carnahan-Starling
The (quasi-exact) Carnahan-Starling model in singularity-eos
takes
the form
where \(\eta\) is the packing fraction given by
The energy is related to the temperature through
where \(q\) is an energy offset.
As with the Noble-Abel EOS, it should be noted that covolume is physically significant as it represents the maximum compressibility of the gas, and as a result it should be non-negative.
The Carnahan-Starling EOS is intended to represent a hard sphere fluid, and the covolume parameter, \(b\), can be related to the hard sphere diameter, \(\sigma\), through
where \(M\) is the molar mass of the gas.
The entropy for the Carnahan-Starling EOS is given by
where \(S(\rho_0,T_0)=q'\). By default, \(T_0 = 298\) K and the reference density is given by
where \(P_0\) is by default 1 bar. Denisty is obtained through root finding methods.
The settable parameters for this EOS are \(\gamma-1\), specific heat capacity (\(C_V\)), covolume (\(b\)) and offset internal energy (\(q\)). Optionally, the reference state for the entropy calculation can be provided by setting the reference temperature, pressure, and entropy offset.
The CarnahanStarling
EOS constructor has four arguments: gm1
, which is \(\gamma-1\); Cv
, the
specific heat \(C_V\); \(b\), the covolume; and \(q\), the internal energy offset.
CarnahanStarling(Real gm1, Real Cv, Real b, Real q)
Optionally, the reference state for the entropy calculation,
can be provided in the constructor via qp
, T0
and P0
:
CarnahanStarling(Real gm1, Real Cv, Real b, Real q, Real qp, Real T0, Real P0)
Note that these parameters are provided solely for the entropy calculation. When
these values are not set, they will be the same as those returned by the
ValuesAtReferenceState()
function. However, if the entropy reference
conditions are given, the return values of the ValuesAtReferenceState()
function will not be the same.
Gruneisen EOS
Warning
Entropy is not available for this EOS
One of the most commonly-used EOS to represent solids is the Steinberg variation of the Mie-Gruneisen EOS, often just shortened to “Gruneisen” EOS. This EOS uses the Hugoniot as the reference curve and thus is extremly powerful because the basic shock response of a material can be modeled using minimal parameters.
The pressure follows the traditional Mie-Gruneisen form,
Here the subscript \(H\) is a reminder that the reference curve is a Hugoniot. Other quantities are defined in the nomenclature section.
The above is an incomplete equation of state because it only relates the pressure to the density and energy, the minimum required in a solution to the Euler equations. To complete the EOS and determine the temperature, a constant heat capacity is assumed so that
The user should note that this implies that \(e=0\) at the reference temperature, \(T_0\). Given this simple relationship, the user should treat the temperature from this EOS as only a rough estimate.
Given the inconsisetency in the temperature, we have made the choice not to expose the entropy for this EOS. Requesting an entropy value will result in an error.
If a linear \(U_s\)-\(u_p\) relation is enough for your problem, we recommend using the MGUsup EOS described below. It is a complete EOS with consistent temperature.
Given a reference density, \(\rho_0\), we first parameterize the EOS using \(\eta\) as a measure of compression given by
This is convenient because \(eta = 0\) when \(\rho = \rho_0\), \(\eta = 1\) at the infinite density limit, and \(\eta = -\infty\) at the zero density limit. The Gruneisen parameter, \(\Gamma\) can be expressed in terms of \(\eta\) as
When the unitless user parameter \(b=0\), the Gruneisen parameter is of a form where \(\rho\Gamma =\) constant in compression, i.e. when \(\eta > 0\). If the unitless user parameter \(b=\Gamma_0\), the Gruneisen parameter is of a form where \(\Gamma_0 =\) constant in compression. These two limitig cases are shown in the figure below.
The reference pressure along the Hugoniot is determined by
where \(P_0\) is the reference pressure and \(c_0\), \(s_1\), \(s_2\), and \(s_3\) are fitting paramters to the \(U_s\)-\(u_p\) curve such that
Here \(U_s\) is the shock velocity and \(u_p\) is the particle velocity. For many materials, this relationship is roughly linear so only the \(s_1\) parameter is needed. The units for \(c_0\) are velocity while the rest are unitless. Note that the parameter \(s_1\) is related to the fundamental derivative of shock physics as shown by Wills.
Finally the energy along the Hugoniot is given by
One should note that in this form neither the expansion region nor the overall temperature are thermodynamically consistent with the rest of the EOS. Since the EOS is a fit to the principal Hugoniot, the EOS will obviously reproduce single shocks quite well, but it may not be as appropriate when there are multiple shocks or for modeling the release behavior of a material.
The constructor for the Gruneisen
EOS has the signature
Gruneisen(const Real C0, const Real s1, const Real s2, const Real s3, const Real G0,
const Real b, const Real rho0, const Real T0, const Real P0, const Real Cv,
const Real rho_max)
where C0
is \(C_0\), s1
is \(s_1\), s2
is
\(s_2\), s3
is \(s_3\), G0
is \(\Gamma_0\), b
is \(b\), rho0
is \(\rho_0\), T0
is \(T_0\),
P0
is \(P_0\), and Cv
is \(C_v\). rho_max
is the
maximum value of density for which the reference pressure curve is
valid. Input densities above rho_max
are pinned to rho_max
.
There is an overload of the Gruneisen
class which computes
rho_max
automatically without the user needing to specify:
Gruneisen(const Real C0, const Real s1, const Real s2, const Real s3, const Real G0,
const Real b, const Real rho0, const Real T0, const Real P0, const Real Cv)
Extendended Vinet EOS
The extended Vinet EOS is a full EOS, extended in both temperature and density from the Vinet universal EOS for solids (also called Rose cold curve). It is expected to work well in compression but is untested in expansion. It is published in Appendix 2 in J. Appl. Phys. 119, 015904 (2016).
While the Mie-Gruneisen EOS is based on a Hugoniot as reference curve, the Vinet is based on an isotherm:
where the reference isotherm is
Note that \(P_{ref}=0\) when \(\rho = \rho_0\), the reference state on the reference isotherm is always at ambient pressure. However, the reference isotherm is not necessarily at room temperature.
It can be shown that \(B_0\) is the isothermal bulk modulus, and \(\alpha_0\) the thermal expansion coefficient, at the reference state, and that
By assuming that also the constant volume heat capacity is a constant, \({C_V}_0\), an entropy can be derived
and from that a thermodynamic consistent energy
where the energy coefficients \(f_n\) are determined from the pressure coefficients \(d_n\), \(n\geq 2\), by
Note
The entropy diverges to negative infinity at absolute zero due to the constant heat capacity assumption. Care should be taken when using temperatures significantly below that of the reference state.
The constructor for the Vinet
EOS has the signature
Vinet(const Real rho0, const Real T0, const Real B0, const Real BP0, const Real A0,
const Real Cv0, const Real E0, const Real S0, const Real *expconsts)
where rho0
is \(\rho_0\), T0
is \(T_{ref}\), B0
is
\(B_0\), BP0
is \((\partial B/\partial P)_0\), A0
is \(\alpha_0\), Cv0
is \({C_V}_0\), E0
is \(E_0\), S0
is \(S_0\), and expconsts
is a pointer to the constant array of length
39 containing the expansion coefficients
\(d_2\) to \(d_{40}\). Expansion coefficients not used should be set to
0.0.
Mie-Gruneisen linear \(U_s\)- \(u_p\) EOS
One of the most commonly-used EOS is the linear \(U_s\)- \(u_p\) version of the Mie-Gruneisen EOS. This EOS uses the Hugoniot as the reference curve and is extensively used in shock physics. This version implements the exact thermodynamic temperature on the Hugoniot and also adds an entropy.
The pressure follows the traditional Mie-Gruneisen form,
Here the subscript \(H\) is a reminder that the reference curve is a Hugoniot. \(\Gamma\) is the Gruneisen parameter and the first approximation is that \(\rho\Gamma(\rho)=\rho_0\Gamma(\rho_0)\) which is the same assumption as in the Gruneisen EOS when \(b=0\).
The above is an incomplete equation of state because it only relates the pressure to the density and energy, the minimum required in a solution to the Euler equations. To complete the EOS and determine the temperature and entropy, a constant heat capacity is assumed so that
Note the difference from the Gruneisen EOS described above. We still use a constant \(C_V\), and it is usually taken at the reference temperature, but we now extrapolate from the temperature on the Hugoniot, \(T_H(\rho)\), and not from the reference temperature, \(T_0\).
With this consistent temperature we can derive an entropy in a similar way as for the Vinet EOS. Using thermodynamic derivatives we can show that
and we arrive at
where \(\eta\) is a measure of compression given by
This is convenient because \(\eta = 0\) when \(\rho = \rho_0\), \(\eta = 1\) at the infinite density limit, and \(\eta = -\infty\) at the zero density limit.
The pressure, energy, and temperature, on the Hugoniot are derived from the shock jump conditions,
assuming a linear \(U_s\)- \(u_p\) relation,
Here \(U_s\) is the shock velocity and \(u_p\) is the particle velocity. As is pointed out in the description of the Gruneisen EOS, for many materials, the \(U_s\)- \(u_p\) relationship is roughly linear so only this \(s\) parameter is needed. The units for \(C_s\) is velocity while \(s\) is unitless. Note that the parameter \(s\) is related to the fundamental derivative of shock physics as shown by Mattsson-Wills.
Solving the jump equations above gives that the reference pressure along the Hugoniot is determined by
Note the singularity at \(s \eta = 1\) which limits this model’s validity to compressions \(\eta << 1/s\). If your problem can be expected to have compressions of this order, you should use the PowerMG EOS that is explicitely constructed for large compressions. The assumption of linear \(U_s\)- \(u_p\) relation is simply not valid at large compressions.
The energy along the Hugoniot is given by
The temperature on the Hugoniot is hard to derive explicitely but with the help of Mathematica we can solve
into the explicit formula
where \(Ei\) is the exponential integral function. We replace the \(Ei\) difference with a sum with cutoff giving an error less than machine precision. For \(s \eta\) close to \(0\), there are severe cancellations in this formula and we use the expansion
The first omitted term in the expansion inside the square brackets is \(\Gamma(\rho_0) \eta^4 / 6\). This expansion is in fact even better than the common approximation of replacing the full temperature on the Hugoniot with the temperature on the isentrope, that is, the first term \(T_0 e^{\Gamma(\rho_0) \eta}\).
The constructor for the MGUsup
EOS has the signature
MGUsup(const Real rho0, const Real T0, const Real Cs, const Real s, const Real G0,
const Real Cv0, const Real E0, const Real S0)
where
rho0
is \(\rho_0\), T0
is \(T_0\),
Cs
is \(C_s\), s
is \(s\),
G0
is \(\Gamma(\rho_0)\), Cv0
is \(C_V\),
E0
is \(E_0\), and S0
is \(S_0\).
Mie-Gruneisen power expansion EOS
As we noted above, the assumption of a linear \(U_s\)- \(u_p\) relation is simply not valid at large compressions. At Sandia National Laboratories Z-pinch machine, the compression is routinely so large that a new Mie-Gruneisen EOS was developped, by Robinson, that could handle these large compressions. The overall structure and motivation for approximations are as described above; in compression it is only the formula for \(P_H\), and by extension \(T_H\), that differ. This EOS is however modified in expansion to follow an isentrope instead of the invalid-in-expansion Hugoniot.
In the PowerMG model the pressure on the Hugoniot in the compression region, \(\eta \geq 0\) is expressed as a power series
By expanding the MGUsup Hugoniot pressure into a power series in \(\eta\) we see that we can recover the MGUsup results by setting
In the figure below we have used \(M=20\) with these coefficients and show how the divergence in the MGUsup pressure at \(\eta = \frac{1}{s}\) is avoided in the PowerMG, making it more suitable for modeling high pressures.
For \(\eta < 0\), that is, in expansion, the isentrope with a single \(K_0\) is used until a user defined minimum pressure is obtained
If the user have not set \(P_{min}\) or if a positive value has been given, a default value of \(P_{min} = -1000 K_0\) is used.
If we now insert the formula for \(P_H\) in compression into equation (1), for \(\eta \geq 0\) we arrive at
where
that can be rewritten in terms of the lower incomplete gamma function. For \(\eta < 0\) the isentropic temperature is used,
It has been verified that this temperature is following the black, true temperature line in the figure late in the MGUsup section in compression and the blue isentropic temperature in expansion. More information about how to implement \(T_H\) into codes is given in Robinson.
For completeness we give \(E_H\) as well,
The constructor for the PowerMG
EOS has the signature
PowerMG(const Real rho0, const Real T0, const Real G0, const Real Cv0, const Real E0,
const Real S0, const Real Pmin, const Real *expconsts)
where
rho0
is \(\rho_0\), T0
is \(T_0\),
G0
is \(\Gamma(\rho_0)\), Cv0
is \(C_V\),
E0
is \(E_0\), S0
is \(S_0\), Pmin
is \(P_{min}\), and
expconsts
is a pointer to the constant array of length
41 containing the expansion coefficients
\(K_0\) to \(K_{40}\). Expansion coefficients not used should be set to
\(0.0\).
JWL EOS
Warning
Entropy is not available for this EOS
The Jones-Wilkins-Lee (JWL) EOS is used mainly for detonation products of high explosives. Similar to the other EOS here, the JWL EOS can be written in a Mie-Gruneisen form as
where the reference curve is an isentrope of the form
Here \(\eta = \frac{\rho_0}{\rho}\) and \(R_1\), \(R_2\), \(A\), \(B\), and \(w\) are constants particular to the material. Note that the parameter \(w\) is simply the Gruneisen parameter and is assumed constant for the EOS (which is fairly reasonable since the detonation products are gasses).
Finally, to complete the EOS the energy is related to the temperature by
where \(C_V\) is the constant volume specific heat capacity.
The constructor for the JWL EOS is
JWL(const Real A, const Real B, const Real R1, const Real R2,
const Real w, const Real rho0, const Real Cv)
where A
is \(A\), B
is \(B\), R1
is \(R_1\),
R2
is \(R_2\), w
is \(w\), rho0
is \(\rho_0\),
and Cv
is \(C_V\).
Davis EOS
The Davis reactants and products EOS are both of Mie-Gruneisen forms that use isentropes for the reference curves. The equations of state are typically used to represent high explosives and their detonation products and the reference curves are calibrated to several sets of experimental data.
For both the reactants and products EOS, the pressure and energy take the forms
where the subscript \(S\) denotes quantities along the reference isentrope and other quantities are defined in the nomenclature section.
Davis Reactants EOS
Warning
Entropy is not yet available for this EOS
The Davis reactants EOS uses an isentrope passing through a reference state and as the reference curve and then assumes that the heat capacity varies linearly with entropy such that
where subscript \(0\) refers to the reference state and \(\alpha\) is a dimensionless constant specified by the user.
The Gruneisen parameter is given a linear form such that
where \(Z\) is a dimensionless parameter and \(y = 1 - \rho0/\rho\). Along an isentrope, the Gruneisen parameter can be expressed as
which, upon integration can produce the temperature along the reference isentrope:
where \(T_{S,0}\) is the temperature along the reference isentrope, \(S = S_0\).
Using the fact that the heat capacity can be expressed as
the temperature off of the reference isoentrope can be integrated from this identity to yield
Now requiring that the entropy go to zero at absolute zero in accordance with the Nernst postulate and the third law of thermodynamics, the entropy can be expressed as a function of temperature and density such that
The \(e(\rho, P)\) formulation can now be more-conveniently cast in terms of termperature such that
which can easily be inverted to find \(T(\rho, e)\).
Finally, the pressure and energy along the isentrope are given by
where \(A\), \(B\), \(C\), \(y\), and \(Z\) are all user-settable parameters and again quantities with a subcript of \(0\) refer to the reference state. The variable \(\bar{\rho}\) is simply an integration variable. The parameter \(C\) is especially useful for ensuring that the high-pressure portion of the shock Hugoniot does not cross that of the products.
The settable parameters are the dimensionless parameters listed above as well as the pressure, density, temperature, energy, Gruneisen parameter, and constant volume specific heat capacity at the reference state.
The constructor for the Davis Reactants EOS is
DavisReactants(const Real rho0, const Real e0, const Real P0, const Real T0,
const Real A, const Real B, const Real C, const Real G0, const Real Z,
const Real alpha, const Real Cv0)
where rho0
is \(\rho_0\), e0
is \(e_0\), P0
is
\(P_0\), T0
is \(T_0\), A
is \(A\), B
is
\(B\), C
is \(C\), G0
is \(\Gamma_0\), Z
is
\(Z\), alpha
is \(\alpha\), and Cv0
is the specific
heat capacity at the reference state.
Davis Products EOS
Warning
Entropy is not yet available for this EOS
The Davis products EOS is created from the reference isentrope passing through the CJ state of the high explosive along with a constant heat capacity. The constant heat capacity leads to the energy being a simple funciton of the temperature deviation from the reference isentrope such that
The Gruneisen parameter is given by
where \(b\) is a user-settable dimensionless parameter and \(F(\rho)\) is given by
Here the calibration parameters \(a\) and \(n\) are dimensionless while \(V_{\mathrm{C}}\) is given in units of specific volume.
Finally, the pressure, energy, and temperature along the isentrope are given by
where
and
Here, there are four dimensionless parameters that are settable by the user, \(a\), \(b\), \(k\), and \(n\), while \(P_\mathrm{C}\), \(e_\mathrm{C}\), \(V_\mathrm{C}\) and \(T_\mathrm{C}\) are tuning parameters with units related to their non-subscripted counterparts.
Note that the energy zero (i.e. the reference energy) for the Davis products EOS is arbitrary. For the isentrope to properly pass through the CJ state of a reacting material, the energy release of the reaction needs to be accounted for properly. If done external to the EOS, an energy source term is required in the Euler equations. However, a common convention is to specify the reactants and product EOS in a consistent way such that the reference energy corresponds to the rest state of the material before it reacts.
The energy at the CJ state can be calculated as
relative to \(e = 0\) at the reference state of the reactants. Therefore the energy offset of the products EOS is given by
Practically, this means \(e_0\) should be positive for any energetic material.
To provide the energy offset to the Davis Products EOS, the energy shift modifier should be used. Note that the convention there is that the shift is positive, so \(-e_0\) should be provided to the shift modifier.
The constructor for the Davis Products EOS is
DavisProducts(const Real a, const Real b, const Real k, const Real n, const Real vc,
const Real pc, const Real Cv)
where a
is \(a\), b
is \(b\), k
is \(k\),
n
is \(n\), vc
is \(V_\mathrm{C}\), pc
is
\(P_\mathrm{C}\), Cv
is \(C_{V,0}\).
Spiner EOS
Warning
Entropy is not yet available for this EOS
Spiner EOS is a tabulated reader for the Sesame database of material
equations of state. Materials include things like water, dry air,
iron, or steel. This model comes in two flavors:
SpinerEOSDependsRhoT
and SpinerEOSDependsRhoSie
. The former
tabulates all quantities of interest in terms of density and
temperature. The latter also includes tables in terms of density and
specific internal energy.
Tabulating in terms of density and pressure means that computing, e.g., pressure in terms of density and internal energy requires solving the equation:
for temperature \(T\) given density \(\rho\) and specific
internal energy \(e_0\). This is in general not closed
algebraically and must be solved using a
root-find. SpinerEOSDependsRhoT
performs this root find in-line,
and the result is performant, thanks to library’s ability to take and
cache initial guesses. SpinerEOSDependsRhoSie
circumvents this
issue by tabulating in terms of both specific internal energy and
temperature.
Both models use (approximately) log-linear interpolation on a grid that is (approximately) uniformly spaced on a log scale. Thermodynamic derivatives are tabulated and interpolated, rather than computed from the interpolating function. This approach allows for significantly higher fidelity approximations of these derivatives.
Both SpinerEOS
classes benefit from a lambda
parameter, as
described in the EOS API section`. In particular, if
an array of size 2 is passed in to the scalar call (or one per point
for the vector call), the model will leverage this scratch space to
cache initial guesses for root finds.
To avoid race conditions, at least one array should be allocated per thread. Depending on the call pattern, one per point may be best. In the vector case, one per point is necessary.
The constructor for SpinerEOSDependsRhoT
is given by two overloads:
SpinerEOSDependsRhoT(const std::string &filename, int matid,
bool reproduciblity_mode = false);
SpinerEOSDependsRhoT(const std::string &filename, const std::string &materialName,
bool reproducibility_mode = false);
where here filename
is the input file, matid
is the unique
material ID in the database in the file, materialName
is the name
of the material in the file, and reproducability_mode
is a boolean
which slightly changes how initial guesses for root finds are
computed. The constructor for SpinerEOSDependsRhoSie
is identical.
sp5
files and sesame2spiner
The SpinerEOS
models use their own file format built on hdf5
,
which we call sp5
. These files can be generated by hand, or they
can be generated from the sesame database (assuming eospac is
installed) via the tool sesame2spiner
, which is packaged with
singularity-eos
. Buld sesame2spiner
by specifying
-DSINGULARITY_USE_HDF5=ON -DSPINGULARITY_USE_EOSPAC=ON -DSINGULARITY_BUILD_SESAME2SPINER=ON
at configure time. The call to sesame2spiner
is of the form
sesame2spiner -s output_file_name.sp5 input1.dat input2.dat ...
for any number of input files. Verbosity flags -p
and -v
are
also available. Use -h
for a help message. The -s
flag is
optional and the output file name defaults to materials.sp5
.
Each input file corresponds to a material and consists of simple key-value pairs. For exampe the following input deck is for air:
matid = 5030
# These set the number of grid points per decade
# for each variable.
numrho/decade = 40
numT/decade = 40
numSie/decade = 40
# Defaults pulled from the sesame file if possible
name = air
rhomin = 1e-2
rhomax = 10
Tmin = 252
Tmax = 1e4
siemin = 1e12
siemax = 1e16
# These shrink the logarithm of the bounds by a fraction of the
# total inteval <= 1.
# Note that these may be deprecated in the near future.
shrinklRhoBounds = 0.15
shrinklTBounds = 0.15
shrinkleBounds = 0.5
Comments are prefixed with #
. eospac uses environment variables
and files to locate files in the sesame database, and
sesame2spiner
uses eospac. So the location of the sesame
database need not be provided by the command line. For how to specify
sesame file locations, see the eospac manual.
Piecewise Spiner Grids
sesame2spiner
also supports grids with different resolutions in
different parts of the table. We call these piecewise grids. By
default grids are now piecewise. Piecewise grids can be disabled with
# defaults are true
piecewiseRho = false
piecewiseT = false
piecewiseSie = dalse
These options may be true or false. The default is true. When
piecewise grids are active, the density-temperature (or
density-energy) grid is built as a Cartesian product grid of grids of
non-uniform resolutions. The density grid gets split into three
pieces, a region [rhoMin, rhoFineMin]
, a region [rhoFineMin,
rhoFineMax]
, and a region [rhoFineMin, rhoMax]
. The
numrho/decade
parameter sets the number of points per decade in
the central refined region. The regions at lower and higher density
have rhoCoarseFactorLo
and rhoCoarseFactorHi
fewer points per
decade respectively compared to the finer region.
Typically the fine region should be roughly centered around the normal
density for a material, which is usually a challenging region to
capture. If you neglect to set rhoFineMin
and rhoFineMax
,
sesame2spiner
will set the central refined region to be a region
of diameter rhoFineDiameterDecades
(in log space) around the
material’s normal density.
The temperature grid has two regions, a more finely spaced region at
low temperatures and a less finely spaced region at high
temperatures. The regions are spearated by a temperature
TSplitPoint
. The default is \(10^4\) Kelvin. The energy grid
follows the temperature grid, with the energy split point
corresponding to the temperature split point. The coarser
high-temperature temperature and energy grids are coarsened by a
factor of TCoarseFactor
and sieCoarseFactor
respectively.
A diagram of a density-temperature grid is shown below. The region
with temperatures below TSplitPoint
is refined in temperature. The
region between rhoFineMin
and rhoFineMax
is refined in
density.
Thus the input block for piecewise grid might look like this:
# Below, all right-hand-sides are set to their default values.
piecewiseRho = true
piecewiseT = true
piecewiseSie = true
# the fine resolution for rho.
numrho/decade = 350
# width of the fine region for rho
rhoFineDiameterDecades = 1.5
# the lower density region is 3x less refined
rhoCoarseFactorLo = 3
# the higher density region is 5x less refined
rhoCoarseFactorHi = 5
# the fine resolution for T
numT/decade = 100
# the point demarking the coarse and fine regions in temperature
TSplitPoint = 1e4
# it's usually wise to to not let
# temperature get too small in log space if you do this
Tmin = 1
# The coarser region (above the split point) is 50 percent less refined
TCoarseFactor = 1.5
# energy has the split point sie(rhonormal, TSplitPoint)
# but we may still specify the resolution
numSie/decade = 100
sieCoarseFactor = 1.5
Note
For all grid types, the only required value in an input file is the matid. Table bounds and normal density will be inferred from teh sesame metadata if possible and if no value in the original input file is provided. Table densities and positions and sizes of refined regions are not inferred from the table, but are chosen with the default values listed in the above code block.
Note
Both the flat and hierarchical grids attempt to align their grids so that there is a grid point in density and temperature exactly at room temperature and normal density. This is because normal density and room temperature is a particularly important point in phase space, as it is the point in phase space a piece of material sitting on your desk would be at. This is called an anchor point for the mesh.
SAP Polynomial EOS
This model is specific to the Safety Applications Project (SAP). It is an incomplete EOS, and is a simple analytical form used to fit experimental data:
with
The constants \(a_2^*\) and \(b_2^*\) can assume different values in expansion and compression.
and similar expressions for \(b_2^*\).
Stellar Collapse EOS
This model provides finite temperature nuclear equations of state suitable for core collapse supernova and compact object (such as neutron star) simulations. These models assume nuclear statistical equilibrium (NSE). It reads tabulated data in the Stellar Collapse format, as first presented by OConnor and Ott.
Like SpinerEOSDependsRhoT
, StellarCollapse
tabulateds all
quantities in terms of density and temperature on an (approximately)
logarithmically spaced grid. And similarly, it requires an in-line
root-find to compute quantities in terms of density and specific
internal energy. Unlike most of the other models in
singularity-eos
, StellarCollapse
also depends on a third
quantity, the electron fraction,
which measures the number fraction of electrons to baryons. Symmetric matter has a \(Y_e\) of 0.5, while cold neutron stars, have a \(Y_e\) approximately less than 0.1.
As with SpinerEOSDependsRhoT
, the Stellar Collapse tables tabulate
thermodynamic derivatives separately, rather than reconstruct them
from interpolants. However, the tabulated values can contain
artifacts, such as unphysical spikes. To mitigate this issue, the
thermodynamic derivatives are cleaned via a median filter. The bulk
modulus is then recomputed from these thermodynamic derivatives via:
Note that StellarCollapse
is a relativistic model, and thus the
sound speed is given by
where \(w = \rho h\) for specific entalpy \(h\) is the enthalpy by volume, rather than the density \(rho\). This ensures the sound speed is bounded from above by the speed of light.
The StellarCollapse
model requires a lambda
parameter of size
2, as described in the EOS API section`. The zeroth
element of the lambda
array contains the electron fraction. The
first element is reserved for caching. It currently contains the
log of the temperature, but this should not be assumed.
To avoid race conditions, at least one array should be allocated per thread. Depending on the call pattern, one per point may be best. In the vector case, one per point is necessary.
The StellarCollpase
model can read files in either the original
format found on the Stellar Collapse website, or in the sp5
format described above.
Warning
Note that the data contained in an sp5
file for the
StellarCollapse
EOS and the SpinerEOS
models is not
identical and the files are not interchangeable.
The constructor for the StellarCollapse
EOS class looks like
StellarCollapse(const std::string &filename, bool use_sp5 = false,
bool filter_bmod = true)
where filename
is the file containing the tabulated model,
use_sp5
specifies whether to read an sp5
file or a file in the
original Stellar Collapse format, and filter_bmod
specifies
whether or not to apply the above-described median filter.
StellarCollapse
also provides
-
void Save(const std::string &filename)
which saves the current EOS data in sp5
format.
The StellarCollapse
model, if used alone, also provides several
additional functions of interest for those running, e.g., supernova
simulations:
-
void MassFractionsFromDensityTemperature(const Real rho, const Real temperature, Real &Xa, Real &Xn, Real &Xp, Real &Abar, Real &Zbar, Real *lambda = nullptr) const
which returns the mass fractions for alpha particles, Xa
, heavy
ions Xh
, neutrons Xn
, and protons Xp
, as well as the
average atomic mass Abar
and atomic number Zbar
for heavy
ions, assuming nuclear statistical equilibrium.
In addition, the user may query the bounds of the table via the
functions rhoMin()
, rhoMax()
, TMin()
, TMax()
,
YeMin()
, YeMax()
, sieMin()
, and sieMax()
, which all
return a Real
number.
Warning
As with the SpinerEOS models, the stellar collapse models use fast
logs. You can switch the logs to true logs with the
SINGULARITY_USE_TRUE_LOG_GRIDDING
cmake option.
Note
A more performant implementation of fast logs is available, but it
might not be portable. Enable it with the
SINGULARITY_USE_HIGH_RISK_MATH
cmake option.
Helmholtz EOS
This is a performance portable implementation of the Helmholtz equation of state provided by Timmes and Swesty. The Helmholtz EOS is a three part thermodynamically consistent EOS for a hot, ionized gas. It consists of a thermal radiation term:
an ions term, treated as an ideal gas:
and a degenerate electron term. Additionally, coulomb force corrections can be applied on top of the full model. This multi-component model depends on the relative abundances of electrons and ions, as well as the atomic mass and charge of the ions. As such, the Helmholtz EOS requires two additional indepenent variables, the average atomic mass, Abar, and the average atomic number, Zbar. These are passed in through the lambda pointer. As with the other tabulated EOS’s, the log of the temperature is also stored in the lambda pointer as a cache for root finding. Helmholtz provides an enum for indexing into the lambda:
Helmholtz::Lambda::Abar
indexes into theAbar
component of the lambda array.Helmholtz::Lambda::Zbar
indexes into theZbar
component of the lambda array.Helmholtz::Lambda::lT
indexes into the log temperature cache inside the lambda array.
The degenerate electron term is computed via thermodynamic derivatives of the Helmholtz free energy (hence the name Helmholtz EOS). The free energy is pre-computed via integrals over the Fermi sphere and tabulated in a file provided from Frank Timmes’s website.
The table is a simple small ascii file. To ensure thermodyanic consistency, the table is interpolated using either biquintic or bicubic Hermite polynomials, which are sufficiently high order that their high-order derivatives match the underlying data.
Warning
Only a modified version of the table is supported due to the fixed
number of colums in the table. This may change in the future.
The original table found on Frank Timmes’s website is not supported.
A compatible version of the table can be found in the
data/helmholtz
directory of the source code, or the data
directory specified in the installation configuration.
Note
The implication of interpolating from the free energy is that each EOS evaluation provides ALL relevant EOS data and thermodynamic derivatives. Thus the per-quantity EOS calls are relatively inefficient, and it is instead better to use the FillEos call to get the entire model at once.
The Helmholtz EOS is instantiated by passing in the path to the relevant table:
Helmholtz(const std::string &filename)
Note that e.g. the Gruneisen parameter is defined differently compared to other EOSs. Here the Gruneisen parameter is the \(\Gamma_3\) of Cox & Giuli 1968 - Princiiples of Stellar Structure (c&g in the following). Specifically:
- Some important formulas to be used when using this EOS:
the temperature and density exponents (c&g 9.81 9.82)
the specific heat at constant volume (c&g 9.92)
the third adiabatic exponent (c&g 9.93)
the first adiabatic exponent (c&g 9.97)
the second adiabatic exponent (c&g 9.105)
the specific heat at constant pressure (c&g 9.98)
and relativistic formula for the sound speed (c&g 14.29)
The constructor for the Helmholtz
EOS class looks like
Helmholtz(const std::string &filename, const bool rad = true,
const bool gas = true, const bool coul = true,
const bool ion = true, const bool ele = true,
const bool verbose = false, const bool newton_raphson = true)
where filename
is the file containing the tabulated model. The
optional arguments rad
, gas
, coul
, ion
, and ele
specify whether to include the radiation, ideal gas, coulomb correction,
ionization, and electron contributions, respectively. The default is to
include all terms. The optional argument verbose
specifies whether to print
out additional information, e.g. when the root find fails to converge. The
optional argument newton_raphson
specifies whether to use the Newton-Raphson
method or the regula falsi method for root finding. The default is to use the
Newton-Raphson method (note that the regula falsi method is used as a fallback
in case the Newton-Raphson method does not converge).
EOSPAC EOS
Warning
Entropy is not yet available for this EOS
This is a striaghtforward wrapper of the EOSPAC library for the
Sesame database. The constructor for the EOSPAC
model looks like
EOSPAC(int matid, bool invert_at_setup = false, Real insert_data = 0.0, eospacMonotonicity monotonicity = eospacMonotonicity::none, bool apply_smoothing = false, eospacSplit apply_splitting = eospacSplit::none, bool linear_interp = false)
where matid
is the unique material number in the database,
invert_at_setup
specifies whether or not pre-compute tables of
temperature as a function of density and energy, insert_data
inserts specified number of grid points between original grid points
in the Sesame table, monotonicity` enforces monotonicity in x,
y or both (:math:`monotonicityX/Y/XY`), ``apply_smoothing
enables
data table smoothing that imposes a linear floor on temperature dependence,
forces linear temperature dependence for low temperature, and forces
linear density dependence for low and high density, apply_splitting
has the following options for ion data tables not found in the Sesame
database :. \(splitNumProp\) uses the cold curve plus number-proportional
model, \(splitIdealGas\) uses the cold curve plus ideal gas model
and \(splitCowan\) uses the cold curve plus Cowan-nuclear model
for ions and the final option linear_interp
uses linear instead of
bilinear interpolation.
Note for performance reasons this EOS uses a slightly different vector API. See EOSPAC Vector Functions for more details.