22 params.addRequiredParam<UserObjectName>(
NS::fluid,
"Fluid properties userobject");
23 params.addClassDescription(
"Computes fluid properties using a (P, T) formulation");
26 params.addRequiredRangeCheckedParam<Real>(
27 "characteristic_length",
28 "characteristic_length > 0.0 ",
29 "characteristic length for Reynolds number calculation");
36 _eps(coupledValue(
NS::porosity)),
37 _d(getParam<Real>(
"characteristic_length")),
39 _pressure(getADMaterialProperty<Real>(
NS::pressure)),
40 _T_fluid(getADMaterialProperty<Real>(
NS::T_fluid)),
41 _rho(getADMaterialProperty<Real>(
NS::density)),
42 _speed(getADMaterialProperty<Real>(
NS::speed)),
44 _drho_dp(declarePropertyDerivative<Real>(
NS::density,
NS::pressure)),
45 _drho_dT(declarePropertyDerivative<Real>(
NS::density,
NS::T_fluid)),
47 _cp(declareADProperty<Real>(
NS::cp)),
48 _dcp_dp(declarePropertyDerivative<Real>(
NS::cp,
NS::pressure)),
49 _dcp_dT(declarePropertyDerivative<Real>(
NS::cp,
NS::T_fluid)),
51 _cv(declareADProperty<Real>(
NS::cv)),
53 _mu(declareADProperty<Real>(
NS::
mu)),
54 _dmu_dp(declarePropertyDerivative<Real>(
NS::
mu,
NS::pressure)),
55 _dmu_dT(declarePropertyDerivative<Real>(
NS::
mu,
NS::T_fluid)),
57 _k(declareADProperty<Real>(
NS::k)),
58 _dk_dp(declarePropertyDerivative<Real>(
NS::k,
NS::pressure)),
59 _dk_dT(declarePropertyDerivative<Real>(
NS::k,
NS::T_fluid)),
61 _Pr(declareADProperty<Real>(
NS::Prandtl)),
62 _dPr_dp(declarePropertyDerivative<Real>(
NS::Prandtl,
NS::pressure)),
63 _dPr_dT(declarePropertyDerivative<Real>(
NS::Prandtl,
NS::T_fluid)),
65 _Re(declareADProperty<Real>(
NS::Reynolds)),
66 _dRe_dp(declarePropertyDerivative<Real>(
NS::Reynolds,
NS::pressure)),
67 _dRe_dT(declarePropertyDerivative<Real>(
NS::Reynolds,
NS::T_fluid)),
69 _Re_h(declareADProperty<Real>(
NS::Reynolds_hydraulic)),
70 _Re_i(declareADProperty<Real>(
NS::Reynolds_interstitial))
95 static constexpr Real small_number = 1e-8;
129 _Re_h[_qp] =
_Re[_qp] / max(1 -
_eps[_qp], small_number);
registerMooseObject("NavierStokesApp", GeneralFluidProps)
Computes fluid properties in (P, T) formulation.
const VariableValue & _eps
Porosity.
MaterialProperty< Real > & _dmu_dp
Derivative of dynamic viscosity with respect to pressure.
ADMaterialProperty< Real > & _cp
Isobaric specific heat capacity.
ADMaterialProperty< Real > & _k
Thermal conductivity.
ADMaterialProperty< Real > & _Re_h
Hydraulic Reynolds number.
const ADMaterialProperty< Real > & _T_fluid
const ADMaterialProperty< Real > & _speed
MaterialProperty< Real > & _dcp_dp
Derivative of isobaric specific heat with respect to pressure.
ADMaterialProperty< Real > & _Pr
Prandtl number.
MaterialProperty< Real > & _dcp_dT
Derivative of isobaric specific heat with respect to temperature.
MaterialProperty< Real > & _dmu_dT
Derivative of dynamic viscosity with respect to temperature.
virtual void computeQpProperties() override
ADMaterialProperty< Real > & _Re_i
Interstitial Reynolds number.
ADMaterialProperty< Real > & _cv
Isochoric specific heat capacity.
static InputParameters validParams()
ADMaterialProperty< Real > & _mu
Dynamic viscosity.
MaterialProperty< Real > & _drho_dT
Derivative of density with respect to temperature.
MaterialProperty< Real > & _dRe_dT
Derivative of pore Reynolds number with respect to temperature.
MaterialProperty< Real > & _dRe_dp
Derivative of pore Reynolds number with respect to pressure.
ADMaterialProperty< Real > & _Re
Pore (particle) Reynolds number.
const ADMaterialProperty< Real > & _rho
MaterialProperty< Real > & _dPr_dT
Derivative of Prandtl number with respect to temperature.
MaterialProperty< Real > & _dk_dT
Derivative of thermal conductivity with respect to temperature.
MaterialProperty< Real > & _drho_dp
Derivative of density with respect to pressure.
GeneralFluidProps(const InputParameters ¶meters)
const Real _d
Characteristic length $d$ used in computing the Reynolds number $Re=\rho_fVd/\mu_f$.
const ADMaterialProperty< Real > & _pressure
variables
MaterialProperty< Real > & _dPr_dp
Derivative of Prandtl number with respect to pressure.
MaterialProperty< Real > & _dk_dp
Derivative of thermal conductivity with respect to pressure.
const SinglePhaseFluidProperties & _fluid
static InputParameters validParams()
Common class for single phase fluid properties.
auto reynolds(const T1 &rho, const T2 &vel, const T3 &L, const T4 &mu)
Compute Reynolds number.
auto prandtl(const T1 &cp, const T2 &mu, const T3 &k)
Compute Prandtl number.
Real reynoldsPropertyDerivative(const Real &Re, const Real &rho, const Real &mu, const Real &drho, const Real &dmu)
Computes the derivative of the Reynolds number, $Re\equiv \frac{\rho Vd}{\mu}$, with respect to an ar...
Real prandtlPropertyDerivative(const Real &mu, const Real &cp, const Real &k, const Real &dmu, const Real &dcp, const Real &dk)
Computes the derivative of the Prandtl number, $Pr\equiv\frac{\mu C_p}{k}$, with respect to an arbitr...
static const std::string porosity
static const std::string fluid