![]() |
ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
|
Class describing an ideal gas equation of state. More...
#include <EosIG.h>
Inherits Eos.
Public Member Functions | |
| EosIG (std::vector< std::string > &nameParameterEos, int &number) | |
| ~EosIG () override | |
| void | assignParametersEos (std::string name, std::vector< double > parametersEos) override |
| Assign the values of the attributes for EosIG from data defined in the code. | |
| double | computeTemperature (const double &density, const double &pressure) const override |
| Compute temperature. | |
| double | computeEnergy (const double &density, const double &pressure) const override |
| Compute internal energy. | |
| double | computePressure (const double &density, const double &energy) const override |
| Compute pressure. | |
| double | computeDensity (const double &pressure, const double &temperature) const override |
| Compute density. | |
| double | computeSoundSpeed (const double &density, const double &pressure) const override |
| Compute sound speed. | |
| double | computeInterfaceSoundSpeed (const double &density, const double &interfacePressure, const double &pressure) const override |
| Compute interface sound speed. | |
| double | computeAcousticImpedance (const double &density, const double &pressure) const override |
| Compute acoustic impedance. | |
| double | computeDensityTimesInterfaceSoundSpeedSquare (const double &, const double &interfacePressure, const double &pressure) const override |
| Compute density times interface sound speed square. | |
| double | computeEntropy (const double &temperature, const double &pressure) const override |
| Compute entropy. | |
| double | computePressureIsentropic (const double &initialPressure, const double &initialDensity, const double &finalDensity) const override |
| Compute phase pressure along an isentropic path. | |
| double | computePressureHugoniot (const double &initialPressure, const double &initialDensity, const double &finalDensity) const override |
| Compute pressure along the Hugoniot curve. | |
| double | computeDensityIsentropic (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const override |
| Compute density along an isentropic path AND its derivature versus the pressure at constant entropy. | |
| double | computeDensityHugoniot (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const override |
| Compute density along the Hugoniot curve path AND its derivature versus the pressure along Hugoniot curve. | |
| double | computeDensityPfinal (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *drhodp=0) const override |
| Compute density during relaxation step AND its derivative versus the pressure. | |
| double | computeEnthalpyIsentropic (const double &initialPressure, const double &initialDensity, const double &finalPressure, double *dhdp=0) const override |
| Compute enthalpy at the end of an isentropic path AND the enthalpy derivature versus the pressure. | |
| double | computeDensitySaturation (const double &pressure, const double &Tsat, const double &dTsatdP, double *drhodp=0) const override |
| Compute density on the saturation curve at the saturation temperature AND its derivative versus the pressure at constant density (OPTIONAL). | |
| double | computeDensityEnergySaturation (const double &pressure, const double &rho, const double &drhodp, double *drhoedp=0) const override |
| Compute the volumic internal energy at the saturation AND its derivative versus the pressure at constant density (OPTIONAL). | |
| void | sendSpecialMixtureEos (double &gamPinfOverGamMinusOne, double &eRef, double &oneOverGamMinusOne, double &covolume) const override |
| Send specific values of the parameters useful for mixture EOS based on Ideal Gas and Stiffened Gas. | |
| double | vfpfh (const double &pressure, const double &enthalpy) const override |
| Compute the specific volume with the pressure and the enthalpy. | |
| double | dvdpch (const double &pressure, const double &enthalpy) const override |
| Compute the partial derivative of the specific volume versus pressure at constant enthalpy. | |
| double | dvdhcp (const double &pressure) const override |
| Compute the partial derivative of the specific volume versus enthalpy at constant pressure. | |
| double | drhodpcT (const double &, const double &temperature) const override |
| Compute the partial derivative of density versus pressure at constant temperature. | |
| void | verifyPressure (const double &pressure, const std::string &message="") const override |
| Add a message error if the pressure is too low and under a limit value equal to \( 10^{-15} \). | |
| void | verifyAndModifyPressure (double &pressure) const override |
| Modify the pressure if its value is under a limit value equal to \( 10^{-15} \). | |
| void | verifyAndCorrectDensityMax (const double &, double &, double &) const override |
| Do nothing for IG. | |
| void | verifyAndCorrectDensityMax (double &) const override |
| Do nothing for IG. | |
| const double & | getGamma () const override |
| Get the adiabatic exponent of the fluid. | |
| const double & | getCv () const override |
| Get the volume calorific energy of the fluid. | |
| const double & | getERef () const override |
| Get the energy of reference of the fluid. | |
| const double & | getSRef () const override |
| Get the entropy of reference of the fluid | |
| TypeEOS | getType () const override |
| Get the type that is to say the reduced name of the EOS in ECOGEN. | |
| Public Member Functions inherited from Eos | |
| 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 | computeEnergyFromDensityAndTemperature (const double &, const double &) const |
| See derived classes. | |
| virtual double | computeSquareSoundSpeed (const double &, const double &) const |
| See derived classes. | |
| virtual double | computeEntropyFromDensityAndEnergy (const double &, const double &) const |
| See derived classes. | |
| virtual double | computeEntropyFromDensityAndPressure (const double &, const double &) const |
| See derived classes. | |
| virtual double | computeEntropyFromDensityAndTemperature (const double &, const double &) const |
| See derived classes. | |
| virtual double | computePressureFromDensityAndEntropy (const double &, const double &) const |
| See derived classes. | |
| virtual double | computePressureFromDensityAndTemperature (const double &, const double &) const |
| See derived classes. | |
| virtual double | dedrho (const double &, const double &) const |
| See derived classes. | |
| virtual double | dedrhoSecond (const double &, const double &) const |
| See derived classes. | |
| virtual double | kappa (const double &) const |
| See derived classes. | |
| virtual double | kappaPrime (const double &) const |
| See derived classes. | |
| virtual double | kappaSecond (const double &) const |
| See derived classes. | |
| virtual const double & | getPInf () const |
| See derived classes. | |
Private Attributes | |
| double | m_gamma |
| Adiabatic exponent of the fluid. | |
| double | m_cv |
| Volume calorific energy of the fluid. | |
| double | m_eRef |
| Energy of reference of the fluid. | |
| double | m_sRef |
| Entropy of the fluid. | |
Additional Inherited Members | |
| Protected Attributes inherited from Eos | |
| 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 an ideal gas equation of state.
| EosIG::EosIG | ( | std::vector< std::string > & | nameParameterEos, |
| int & | number ) |
|
override |
|
overridevirtual |
Assign the values of the attributes for EosIG from data defined in the code.
| name | string that contains the reduced name (sould be IG) |
| parametersEos | vector (size depending on the Eos, 4 for IG) |
Are assigned the following attributes: name, \( \gamma, \; c_v, \; e_{ref}, s_{ref}\). If the size of parameterEos \( \neq 4\) then the code aborts.
Implements Eos.
|
overridevirtual |
Compute acoustic impedance.
| density | density ( \(\rho\)) |
| pressure | pressure (p) |
with : \( z(p, \rho) = \sqrt{ \rho \ \gamma \ p } \)
Reimplemented from Eos.
|
overridevirtual |
Compute density.
| pressure | pressure (p) |
| temperature | temperature (T) |
with density : \( \rho(p, T) = \frac{p}{T \ c_v \ (\gamma-1)}\ \)
Reimplemented from Eos.
|
overridevirtual |
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) |
with rhoe : \( \rho\epsilon(p, \rho) = \frac{p}{(\gamma-1)} +\rho\epsilon_{ref}\) AND \( \frac{d \rho\epsilon}{d p} =\left. \frac{\partial \rho\epsilon}{\partial p} \right)_{\rho} + \left. \frac{\partial \rho\epsilon}{\partial\rho } \right)_p \frac{d \rho}{d p} = \frac{1}{(\gamma-1)} +\frac{d \rho}{d p}\epsilon_{ref} \)
Reimplemented from Eos.
|
overridevirtual |
Compute density along the Hugoniot curve path AND its derivature versus the pressure along Hugoniot curve.
| initialPressure | initial pressure ( \( p_i \)) |
| initialDensity | initial density ( \( \rho_i \)) |
| finalPressure | final pressure ( \( p_f \)) |
with finalDensity : \( \rho_f =\rho_i\frac{ (\gamma + 1)*p_f + (\gamma - 1)*p_i}{(\gamma - 1)p_f +(\gamma + 1)p_i) }\) AND with *drhodp : \( \left. \frac{\partial \rho}{\partial p} \right)_Hug = \frac{4\gamma \rho_i \ p_i}{ \left( (\gamma - 1)p_f +(\gamma + 1)p_i \right) ^2} \)
Reimplemented from Eos.
|
overridevirtual |
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 |
with finalDensity : \( \rho_f = \rho_i \left( \frac{p_f}{ p_i}\right) ^\frac{1}{\gamma} \) AND with *drhodp : \( \left. \frac{\partial \rho}{\partial p} \right)_s = \frac{\rho_f}{ \gamma \ p_f} \)
Reimplemented from Eos.
|
overridevirtual |
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 \)) |
with finalDensity : \( \rho_f = \rho_i \frac{\gamma p_f}{\gamma p_f + p_i - p_f} \) AND with *drhodp : \( \frac{d\rho}{dp} = \rho_i \frac{\gamma p_i}{\left(\gamma p_f + p_i - p_f\right)^2} \)
Reimplemented from Eos.
|
overridevirtual |
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}\)) |
with rho : \( \rho(p, T_{sat}) = \frac{p}{T_{sat} \ c_v \ (\gamma-1)}\ \) AND \(\frac{d \rho}{d p} = \left. \frac{\partial \rho}{\partial p} \right)_{T_{sat}} + \left. \frac{\partial \rho}{\partial T_{sat} } \right)_p \frac{d T_{sat}}{d p} =\frac{(\gamma-1)c_v\left(T_{sat} - p\frac{d T_{sat}}{d p}\right) }{\left((\gamma-1)c_vT_{sat}\right)^2 }\)
Reimplemented from Eos.
|
overridevirtual |
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 \)
Reimplemented from Eos.
|
overridevirtual |
Compute internal energy.
| density | density ( \(\rho\)) |
| pressure | pressure (p) |
with internal energy : \( \epsilon (\rho, p) = \frac{p}{\rho \ (\gamma-1)} \ + \ \epsilon_{ref}\)
Reimplemented from Eos.
|
overridevirtual |
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) |
with finalEnthalpy : \( h(p_f,{\rho_f})= \frac{\gamma}{(\gamma-1)}\frac{p_f}{\rho_f} +e_{ref} \). The density \( \rho_f \) is fisrt computed along an isentropic path (see computeDensityIsentropic EosIG method ). AND with *dhdp : \( \frac{dh}{dp}=\frac{\gamma}{(\gamma-1)}\frac{ \rho_f - p_f \frac{d\rho}{dp} }{\rho_f^2} \). The term \(\frac{d\rho}{dp}\) is the derivative obtained along an isentropic path.
Reimplemented from Eos.
|
overridevirtual |
Compute entropy.
| temperature | temperature (T) |
| pressure | pressure (p) |
with s : \( s(T, p) = c_v \ ln \left( \frac{T^\gamma} { p^\frac{\gamma}{(\gamma-1)} } \right)+s_{ref} \)
Reimplemented from Eos.
|
overridevirtual |
Compute interface sound speed.
| density | density ( \(\rho\)) |
| interfacePressure | interface pressure (pI) |
| pressure | pressure (p) |
with : \( c(pI, p, \rho) = \sqrt{ \frac{(\gamma-1) \ p_I + p}{\rho}} \)
Reimplemented from Eos.
|
overridevirtual |
Compute pressure.
| density | density ( \(\rho\)) |
| energy | internal energy ( \(\epsilon\)) |
with pressure : \( p(\rho, \epsilon) = (\gamma-1)\rho(\epsilon - \epsilon_{ref}) \)
Reimplemented from Eos.
|
overridevirtual |
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 \frac{ (\gamma+1)*\rho_f - (\gamma-1)*\rho_i }{ (\gamma+1)*\rho_i-(\gamma-1)*\rho_f } \)
Reimplemented from Eos.
|
overridevirtual |
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 \left( \frac{\rho_f}{\rho_i} \right) ^\gamma \)
Reimplemented from Eos.
|
overridevirtual |
Compute sound speed.
| density | density ( \(\rho\)) |
| pressure | pressure (p) |
with soundSpeed : \( c(p, \rho) = \sqrt{ \frac{\gamma \ p}{\rho}} \)
Reimplemented from Eos.
|
overridevirtual |
Compute temperature.
| density | density ( \(\rho \)) |
| pressure | pressure (p) |
with temperature : \( T(\rho, p) = \frac{p}{\rho c_v (\gamma-1)}\)
Reimplemented from Eos.
|
overridevirtual |
Compute the partial derivative of density versus pressure at constant temperature.
| temperature | temperature (T) |
Reimplemented from Eos.
|
overridevirtual |
Compute the partial derivative of the specific volume versus enthalpy at constant pressure.
| pressure | pressure (p) |
Reimplemented from Eos.
|
overridevirtual |
Compute the partial derivative of the specific volume versus pressure at constant enthalpy.
| pressure | pressure (p) |
| enthalpy | enthalpy (h) |
Reimplemented from Eos.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Get the type that is to say the reduced name of the EOS in ECOGEN.
Reimplemented from Eos.
|
overridevirtual |
Send specific values of the parameters useful for mixture EOS based on Ideal Gas and Stiffened Gas.
| gamPinfOverGamMinusOne | \( \frac{\gamma p_{\infty}}{(\gamma-1)} = 0 \;for\; Ideal\; Gas\) |
| eRef | \( \epsilon_{ref} \) |
| oneOverGamMinusOne | \( \frac{1}{(\gamma-1)}\) |
Reimplemented from Eos.
|
inlineoverridevirtual |
Do nothing for IG.
Reimplemented from Eos.
|
inlineoverridevirtual |
Do nothing for IG.
Reimplemented from Eos.
|
overridevirtual |
Modify the pressure if its value is under a limit value equal to \( 10^{-15} \).
| pressure | pressure (p) |
Reimplemented from Eos.
|
overridevirtual |
Add a message error if the pressure is too low and under a limit value equal to \( 10^{-15} \).
| pressure | pressure (p) |
| message | "" |
Reimplemented from Eos.
|
overridevirtual |
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 |
Entropy of the fluid.