22 params.addClassDescription(
"Implements the drift momentum flux source.");
23 params.addRequiredParam<UserObjectName>(
24 "rhie_chow_user_object",
25 "The rhie-chow user-object which is used to determine the face velocity.");
26 params.addRequiredParam<MooseFunctorName>(
"u_slip",
"The slip velocity in the x direction.");
27 params.addParam<MooseFunctorName>(
"v_slip",
"The slip velocity in the y direction.");
28 params.addParam<MooseFunctorName>(
"w_slip",
"The slip velocity in the z direction.");
29 params.addRequiredParam<MooseFunctorName>(
"rho_d",
"Dispersed phase density.");
30 params.addParam<MooseFunctorName>(
"fd", 0.0,
"Fraction dispersed phase.");
31 params.renameParam(
"fd",
"fraction_dispersed",
"");
33 params.addParam<
bool>(
34 "force_boundary_execution",
true,
"This kernel should execute on boundaries by default");
35 MooseEnum momentum_component(
"x=0 y=1 z=2");
39 "The component of the momentum equation that this kernel applies to.");
41 MooseEnum coeff_interp_method(
"average harmonic",
"harmonic");
42 params.addParam<
MooseEnum>(
"density_interp_method",
44 "Switch that can select face interpolation method for the density.");
51 _dim(_subproblem.
mesh().dimension()),
52 _mass_flux_provider(getUserObject<
RhieChowMassFlux>(
"rhie_chow_user_object")),
53 _rho_d(getFunctor<
Real>(
"rho_d")),
54 _f_d(getFunctor<
Real>(
"fd")),
55 _u_slip(getFunctor<
Real>(
"u_slip")),
56 _v_slip(isParamValid(
"v_slip") ? &getFunctor<
Real>(
"v_slip") : nullptr),
57 _w_slip(isParamValid(
"w_slip") ? &getFunctor<
Real>(
"w_slip") : nullptr),
58 _index(getParam<
MooseEnum>(
"momentum_component")),
59 _density_interp_method(
63 mooseError(
"In two or more dimensions, the v_slip velocity must be supplied using the 'v_slip' " 67 "In three dimensions, the w_slip velocity must be supplied using the 'w_slip' parameter");
95 const auto uslipdotn = normal * u_slip_vel_vec;
99 face_rho_fd =
_rho_d(face_arg, state) *
_f_d(face_arg, state);
107 _rho_d(elem_arg, state) *
_f_d(elem_arg, state),
108 _rho_d(neigh_arg, state) *
_f_d(neigh_arg, state),
120 if (std::abs(u_old) > 1e-6)
130 if (std::abs(u_old) > 1e-6)
143 if (std::abs(u_old) > 1e-6)
155 if (std::abs(u_old) > 1e-6)
const Moose::Functor< Real > & _rho_d
Dispersed phase density.
virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition &bc) override
virtual void setupFaceData(const FaceInfo *face_info) override
Set the current FaceInfo object.
User object responsible for determining the face fluxes using the Rhie-Chow interpolation in a segreg...
const unsigned int _index
The index of the momentum component.
virtual Real computeNeighborMatrixContribution() override
std::pair< Real, Real > interpCoeffs(const InterpMethod m, const FaceInfo &fi, const bool one_is_elem, const T &face_flux=0.0)
Real getMassFlux(const FaceInfo &fi) const
Get the face velocity times density (used in advection terms)
const Moose::Functor< Real > & _u_slip
slip velocity in direction x
Moose::FaceArg singleSidedFaceArg(const FaceInfo *fi, Moose::FV::LimiterType limiter_type=Moose::FV::LimiterType::CentralDifference, bool correct_skewness=false) const
Adds drift flux kernel coming for two-phase mixture model for the linear finite volume discretization...
Moose::StateArg determineState() const
void computeFlux()
Compute the face flux.
MooseLinearVariableFV< Real > & _var
virtual void setupFaceData(const FaceInfo *face_info)
virtual Real computeElemMatrixContribution() override
const Moose::Functor< Real > *const _v_slip
slip velocity in direction y
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
static InputParameters validParams()
static InputParameters validParams()
const RhieChowMassFlux & _mass_flux_provider
The Rhie-Chow user object that provides us with the face velocity.
const Moose::Functor< Real > & _f_d
Dispersed phase fraction.
const FaceInfo * _current_face_info
const Elem * neighborPtr() const
std::pair< Real, Real > _velocity_interp_coeffs
Advected coefficients.
LinearWCNSFV2PMomentumDriftFlux(const InputParameters ¶ms)
const Point & normal() const
virtual Real computeNeighborRightHandSideContribution() override
virtual Real computeElemRightHandSideContribution() override
const Elem * elemPtr() const
const Moose::FV::InterpMethod _density_interp_method
The face interpolation method for the density.
bool onBoundary(const SubdomainRestrictable &obj, const FaceInfo &fi)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void mooseError(Args &&... args) const
const Moose::Functor< Real > *const _w_slip
slip velocity in direction z
InterpMethod selectInterpolationMethod(const std::string &interp_method)
const unsigned int _dim
The dimension of the simulation.
Real _face_flux
Face flux.
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)
StateArg previousNonlinearState()
registerMooseObject("NavierStokesApp", LinearWCNSFV2PMomentumDriftFlux)