11 eos.
dp2e(density, pressure),
12 eos.
dp2c(density, pressure));
18 const double density = c.
Mass;
21 0.5*pow(
abs(velocity),2);
23 "Thermal energy is negative");
35 const double pressure = eos.
de2p(density, energy);
36 const double sound_speed = eos.
dp2c(density, pressure);
Set of conserved variables (extensive)
Vector2D Momentum
Momentum.
Primitive Conserved2Primitive(Conserved const &c, EquationOfState const &eos)
Calculates the primitive variables from the conserved.
virtual double de2p(double d, double e, tvector const &tracers=tvector(), vector< string > const &tracernames=vector< string >()) const =0
Calculates the pressure.
Primitive CalcPrimitive(double density, double pressure, Vector2D const &velocity, EquationOfState const &eos)
Calculates the primitive variables.
Vector2D Velocity
Velocity.
virtual double dp2c(double d, double p, tvector const &tracers=tvector(), vector< string > const &tracernames=vector< string >()) const =0
Calculates the speed of sound.
double Energy
Total energy (kinetic + thermal)
Hydrodynamical relations.
Primitive make_eos_consistent(Primitive const &p, EquationOfState const &eos)
Takes a set of primitive variables that do not necessarily satisfy the equation of state...
Base class for equation of state.
virtual double dp2e(double d, double p, tvector const &tracers=tvector(), vector< string > const &tracernames=vector< string >()) const =0
Calculates the thermal energy per unit mass.
double abs(Vector3D const &v)
Norm of a vector.
Primitive hydrodynamic variables.