14 namespace EquationsOfState
29 Hayes(
const std::string &subsection)
34 this->add_parameter(
"rho_0", rho0_,
"The reference density");
37 this->add_parameter(
"T_0", T0_,
"The reference temperature");
40 this->add_parameter(
"gamma_0", gm0_,
"The Gruneisen parameter");
44 "c_v", cv_,
"The specific heat capacity at constant volume");
47 this->add_parameter(
"k_0", k0_,
"The bulk modulus");
51 this->add_parameter(
"N", N_,
"The exponent N");
55 "e_0", e0_,
"The reference specific internal energy");
58 this->add_parameter(
"p_0", p0_,
"The reference pressure");
61 this->add_parameter(
"s_0", s0_,
"The reference specific entropy");
64 const auto update_values = [
this]() { v0_ = 1. / rho0_; };
66 this->parse_parameters_call_back.connect(update_values);
88 double pressure(
double rho,
double e)
const final
90 const auto v = 1. / rho;
91 const auto ratio = v / v0_;
92 const auto f_c = repulsion_of_ions(v);
94 (e - e0_ - p0_ * (v0_ - v) - f_c) / cv_ + gm0_ * T0_ * (1. - ratio);
95 const auto first_term = k0_ / N_ * std::pow(ratio, -N_);
96 const auto second_term = cv_ * gm0_ / v0_ * delta_T;
98 return first_term + second_term - k0_ / N_ + p0_;
115 const auto v = 1. / rho;
116 const auto ratio = v / v0_;
117 const auto f_c = repulsion_of_ions(v);
118 auto scaled_delta_p =
119 p - p0_ - k0_ / N_ * std::pow(ratio, -N_) + k0_ / N_;
120 scaled_delta_p *= v0_ / gm0_;
121 const auto composite_constant = p0_ * v0_ - gm0_ * T0_ * cv_;
123 return scaled_delta_p + composite_constant * (1. - ratio) + f_c + e0_;
140 const auto v = 1. / rho;
141 const auto f_c = repulsion_of_ions(v);
142 const auto first_term = (e - e0_ - p0_ * (v0_ - v) - f_c) / cv_;
143 const auto second_term = gm0_ * T0_ * (v0_ - v) / v0_;
144 return first_term + second_term + T0_;
160 const auto v = 1. / rho;
161 const auto f_c = repulsion_of_ions(v);
162 return p0_ * (v0_ - v) + f_c + e0_;
177 const auto v = 1. / rho;
178 const auto f_c = repulsion_of_ions(v);
179 const auto T = (e - e0_ - p0_ * (v0_ - v) - f_c) / cv_ +
180 gm0_ * T0_ * (v0_ - v) / v0_ + T0_;
181 auto s = std::log(T / T0_) + gm0_ * (v - v0_) / v0_;
204 const auto v = 1. / rho;
205 const auto ratio = v / v0_;
206 const auto f_c = repulsion_of_ions(v);
207 const auto T = (e - e0_ - p0_ * (v0_ - v) - f_c) / cv_ +
208 gm0_ * T0_ * (v0_ - v) / v0_ + T0_;
209 const auto radicand = v0_ * k0_ * std::pow(ratio, 1. - N_) +
210 cv_ * gm0_ * gm0_ * v * v * T / (v0_ * v0_);
211 return std::sqrt(radicand);
233 double repulsion_of_ions(
const double v)
const
235 const double ratio = v / v0_;
236 double f_c = std::pow(ratio, 1. - N_) - (N_ - 1.) * (1. - ratio) - 1.;
237 f_c *= k0_ * v0_ / (N_ * (N_ - 1.));
virtual double pressure(double rho, double e) const =0
virtual double temperature(double, double) const
virtual double speed_of_sound(double, double) const
virtual double specific_internal_energy(double rho, double p) const =0
double specific_entropy(double rho, double e) const final
double specific_internal_energy(double rho, double p) const final
double pressure(double rho, double e) const final
double cold_curve_bound(double rho) const final
double temperature(double rho, double e) const final
double speed_of_sound(double rho, double e) const final
Hayes(const std::string &subsection)