https://mooseframework.inl.gov
INSFVMixingLengthTKEDBC.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 #include "NavierStokesMethods.h"
12 #include "NS.h"
13 
15 
18 {
20  params.addClassDescription("Adds inlet boundary condition for the turbulent kinetic energy "
21  "dissipation rate based on characteristic length.");
22  params.addParam<MooseFunctorName>("C_mu", 0.09, "Coupled turbulent kinetic energy closure.");
23  params.addRequiredParam<MooseFunctorName>("k", "The turbulent kinetic energy.");
24  params.deprecateParam("k", NS::TKE, "01/01/2025");
25  params.addRequiredParam<MooseFunctorName>("characteristic_length",
26  "Characteristic length of the inlet in the problem.");
27  return params;
28 }
29 
31  : FVDirichletBCBase(params),
32  _C_mu(getFunctor<ADReal>("C_mu")),
33  _k(getFunctor<ADReal>(NS::TKE)),
34  _characteristic_length(getFunctor<ADReal>("characteristic_length"))
35 {
36 }
37 
38 ADReal
40 {
41  const auto boundary_face = singleSidedFaceArg(&fi);
42 
43  return std::pow(_C_mu(boundary_face, state), 0.75) * std::pow(_k(boundary_face, state), 1.5) /
44  (0.07 * _characteristic_length(boundary_face, state));
45 }
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
static InputParameters validParams()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
static const std::string TKE
Definition: NS.h:176
const Moose::Functor< ADReal > & _characteristic_length
turbulent intensity
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
INSFVMixingLengthTKEDBC(const InputParameters &params)
DualNumber< Real, DNDerivativeType, true > ADReal
void addRequiredParam(const std::string &name, const std::string &doc_string)
registerMooseObject("NavierStokesApp", INSFVMixingLengthTKEDBC)
static InputParameters validParams()
void deprecateParam(const std::string &old_name, const std::string &new_name, const std::string &removal_date)
const Moose::Functor< ADReal > & _k
turbulent kinetic energy
A class for turbulent kinetic energy dissipation rate inlet boundary conditions.
const Moose::Functor< ADReal > & _C_mu
C-mu closure coefficient.
void addClassDescription(const std::string &doc_string)
MooseUnits pow(const MooseUnits &, int)