20 params.
addClassDescription(
"This is the material class used to compute the interstitial velocity"
21 " norm for the incompressible and weakly compressible primitive "
22 "superficial finite-volume implementation of porous media equations.");
31 auto add_property = [¶ms](
const auto & property_name)
33 params.
addParam<MooseFunctorName>(property_name,
35 "The name to give the declared '" + property_name +
36 "' functor property");
43 params.
addParam<
bool>(
"define_interstitial_velocity_components",
45 "Whether to define the interstitial velocity functors");
52 _eps(getFunctor<
ADReal>(
NS::porosity)),
53 _superficial_vel_x(getFunctor<
ADReal>(
NS::superficial_velocity_x)),
54 _superficial_vel_y(getFunctor<
ADReal>(
NS::superficial_velocity_y)),
55 _superficial_vel_z(getFunctor<
ADReal>(
NS::superficial_velocity_z))
58 const unsigned int num_components_specified =
64 num_components_specified,
65 " superficial velocity components were provided for a mesh of dimension ",
69 const auto & interstitial_velocity = addFunctorProperty<ADRealVectorValue>(
80 addFunctorProperty<ADReal>(getParam<MooseFunctorName>(
NS::speed),
81 [&interstitial_velocity](
const auto & r,
const auto & t) ->
ADReal
86 if (getParam<bool>(
"define_interstitial_velocity_components"))
88 addFunctorProperty<ADReal>(getParam<MooseFunctorName>(
NS::velocity_x),
89 [&interstitial_velocity](
const auto & r,
const auto & t) ->
ADReal
90 {
return interstitial_velocity(r, t)(0); });
91 addFunctorProperty<ADReal>(getParam<MooseFunctorName>(
NS::velocity_y),
92 [&interstitial_velocity](
const auto & r,
const auto & t) ->
ADReal
93 {
return interstitial_velocity(r, t)(1); });
94 addFunctorProperty<ADReal>(getParam<MooseFunctorName>(
NS::velocity_z),
95 [&interstitial_velocity](
const auto & r,
const auto & t) ->
ADReal
96 {
return interstitial_velocity(r, t)(2); });
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", PINSFVSpeedFunctorMaterial)
unsigned int blocksMaxDimension() const
static InputParameters validParams()
const InputParameters & parameters() const
void mooseError(Args &&... args) const
Material class used to compute the interstitial velocity norm for the incompressible and weakly compr...
const Moose::Functor< ADReal > & _superficial_vel_y
const Moose::Functor< ADReal > & _eps
Porosity.
static InputParameters validParams()
const Moose::Functor< ADReal > & _superficial_vel_x
PINSFVSpeedFunctorMaterial(const InputParameters ¶meters)
const Moose::Functor< ADReal > & _superficial_vel_z
static const std::string superficial_velocity_y
static const std::string velocity_y
static const std::string superficial_velocity_z
template ADReal computeSpeed< ADReal >(const libMesh::VectorValue< ADReal > &velocity)
static const std::string velocity_z
static const std::string porosity
static const std::string superficial_velocity_x
static const std::string speed
static const std::string velocity_x
static const std::string velocity