17 params.
set<std::string>(
"fp_type") =
"two-phase-fp";
19 params.
addParam<UserObjectName>(
"fp_liquid",
20 "Liquid single-phase fluid properties user object name");
21 params.
addParam<UserObjectName>(
"fp_vapor",
22 "Vapor single-phase fluid properties user object name");
30 _liquid_name(isParamValid(
"fp_liquid") ? getParam<UserObjectName>(
"fp_liquid")
31 : UserObjectName(
name() +
":liquid")),
32 _vapor_name(isParamValid(
"fp_vapor") ? getParam<UserObjectName>(
"fp_vapor")
33 : UserObjectName(
name() +
":vapor"))
41 "The two-phase fluid properties object '" +
name() +
"' is ",
42 "trying to create a single-phase fluid properties object with ",
45 "', but a single-phase fluid properties ",
46 "object with this name already exists.");
50 "The two-phase fluid properties object '" +
name() +
"' is ",
51 "trying to create a single-phase fluid properties object with ",
54 "', but a single-phase fluid properties ",
55 "object with this name already exists.");
58#pragma GCC diagnostic push
59#pragma GCC diagnostic ignored "-Woverloaded-virtual"
64 mooseError(__PRETTY_FUNCTION__,
" is not implemented.");
70 const Real p_real =
p.value();
71 const Real T_sat_real =
T_sat(p_real);
72 const Real dT_sat_dp_real =
dT_sat_dp(p_real);
75 T_sat.derivatives() =
p.derivatives() * dT_sat_dp_real;
82 const Real T_real =
T.value();
83 const Real p_sat_real =
p_sat(T_real);
84 const Real dp_sat_dT_real = 1.0 /
dT_sat_dp(p_sat_real);
87 p_sat.derivatives() =
T.derivatives() * dp_sat_dT_real;
106 mooseError(__PRETTY_FUNCTION__,
" is not implemented.");
112 mooseError(__PRETTY_FUNCTION__,
" is not implemented.");
118 const Real T_real =
T.value();
122 ADReal sigma = sigma_real;
123 sigma.derivatives() =
T.derivatives() * dsigma_dT;
130 mooseError(__PRETTY_FUNCTION__,
" is not implemented.");
133#pragma GCC diagnostic pop
DualNumber< Real, DNDerivativeType, true > ADReal
bool hasUserObject(const std::string &name) const
static InputParameters validParams()
const std::string & name() const
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
virtual Real dsigma_dT_from_T(Real T) const
Computes dsigma/dT along the saturation line.
virtual Real T_triple() const
Returns the triple-point temperature.
const UserObjectName _liquid_name
The name of the user object that provides liquid phase fluid properties.
TwoPhaseFluidProperties(const InputParameters ¶meters)
virtual Real dT_sat_dp(Real p) const =0
Computes dT/dp along the saturation line.
const UserObjectName _vapor_name
The name of the user object that provides vapor phase fluid properties.
static InputParameters validParams()
virtual Real sigma_from_T(Real T) const
Computes surface tension sigma of saturated liquid in contact with saturated vapor.
virtual Real p_sat(Real T) const =0
Computes the saturation pressure at a temperature.
const SinglePhaseFluidProperties * _fp_liquid
The user object that provides liquid phase fluid properties.
virtual Real L_fusion() const
Returns the latent heat of fusion.
virtual Real h_lat(Real p, Real T) const
Computes latent heat of vaporization.
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.
const SinglePhaseFluidProperties * _fp_vapor
The user object that provides vapor phase fluid properties.
FEProblemBase & _fe_problem