21 params.
addParam<MooseFunctorName>(
"drag_coef_name",
23 "Name of the scalar friction coefficient defined. The vector " 24 "coefficient is suffixed with _vec");
25 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
26 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
27 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
31 "particle_diameter", 1.0,
"Diameter of particles in the dispersed phase.");
38 _dim(_subproblem.
mesh().dimension()),
39 _u_var(getFunctor<
ADReal>(
"u")),
40 _v_var(parameters.isParamValid(
"v") ? &(getFunctor<
ADReal>(
"v")) : nullptr),
41 _w_var(parameters.isParamValid(
"w") ? &(getFunctor<
ADReal>(
"w")) : nullptr),
44 _particle_diameter(getFunctor<
ADReal>(
"particle_diameter"))
48 "In two or more dimensions, the v velocity must be supplied and it must be an " 49 "INSFVVelocityVariable.");
53 "In three-dimensions, the w velocity must be supplied and it must be an " 54 "INSFVVelocityVariable.");
56 const auto f = [
this](
const auto & r,
const auto & t) ->
ADReal 65 const auto Re_particle =
68 if (Re_particle <= 1000)
71 mooseException(
"Cannot take a non-integer power of a negative number");
72 return 1.0 + 0.15 *
std::pow(Re_particle, 0.687);
75 return 0.0183 * Re_particle;
77 const auto & f_func = addFunctorProperty<ADReal>(getParam<MooseFunctorName>(
"drag_coef_name"),
f);
82 const auto f_value = f_func(r, t);
85 addFunctorProperty<ADRealVectorValue>(getParam<MooseFunctorName>(
"drag_coef_name") +
"_vec",
static InputParameters validParams()
static const std::string speed
static InputParameters validParams()
NSFVDispersePhaseDragFunctorMaterial(const InputParameters ¶meters)
static const std::string density
const Moose::Functor< ADReal > & _mu_mixture
Mixture density.
const Moose::Functor< ADReal > * _w_var
z-velocity
This is the material class used to compute phase-averaged drag properties of mixtures.
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > & _u_var
x-velocity
const Moose::Functor< ADReal > & _rho_mixture
Continuous phase density.
registerMooseObject("NavierStokesApp", NSFVDispersePhaseDragFunctorMaterial)
Real f(Real x)
Test function for Brents method.
static const std::string mu
void paramError(const std::string ¶m, Args... args) const
const unsigned int _dim
the dimension of the simulation
const Moose::Functor< ADReal > & _particle_diameter
Particle diameter in the dispersed phase.
static const std::string velocity
const Moose::Functor< ADReal > * _v_var
y-velocity
ADReal computeSpeed(const ADRealVectorValue &velocity)
Compute the speed (velocity norm) given the supplied velocity.
MooseUnits pow(const MooseUnits &, int)