22 "Dirichlet BC for the turbulent kinetic energy dissipation rate.");
23 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
24 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
25 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
29 params.
addRequiredParam<MooseFunctorName>(
"k",
"The turbulent kinetic energy.");
31 params.
addParam<MooseFunctorName>(
"C_mu", 0.09,
"Coupled turbulent kinetic energy closure.");
32 params.
addParam<
bool>(
"newton_solve",
false,
"Whether a Newton nonlinear solve is being used");
39 _dim(_subproblem.
mesh().dimension()),
40 _u_var(getFunctor<
ADReal>(
"u")),
41 _v_var(params.isParamValid(
"v") ? &(getFunctor<
ADReal>(
"v")) : nullptr),
42 _w_var(params.isParamValid(
"w") ? &(getFunctor<
ADReal>(
"w")) : nullptr),
47 _C_mu(getFunctor<
ADReal>(
"C_mu")),
48 _newton_solve(getParam<bool>(
"newton_solve"))
56 const Elem & _current_elem = fi.
elem();
64 for (
unsigned int i_side = 0; i_side < _current_elem.n_sides(); ++i_side)
75 const ADReal parallel_speed =
82 const ADReal y_plus = dist * u_star * rho /
mu;
96 else if (y_plus >= 30.0)
102 return turbulent_value;
105 return turbulent_value + 0 *
mu;
113 const auto interpolation_coef = (y_plus - 5.0) / 25.0;
114 return (interpolation_coef * (turbulent_value - laminar_value) + laminar_value);
const Moose::Functor< ADReal > & _rho
Density.
virtual MooseMesh & mesh()=0
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
const Moose::Functor< ADReal > & _mu
Dynamic viscosity.
static const std::string mu_t
const Moose::Functor< ADReal > & _mu_t
Turbulent dynamic viscosity.
const Elem & elem() const
const Point & faceCentroid() const
static const std::string density
static const std::string TKE
const Moose::Functor< ADReal > & _C_mu
C_mu turbulent coefficient.
static InputParameters validParams()
const Moose::Functor< ADReal > * _v_var
y-velocity
DualNumber< Real, DNDerivativeType, true > ADReal
const Moose::Functor< ADReal > & _k
Turbulent kinetic energy.
const Moose::Functor< ADReal > & _u_var
x-velocity
Moose::ElemArg makeElemArg(const Elem *elem, bool correct_skewnewss=false) const
const Point & elemCentroid() const
static InputParameters validParams()
static const std::string mu
const Point & normal() const
const Moose::Functor< ADReal > * _w_var
z-velocity
registerMooseObject("NavierStokesApp", INSFVTKEDWallFunctionBC)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const bool _newton_solve
Whether we are using a newton solve.
Applies a wall function to the turbulent kinetic energy dissipation rate.
static const std::string velocity
ADReal findUStar(const ADReal &mu, const ADReal &rho, const ADReal &u, Real dist)
Finds the friction velocity using standard velocity wall functions formulation.
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
ADReal computeSpeed(const ADRealVectorValue &velocity)
Compute the speed (velocity norm) given the supplied velocity.
MooseUnits pow(const MooseUnits &, int)
INSFVTKEDWallFunctionBC(const InputParameters ¶meters)