LCOV - code coverage report
Current view: top level - src/linearfvbcs - LinearFVNormalVelocityFunctorDirichletBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #32971 (54bef8) with base c6cf66 Lines: 15 15 100.0 %
Date: 2026-05-29 20:37:52 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 "LinearFVNormalVelocityFunctorDirichletBC.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", LinearFVNormalVelocityFunctorDirichletBC);
      13             : 
      14             : InputParameters
      15          32 : LinearFVNormalVelocityFunctorDirichletBC::validParams()
      16             : {
      17          32 :   InputParameters params = LinearFVAdvectionDiffusionFunctorDirichletBC::validParams();
      18          32 :   params.addClassDescription(
      19             :       "Adds a dirichlet BC for a velocity parallel to the normal direction. A positive dirichlet "
      20             :       "value would denote outflow, while negative denotes inflow.");
      21          64 :   params.renameParam("functor", "normal_velocity", "The velocity in the normal direction");
      22          64 :   MooseEnum component("x y z");
      23          64 :   params.addRequiredParam<MooseEnum>(
      24             :       "component",
      25             :       component,
      26             :       "The velocity component this object is acting on. We will multiply the prescribed normal "
      27             :       "velocity by the corresponding face normal component");
      28          32 :   return params;
      29          32 : }
      30             : 
      31          16 : LinearFVNormalVelocityFunctorDirichletBC::LinearFVNormalVelocityFunctorDirichletBC(
      32          16 :     const InputParameters & parameters)
      33             :   : LinearFVAdvectionDiffusionFunctorDirichletBC(parameters),
      34          32 :     _component((getParam<MooseEnum>("component").getEnum<Component>()))
      35             : {
      36          16 : }
      37             : 
      38             : Real
      39        7360 : LinearFVNormalVelocityFunctorDirichletBC::computeBoundaryValue() const
      40             : {
      41        7360 :   return LinearFVAdvectionDiffusionFunctorDirichletBC::computeBoundaryValue() *
      42        7360 :          _current_face_info->normal()(_component);
      43             : }

Generated by: LCOV version 1.14