ECOGEN 6.0
Evolutive, Compressible, Open, Genuine, Easy, N-phase
Loading...
Searching...
No Matches
EosNASG Class Reference

Class describing a Noble-Abel stiffened gas equation of state. More...

#include <EosNASG.h>

Inherits Eos.

Collaboration diagram for EosNASG:
[legend]

Public Member Functions

 EosNASG (std::vector< std::string > &nameParameterEos, int &number)
 ~EosNASG () override
void assignParametersEos (std::string name, std::vector< double > parametersEos) override
 assign the values of the attributes for EosNASG 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 &density, 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 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 &pressure, 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 \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).
void verifyAndModifyPressure (double &pressure) const override
 Modify the pressure if its value is under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).
void verifyAndCorrectDensityMax (const double &mass, double &alpha, double &density) const override
 Modify the density if its value is above a limit value equal to \( \frac{1.}{b} - 1. \) and then correct the volume fraction based on mass.
void verifyAndCorrectDensityMax (double &density) const override
 Modify the density if its value is above a limit value equal to \( \frac{1.}{b} - 1. \).
const double & getGamma () const override
 Get the adiabatic exponent of the fluid.
const double & getPInf () const override
 Get the constant pressure.
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.
virtual const double & getB () const
 Get the covolume of the fluid.
TypeEOS getType () const override
 Get the type that is to say the reduced name of the EOS in ECOGEN return \( \ "NASG" \).
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.

Private Attributes

double m_gamma
 Adiabatic exponent of the fluid.
double m_pInf
 Infinit (reference) pressure of the fluid.
double m_b
 Covolume 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)).

Detailed Description

Class describing a Noble-Abel stiffened gas equation of state.

Constructor & Destructor Documentation

◆ EosNASG()

EosNASG::EosNASG ( std::vector< std::string > & nameParameterEos,
int & number )
Here is the call graph for this function:

◆ ~EosNASG()

EosNASG::~EosNASG ( )
override

Member Function Documentation

◆ assignParametersEos()

void EosNASG::assignParametersEos ( std::string name,
std::vector< double > parametersEos )
overridevirtual

assign the values of the attributes for EosNASG from data defined in the code

Parameters
namestring that contains the reduced name (should be NASG)
parametersEosvector (size depending on the Eos, 6 for NASG)

Are assigned the following attributes: name, \( \gamma, \; p_{infty}, \; b, \; c_v, \; e_{ref}, \; s_{ref}\). If the size of parameterEos \( \neq 6\) then the code aborts.

Implements Eos.

◆ computeAcousticImpedance()

double EosNASG::computeAcousticImpedance ( const double & density,
const double & pressure ) const
overridevirtual

Compute acoustic impedance.

Parameters
densitydensity ( \(\rho\))
pressurepressure (p)
Returns
acousticImpedance

with : \( z(p, \rho) = \sqrt{ \frac{\rho \ \gamma \ (p+p_{\infty})}{1-\rho b} } \)

Reimplemented from Eos.

◆ computeDensity()

double EosNASG::computeDensity ( const double & pressure,
const double & temperature ) const
overridevirtual

Compute density.

Parameters
pressurepressure (p)
temperaturetemperature (T)
Returns
density

with density : \( \rho(p, T) = \frac{p + p_{\infty} }{c_v T(\gamma-1) + b (p + p_{\infty})} \)

Reimplemented from Eos.

◆ computeDensityEnergySaturation()

double EosNASG::computeDensityEnergySaturation ( const double & pressure,
const double & rho,
const double & drhodp,
double * drhoedp = 0 ) const
overridevirtual

Compute the volumic internal energy at the saturation AND its derivative versus the pressure at constant density (OPTIONAL).

Parameters
pressurepressure (p)
densitydensity ( \( \rho \))
drhodpderivative of the density versus pressure ( \(\frac{d \rho}{d p}\) at the saturation state)
Returns
rhoe AND *drhoedp (OPTIONAL)

with rhoe : \( \rho\epsilon(p, \rho) = \frac{(p+\gamma p_{\infty})(1-\rho b)}{(\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}{dp} = \frac{1-\rho b}{(\gamma-1)} +\frac{d \rho}{d p}\left(\epsilon_{ref}-b\frac{(p+\gamma p_{\infty})}{\gamma-1}\right) \)

Reimplemented from Eos.

◆ computeDensityHugoniot()

double EosNASG::computeDensityHugoniot ( const double & initialPressure,
const double & initialDensity,
const double & finalPressure,
double * drhodp = 0 ) const
overridevirtual

Compute density along the Hugoniot curve AND its derivature versus the pressure along Hugoniot curve.

Parameters
initialPressureinitial pressure ( \( p_i \))
initialDensityinitial density ( \( \rho_i \))
finalPressurefinal pressure ( \( p_f \))
Returns
finalDensity AND *drhodp (OPTIONAL)

with finalDensity : \( \rho_f =\rho_i\frac{ (\gamma + 1)*(p_f+p_{\infty}) + (\gamma - 1)*(p_i+p_{\infty})}{(\gamma - 1)(p_f+p_{\infty}) +(\gamma + 1)(p_i+p_{\infty}) + 2 b \rho_0 (p_f-p_i)} \) AND with *drhodp : \( \left. \frac{\partial \rho}{\partial p} \right)_{Hug} = \frac{4\gamma \rho_i \ (p_i+p_{\infty}) \ (1- b\rho_i)}{ \left( (\gamma - 1)(p_f+p_{\infty}) +(\gamma + 1)(p_i+p_{\infty}) +2b\rho_i (p_f-p_i)\right) ^2} \)

Reimplemented from Eos.

◆ computeDensityIsentropic()

double EosNASG::computeDensityIsentropic ( const double & initialPressure,
const double & initialDensity,
const double & finalPressure,
double * drhodp = 0 ) const
overridevirtual

Compute density along an isentropic path AND its derivature versus the pressure at constant entropy.

Parameters
initialPressureinitial pressure ( \( p_i \))
initialDensityinitial density ( \( \rho_i \))
finalPressurefinal pressure ( \( p_f \))
Returns
finalDensity AND *drhodp (OPTIONAL)

with finalDensity : \( \rho_f = \rho_i \frac{(p_f + p_{\infty})^{1/\gamma}}{(p_i + p_{\infty})^{1/\gamma} (1-\rho_i b) + \rho_i b (p_f + p_{\infty})^{1/\gamma}} \) AND with *drhodp : \( \left. \frac{\partial \rho}{\partial p} \right)_s = \frac{\rho_f (1-\rho_f b)}{\gamma (p_f+p_{\infty})} \)

Reimplemented from Eos.

Here is the caller graph for this function:

◆ computeDensityPfinal()

double EosNASG::computeDensityPfinal ( const double & initialPressure,
const double & initialDensity,
const double & finalPressure,
double * drhodp = 0 ) const
overridevirtual

Compute density during relaxation step AND its derivative versus the pressure.

Parameters
initialPressureinitial pressure ( \( p_i \))
initialDensityinitial density ( \( \rho_i \))
finalPressurefinal pressure ( \( p_f \))
Returns
finalDensity AND *drhodp (OPTIONAL)

with finalDensity : \( \rho_f = \rho_i \frac{\gamma (p_f+p_{\infty})}{\gamma (p_f+p_{\infty}) + p_i - p_f + b \rho_i (p_f -p_i)} \) AND with *drhodp : \( \frac{d\rho}{dp} = \rho_i \gamma \frac{\left(p_i + p_{\infty}-b \rho_i (p_i + p_{\infty})\right)}{\left(\gamma (p_f+p_{\infty}) + p_i - p_f+b \rho_i (p_f - p_i)\right)^2} \)

Reimplemented from Eos.

◆ computeDensitySaturation()

double EosNASG::computeDensitySaturation ( const double & pressure,
const double & Tsat,
const double & dTsatdP,
double * drhodp = 0 ) const
overridevirtual

Compute density on the saturation curve at the saturation temperature AND its derivative versus the pressure at constant density (OPTIONAL).

Parameters
pressurepressure (p)
Tsatsaturation temperature ( \(T_{sat}\))
dTsatdPderivative of the saturation temperature versus pressure ( \(\frac{d T_{sat}}{d p}\))
Returns
rho AND *drhodp (OPTIONAL)

with rho : \( \rho(p, T_{sat}) = \frac{p+p_{\infty}}{T_{sat} \ c_v \ (\gamma-1) + b(p+p_{\infty})} \) 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+p_{\infty})\frac{d T_{sat}}{d p}\right) }{\left((\gamma-1)c_vT_{sat} + b(p+p_{\infty}) \right)^2 } \)

Reimplemented from Eos.

◆ computeDensityTimesInterfaceSoundSpeedSquare()

double EosNASG::computeDensityTimesInterfaceSoundSpeedSquare ( const double & density,
const double & interfacePressure,
const double & pressure ) const
overridevirtual

Compute density times interface sound speed square.

Parameters
densitydensity ( \(\rho\))
interfacePressureinterface pressure (pI)
pressurepressure (p)
Returns
rhoCISquare

with : \( z(p, \rho) = \frac{(\gamma-1) \ p_I + p + \gamma \ p_{\infty}}{1 - \rho \ b} \)

Reimplemented from Eos.

◆ computeEnergy()

double EosNASG::computeEnergy ( const double & density,
const double & pressure ) const
overridevirtual

Compute internal energy.

Parameters
densitydensity ( \(\rho\))
pressurepressure (p)
Returns
internal energy

with internal energy : \( \epsilon (\rho, p) = \frac{(p + \gamma p_{\infty})(1-\rho b)}{\rho (\gamma-1)} \ + \ \epsilon_{ref} \)

Reimplemented from Eos.

◆ computeEnthalpyIsentropic()

double EosNASG::computeEnthalpyIsentropic ( const double & initialPressure,
const double & initialDensity,
const double & finalPressure,
double * dhdp = 0 ) const
overridevirtual

Compute enthalpy at the end of an isentropic path AND the enthalpy derivature versus the pressure.

Parameters
initialPressureinitial pressure ( \( p_i \) at the beginning of the isentropic path)
initialDensityinitial density ( \( \rho_i \) at the beginning of the isentropic path)
finalPressurefinal Pressure ( \( p_f \) at the end of the isentropic path)
Returns
finalEnthalpy AND *dhdp (OPTIONAL)

with finalEnthalpy : \( h(p_f,{\rho_f})= \frac{\gamma}{(\gamma-1)}\frac{p_f+p_{\infty}}{\rho_f} (1-\rho_f b) + b p + e_{ref} \). The density \( \rho_f \) is first computed along an isentropic path (see computeDensityIsentropic EosNASG method ). AND with *dhdp : \( \frac{dh}{dp}=\frac{\gamma}{(\gamma-1)}\left[\frac{ \rho_f - (p_f+p_{\infty}) \frac{d\rho}{dp} }{\rho_f^2}-b\right] +b \). The term \(\frac{d\rho}{dp}\) is the derivative obtained along an isentropic path.

Reimplemented from Eos.

Here is the call graph for this function:

◆ computeEntropy()

double EosNASG::computeEntropy ( const double & temperature,
const double & pressure ) const
overridevirtual

Compute entropy.

Parameters
temperaturetemperature (T)
pressurepressure (p)
Returns
entropy

with s : \( s(T, p) = c_v \ln \left( \frac{T^\gamma} { (p+p_{\infty})^{\gamma-1} } \right)+s_{ref} \)

Reimplemented from Eos.

◆ computeInterfaceSoundSpeed()

double EosNASG::computeInterfaceSoundSpeed ( const double & density,
const double & interfacePressure,
const double & pressure ) const
overridevirtual

Compute interface sound speed.

Parameters
densitydensity ( \(\rho\))
interfacePressureinterface pressure (pI)
pressurepressure (p)
Returns
soundSpeed

with soundSpeed : \( c(p, \rho) = \sqrt{ \frac{(\gamma-1) \ p_I + p + \gamma \ p_{\infty}}{(1 - \rho \ b) \ \rho}} \)

Reimplemented from Eos.

◆ computePressure()

double EosNASG::computePressure ( const double & density,
const double & energy ) const
overridevirtual

Compute pressure.

Parameters
densitydensity ( \(\rho\))
energyinternal energy ( \(\epsilon\))
Returns
pressure

with pressure : \( p(\rho, \epsilon) = (\gamma-1)\rho \frac{(\epsilon - \epsilon_{ref})}{(1-\rho b)} - \gamma p_{\infty} \)

Reimplemented from Eos.

◆ computePressureHugoniot()

double EosNASG::computePressureHugoniot ( const double & initialPressure,
const double & initialDensity,
const double & finalDensity ) const
overridevirtual

Compute pressure along the Hugoniot curve.

Parameters
initialPressureinitial pressure ( \( p_i \))
initialDensityinitial density ( \( \rho_i \))
finalDensityfinal density ( \( \rho_f \))
Returns
finalPressure

with finalPressure : \( p_f = \frac{\rho_i\left(2\gamma p_{\infty}+p_i (\gamma-1)\right)-\rho_f \left(2\gamma p_{\infty}+p_i (\gamma +1)\right)+2b\rho_i p_i}{\rho_f (\gamma-1)-\rho_i (\gamma+1)+2b\rho_0} \)

Reimplemented from Eos.

◆ computePressureIsentropic()

double EosNASG::computePressureIsentropic ( const double & initialPressure,
const double & initialDensity,
const double & finalDensity ) const
overridevirtual

Compute phase pressure along an isentropic path.

Parameters
initialPressureinitial pressure ( \( p_i \))
initialDensityinitial density ( \( \rho_i \))
finalDensityfinal density ( \( \rho_f \))
Returns
finalPressure

with finalPressure : \( p_f = (p_i+p_{\infty}) \left( \frac{\rho_f}{\rho_i} \right)^\gamma \left(\frac{1-\rho_i b}{1-\rho_f b}\right)^\gamma -p_{\infty} \)

Reimplemented from Eos.

◆ computeSoundSpeed()

double EosNASG::computeSoundSpeed ( const double & density,
const double & pressure ) const
overridevirtual

Compute sound speed.

Parameters
densitydensity ( \(\rho\))
pressurepressure (p)
Returns
soundSpeed

with soundSpeed : \( c(p, \rho) = \sqrt{ \frac{\gamma \ (p+p_{\infty})}{\rho (1-\rho b)}} \)

Reimplemented from Eos.

◆ computeTemperature()

double EosNASG::computeTemperature ( const double & density,
const double & pressure ) const
overridevirtual

Compute temperature.

Parameters
densitydensity ( \(\rho \))
pressurepressure (p)
Returns
temperature

with temperature : \( T(\rho, p) = \frac{(p+p_{\infty})(1-\rho b)}{c_v (\gamma-1)\rho} \)

Reimplemented from Eos.

◆ drhodpcT()

double EosNASG::drhodpcT ( const double & pressure,
const double & temperature ) const
overridevirtual

Compute the partial derivative of density versus pressure at constant temperature.

Parameters
pressurepressure (p)
temperaturetemperature (T)
Returns
derivative : \( \left. \frac{\partial \rho}{\partial p} \right)_T = \frac{(\gamma -1) c_v T}{\left((\gamma - 1)* c_v * T + b * (p + p_{\infty})\right)^2} \)

Reimplemented from Eos.

◆ dvdhcp()

double EosNASG::dvdhcp ( const double & pressure) const
overridevirtual

Compute the partial derivative of the specific volume versus enthalpy at constant pressure.

Parameters
pressurepressure (p)
Returns
derivative : \( \left. \frac{\partial v}{\partial h} \right)_p = \frac{(\gamma-1)}{\gamma (p+p_{\infty})} \)

Reimplemented from Eos.

◆ dvdpch()

double EosNASG::dvdpch ( const double & pressure,
const double & enthalpy ) const
overridevirtual

Compute the partial derivative of the specific volume versus pressure at constant enthalpy.

Parameters
pressurepressure (p)
enthalpyenthalpy (h)
Returns
derivative : \( \left. \frac{\partial v}{\partial p} \right)_h = \frac{\gamma-1}{\gamma (p+p_{\infty})^2} \left(-b(p+p_{\infty})-(h-bp-q)\right) \)

Reimplemented from Eos.

◆ getB()

virtual const double & EosNASG::getB ( ) const
inlinevirtual

Get the covolume of the fluid.

Returns
m_b : \( b \);

◆ getCv()

const double & EosNASG::getCv ( ) const
inlineoverridevirtual

Get the volume calorific energy of the fluid.

Returns
m_cv : \( c_v \)

Reimplemented from Eos.

◆ getERef()

const double & EosNASG::getERef ( ) const
inlineoverridevirtual

Get the energy of reference of the fluid.

Returns
m_eRef : \( \epsilon_{ref} \)

Reimplemented from Eos.

◆ getGamma()

const double & EosNASG::getGamma ( ) const
inlineoverridevirtual

Get the adiabatic exponent of the fluid.

Returns
m_gamma : \( \gamma \)

Reimplemented from Eos.

◆ getPInf()

const double & EosNASG::getPInf ( ) const
inlineoverridevirtual

Get the constant pressure.

Returns
m_pInf : \( p_{\infty} \)

Reimplemented from Eos.

◆ getSRef()

const double & EosNASG::getSRef ( ) const
inlineoverridevirtual

Get the entropy of reference of the fluid.

Returns
m_sRef : \( \ s_{ref} \)

Reimplemented from Eos.

◆ getType()

TypeEOS EosNASG::getType ( ) const
inlineoverridevirtual

Get the type that is to say the reduced name of the EOS in ECOGEN return \( \ "NASG" \).

Reimplemented from Eos.

◆ sendSpecialMixtureEos()

void EosNASG::sendSpecialMixtureEos ( double & gamPinfOverGamMinusOne,
double & eRef,
double & oneOverGamMinusOne,
double & covolume ) const
overridevirtual

Send specific values of the parameters useful for mixture EOS based on Ideal Gas and Stiffened Gas.

Parameters
gamPinfOverGamMinusOne\( \frac{\gamma p_{\infty}}{(\gamma-1)} \)
eRef\( \epsilon_{ref} \)
oneOverGamMinusOne\( \frac{1}{(\gamma-1)}\)

Reimplemented from Eos.

◆ verifyAndCorrectDensityMax() [1/2]

void EosNASG::verifyAndCorrectDensityMax ( const double & mass,
double & alpha,
double & density ) const
overridevirtual

Modify the density if its value is above a limit value equal to \( \frac{1.}{b} - 1. \) and then correct the volume fraction based on mass.

Parameters
massmass (continuity)
alphavolume fraction ( \( \alpha \))
densitydensity ( \( \rho \))

Reimplemented from Eos.

◆ verifyAndCorrectDensityMax() [2/2]

void EosNASG::verifyAndCorrectDensityMax ( double & density) const
overridevirtual

Modify the density if its value is above a limit value equal to \( \frac{1.}{b} - 1. \).

Parameters
densitydensity ( \( \rho \))

Reimplemented from Eos.

◆ verifyAndModifyPressure()

void EosNASG::verifyAndModifyPressure ( double & pressure) const
overridevirtual

Modify the pressure if its value is under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).

Parameters
pressurepressure (p)
Returns
pressure : \( if \; p < -(1. - 10^{-15})*p_{\infty} + 10^{-15} \; then \; p= -(1. - 10^{-15})*p_{\infty} + 10^{-15} \)

Reimplemented from Eos.

◆ verifyPressure()

void EosNASG::verifyPressure ( const double & pressure,
const std::string & message = "" ) const
overridevirtual

Add a message error if the pressure is too low and under a limit value equal to \( -(1. - 10^{-15})*p_{\infty} + 10^{-15} \).

Parameters
pressurepressure (p)
message""
Returns
Add a message in the \( errors \) vector. The message is \( " :\;too\;low\;pressure \;in\; EosNASG\;"\)

Reimplemented from Eos.

◆ vfpfh()

double EosNASG::vfpfh ( const double & pressure,
const double & enthalpy ) const
overridevirtual

Compute the specific volume with the pressure and the enthalpy.

Parameters
pressurepressure (p)
enthalpyenthalpy (h)
Returns
specific volume (volume per mass unit) : \( v(p,h) = (h - bp -\epsilon_{ref})\frac{(\gamma-1)}{\gamma (p+p_{\infty})}+b \) from the definition of enthalpy \( h=\epsilon +pv \)

Reimplemented from Eos.

Member Data Documentation

◆ m_b

double EosNASG::m_b
private

Covolume of the fluid.

◆ m_cv

double EosNASG::m_cv
private

Volume calorific energy of the fluid.

◆ m_eRef

double EosNASG::m_eRef
private

Energy of reference of the fluid.

◆ m_gamma

double EosNASG::m_gamma
private

Adiabatic exponent of the fluid.

◆ m_pInf

double EosNASG::m_pInf
private

Infinit (reference) pressure of the fluid.

◆ m_sRef

double EosNASG::m_sRef
private

Entropy of the fluid.


The documentation for this class was generated from the following files:
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Eos/EosNASG.h
  • /home/runner/work/ECOGEN/ECOGEN/doc_sources/src/Eos/EosNASG.cpp