Skip to content

Commit

Permalink
Merge pull request #91 from LLNL/bugfix/StiffenedGasEOS2
Browse files Browse the repository at this point in the history
error in stiffened gas bulk mod made it way too large
  • Loading branch information
jmikeowen authored Oct 4, 2021
2 parents e47116d + d92cd1d commit 25bb5d7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Material/StiffenedGas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,19 @@ StiffenedGas<Dimension>::
bulkModulus(const Scalar massDensity,
const Scalar specificThermalEnergy) const {
CHECK(valid());
return massDensity*max(0.0, mGamma*mGamma1*(specificThermalEnergy+mP0/massDensity));
return massDensity*max(0.0, mGamma*mGamma1*(specificThermalEnergy-mP0/massDensity));
}

//------------------------------------------------------------------------------
// Calculate an entropy. This should be double checked
// Calculate an entropy.
//------------------------------------------------------------------------------
template<typename Dimension>
typename Dimension::Scalar
StiffenedGas<Dimension>::
entropy(const Scalar massDensity,
const Scalar specificThermalEnergy) const {
CHECK(valid());
return (mGamma*mP0+this->pressure(massDensity, specificThermalEnergy))*safeInvVar(pow(massDensity, mGamma));
return (mP0+this->pressure(massDensity, specificThermalEnergy))*safeInvVar(pow(massDensity, mGamma));
}

//------------------------------------------------------------------------------
Expand Down

0 comments on commit 25bb5d7

Please sign in to comment.