12 namespace EquationOfStateLibrary
34 this->add_parameter(
"A", capA,
"The A constant");
37 this->add_parameter(
"B", capB,
"The B constant");
40 this->add_parameter(
"R1", R1,
"The R1 constant");
43 this->add_parameter(
"R2", R2,
"The R2 constant");
46 this->add_parameter(
"omega", omega,
"The Gruneisen coefficient");
49 this->add_parameter(
"rho_0", rho_0,
"The reference density");
52 this->add_parameter(
"q_0", q_0,
"The specific internal energy offset");
56 "c_v", cv_,
"The specific heat capacity at constant volume");
67 double pressure(
double rho,
double e)
const final
70 const auto ratio = rho / rho_0;
72 const auto first_term =
73 capA * (1. - omega / R1 * ratio) * std::exp(-R1 * 1. / ratio);
74 const auto second_term =
75 capB * (1. - omega / R2 * ratio) * std::exp(-R2 * 1. / ratio);
77 return first_term + second_term + omega * rho * (e + q_0);
90 const auto ratio = rho / rho_0;
92 const auto first_term =
93 capA * (1. - omega / R1 * ratio) * std::exp(-R1 * 1. / ratio);
94 const auto second_term =
95 capB * (1. - omega / R2 * ratio) * std::exp(-R2 * 1. / ratio);
97 return (p - first_term - second_term) / (rho * omega);
110 const auto ratio = rho / rho_0;
112 const auto first_term = capA / R1 * std::exp(-R1 * 1. / ratio);
113 const auto second_term = capB / R2 * std::exp(-R2 * 1. / ratio);
115 return (e + q_0 - 1. / rho_0 * (first_term + second_term)) / cv_;
125 const auto t1 = omega * rho / (R1 * rho_0);
126 const auto factor1 = omega * (1. - t1) * (1. + 1. / t1) - t1;
127 const auto first_term =
128 capA / rho * factor1 * std::exp(-1. / t1 / omega);
130 const auto t2 = omega * rho / (R2 * rho_0);
131 const auto factor2 = omega * (1. - t2) * (1. + 1. / t2) - t2;
132 const auto second_term =
133 capB / rho * factor2 * std::exp(-1. / t2 / omega);
135 const auto third_term = omega * (omega + 1.) * e;
137 return std::sqrt(first_term + second_term + third_term);
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
double pressure(double rho, double e) const final
JonesWilkinsLee(const std::string &subsection)
double specific_internal_energy(double rho, double p) const final
double speed_of_sound(double rho, double e) const final
double temperature(double rho, double e) const final