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>(NS::TKE, "The turbulent kinetic energy.");
24  params.addRequiredParam<MooseFunctorName>("characteristic_length",
25  "Characteristic length of the inlet in the problem.");
26  return params;
27 }
28 
30  : FVDirichletBCBase(params),
31  _C_mu(getFunctor<ADReal>("C_mu")),
32  _k(getFunctor<ADReal>(NS::TKE)),
33  _characteristic_length(getFunctor<ADReal>("characteristic_length"))
34 {
35 }
36 
37 ADReal
39 {
40  const auto boundary_face = singleSidedFaceArg(&fi);
41 
42  using std::pow;
43  return pow(_C_mu(boundary_face, state), 0.75) * 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()
const Moose::Functor< ADReal > & _k
turbulent kinetic energy
A class for turbulent kinetic energy dissipation rate inlet boundary conditions.
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const Moose::Functor< ADReal > & _C_mu
C-mu closure coefficient.
void addClassDescription(const std::string &doc_string)
MooseUnits pow(const MooseUnits &, int)