24 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
25 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
26 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
27 params.
addClassDescription(
"Fully developed outflow boundary condition for advecting momentum. " 28 "This will impose a zero normal gradient on the boundary velocity.");
36 _u(getFunctor<
ADReal>(
"u")),
37 _v(isParamValid(
"v") ? &getFunctor<
ADReal>(
"v") : nullptr),
38 _w(isParamValid(
"w") ? &getFunctor<
ADReal>(
"w") : nullptr),
39 _dim(_subproblem.
mesh().dimension()),
44 "In two or more dimensions, the v velocity must be supplied using the 'v' parameter");
46 mooseError(
"In three dimensions, the w velocity must be supplied using the 'w' parameter");
53 const auto rho_boundary =
_rho(boundary_face, state);
54 const auto eps_boundary =
epsFunctor()(boundary_face, state);
60 const auto var_boundary =
_var(boundary_face, state);
62 return rho_boundary / eps_boundary * var_boundary;
95 v(1) = (*_v)(boundary_face, state);
97 v(2) = (*_w)(boundary_face, state);
108 const auto a = advected_quant.derivatives()[dof_number] *
_normal *
v;
110 const auto strong_resid =
_normal *
v * advected_quant;
const FaceInfo * _face_info
ADReal computeSegregatedContribution() override
Compute the contribution which goes into the residual of the segregated system.
FaceInfo::VarFaceNeighbors _face_type
const Moose::Functor< ADReal > & _u
x-velocity
unsigned int number() const
A flux boundary condition that momentum residual objects that add boundary flux terms should inherit ...
const Moose::Functor< ADReal > & _rho
The density.
const Elem & elem() const
Moose::StateArg determineState() const
const unsigned int _index
index x|y|z
static const std::string density
void gatherRCData(const FaceInfo &) override
Should be a non-empty implementation if the residual object is a FVFluxKernel and introduces residual...
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
MooseVariableFV< Real > & _var
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > *const _v
y-velocity
static InputParameters validParams()
virtual const Moose::FunctorBase< ADReal > & epsFunctor() const
A virtual method that can be overridden in PINSFV classes to return a non-unity porosity.
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
registerMooseObject("NavierStokesApp", INSFVMomentumAdvectionOutflowBC)
virtual VectorValue< ADReal > getVelocity(const Moose::FV::InterpMethod m, const FaceInfo &fi, const Moose::StateArg &time, const THREAD_ID tid, bool subtract_mesh_velocity) const =0
Retrieve a face velocity.
const Elem * neighborPtr() const
const Moose::Functor< ADReal > *const _w
z-velocity
const unsigned int _dim
the dimension of the simulation
const Elem & neighbor() const
ADRealVectorValue _normal
const Point & normal() const
unsigned int number() const
void addResidualAndJacobian(const ADReal &residual)
Process into either the system residual or Jacobian.
static InputParameters validParams()
static const std::string v
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.
static InputParameters validParams()
ADReal computeAdvectedQuantity(const Moose::FaceArg &boundary_face, const Moose::StateArg &state)
Computes the advected quantity which is then used on gatherRCData and computeSegregatedContribution.
A class for finite volume fully developed outflow boundary conditions for the momentum equation It ad...
void mooseError(Args &&... args) const
INSFVMomentumAdvectionOutflowBC(const InputParameters ¶ms)
A parent class for INSFV fully developed flow boundary conditions.
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const