https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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}
DualNumber< Real, DNDerivativeType, true > ADReal
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
registerMooseObject("NavierStokesApp", INSFVMixingLengthTKEDBC)
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()
A class for turbulent kinetic energy dissipation rate inlet boundary conditions.
const Moose::Functor< ADReal > & _C_mu
C-mu closure coefficient.
static InputParameters validParams()
INSFVMixingLengthTKEDBC(const InputParameters &params)
const Moose::Functor< ADReal > & _k
turbulent kinetic energy
const Moose::Functor< ADReal > & _characteristic_length
turbulent intensity
ADReal boundaryValue(const FaceInfo &fi, const Moose::StateArg &state) const override
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
static const std::string TKE
Definition NS.h:180