Skip to content

Commit

Permalink
Add missing density to DimlessEDiff function
Browse files Browse the repository at this point in the history
  • Loading branch information
jhp-lanl committed May 14, 2024
1 parent 43fb3ad commit e30a855
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions singularity-eos/eos/eos_davis.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class DavisReactants : public EosBase<DavisReactants> {
const Real rho, const Real sie,
Indexer_t &&lambda = static_cast<Real *>(nullptr)) const {
const Real es = Es(rho);
const Real power_base = DimlessEdiff(sie);
const Real power_base = DimlessEdiff(rho, sie);
if (power_base <= 0) {
// This case would result in an imaginary temperature (i.e. negative), but we won't
// allow that so return zero
Expand Down Expand Up @@ -110,7 +110,7 @@ class DavisReactants : public EosBase<DavisReactants> {
PORTABLE_INLINE_FUNCTION Real SpecificHeatFromDensityInternalEnergy(
const Real rho, const Real sie,
Indexer_t &&lambda = static_cast<Real *>(nullptr)) const {
const Real power_base = DimlessEdiff(sie);
const Real power_base = DimlessEdiff(rho, sie);
if (power_base <= 0) {
// Return zero heat capacity instead of an imaginary value
return 0.;
Expand Down Expand Up @@ -180,7 +180,7 @@ class DavisReactants : public EosBase<DavisReactants> {
// static constexpr const char _eos_type[] = "DavisReactants";
static constexpr unsigned long _preferred_input =
thermalqs::density | thermalqs::specific_internal_energy;
PORTABLE_FORCEINLINE_FUNCTION Real DimlessEdiff(const Real sie) const;
PORTABLE_FORCEINLINE_FUNCTION Real DimlessEdiff(const Real rho, const Real sie) const;
PORTABLE_INLINE_FUNCTION Real Ps(const Real rho) const;
PORTABLE_INLINE_FUNCTION Real Es(const Real rho) const;
PORTABLE_INLINE_FUNCTION Real Ts(const Real rho) const;
Expand Down Expand Up @@ -353,7 +353,7 @@ class DavisProducts : public EosBase<DavisProducts> {
}
};

PORTABLE_FORCEINLINE_FUNCTION Real DavisReactants::DimlessEdiff(const Real sie) const {
PORTABLE_FORCEINLINE_FUNCTION Real DavisReactants::DimlessEdiff(const Real rho, const Real sie) const {
return (1.0 + _alpha) / (Ts(rho) * _Cv0) * (sie - es) + 1.0}

PORTABLE_INLINE_FUNCTION Real DavisReactants::Ps(const Real rho) const {
Expand Down

0 comments on commit e30a855

Please sign in to comment.