LCOV - code coverage report
Current view: top level - src/fvkernels - PINSFVMomentumPressure.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: ba1ead Lines: 12 14 85.7 %
Date: 2025-08-13 06:50:25 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 "PINSFVMomentumPressure.h"
      11             : #include "PINSFVSuperficialVelocityVariable.h"
      12             : #include "NS.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", PINSFVMomentumPressure);
      15             : 
      16             : InputParameters
      17       10182 : PINSFVMomentumPressure::validParams()
      18             : {
      19       10182 :   InputParameters params = INSFVMomentumPressure::validParams();
      20       10182 :   params.addClassDescription("Introduces the coupled pressure term $eps \nabla P$ into the "
      21             :                              "Navier-Stokes porous media momentum equation.");
      22       10182 :   params.addRequiredParam<MooseFunctorName>(NS::porosity, "Porosity");
      23             : 
      24       10182 :   return params;
      25           0 : }
      26             : 
      27        5750 : PINSFVMomentumPressure::PINSFVMomentumPressure(const InputParameters & params)
      28        5750 :   : INSFVMomentumPressure(params), _eps(getFunctor<ADReal>(NS::porosity))
      29             : {
      30        5750 :   if (!dynamic_cast<PINSFVSuperficialVelocityVariable *>(&_var))
      31           0 :     mooseError("PINSFVMomentumPressure may only be used with a superficial velocity "
      32             :                "variable, of variable type PINSFVSuperficialVelocityVariable.");
      33        5750 : }
      34             : 
      35             : ADReal
      36    21160026 : PINSFVMomentumPressure::computeQpResidual()
      37             : {
      38    21160026 :   return _eps(makeElemArg(_current_elem), determineState()) *
      39    42320052 :          INSFVMomentumPressure::computeQpResidual();
      40             : }

Generated by: LCOV version 1.14