20 "Calculates y+ value according to the algebraic velocity standard wall function.");
22 params.
addCoupledVar(
"v",
"The velocity in the y direction.");
23 params.
addCoupledVar(
"w",
"The velocity in the z direction.");
27 "Boundaries that correspond to solid walls");
33 _dim(_subproblem.
mesh().dimension()),
35 _v_var(params.isParamValid(
"v")
38 _w_var(params.isParamValid(
"w")
41 _rho(getFunctor<
Real>(
"rho")),
42 _mu(getFunctor<
Real>(
"mu")),
43 _wall_boundary_names(getParam<
std::vector<BoundaryName>>(
"walls"))
46 paramError(
"u",
"the u velocity must be an INSFVVelocityVariable.");
50 "In two or more dimensions, the v velocity must be supplied and it must be an " 51 "INSFVVelocityVariable.");
55 "In three-dimensions, the w velocity must be supplied and it must be an " 56 "INSFVVelocityVariable.");
64 bool wall_bounded =
false;
65 Real min_wall_dist = 1e10;
68 for (
unsigned int i_side = 0; i_side < elem.n_sides(); ++i_side)
70 const std::vector<BoundaryID> side_bnds =
80 const Point & this_normal = fi->
normal();
81 Point this_wall_vec = (elem.vertex_average() - fi->
faceCentroid());
82 Real dist = std::abs(this_wall_vec * normal);
83 if (dist < min_wall_dist)
86 wall_vec = this_wall_vec;
108 Real dist = std::abs(wall_vec * normal);
111 const Real parallel_speed = parallel_velocity.
norm();
113 if (parallel_speed < 1e-6)
116 if (!std::isfinite(parallel_speed))
117 return parallel_speed;
121 const auto rho =
_rho(elem_arg, state);
122 const auto mu =
_mu(elem_arg, state);
125 return (dist * u_star * rho /
mu);
virtual MooseMesh & mesh()=0
const std::vector< BoundaryName > & _wall_boundary_names
Wall boundaries.
auto norm() const -> decltype(std::norm(Real()))
Moose::StateArg determineState() const
const boundary_id_type side_id
const Point & faceCentroid() const
virtual Real computeValue() override
template Real findUStar< Real >(const Real &mu, const Real &rho, const Real &u, const Real dist)
virtual const std::string & name() const
ADReal getElemValue(const Elem *elem, const StateArg &state) const
const INSFVVelocityVariable *const _v_var
y-velocity
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const std::vector< const FaceInfo *> & faceInfo() const
WallFunctionYPlusAux(const InputParameters ¶meters)
static const std::string mu
boundary_id_type BoundaryID
static InputParameters validParams()
const INSFVVelocityVariable *const _u_var
x-velocity
const Point & normal() const
void paramError(const std::string ¶m, Args... args) const
registerMooseObject("NavierStokesApp", WallFunctionYPlusAux)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const Elem *const & _current_elem
const INSFVVelocityVariable *const _w_var
z-velocity
static InputParameters validParams()
static const std::string velocity
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
Computes wall y+ based on wall functions.
const Moose::Functor< Real > & _mu
Dynamic viscosity.
const unsigned int _dim
the dimension of the simulation
const Moose::Functor< Real > & _rho
Density.
BoundaryID getBoundaryID(const BoundaryName &boundary_name) const