21 params.addClassDescription(
22 "Creates functors for conversions between specific enthalpy and temperature");
24 params.addRequiredParam<MooseFunctorName>(
NS::pressure,
"Pressure");
25 params.addRequiredParam<MooseFunctorName>(
NS::T_fluid,
"Fluid temperature");
29 params.addParam<UserObjectName>(
NS::fluid,
"Fluid properties userobject");
31 params.addParam<MooseFunctorName>(
"h_from_p_T_functor",
32 "User specified enthalpy from temperature functor");
33 params.addParam<MooseFunctorName>(
"T_from_p_h_functor",
34 "User specified temperature from enthalpy functor");
41 _pressure(getFunctor<Real>(
NS::pressure)),
42 _T_fluid(getFunctor<Real>(
NS::T_fluid)),
43 _h(getFunctor<Real>(
NS::specific_enthalpy)),
44 _fluid(params.isParamValid(
NS::fluid)
47 _h_from_p_T_functor(params.isParamValid(
"h_from_p_T_functor")
48 ? &getFunctor<Real>(
"h_from_p_T_functor")
50 _T_from_p_h_functor(params.isParamValid(
"T_from_p_h_functor")
51 ? &getFunctor<Real>(
"T_from_p_h_functor")
58 mooseError(
"An unsupported combination of input parameters was given. Current "
59 "supported combinations are either\ni) `fp` and neither `h_from_p_T_functor` nor "
60 "`T_from_p_h_functor`, or\nii) "
61 "no `fp` and both `h_from_p_T_functor` and `T_from_p_h_functor` are provided.");
69 addFunctorProperty<Real>(
"h_from_p_T",
70 [
this](
const auto & r,
const auto & t) -> Real
72 addFunctorProperty<Real>(
"T_from_p_h",
73 [
this](
const auto & r,
const auto & t) -> Real
78 addFunctorProperty<Real>(
"h_from_p_T",
79 [
this](
const auto & r,
const auto & t) -> Real
81 addFunctorProperty<Real>(
"T_from_p_h",
82 [
this](
const auto & r,
const auto & t) -> Real
registerMooseObject("NavierStokesApp", LinearFVEnthalpyFunctorMaterial)
static InputParameters validParams()
Converts temperature to enthalpy or enthalpy to temperature using functor material properties.
const Moose::Functor< Real > & _pressure
Variables, treated as functors.
LinearFVEnthalpyFunctorMaterial(const InputParameters ¶meters)
static InputParameters validParams()
const Moose::Functor< Real > & _T_fluid
const Moose::Functor< Real > * _h_from_p_T_functor
Pointers to the the conversion functors (in case the fluid property is not provided)
const Moose::Functor< Real > & _h
const SinglePhaseFluidProperties * _fluid
The fluid properties that contain the h from T conversion routines.
const Moose::Functor< Real > * _T_from_p_h_functor
void mooseError(Args &&... args) const
Common class for single phase fluid properties.
static const std::string T_fluid
static const std::string specific_enthalpy
static const std::string fluid
static const std::string pressure