LCOV - code coverage report
Current view: top level - src/fvbcs - INSFVMixingLengthTKEDBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 17 18 94.4 %
Date: 2025-08-14 10:14:56 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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             : 
      10             : #include "INSFVMixingLengthTKEDBC.h"
      11             : #include "NavierStokesMethods.h"
      12             : #include "NS.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", INSFVMixingLengthTKEDBC);
      15             : 
      16             : InputParameters
      17          21 : INSFVMixingLengthTKEDBC::validParams()
      18             : {
      19          21 :   InputParameters params = FVDirichletBCBase::validParams();
      20          21 :   params.addClassDescription("Adds inlet boundary condition for the turbulent kinetic energy "
      21             :                              "dissipation rate based on characteristic length.");
      22          42 :   params.addParam<MooseFunctorName>("C_mu", 0.09, "Coupled turbulent kinetic energy closure.");
      23          42 :   params.addRequiredParam<MooseFunctorName>("k", "The turbulent kinetic energy.");
      24          42 :   params.deprecateParam("k", NS::TKE, "01/01/2025");
      25          42 :   params.addRequiredParam<MooseFunctorName>("characteristic_length",
      26             :                                             "Characteristic length of the inlet in the problem.");
      27          21 :   return params;
      28           0 : }
      29             : 
      30          12 : INSFVMixingLengthTKEDBC::INSFVMixingLengthTKEDBC(const InputParameters & params)
      31             :   : FVDirichletBCBase(params),
      32          12 :     _C_mu(getFunctor<ADReal>("C_mu")),
      33          12 :     _k(getFunctor<ADReal>(NS::TKE)),
      34          36 :     _characteristic_length(getFunctor<ADReal>("characteristic_length"))
      35             : {
      36          12 : }
      37             : 
      38             : ADReal
      39        1940 : INSFVMixingLengthTKEDBC::boundaryValue(const FaceInfo & fi, const Moose::StateArg & state) const
      40             : {
      41        1940 :   const auto boundary_face = singleSidedFaceArg(&fi);
      42             : 
      43        1940 :   return std::pow(_C_mu(boundary_face, state), 0.75) * std::pow(_k(boundary_face, state), 1.5) /
      44        1940 :          (0.07 * _characteristic_length(boundary_face, state));
      45             : }

Generated by: LCOV version 1.14