www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
StiffenedGasFluidProperties Class Reference

Stiffened gas fluid properties. More...

#include <StiffenedGasFluidProperties.h>

Inheritance diagram for StiffenedGasFluidProperties:
[legend]

Public Member Functions

 StiffenedGasFluidProperties (const InputParameters &parameters)
 
virtual ~StiffenedGasFluidProperties ()
 
virtual Real pressure (Real v, Real u) const override
 Pressure as a function of specific internal energy and specific volume. More...
 
virtual Real temperature (Real v, Real u) const override
 Temperature as a function of specific internal energy and specific volume. More...
 
virtual Real c (Real v, Real u) const override
 Sound speed. More...
 
virtual Real cp (Real v, Real u) const override
 Specific heat. More...
 
virtual Real cv (Real v, Real u) const override
 Isochoric specific heat. More...
 
virtual Real gamma (Real v, Real u) const override
 Compute the ratio of specific heats. More...
 
virtual Real mu (Real v, Real u) const override
 Dynamic viscosity [Pa s]. More...
 
virtual Real k (Real v, Real u) const override
 Thermal conductivity [W / m K]. More...
 
virtual Real s (Real v, Real u) const override
 Specific entropy [ J / kg K ]. More...
 
virtual void s_from_h_p (Real h, Real p, Real &s, Real &ds_dh, Real &ds_dp) const override
 Specific entropy from enthalpy and pressure. More...
 
virtual void dp_duv (Real v, Real u, Real &dp_dv, Real &dp_du, Real &dT_dv, Real &dT_du) const override
 The derivative of pressure wrt specific volume and specific internal energy. More...
 
virtual void rho_e_ps (Real pressure, Real entropy, Real &rho, Real &e) const override
 Compute internal energy and density from specific entropy and pressure. More...
 
virtual void rho_e_dps (Real pressure, Real entropy, Real &rho, Real &drho_dp, Real &drho_ds, Real &e, Real &de_dp, Real &de_ds) const override
 
virtual Real beta (Real p, Real T) const override
 Thermal expansion coefficient. More...
 
virtual void rho_e (Real pressure, Real temperature, Real &rho, Real &e) const override
 Computes density and internal energy from pressure and temperature. More...
 
virtual Real rho (Real pressure, Real temperature) const override
 Computes density from pressure and temperature. More...
 
virtual void rho_dpT (Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
 Computes density from pressure and temperature and its derivatives w.r.t pressure and temperature. More...
 
virtual void e_dpT (Real pressure, Real temperature, Real &e, Real &de_dp, Real &de_dT) const
 
virtual Real e (Real pressure, Real rho) const override
 Computes internal energy from pressure and density. More...
 
virtual void e_dprho (Real pressure, Real rho, Real &e, Real &de_dp, Real &de_drho) const override
 Computes internal energy and its derivatives of internal energy w.r.t. pressure and density. More...
 
virtual Real h (Real pressure, Real temperature) const override
 Computes specific enthalpy. More...
 
virtual void h_dpT (Real pressure, Real temperature, Real &h, Real &dh_dp, Real &dh_dT) const override
 Compute enthalpy and its derivatives. More...
 
virtual Real p_from_h_s (Real h, Real s) const override
 Pressure as a function of specific enthalpy and specific entropy. More...
 
virtual Real dpdh_from_h_s (Real h, Real s) const override
 Derivative of pressure wrt specific enthalpy. More...
 
virtual Real dpds_from_h_s (Real h, Real s) const override
 Derivative of pressure wrt specific entropy. More...
 
virtual Real g (Real v, Real e) const override
 Gibbs free energy. More...
 
virtual Real c2_from_p_rho (Real pressure, Real rho) const
 
virtual void execute () final
 
virtual void initialize () final
 
virtual void finalize () final
 

Protected Attributes

Real _gamma
 
Real _cv
 
Real _q
 
Real _q_prime
 
Real _p_inf
 
Real _cp
 
Real _mu
 
Real _k
 

Detailed Description

Stiffened gas fluid properties.

Definition at line 21 of file StiffenedGasFluidProperties.h.

Constructor & Destructor Documentation

StiffenedGasFluidProperties::StiffenedGasFluidProperties ( const InputParameters &  parameters)

Definition at line 26 of file StiffenedGasFluidProperties.C.

27  : SinglePhaseFluidProperties(parameters),
28  _gamma(getParam<Real>("gamma")),
29  _cv(getParam<Real>("cv")),
30  _q(getParam<Real>("q")),
31  _q_prime(getParam<Real>("q_prime")),
32  _p_inf(getParam<Real>("p_inf")),
33  _mu(getParam<Real>("mu")),
34  _k(getParam<Real>("k"))
35 {
36  if (_cv == 0.0)
37  mooseError(name(), ": cv cannot be zero.");
38  _cp = _cv * _gamma;
39 }
SinglePhaseFluidProperties(const InputParameters &parameters)
StiffenedGasFluidProperties::~StiffenedGasFluidProperties ( )
virtual

Definition at line 41 of file StiffenedGasFluidProperties.C.

41 {}

Member Function Documentation

Real StiffenedGasFluidProperties::beta ( Real  p,
Real  T 
) const
overridevirtual

Thermal expansion coefficient.

Implements SinglePhaseFluidProperties.

Definition at line 161 of file StiffenedGasFluidProperties.C.

162 {
163  // The volumetric thermal expansion coefficient is defined as
164  // 1/v dv/dT)_p
165  // It is the fractional change rate of volume with respect to temperature change
166  // at constant pressure. Here it is coded as
167  // - 1/rho drho/dT)_p
168  // using chain rule with v = v(rho)
169 
170  Real rho, drho_dp, drho_dT;
171  rho_dpT(pressure, temperature, rho, drho_dp, drho_dT);
172  return -drho_dT / rho;
173 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
virtual void rho_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
Computes density from pressure and temperature and its derivatives w.r.t pressure and temperature...
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
Real StiffenedGasFluidProperties::c ( Real  v,
Real  u 
) const
overridevirtual

Sound speed.

Implements SinglePhaseFluidProperties.

Definition at line 56 of file StiffenedGasFluidProperties.C.

57 {
58  return std::sqrt(_gamma * (this->pressure(v, u) + _p_inf) * v);
59 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
Real StiffenedGasFluidProperties::c2_from_p_rho ( Real  pressure,
Real  rho 
) const
virtual

Definition at line 282 of file StiffenedGasFluidProperties.C.

283 {
284  return _gamma * (pressure + _p_inf) / rho;
285 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
Real StiffenedGasFluidProperties::cp ( Real  v,
Real  u 
) const
overridevirtual

Specific heat.

Implements SinglePhaseFluidProperties.

Definition at line 61 of file StiffenedGasFluidProperties.C.

Real StiffenedGasFluidProperties::cv ( Real  v,
Real  u 
) const
overridevirtual

Isochoric specific heat.

Implements SinglePhaseFluidProperties.

Definition at line 63 of file StiffenedGasFluidProperties.C.

void StiffenedGasFluidProperties::dp_duv ( Real  v,
Real  u,
Real &  dp_dv,
Real &  dp_du,
Real &  dT_dv,
Real &  dT_du 
) const
overridevirtual

The derivative of pressure wrt specific volume and specific internal energy.

Implements SinglePhaseFluidProperties.

Definition at line 98 of file StiffenedGasFluidProperties.C.

100 {
101  dp_dv = -(_gamma - 1.0) * (u - _q) / v / v;
102  dp_du = (_gamma - 1.0) / v;
103  dT_dv = -_p_inf / _cv;
104  dT_du = 1.0 / _cv;
105 }
Real StiffenedGasFluidProperties::dpdh_from_h_s ( Real  h,
Real  s 
) const
overridevirtual

Derivative of pressure wrt specific enthalpy.

Implements SinglePhaseFluidProperties.

Definition at line 248 of file StiffenedGasFluidProperties.C.

249 {
250  return _gamma / (_gamma - 1.0) / (_gamma * _cv) *
251  std::pow((h - _q) / (_gamma * _cv), 1.0 / (_gamma - 1.0)) *
252  std::exp((_q_prime - s) / ((_gamma - 1.0) * _cv));
253 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real h(Real pressure, Real temperature) const override
Computes specific enthalpy.
Real StiffenedGasFluidProperties::dpds_from_h_s ( Real  h,
Real  s 
) const
overridevirtual

Derivative of pressure wrt specific entropy.

Implements SinglePhaseFluidProperties.

Definition at line 256 of file StiffenedGasFluidProperties.C.

257 {
258  return std::pow((h - _q) / (_gamma * _cv), _gamma / (_gamma - 1)) *
259  std::exp((_q_prime - s) / ((_gamma - 1) * _cv)) / ((1 - _gamma) * _cv);
260 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real h(Real pressure, Real temperature) const override
Computes specific enthalpy.
virtual Real s(Real v, Real u) const override
Specific entropy [ J / kg K ].
Real StiffenedGasFluidProperties::e ( Real  pressure,
Real  rho 
) const
overridevirtual

Computes internal energy from pressure and density.

Implements SinglePhaseFluidProperties.

Definition at line 208 of file StiffenedGasFluidProperties.C.

Referenced by e_dprho(), rho_e(), and rho_e_ps().

209 {
210  mooseAssert((_gamma - 1.0) * rho != 0., "Invalid gamma or density detected!");
211  return (pressure + _gamma * _p_inf) / ((_gamma - 1.0) * rho) + _q;
212 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
void StiffenedGasFluidProperties::e_dprho ( Real  pressure,
Real  rho,
Real &  e,
Real &  de_dp,
Real &  de_drho 
) const
overridevirtual

Computes internal energy and its derivatives of internal energy w.r.t. pressure and density.

Implements SinglePhaseFluidProperties.

Definition at line 215 of file StiffenedGasFluidProperties.C.

217 {
218  mooseAssert((_gamma - 1.0) * rho != 0., "Invalid gamma or density detected!");
219  e = this->e(pressure, rho);
220  de_dp = 1.0 / ((_gamma - 1.0) * rho);
221  de_drho = -(pressure + _gamma * _p_inf) / ((_gamma - 1.0) * rho * rho);
222 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
virtual Real e(Real pressure, Real rho) const override
Computes internal energy from pressure and density.
void StiffenedGasFluidProperties::e_dpT ( Real  pressure,
Real  temperature,
Real &  e,
Real &  de_dp,
Real &  de_dT 
) const
virtual

Definition at line 202 of file StiffenedGasFluidProperties.C.

203 {
204  mooseError(name(), ": e_dpT() not implemented.");
205 }
virtual void FluidProperties::execute ( )
inlinefinalvirtualinherited

Definition at line 25 of file FluidProperties.h.

25 {}
virtual void FluidProperties::finalize ( )
inlinefinalvirtualinherited

Definition at line 27 of file FluidProperties.h.

27 {}
Real StiffenedGasFluidProperties::g ( Real  v,
Real  e 
) const
overridevirtual

Gibbs free energy.

Implements SinglePhaseFluidProperties.

Definition at line 263 of file StiffenedGasFluidProperties.C.

264 {
265  // g(p,T) for SGEOS is given by Equation (37) in the following reference:
266  //
267  // Ray A. Berry, Richard Saurel, Olivier LeMetayer
268  // The discrete equation method (DEM) for fully compressible, two-phase flows in
269  // ducts of spatially varying cross-section
270  // Nuclear Engineering and Design 240 (2010) p. 3797-3818
271  //
272  const Real p = pressure(v, e);
273  const Real T = temperature(v, e);
274 
275  return (_gamma * _cv - _q_prime) * T -
276  _cv * T * std::log(std::pow(T, _gamma) / std::pow(p + _p_inf, _gamma - 1.0)) + _q;
277 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real e(Real pressure, Real rho) const override
Computes internal energy from pressure and density.
Real StiffenedGasFluidProperties::gamma ( Real  v,
Real  u 
) const
overridevirtual

Compute the ratio of specific heats.

Reimplemented from SinglePhaseFluidProperties.

Definition at line 279 of file StiffenedGasFluidProperties.C.

Real StiffenedGasFluidProperties::h ( Real  p,
Real  T 
) const
overridevirtual

Computes specific enthalpy.

Implements SinglePhaseFluidProperties.

Definition at line 225 of file StiffenedGasFluidProperties.C.

226 {
227  return _gamma * _cv * temperature + _q;
228 }
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
void StiffenedGasFluidProperties::h_dpT ( Real  pressure,
Real  temperature,
Real &  h,
Real &  dh_dp,
Real &  dh_dT 
) const
overridevirtual

Compute enthalpy and its derivatives.

Implements SinglePhaseFluidProperties.

Definition at line 231 of file StiffenedGasFluidProperties.C.

233 {
234  h = _gamma * _cv * temperature + _q;
235  dh_dp = 0.0;
236  dh_dT = _gamma * _cv;
237 }
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
virtual Real h(Real pressure, Real temperature) const override
Computes specific enthalpy.
virtual void FluidProperties::initialize ( )
inlinefinalvirtualinherited

Definition at line 26 of file FluidProperties.h.

26 {}
Real StiffenedGasFluidProperties::k ( Real  v,
Real  u 
) const
overridevirtual

Thermal conductivity [W / m K].

Implements SinglePhaseFluidProperties.

Definition at line 67 of file StiffenedGasFluidProperties.C.

Real StiffenedGasFluidProperties::mu ( Real  v,
Real  u 
) const
overridevirtual

Dynamic viscosity [Pa s].

Implements SinglePhaseFluidProperties.

Definition at line 65 of file StiffenedGasFluidProperties.C.

Real StiffenedGasFluidProperties::p_from_h_s ( Real  h,
Real  s 
) const
overridevirtual

Pressure as a function of specific enthalpy and specific entropy.

Implements SinglePhaseFluidProperties.

Definition at line 240 of file StiffenedGasFluidProperties.C.

241 {
242  return std::pow((h - _q) / (_gamma * _cv), _gamma / (_gamma - 1.0)) *
243  std::exp((_q_prime - s) / ((_gamma - 1.0) * _cv)) -
244  _p_inf;
245 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real h(Real pressure, Real temperature) const override
Computes specific enthalpy.
virtual Real s(Real v, Real u) const override
Specific entropy [ J / kg K ].
Real StiffenedGasFluidProperties::pressure ( Real  v,
Real  u 
) const
overridevirtual

Pressure as a function of specific internal energy and specific volume.

Implements SinglePhaseFluidProperties.

Definition at line 44 of file StiffenedGasFluidProperties.C.

Referenced by c(), g(), and s().

Real StiffenedGasFluidProperties::rho ( Real  pressure,
Real  temperature 
) const
overridevirtual

Computes density from pressure and temperature.

Implements SinglePhaseFluidProperties.

Definition at line 183 of file StiffenedGasFluidProperties.C.

Referenced by beta(), e(), e_dprho(), rho_e(), rho_e_dps(), and rho_e_ps().

184 {
185  mooseAssert(((_gamma - 1.0) * _cv * temperature) != 0.0,
186  "Invalid gamma or cv or temperature detected!");
187  return (pressure + _p_inf) / ((_gamma - 1.0) * _cv * temperature);
188 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
void StiffenedGasFluidProperties::rho_dpT ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  drho_dp,
Real &  drho_dT 
) const
overridevirtual

Computes density from pressure and temperature and its derivatives w.r.t pressure and temperature.

Implements SinglePhaseFluidProperties.

Definition at line 191 of file StiffenedGasFluidProperties.C.

Referenced by beta(), and rho_e_dps().

193 {
194  mooseAssert(((_gamma - 1.0) * _cv * temperature) != 0.0,
195  "Invalid gamma or cv or temperature detected!");
196  rho = (pressure + _p_inf) / ((_gamma - 1) * _cv * temperature);
197  drho_dp = 1. / ((_gamma - 1.0) * _cv * temperature);
198  drho_dT = -(pressure + _p_inf) / ((_gamma - 1.0) * _cv * temperature * temperature);
199 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
void StiffenedGasFluidProperties::rho_e ( Real  pressure,
Real  temperature,
Real &  rho,
Real &  e 
) const
overridevirtual

Computes density and internal energy from pressure and temperature.

Implements SinglePhaseFluidProperties.

Definition at line 176 of file StiffenedGasFluidProperties.C.

177 {
178  rho = this->rho(pressure, temperature);
179  e = this->e(pressure, rho);
180 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
virtual Real e(Real pressure, Real rho) const override
Computes internal energy from pressure and density.
void StiffenedGasFluidProperties::rho_e_dps ( Real  pressure,
Real  entropy,
Real &  rho,
Real &  drho_dp,
Real &  drho_ds,
Real &  e,
Real &  de_dp,
Real &  de_ds 
) const
overridevirtual

Implements SinglePhaseFluidProperties.

Definition at line 117 of file StiffenedGasFluidProperties.C.

125 {
126  // compute rho(p, T(p,s)) and e(p, rho(p, T(p,s)))
127  this->rho_e_ps(pressure, entropy, rho, e);
128 
129  // compute temperature
130  const Real aux =
131  (entropy - _q_prime + _cv * std::log(std::pow(pressure + _p_inf, _gamma - 1.0))) / _cv;
132  const Real T = std::pow(std::exp(aux), 1 / _gamma);
133 
134  // dT/dp
135  const Real dT_dp = 1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) /
136  std::pow(pressure + _p_inf, _gamma - 1.0) * (_gamma - 1.0) *
137  std::pow(pressure + _p_inf, _gamma - 2.0);
138 
139  // dT/ds
140  const Real dT_ds =
141  1.0 / _gamma * std::pow(std::exp(aux), 1.0 / _gamma - 1.0) * std::exp(aux) / _cv;
142 
143  // Drho/Dp = d/dp[rho(p, T(p,s))] = drho/dp + drho/dT * dT/dp
144  Real drho_dp_partial, drho_dT;
145  rho_dpT(pressure, T, rho, drho_dp_partial, drho_dT);
146  drho_dp = drho_dp_partial + drho_dT * dT_dp;
147 
148  // Drho/Ds = d/ds[rho(p, T(p,s))] = drho/dT * dT/ds
149  drho_ds = drho_dT * dT_ds;
150 
151  // De/Dp = d/dp[e(p, rho(p, T(p,s)))] = de/dp + de/drho * Drho/Dp
152  const Real de_dp_partial = 1.0 / ((_gamma - 1.0) * rho);
153  const Real de_drho = -(pressure + _gamma * _p_inf) / ((_gamma - 1.0) * rho * rho);
154  de_dp = de_dp_partial + de_drho * drho_dp;
155 
156  // De/Ds = d/ds[e(p, rho(p, T(p,s)))] = de/drho * Drho/Ds
157  de_ds = de_drho * drho_ds;
158 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual void rho_dpT(Real pressure, Real temperature, Real &rho, Real &drho_dp, Real &drho_dT) const override
Computes density from pressure and temperature and its derivatives w.r.t pressure and temperature...
virtual void rho_e_ps(Real pressure, Real entropy, Real &rho, Real &e) const override
Compute internal energy and density from specific entropy and pressure.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
virtual Real e(Real pressure, Real rho) const override
Computes internal energy from pressure and density.
void StiffenedGasFluidProperties::rho_e_ps ( Real  pressure,
Real  entropy,
Real &  rho,
Real &  e 
) const
overridevirtual

Compute internal energy and density from specific entropy and pressure.

Implements SinglePhaseFluidProperties.

Definition at line 108 of file StiffenedGasFluidProperties.C.

Referenced by rho_e_dps().

109 {
110  Real a = (entropy - _q_prime + _cv * std::log(std::pow(pressure + _p_inf, _gamma - 1.0))) / _cv;
111  Real T = std::pow(std::exp(a), 1.0 / _gamma);
112  rho = this->rho(pressure, T);
113  e = this->e(pressure, rho);
114 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real rho(Real pressure, Real temperature) const override
Computes density from pressure and temperature.
virtual Real e(Real pressure, Real rho) const override
Computes internal energy from pressure and density.
Real StiffenedGasFluidProperties::s ( Real  v,
Real  u 
) const
overridevirtual

Specific entropy [ J / kg K ].

Implements SinglePhaseFluidProperties.

Definition at line 70 of file StiffenedGasFluidProperties.C.

71 {
72  Real T = this->temperature(v, u);
73  Real p = this->pressure(v, u);
74  Real n = std::pow(T, _gamma) / std::pow(p + _p_inf, _gamma - 1.0);
75  if (n <= 0.0)
76  mooseError(name(), ": Negative argument in the ln() function.");
77  return _cv * std::log(n) + _q_prime;
78 }
virtual Real pressure(Real v, Real u) const override
Pressure as a function of specific internal energy and specific volume.
virtual Real temperature(Real v, Real u) const override
Temperature as a function of specific internal energy and specific volume.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
void StiffenedGasFluidProperties::s_from_h_p ( Real  h,
Real  p,
Real &  s,
Real &  ds_dh,
Real &  ds_dp 
) const
overridevirtual

Specific entropy from enthalpy and pressure.

Implements SinglePhaseFluidProperties.

Definition at line 81 of file StiffenedGasFluidProperties.C.

82 {
83  const Real aux = (p + _p_inf) * std::pow((h - _q) / (_gamma * _cv), -_gamma / (_gamma - 1));
84  if (aux <= 0.0)
85  mooseError(name(), ": Non-positive argument in the ln() function.");
86 
87  const Real daux_dh = (p + _p_inf) *
88  std::pow((h - _q) / (_gamma * _cv), -_gamma / (_gamma - 1) - 1) *
89  (-_gamma / (_gamma - 1)) / (_gamma * _cv);
90  const Real daux_dp = std::pow((h - _q) / (_gamma * _cv), -_gamma / (_gamma - 1));
91 
92  s = _q_prime - (_gamma - 1) * _cv * std::log(aux);
93  ds_dh = -(_gamma - 1) * _cv / aux * daux_dh;
94  ds_dp = -(_gamma - 1) * _cv / aux * daux_dp;
95 }
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
virtual Real h(Real pressure, Real temperature) const override
Computes specific enthalpy.
virtual Real s(Real v, Real u) const override
Specific entropy [ J / kg K ].
Real StiffenedGasFluidProperties::temperature ( Real  v,
Real  u 
) const
overridevirtual

Temperature as a function of specific internal energy and specific volume.

Implements SinglePhaseFluidProperties.

Definition at line 50 of file StiffenedGasFluidProperties.C.

Referenced by g(), rho(), rho_dpT(), and s().

Member Data Documentation

Real StiffenedGasFluidProperties::_cp
protected

Definition at line 81 of file StiffenedGasFluidProperties.h.

Referenced by cp(), and StiffenedGasFluidProperties().

Real StiffenedGasFluidProperties::_cv
protected
Real StiffenedGasFluidProperties::_gamma
protected
Real StiffenedGasFluidProperties::_k
protected

Definition at line 84 of file StiffenedGasFluidProperties.h.

Referenced by k().

Real StiffenedGasFluidProperties::_mu
protected

Definition at line 83 of file StiffenedGasFluidProperties.h.

Referenced by mu().

Real StiffenedGasFluidProperties::_p_inf
protected
Real StiffenedGasFluidProperties::_q
protected
Real StiffenedGasFluidProperties::_q_prime
protected

The documentation for this class was generated from the following files: