12 namespace EquationOfStateLibrary
31 this->add_parameter(
"gamma", gamma_,
"The ratio of specific heats");
34 this->add_parameter(
"vdw a", a_,
"The vdw a constant");
38 "covolume b", b_,
"The maximum compressibility constant");
47 "gas constant R", R_,
"The specific gas constant R");
49 cv_ = R_ / (gamma_ - 1.);
52 ParameterAcceptor::parse_parameters_call_back.connect([
this] {
68 double pressure(
double rho,
double e)
const final
70 const auto intermolecular = a_ * rho * rho;
71 const auto numerator = rho * e + intermolecular;
72 const auto covolume = 1. - b_ * rho;
73 return (gamma_ - 1.) * numerator / covolume - intermolecular;
85 const auto intermolecular = a_ * rho * rho;
86 const auto covolume = 1. - b_ * rho;
87 const auto numerator = (p + intermolecular) * covolume;
88 const auto denominator = rho * (gamma_ - 1.);
89 return numerator / denominator - a_ * rho;
100 return (e + a_ * rho) / cv_;
112 const auto covolume = 1. - b_ * rho;
113 const auto numerator = gamma_ * (gamma_ - 1.) * (e + a_ * rho);
114 return std::sqrt(numerator / (covolume * covolume) - 2. * a_ * rho);
virtual double specific_internal_energy(double rho, double p) const =0
virtual double pressure(double rho, double e) const =0
virtual double speed_of_sound(double rho, double e) const =0
virtual double temperature(double rho, double e) const =0
VanDerWaals(const std::string &subsection)
double temperature(double rho, double e) const final
double pressure(double rho, double e) const final
double speed_of_sound(double rho, double e) const final
double specific_internal_energy(double rho, double p) const final