Accuracy of second derivatives, specifically for tabular lookups
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 39
- Forks
- 22
- Avg merge
- 10h 22m
- Merged PRs (30d)
- 3
Description
@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
\left( \frac{\partial P}{\partial e}\right)_\rho = \rho \Gamma
and
\left( \frac{\partial P}{\partial \rho}\right)_e = \frac{B_S - P\Gamma}{\rho},
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
\left(\frac{\partial P}{\partial T} \right)_\rho = \alpha B_T
and
\left(\frac{\partial P}{\partial \rho} \right)_T = \frac{B_T}{\rho}
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the EOS APIs involved in FillEos() and the eventual sound speed function referenced in issue #4. Compare derivative interpolation in density-energy and density-temperature space, then determine whether accuracy gains justify changing returned quantities or exposing alpha and B_T directly. Done criteria are not specified and would need agreement on benchmarks and API scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100