40 Real p_from_props, dp_dv, dp_de;
41 const unsigned int max_its = 10;
47 const Real & jacobian = dp_de;
48 const Real residual = p_from_props -
p;
50 if (std::abs(residual) /
p < 1e-12)
53 const Real delta_e = -residual / jacobian;
55 }
while (++it < max_its);
58 mooseWarning(
"The e_from_p_rho iteration failed to converge");
70 ADReal p_from_props, dp_dv, dp_de;
71 const unsigned int max_its = 10;
77 const ADReal & jacobian = dp_de;
78 const ADReal residual = p_from_props -
p;
80 if (std::abs(residual.value()) /
p.value() < 1e-12)
83 const ADReal delta_e = -residual / jacobian;
85 }
while (++it < max_its);
88 mooseWarning(
"The e_from_p_rho iteration failed to converge");
97 return T / (48.14 *
v - 0.4446 /
std::pow(
T, 0.2)) * 1.0e5;
104 return T / (48.14 *
v - 0.4446 /
std::pow(
T, 0.2)) * 1.0e5;
112 Real T, dT_dv, dT_de;
116 Real dp_dT = 1.0e5 / val - 0.4446 * 0.2e5 *
std::pow(
T, -0.2) / (val * val);
118 dp_dv = -48.14e5 *
T / (val * val);
119 dp_de = dp_dT * dT_de;
131 auto val = 48.14 *
v - 0.4446 /
std::pow(
T, 0.2);
132 auto dp_dT = 1.0e5 / val - 0.4446 * 0.2e5 *
std::pow(
T, -0.2) / (val * val);
134 dp_dv = -48.14e5 *
T / (val * val);
135 dp_de = dp_dT * dT_de;
142 return T / (48.14 *
v - 0.4446 /
std::pow(
T, 0.2)) * 1.0e5;
149 return T / (48.14 *
v - 0.4446 /
std::pow(
T, 0.2)) * 1.0e5;
161 const Real T,
const Real
v, Real & e, Real & de_dT, Real & de_dv)
const 208 T = SinglePhaseFluidProperties::T_from_v_e(
v, e);
229 return std::sqrt(c2);
242 auto p = SinglePhaseFluidProperties::p_from_v_e(myv, mye);
243 auto T = SinglePhaseFluidProperties::T_from_v_e(myv, mye);
248 auto cc = std::sqrt(-(
p /
rho /
rho -
_cv / drho_dT) / (
_cv * drho_dp / drho_dT));
250 dc_dv = cc.derivatives()[0];
251 dc_de = cc.derivatives()[1];
285 return 2.682e-3 * (1.0 + 1.123e-3 * p_in_bar) *
std::pow(
T, 0.71 * (1.0 - 2.0e-4 * p_in_bar));
296 return -drho_dT /
rho;
413 return 2.682e-3 * (1.0 + 1.123e-8 *
pressure) *
Fluid properties for helium .
virtual Real molarMass() const override
Molar mass.
e e e e s T T T T T rho T
static const std::string cv
virtual Real rho_from_p_T(Real p, Real T) const override
Density from pressure and temperature.
virtual Real p_from_v_e(Real v, Real e) const override
Pressure from specific volume and specific internal energy.
virtual Real T_from_p_h(Real p, Real h) const override
Temperature from pressure and specific enthalpy.
static InputParameters validParams()
const Real _cp
specific heat at constant pressure
virtual Real cv_from_v_e(Real v, Real e) const override
Isochoric specific heat from specific volume and specific internal energy.
virtual Real k_from_v_e(Real v, Real e) const override
Thermal conductivity from specific volume and specific internal energy.
registerMooseObject("FluidPropertiesApp", HeliumFluidProperties)
const Real _cv
specific heat at constant volume
static const std::string temperature
virtual Real cp_from_v_e(Real v, Real e) const override
Isobaric specific heat from specific volume and specific internal energy.
Real e_from_T_v(Real T, Real) const override
DualNumber< Real, DNDerivativeType, true > ADReal
Real p_from_T_v(Real T, Real v) const override
virtual Real e_from_p_T(Real p, Real T) const override
Specific internal energy from pressure and temperature.
virtual Real beta_from_p_T(Real p, Real T) const override
Thermal expansion coefficient from pressure and temperature.
void mooseWarning(Args &&... args) const
HeliumFluidProperties(const InputParameters ¶meters)
static const std::string cp
e e e e s T T T T T rho v v T e h
virtual Real mu_from_p_T(Real p, Real T) const override
Dynamic viscosity from pressure and temperature.
virtual Real mu_from_v_e(Real v, Real e) const override
Dynamic viscosity from specific volume and specific internal energy.
static const std::string mu
Real e_from_p_rho(Real p, Real rho) const override
virtual Real cv_from_p_T(Real p, Real T) const override
Isochoric specific heat capacity from pressure and temperature.
Common class for single phase fluid properties.
virtual Real c_from_v_e(Real v, Real e) const override
Speed of sound from specific volume and specific internal energy.
virtual Real T_from_v_e(Real v, Real e) const override
Temperature from specific volume and specific internal energy.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string v
virtual Real h_from_p_T(Real p, Real T) const override
Specific enthalpy from pressure and temperature.
virtual Real cp_from_p_T(Real p, Real T) const override
Isobaric specific heat capacity from pressure and temperature.
static const std::string pressure
void derivInsert(SemiDynamicSparseNumberArray< Real, libMesh::dof_id_type, NWrapper< N >> &derivs, libMesh::dof_id_type index, Real value)
virtual Real k_from_p_T(Real p, Real T) const override
Thermal conductivity from pressure and temperature.
MooseUnits pow(const MooseUnits &, int)
static const std::string k
static InputParameters validParams()
virtual std::string fluidName() const override
Fluid name.