25 params.
addClassDescription(
"Computes the residual of the advective and pressure term (the latter "
26 "when this object is added for the momentum equation) on a boundary.");
31 "The x-component of the superficial velocity");
36 MooseEnum advected_interp_method(
"average upwind",
"upwind");
38 advected_interp_method,
39 "The interpolation to use for the advected quantity. Options are "
40 "'upwind' and 'average', with the default being 'upwind'.");
48 _sup_vel_x(getFunctor<
ADReal>(
NS::superficial_velocity_x)),
49 _sup_vel_y(isParamValid(
NS::superficial_velocity_y)
50 ? &getFunctor<
ADReal>(
NS::superficial_velocity_y)
52 _sup_vel_z(isParamValid(
NS::superficial_velocity_z)
53 ? &getFunctor<
ADReal>(
NS::superficial_velocity_z)
55 _pressure(getFunctor<
ADReal>(
NS::pressure)),
56 _rho(getFunctor<
ADReal>(
NS::density)),
57 _eps(getFunctor<
ADReal>(
NS::porosity)),
59 _index(getParam<
MooseEnum>(
"momentum_component"))
63 "If 'momentum' is specified for 'eqn', then you must provide a parameter "
64 "value for 'momentum_component'");
67 "'momentum_component' should not be specified when the 'eqn' is not 'momentum'");
71 const auto & advected_interp_method = getParam<MooseEnum>(
"advected_interp_method");
72 if (advected_interp_method ==
"average")
74 else if (advected_interp_method ==
"upwind")
78 static_cast<std::string
>(advected_interp_method));
85 const bool out_of_elem = (ft == FaceInfo::VarFaceNeighbors::ELEM);
94 const VectorValue<ADReal> sup_vel(
_sup_vel_x(boundary_face, state),
97 const auto rho =
_rho(boundary_face, state);
101 else if (
_eqn ==
"momentum")
103 const auto eps =
_eps(boundary_face, state);
110 _a = sup_vel(
_index).derivatives()[dof_number];
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesTestApp", PINSFVFunctorBC)
MooseVariableFV< Real > & _var
const FaceInfo * _face_info
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
FaceInfo::VarFaceNeighbors _face_type
const ADRealVectorValue & normal() const
static InputParameters validParams()
const Point & normal() const
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
const Elem & elem() const
const Elem * neighborPtr() const
const Elem & neighbor() const
A parent class for INSFV flow boundary conditions.
static InputParameters validParams()
All objects that contribute to pressure-based (e.g.
static InputParameters validParams()
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms.
void paramError(const std::string ¶m, Args... args) const
void mooseError(Args &&... args) const
bool isParamValid(const std::string &name) const
unsigned int number() const
Evaluates boundary mass or momentum fluxes through functor evaluation of the superficial velocities,...
const Moose::Functor< ADReal > *const _sup_vel_y
The y component of the superficial velocity.
const MooseEnum _eqn
Denotes the equation we're computing the boundary fluxes for. Options are either "mass" or "momentum"...
const Moose::Functor< ADReal > & _pressure
The pressure.
PINSFVFunctorBC(const InputParameters ¶ms)
const Moose::Functor< ADReal > & _rho
The density.
Moose::FV::InterpMethod _advected_interp_method
The interpolation method to use for the advected quantity.
const Moose::Functor< ADReal > *const _sup_vel_z
The z component of the superficial velocity.
const Moose::Functor< ADReal > & _sup_vel_x
The x component of the superficial velocity.
bool _computing_rc_data
Whether we are computing Rhie-Chow data.
static InputParameters validParams()
ADReal _a
Local variable to hold this object's contribution to the Rhie-Chow 'a' coefficient.
const Moose::Functor< ADReal > & _eps
The porosity.
const unsigned int _index
If computing the boundary fluxes for the momentum equation, this denotes the component of the momentu...
virtual ADReal computeQpResidual() override
void gatherRCData(const Elem &) override final
Should be a non-empty implementation if the residual object is a FVElementalKernel and introduces res...
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.
unsigned int number() const
Moose::StateArg determineState() const
static const std::string superficial_velocity_y
static const std::string density
static const std::string superficial_velocity_z
static const std::string porosity
static const std::string superficial_velocity_x
static const std::string pressure