LCOV - code coverage report
Current view: top level - include/linearfvbcs - LinearFVTurbulentViscosityWallFunctionBC.h (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 0 1 0.0 %
Date: 2025-08-14 10:14:56 Functions: 0 1 0.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             : #pragma once
      11             : 
      12             : #include "LinearFVAdvectionDiffusionBC.h"
      13             : #include "NS.h"
      14             : 
      15             : /**
      16             :  * Class implementing a Dirichlet boundary condition for the turbulent viscosity wall function
      17             :  * in a RANS simulation
      18             :  */
      19             : class LinearFVTurbulentViscosityWallFunctionBC : public LinearFVAdvectionDiffusionBC
      20             : {
      21             : public:
      22             :   /**
      23             :    * Class constructor.
      24             :    * @param parameters The InputParameters for the object
      25             :    */
      26             :   LinearFVTurbulentViscosityWallFunctionBC(const InputParameters & parameters);
      27             : 
      28             :   static InputParameters validParams();
      29             : 
      30             :   virtual Real computeBoundaryValue() const override;
      31             : 
      32             :   virtual Real computeBoundaryNormalGradient() const override;
      33             : 
      34             :   virtual Real computeBoundaryValueMatrixContribution() const override;
      35             : 
      36             :   virtual Real computeBoundaryValueRHSContribution() const override;
      37             : 
      38             :   virtual Real computeBoundaryGradientMatrixContribution() const override;
      39             : 
      40             :   virtual Real computeBoundaryGradientRHSContribution() const override;
      41             : 
      42           0 :   virtual bool useBoundaryGradientExtrapolation() const override { return true; }
      43             : 
      44             :   Real computeTurbulentViscosity() const;
      45             : 
      46             : protected:
      47             :   /// the dimension of the domain
      48             :   const unsigned int _dim;
      49             : 
      50             :   /// x-velocity
      51             :   const Moose::Functor<Real> & _u_var;
      52             :   /// y-velocity
      53             :   const Moose::Functor<Real> * _v_var;
      54             :   /// z-velocity
      55             :   const Moose::Functor<Real> * _w_var;
      56             : 
      57             :   /// Density
      58             :   const Moose::Functor<Real> & _rho;
      59             :   /// Dynamic viscosity
      60             :   const Moose::Functor<Real> & _mu;
      61             : 
      62             :   /// Turbulent kinetic energy
      63             :   const Moose::Functor<Real> & _k;
      64             : 
      65             :   /// C_mu turbulent coefficient
      66             :   const Real _C_mu;
      67             : 
      68             :   /// Method used for wall treatment
      69             :   const NS::WallTreatmentEnum _wall_treatment;
      70             : 
      71             :   // Mu_t evaluated at y+=30 for blending purposes
      72             :   const Real _mut_30 =
      73             :       (NS::von_karman_constant * 30.0 / std::log(NS::E_turb_constant * 30.0) - 1.0);
      74             : };

Generated by: LCOV version 1.14