![]() |
ECOGEN 4.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
Class describing a stiffened gas equation of state. More...
#include <EosSG.h>
Inherits Eos.
Public Member Functions | |
EosSG (std::vector< std::string > &nameParameterEos, int &number) | |
virtual | ~EosSG () |
virtual void | assignParametersEos (std::string name, std::vector< double > parametersEos) |
assign the values of the attributes for EosSG from data defined in the code | |
virtual double | computeTemperature (const double &density, const double &pressure) const |
Compute temperature. | |
virtual double | computeEnergy (const double &density, const double &pressure) const |
Compute internal energy. | |
virtual double | computePressure (const double &density, const double &energy) const |
Compute pressure. | |
virtual double | computeDensity (const double &pressure, const double &temperature) const |
Compute density. | |
virtual double | computeSoundSpeed (const double &density, const double &pressure) const |
Compute sound speed. | |
virtual double | computeInterfaceSoundSpeed (const double &density, const double &interfacePressure, const double &pressure) const |
Compute interface sound speed. | |
virtual double | computeAcousticImpedance (const double &density, const double &pressure) const |
Compute acoustic impedance. | |
virtual double | computeDensityTimesInterfaceSoundSpeedSquare (const double &, const double &interfacePressure, const double &pressure) const |
Compute density times interface sound speed square. | |
virtual double | computeEntropy (const double &temperature, const double &pressure) const |
Compute entropy. | |
virtual double | computePressureIsentropic (const double &initialPressure, const double &initialDensity, const double &finalDensity) const |
Compute phase pressure along an isentropic path. | |
virtual double | computePressureHugoniot (const double &initialPressure, const double &initialDensity, const double &finalDensity) const |
Compute pressure along the Hugoniot curve. | |
virtual double | computeDensityIsentropic (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const |
Compute density along an isentropic path AND its derivature versus the pressure at constant entropy. | |
virtual double | computeDensityHugoniot (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const |
Compute density along the Hugoniot curve AND its derivature versus the pressure along Hugoniot curve. | |
virtual double | computeDensityPfinal (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const |
Compute density during relaxation step AND its derivative versus the pressure. | |
virtual double | computeEnthalpyIsentropic (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *dhdp=0) const |
Compute enthalpy at the end of an isentropic path AND the enthalpy derivature versus the pressure. | |
virtual double | computeDensitySaturation (const double &pressure, const double &Tsat, const double &dTsatdP, double *drhodp=0) const |
Compute density on the saturation curve at the saturation temperature AND its derivative versus the pressure at constant density (OPTIONAL) | |
virtual double | computeDensityEnergySaturation (const double &pressure, const double &rho, const double &drhodp, double *drhoedp=0) const |
Compute the volumic internal energy at the saturation AND its derivative versus the pressure at constant density (OPTIONAL) | |
virtual void | sendSpecialMixtureEos (double &gamPinfOverGamMinusOne, double &eRef, double &oneOverGamMinusOne, double &covolume) const |
Send specific values of the parameters useful for mixture EOS based on Ideal Gas and Stiffened Gas. | |
virtual double | vfpfh (const double &pressure, const double &enthalpy) const |
Compute the specific volume with the pressure and the enthalpy. | |
virtual double | dvdpch (const double &pressure, const double &enthalpy) const |
Compute the partial derivative of the specific volume versus pressure at constant enthalpy. | |
virtual double | dvdhcp (const double &pressure) const |
Compute the partial derivative of the specific volume versus enthalpy at constant pressure. | |
virtual double | drhodpcT (const double &, const double &temperature) const |
compute the partial derivative of density versus pressure at constant temperature | |
virtual void | verifyPressure (const double &pressure, const std::string &message="") const |
Add a message error if the pressure is too low and under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \). | |
virtual void | verifyAndModifyPressure (double &pressure) const |
Modify the pressure if its value is under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \). | |
virtual void | verifyAndCorrectDensityMax (const double &, double &, double &) const |
Do nothing for SG. | |
virtual void | verifyAndCorrectDensityMax (double &) const |
Do nothing for SG. | |
virtual const double & | getGamma () const |
Get the adiabatic exponent of the fluid. | |
virtual const double & | getPInf () const |
Get the constant pressure. | |
virtual const double & | getCv () const |
Get the volume calorific energy of the fluid. | |
virtual const double & | getERef () const |
Get the energy of reference of the fluid. | |
virtual const double & | getSRef () const |
Get the entropy of reference of the fluid. | |
virtual TypeEOS | getType () const |
Get the type that is to say the reduced name of the EOS in ECOGEN. | |
![]() | |
Eos (int &number) | |
virtual | ~Eos () |
const std::string & | getName () const |
const int & | getNumber () const |
Return the number associated to the EOS. | |
void | readPhysicalParameters (tinyxml2::XMLNode *element) |
Read physical parameters (viscosity, thermal conductivity....) | |
double | computeEnthalpy (const double &density, const double &pressure) const |
Compute the enthalpy of the phase. | |
double | computeTotalEnthalpy (const double &density, const double &pressure, const double &velX, const double &velY=0., const double &velZ=0.) const |
Compute the total enthalpy of the phase. | |
double | computeTotalEnthalpy (const double &density, const double &pressure, const Coord &velocity) const |
Compute the total enthalpy of the phase. | |
const double & | getMu () const |
Return the dynamic viscosity of the fluid return \( \mu \) (Unit: Pa.s). | |
const double & | getLambda () const |
get the thermal conductivity of the fluid return \( \lambda \) (Unit: W/(m.K)). | |
void | assignEpsilonForAlphaNull (bool alphaNull) const |
Assign the epsilonAlphaNull value for alphaNull option (alpha = 0 => epsilonAlphaNull != 0 ; alpha != 0 => epsilonAlphaNull = 0) | |
virtual double | dedrho (const double &, const double &) const |
See derived classes. | |
virtual double | dedrhoSecond (const double &, const double &) const |
See derived classes. | |
Private Attributes | |
double | m_gamma |
Adiabatic exponent of the fluid. | |
double | m_pInf |
Infinit (reference) pressure of the fluid. | |
double | m_cv |
Volume calorific energy of the fluid. | |
double | m_eRef |
Energy of reference of the fluid. | |
double | m_sRef |
Enthalpy of the fluid. | |
Additional Inherited Members | |
![]() | |
int | m_number |
Corresponding number of the equation of state. | |
std::string | m_name |
Name of the equation of state. | |
double | m_mu |
Dynamic viscosity (kg/m/s or Pa.s) | |
double | m_lambda |
Thermal conductivity (W/(m.K)) | |
Class describing a stiffened gas equation of state.
EosSG::EosSG | ( | std::vector< std::string > & | nameParameterEos, |
int & | number | ||
) |
|
virtual |
|
virtual |
assign the values of the attributes for EosSG from data defined in the code
name | string that contains the reduced name (should be SG) |
parametersEos | vector (size depending on the Eos, 5 for SG) |
Are assigned the following attributes: name, \( \gamma, \; p_{infty}, \; c_v, \; e_{ref}, s_{ref}\). If the size of parameterEos \( \neq 5\) then the code aborts.
Implements Eos.
|
virtual |
Compute acoustic impedance.
density | density ( \(\rho\)) |
pressure | pressure (p) |
with : \( z(p, \rho) = \sqrt{ \rho \ \gamma \ (p+p_{\infty}) } \)
Reimplemented from Eos.
|
virtual |
Compute density.
pressure | pressure (p) |
temperature | temperature (T) |
with density : \( \rho(p, T) = \frac{p + \gamma p_{\infty} }{T \ c_v \ (\gamma-1)}\ \)
Reimplemented from Eos.
|
virtual |
Compute the volumic internal energy at the saturation AND its derivative versus the pressure at constant density (OPTIONAL)
pressure | pressure (p) |
density | density ( \( \rho \)) |
drhodp | derivative of the density versus pressure ( \(\frac{d \rho}{d p}\) at the saturation state) |
Reimplemented from Eos.
|
virtual |
Compute density along the Hugoniot curve AND its derivature versus the pressure along Hugoniot curve.
initialPressure | initial pressure ( \( p_i \)) |
initialDensity | initial density ( \( \rho_i \)) |
finalPressure | final pressure ( \( p_f \)) |
Reimplemented from Eos.
|
virtual |
Compute density along an isentropic path AND its derivature versus the pressure at constant entropy.
initialPressure | initial pressure \( (p_i) \) |
initialDensity | initial density \( (\rho_i ) \) |
finalPressure | final pressure |
Reimplemented from Eos.
|
virtual |
Compute density during relaxation step AND its derivative versus the pressure.
initialPressure | initial pressure ( \( p_i \)) |
initialDensity | initial density ( \( \rho_i \)) |
finalPressure | final pressure ( \( p_f \)) |
Reimplemented from Eos.
|
virtual |
Compute density on the saturation curve at the saturation temperature AND its derivative versus the pressure at constant density (OPTIONAL)
pressure | pressure (p) |
Tsat | saturation temperature ( \(T_{sat}\)) |
dTsatdP | derivative of the saturation temperature versus pressure ( \(\frac{d T_{sat}}{d p}\)) |
Reimplemented from Eos.
|
virtual |
Compute density times interface sound speed square.
density | density ( \(\rho\)) |
interfacePressure | interface pressure (pI) |
pressure | pressure (p) |
with : \( z(p, \rho) = (\gamma-1) \ p_I + p + \gamma \ p_{\infty} \)
Reimplemented from Eos.
|
virtual |
Compute internal energy.
density | density ( \(\rho\)) |
pressure | pressure (p) |
with internal energy : \( \epsilon (\rho, p) = \frac{p + \gamma p_{\infty}}{\rho \ (\gamma-1)} \ + \ \epsilon_{ref} \)
Reimplemented from Eos.
|
virtual |
Compute enthalpy at the end of an isentropic path AND the enthalpy derivature versus the pressure.
initialPressure | Initial pressure ( \( p_i \) at the beginning of the isentropic path) |
initialDensity | Initial density ( \( \rho_i \) at the beginning of the isentropic path) |
finalPressure | final Pressure ( \( p_f \) at the end of the isentropic path) |
Reimplemented from Eos.
|
virtual |
Compute entropy.
temperature | temperature (T) |
pressure | pressure (p) |
with s : \( s(T, p) = c_v \ ln \left( \frac{T^\gamma} { (p+p_{\infty})^{(\gamma-1)} } \right)+s_{ref} \)
Reimplemented from Eos.
|
virtual |
Compute interface sound speed.
density | density ( \(\rho\)) |
interfacePressure | interface pressure (pI) |
pressure | pressure (p) |
with soundSpeed : \( c(p, \rho) = \sqrt{ \frac{(\gamma-1) \ p_I + p + \gamma \ p_{\infty}}{\rho}} \)
Reimplemented from Eos.
|
virtual |
Compute pressure.
density | density ( \(\rho\)) |
energy | internal energy ( \(\epsilon\)) |
with pressure : \( p(\rho, \epsilon) = (\gamma-1)\rho(\epsilon - \epsilon_{ref}) - \gamma p_{\infty}\)
Reimplemented from Eos.
|
virtual |
Compute pressure along the Hugoniot curve.
initialPressure | initial pressure ( \( p_i \)) |
initialDensity | initial density ( \( \rho_i \)) |
finalDensity | final density ( \( \rho_f \)) |
with finalPressure : \( p_f = (p_i+p_{\infty}) \frac{ (\gamma+1)*\rho_f - (\gamma-1)*\rho_i }{ (\gamma+1)*\rho_i-(\gamma-1)*\rho_f } -p_{\infty} \)
Reimplemented from Eos.
|
virtual |
Compute phase pressure along an isentropic path.
initialPressure | initial pressure ( \( p_i \)) |
initialDensity | initial density ( \( \rho_i \)) |
finalDensity | final density |
with finalPressure : \( p_f = (p_i+p_{\infty}) \left( \frac{\rho_f}{\rho_i} \right) ^\gamma -p_{\infty} \)
Reimplemented from Eos.
|
virtual |
Compute sound speed.
density | density ( \(\rho\)) |
pressure | pressure (p) |
with soundSpeed : \( c(p, \rho) = \sqrt{ \frac{\gamma \ (p+p_{\infty})}{\rho}} \)
Reimplemented from Eos.
|
virtual |
Compute temperature.
density | density ( \(\rho \)) |
pressure | pressure (p) |
with temperature : \( T(\rho, p) = \frac{p+p_{\infty}}{\rho c_v (\gamma-1)}\)
Reimplemented from Eos.
|
virtual |
compute the partial derivative of density versus pressure at constant temperature
temperature | temperature (T) |
Reimplemented from Eos.
|
virtual |
Compute the partial derivative of the specific volume versus enthalpy at constant pressure.
pressure | pressure (p) |
Reimplemented from Eos.
|
virtual |
Compute the partial derivative of the specific volume versus pressure at constant enthalpy.
pressure | pressure (p) |
enthalpy | enthalpy (h) |
Reimplemented from Eos.
|
inlinevirtual |
|
inlinevirtual |
Get the energy of reference of the fluid.
Reimplemented from Eos.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
Get the type that is to say the reduced name of the EOS in ECOGEN.
Reimplemented from Eos.
|
virtual |
Send specific values of the parameters useful for mixture EOS based on Ideal Gas and Stiffened Gas.
gamPinfOverGamMinusOne | \( \frac{\gamma p_{\infty}}{(\gamma-1)} \) |
eRef | \( \epsilon_{ref} \) |
oneOverGamMinusOne | \( \frac{1}{(\gamma-1)}\) |
Reimplemented from Eos.
|
inlinevirtual |
Do nothing for SG.
Reimplemented from Eos.
|
inlinevirtual |
Do nothing for SG.
Reimplemented from Eos.
|
virtual |
Modify the pressure if its value is under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).
pressure | pressure (p) |
Reimplemented from Eos.
|
virtual |
Add a message error if the pressure is too low and under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).
pressure | pressure (p) |
message | "" |
Reimplemented from Eos.
|
virtual |
Compute the specific volume with the pressure and the enthalpy.
pressure | pressure (p) |
enthalpy | enthalpy (h) |
Reimplemented from Eos.
|
private |
Volume calorific energy of the fluid.
|
private |
Energy of reference of the fluid.
|
private |
Adiabatic exponent of the fluid.
|
private |
Infinit (reference) pressure of the fluid.
|
private |
Enthalpy of the fluid.