23 params.addClassDescription(
"Implements the drift momentum flux source.");
24 params.addRequiredParam<MooseFunctorName>(
"u_slip",
"The slip velocity in the x direction.");
25 params.addParam<MooseFunctorName>(
"v_slip",
"The slip velocity in the y direction.");
26 params.addParam<MooseFunctorName>(
"w_slip",
"The slip velocity in the z direction.");
27 params.addRequiredParam<MooseFunctorName>(
"rho_d",
"Dispersed phase density.");
28 params.addParam<MooseFunctorName>(
"fd", 0.0,
"Fraction dispersed phase.");
30 params.renameParam(
"fd",
"fraction_dispersed",
"");
32 MooseEnum coeff_interp_method(
"average harmonic",
"harmonic");
33 params.addParam<
MooseEnum>(
"density_interp_method",
35 "Switch that can select face interpolation method for the density.");
42 _dim(_subproblem.
mesh().dimension()),
43 _rho_d(getFunctor<
ADReal>(
"rho_d")),
44 _f_d(getFunctor<
ADReal>(
"fd")),
45 _u_slip(getFunctor<
ADReal>(
"u_slip")),
46 _v_slip(isParamValid(
"v_slip") ? &getFunctor<
ADReal>(
"v_slip") : nullptr),
47 _w_slip(isParamValid(
"w_slip") ? &getFunctor<
ADReal>(
"w_slip") : nullptr),
48 _density_interp_method(
52 mooseError(
"In two or more dimensions, the v_slip velocity must be supplied using the 'v_slip' " 56 "In three dimensions, the w_slip velocity must be supplied using the 'w_slip' parameter");
59 const auto & fraction_name = getParam<MooseFunctorName>(
"fraction_dispersed");
85 const auto uslipdotn =
_normal * u_slip_vel_vec;
98 if (populate_a_coeffs)
107 _ae = (uslipdotn * (*_v_slip)(
elemArg(), state)).derivatives()[dof_number];
109 _ae = (uslipdotn * (*_w_slip)(
elemArg(), state)).derivatives()[dof_number];
119 _an = (uslipdotn * (*_v_slip)(
neighborArg(), state)).derivatives()[dof_number];
121 _an = (uslipdotn * (*_w_slip)(
neighborArg(), state)).derivatives()[dof_number];
126 return -face_rho_fd * uslipdotn * u_slip_vel_vec(
_index);
const Moose::Functor< ADReal > & _u_slip
slip velocity in direction x
virtual bool hasVariable(const std::string &var_name) const override
const Moose::Functor< ADReal > *const _v_slip
slip velocity in direction y
const Moose::FV::InterpMethod _density_interp_method
The face interpolation method for the density.
A flux kernel that momentum residual objects that add non-advection flux terms, or more specifically ...
Moose::ElemArg elemArg(bool correct_skewness=false) const
unsigned int number() const
const Moose::Functor< ADReal > *const _w_slip
slip velocity in direction z
const Elem & elem() const
const FaceInfo * _face_info
Moose::StateArg determineState() const
const unsigned int _index
index x|y|z
ADReal _an
The a coefficient for the neighbor.
WCNSFV2PMomentumDriftFlux(const InputParameters ¶ms)
DualNumber< Real, DNDerivativeType, true > ADReal
virtual const MooseVariableFieldBase & getVariable(const THREAD_ID tid, const std::string &var_name, Moose::VarKindType expected_var_type=Moose::VarKindType::VAR_ANY, Moose::VarFieldType expected_var_field_type=Moose::VarFieldType::VAR_FIELD_ANY) const override
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
bool isParamValid(const std::string &name) const
virtual bool skipForBoundary(const FaceInfo &fi) const
bool onBoundary(const FaceInfo &fi) const
const Elem * neighborPtr() const
registerMooseObject("NavierStokesApp", WCNSFV2PMomentumDriftFlux)
void gatherRCData(const FaceInfo &fi) override final
Should be a non-empty implementation if the residual object is a FVFluxKernel and introduces residual...
virtual ADReal computeStrongResidual(const bool populate_a_coeffs)
Routine to compute this object's strong residual (e.g.
const unsigned int _dim
The dimension of the simulation.
FEProblemBase & _fe_problem
static InputParameters validParams()
const Elem & neighbor() const
const Point & normal() const
unsigned int number() const
const Moose::Functor< ADReal > & _f_d
Dispersed phase fraction.
FaceInfo::VarFaceNeighbors _face_type
virtual ADReal computeSegregatedContribution() override
Compute the contribution which goes into the residual of the segregated system.
Adds drift flux kernel coming for two-phase mixture model.
void addMooseVariableDependency(MooseVariableFieldBase *var)
void addResidualAndJacobian(const ADReal &residual)
Process into either the system residual or Jacobian.
virtual void addToA(const libMesh::Elem *elem, unsigned int component, const ADReal &value)=0
API for momentum residual objects that have on-diagonals for velocity call.
Moose::ElemArg neighborArg(bool correct_skewness=false) const
static InputParameters validParams()
void mooseError(Args &&... args) const
const Moose::Functor< ADReal > & _rho_d
Dispersed phase density.
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi=nullptr, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false, const Moose::StateArg *state_limiter=nullptr) const
InterpMethod selectInterpolationMethod(const std::string &interp_method)
ADReal _ae
The a coefficient for the element.
MooseVariableFV< Real > & _var
Moose::FaceArg makeCDFace(const FaceInfo &fi, const bool correct_skewness=false) const
void interpolate(InterpMethod m, T &result, const T2 &value1, const T3 &value2, const FaceInfo &fi, const bool one_is_elem)
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const