21 "algebraic standard velocity wall functions.");
22 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
23 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
24 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
32 _dim(_subproblem.
mesh().dimension()),
33 _u(getFunctor<
ADReal>(
"u")),
34 _v(isParamValid(
"v") ? &getFunctor<
ADReal>(
"v") : nullptr),
35 _w(isParamValid(
"w") ? &getFunctor<
ADReal>(
"w") : nullptr),
37 _mu(getFunctor<
ADReal>(
"mu"))
40 mooseError(
"Wall sheer stress enforcement based wall functions are not supported with " 41 "segregated solution approaches!");
47 mooseError(
"Sheer-stress-based wall function enforcement not supported for segregated solvers.");
56 const Elem & elem = fi.
elem();
61 velocity(1) = (*_v)(elem_arg, state);
63 velocity(2) = (*_w)(elem_arg, state);
70 ADReal parallel_speed = parallel_velocity.
norm();
71 _a = 1 / parallel_speed;
73 if (parallel_speed.value() < 1e-7)
76 if (!std::isfinite(parallel_speed.value()))
77 return parallel_speed;
82 ADReal tau = u_star * u_star * rho;
87 return _a * parallel_velocity(0);
89 return _a * parallel_velocity(1);
91 return _a * parallel_velocity(2);
const Moose::Functor< ADReal > *const _v
y-velocity
const FaceInfo * _face_info
FaceInfo::VarFaceNeighbors _face_type
auto norm() const -> decltype(std::norm(T()))
unsigned int number() const
ADReal _a
Rhie-Chow coefficient.
const Elem & elem() const
Moose::StateArg determineState() const
const Point & faceCentroid() const
const unsigned int _index
index x|y|z
static const std::string density
static InputParameters validParams()
MooseVariableFV< Real > & _var
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > & _mu
dynamic viscosity
RhieChowInterpolatorBase & _rc_uo
The Rhie Chow user object that is responsible for generating face velocities for advection terms...
INSFVWallFunctionBC(const InputParameters ¶ms)
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Moose::Functor< ADReal > *const _w
z-velocity
const Elem * neighborPtr() const
const Point & elemCentroid() const
virtual bool segregated() const =0
Bool of the Rhie Chow user object is used in monolithic/segregated approaches.
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()
A class for setting the wall shear stress at the walls, based on the standard wall function formulati...
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.
void gatherRCData(const FaceInfo &) override final
Should be a non-empty implementation if the residual object is a FVFluxKernel and introduces residual...
void mooseError(Args &&... args) const
static const std::string velocity
const Moose::Functor< ADReal > & _rho
density
ADReal findUStar(const ADReal &mu, const ADReal &rho, const ADReal &u, Real dist)
Finds the friction velocity using standard velocity wall functions formulation.
ADReal computeSegregatedContribution() override
Compute the contribution which goes into the residual of the segregated system.
ADReal computeStrongResidual()
registerMooseObject("NavierStokesApp", INSFVWallFunctionBC)
A class for free slip boundary conditions for the velocity.
VarFaceNeighbors faceType(const std::pair< unsigned int, unsigned int > &var_sys) const
const Moose::Functor< ADReal > & _u
x-velocity