15 INSFVEnthalpyMaterial,
25 "This is the material class used to compute enthalpy for the " 26 "incompressible/weakly-compressible finite-volume implementation of the Navier-Stokes " 29 params.
addParam<MooseFunctorName>(
"temperature",
"the temperature");
31 NS::cp,
NS::cp,
"The constant value for the specific heat capacity");
36 "the name of the specific enthalpy, for defining it.");
39 params.
addParam<
bool>(
"assumed_constant_cp",
true,
"Whether to assume cp is constant");
41 NS::fluid,
"Fluid properties, to be used when cp is not constant to compute enthalpy");
43 NS::pressure,
"Pressure functor, to be used when cp is not constant to compute enthalpy");
46 "Specific enthalpy functor, to be used when cp is not constant to compute the enthalpy, as " 47 "an alternative to using a 'fp' FluidProperties object");
54 _assumed_constant_cp(getParam<bool>(
"assumed_constant_cp")),
59 _temperature(isParamValid(
"temperature") ? &getFunctor<
ADReal>(
"temperature") : nullptr),
69 "fp",
"No need to specify fluid properties if assuming the specific enthalpy is constant");
72 "Must specify both fluid properties and pressure or an enthalpy functor if not " 73 "assuming the specific enthalpy is constant");
76 "Temperature must be specified if assuming constant specific heat or if not " 77 "specifying the enthalpy functor");
83 [
this](
const auto & r,
const auto & t)
84 {
return _rho(r, t) *
_cp(r, t) * (*_temperature)(r, t); });
87 [
this](
const auto & r,
const auto & t)
88 {
return _cp(r, t) * (*_temperature)(r, t); });
91 [
this](
const auto & r,
const auto & t)
92 {
return _cp(r, t) * (*_temperature).dot(r, t); });
94 addFunctorProperty<ADReal>(
95 "rho_cp_temp", [&rho_h](
const auto & r,
const auto & t) ->
ADReal {
return rho_h(r, t); });
97 addFunctorProperty<ADReal>(
"cp_temp",
98 [&h](
const auto & r,
const auto & t) ->
ADReal {
return h(r, t); });
104 [
this](
const auto & r,
const auto & t)
105 {
return _rho(r, t) * (*_h)(r, t); });
108 [
this](
const auto & r,
const auto & t) {
return _h->dot(r, t); });
112 [
this](
const auto & r,
const auto & t) ->
ADReal 118 addFunctorProperty<ADReal>(
120 [
this](
const auto & r,
const auto & t)
124 [
this](
const auto & r,
const auto & t) {
128 addFunctorProperty<ADReal>(
130 [
this](
const auto & r,
const auto & t)
134 return dh_dT * (*_temperature).dot(r, t) + dh_dp *
_pressure->dot(r, t);
registerMooseObjectRenamed("NavierStokesApp", INSFVEnthalpyMaterial, "02/01/2024 00:00", INSFVEnthalpyFunctorMaterial)
const Moose::Functor< ADReal > & _cp
the specific heat capacity
void paramError(const std::string ¶m, Args... args) const
static InputParameters validParams()
static InputParameters validParams()
bool _assumed_constant_cp
whether we can use a constant cp as a shortcut to compute enthalpy
static const std::string density
static const std::string fluid
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", INSFVEnthalpyFunctorMaterial)
static const std::string cp
const Moose::Functor< ADReal > * _h
the specific enthalpy
static const std::string T_fluid
This is the material class used to compute enthalpy for the incompressible/weakly-compressible finite...
static const std::string enthalpy_density
Common class for single phase fluid properties.
const Moose::Functor< ADReal > * _pressure
the pressure
const SinglePhaseFluidProperties * _fp
A fluid properties user object to compute enthalpy.
static const std::string pressure
INSFVEnthalpyFunctorMaterial(const InputParameters ¶meters)
void paramWarning(const std::string ¶m, Args... args) const
const Moose::Functor< ADReal > & _rho
density
const Moose::Functor< ADReal > * _temperature
the temperature
std::string time_deriv(const std::string &var)
static const std::string specific_enthalpy