18 params.
addClassDescription(
"Adds inlet boudnary conditon for the turbulent kinetic energy based "
19 "on turbulent intensity.");
20 params.
addRequiredParam<MooseFunctorName>(
"u",
"The velocity in the x direction.");
21 params.
addParam<MooseFunctorName>(
"v",
"The velocity in the y direction.");
22 params.
addParam<MooseFunctorName>(
"w",
"The velocity in the z direction.");
23 params.
addRequiredParam<MooseFunctorName>(
"intensity",
"Turbulent intensity.");
29 _u(getFunctor<
ADReal>(
"u")),
30 _v(isParamValid(
"v") ? &getFunctor<
ADReal>(
"v") : nullptr),
31 _w(isParamValid(
"w") ? &getFunctor<
ADReal>(
"w") : nullptr),
32 _intensity(getFunctor<
ADReal>(
"intensity")),
33 _dim(_subproblem.
mesh().dimension())
37 "In two or more dimensions, the v velocity must be supplied using the 'v' parameter");
39 mooseError(
"In threedimensions, the w velocity must be supplied using the 'w' parameter");
49 velocity(1) = (*_v)(boundary_face, state);
51 velocity(2) = (*_w)(boundary_face, state);
53 const auto velocity_normal = fi.
normal() * velocity;
55 return 1.5 * Utility::pow<2>(
_intensity(boundary_face, state) * velocity_normal);
DualNumber< Real, DNDerivativeType, true > ADReal
registerMooseObject("NavierStokesApp", INSFVInletIntensityTKEBC)
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
static InputParameters validParams()
const Point & normal() const
A class for turbulent kinetic energy inlet boundary conditions.
static InputParameters validParams()
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
const unsigned int _dim
the dimension of the domain
const Moose::Functor< ADReal > *const _v
y-velocity
INSFVInletIntensityTKEBC(const InputParameters ¶ms)
const Moose::Functor< ADReal > & _intensity
turbulent intensity
const Moose::Functor< ADReal > & _u
x-velocity
const Moose::Functor< ADReal > *const _w
z-velocity
void mooseError(Args &&... args) const