20 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
21 params.
addParam<MooseFunctorName>(
"v", 0,
"The velocity in the y direction.");
22 params.
addParam<MooseFunctorName>(
"w", 0,
"The velocity in the z direction.");
30 _u_functor(getFunctor<
ADReal>(
"u")),
31 _v_functor(getFunctor<
ADReal>(
"v")),
32 _w_functor(getFunctor<
ADReal>(
"w")),
33 _mu(getFunctor<
ADReal>(
"mu")),
34 _dim(_subproblem.
mesh().dimension())
50 const auto & cell_centroid =
63 vel_C_old(0) =
_u_functor(elem_arg, state_old);
66 vel_C_old(1) =
_v_functor(elem_arg, state_old);
68 vel_C_old(2) =
_w_functor(elem_arg, state_old);
74 const auto mu_b =
_mu(face, state);
78 normal_x_normal(dim_i, dim_i) = 0.0;
89 ADReal matrix_contribution;
93 matrix_contribution = face_flux * (1 - normal_squared) * vel_C(
_index);
94 rhs_contribution = face_flux * (normal_x_normal * vel_C_old)(
_index);
97 matrix_contribution += mu_b / d_perpendicular * normal_squared * vel_C(
_index);
98 rhs_contribution += mu_b / d_perpendicular * (normal_x_normal * vel_C_old)(
_index);
100 return matrix_contribution - rhs_contribution;
110 const auto elem_arg =
114 const Point & cell_centroid =
126 const auto mu_b =
_mu(face, state);
130 v_dot_n += v_C *
normal(1);
132 v_dot_n += w_C *
normal(2);
134 const auto strong_resid = mu_b / d_perpendicular *
normal(
_index) * v_dot_n;
const FaceInfo * _face_info
FaceInfo::VarFaceNeighbors _face_type
registerMooseObject("NavierStokesApp", INSFVSymmetryVelocityBC)
void gatherRCData(const FaceInfo &fi) override
Should be a non-empty implementation if the residual object is a FVFluxKernel and introduces residual...
unsigned int number() const
A flux boundary condition that momentum residual objects that add boundary flux terms should inherit ...
const Elem & elem() const
Moose::StateArg determineState() const
const Point & faceCentroid() const
const unsigned int _index
index x|y|z
const Moose::Functor< ADReal > & _v_functor
y-velocity
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
TypeVector< typename CompareTypes< T, T2 >::supertype > outer_product(const T &a, const TypeVector< T2 > &b)
MooseVariableFV< Real > & _var
const Point & neighborCentroid() const
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > & _mu
The dynamic viscosity.
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
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.
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Elem * neighborPtr() const
const Point & elemCentroid() const
ADReal computeSegregatedContribution() override
Compute the contribution which goes into the residual of the segregated system.
INSFVSymmetryVelocityBC(const InputParameters ¶ms)
const Point & normal() const
unsigned int number() const
void addResidualAndJacobian(const ADReal &residual)
Process into either the system residual or Jacobian.
const Moose::Functor< ADReal > & _w_functor
z-velocity
const unsigned int _dim
The mesh dimension.
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()
IntRange< T > make_range(T beg, T end)
const Moose::Functor< ADReal > & _u_functor
x-velocity
const ADRealVectorValue & normal() const
A parent class for INSFV symmetry boundary conditions.
static InputParameters validParams()
A class for setting a symmetry boundary condition on the velocity.
static InputParameters validParams()
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const