Open jhp-lanl opened 1 year ago
Correct me if I'm wrong, but I believe we are doing this in certain places. For the tabulated EOS's I think we try to compute things in terms of the derivatives with respect to the independent variables then use thermodynamic relations to get the derivatives relevant for a hydro code.
Correct me if I'm wrong, but I believe we are doing this in certain places. For the tabulated EOS's I think we try to compute things in terms of the derivatives with respect to the independent variables then use thermodynamic relations to get the derivatives relevant for a hydro code.
Yes I believe you're right, but it might be appropriate to standardize some of this across EOS. I think the other question is whether to expose routines for accessing the thermal expansion and isothermal bulk modulus. I don't see a need at the moment, but it may be important in the future as the library is integrated into more physics (like KPT).
@aematts brought up the fact that certain thermodynamic derivatives may be more accurate than others, especially for tabular lookups.
We currently provide three second derivative quantities--the Gruneisen parameter, $\Gamma$, the constant volume heat capacity, $C_V$, and isentropic bulk modulus, $B_S$--that can then in principal be used with our other return variables to compute any desired thermodynamic quantity of interest. However, these are not always the most accurate quantities for a material, especially depending on the preferred inputs for that EOS.
More specifically, for Mie-Gruneisen EOS of the form $P = P(\rho, e)$, the natural derivatives to be returned are
and
which is what motivates returning the Gruneisen parameter and isentropic sound speed in the first place (check my math though).
However, for an EOS of the form $P = P(\rho, T)$, the natural derivatives are better expressed in terms of $\alpha := -\frac{1}{\rho}\left(\frac{\partial \rho}{\partial T}\right)_P$ and $B_T := \rho\left(\frac{\partial P}{\partial \rho}\right)_T$ such that the natural derivatives are
and
This could be especially relevant for
FillEos()
or an eventual sound speed function as identified in https://github.com/lanl/singularity-eos/issues/4.For an analytic EOS, this probably won't matter much since any differences in the calculation will be of order roundoff, but interpolation errors in the derivatives in density-energy space will likely be larger than in density-temperature space. It may then be advantageous to minimize these interpolation errors and formulate returned quantities in terms of $\alpha$ and $B_T$.
Moreover, it may make sense to expose routines to access these quantities directly at some point in the future if the interpolation errors can be proven to be significant enough.