LCOV - code coverage report
Current view: top level - src/fvbcs - FVSpecificEnthalpyFromPressureTemperatureDirichletBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 2bd28b Lines: 16 17 94.1 %
Date: 2025-10-23 22:11:45 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 "FVSpecificEnthalpyFromPressureTemperatureDirichletBC.h"
      11             : #include "SinglePhaseFluidProperties.h"
      12             : #include "NS.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", FVSpecificEnthalpyFromPressureTemperatureDirichletBC);
      15             : 
      16             : InputParameters
      17         205 : FVSpecificEnthalpyFromPressureTemperatureDirichletBC::validParams()
      18             : {
      19         205 :   InputParameters params = FVDirichletBCBase::validParams();
      20         410 :   params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties object.");
      21         205 :   params.addRequiredParam<MooseFunctorName>(
      22             :       NS::pressure, "The pressure (units should be based on fluid properties object)");
      23         205 :   params.addRequiredParam<MooseFunctorName>(
      24             :       NS::T_fluid, "The temperature (units should be based on fluid properties object)");
      25         205 :   params.addClassDescription(
      26             :       "Computes the specific enthalpy at the boundary from the pressure and temperature.");
      27         205 :   return params;
      28           0 : }
      29             : 
      30         110 : FVSpecificEnthalpyFromPressureTemperatureDirichletBC::
      31         110 :     FVSpecificEnthalpyFromPressureTemperatureDirichletBC(const InputParameters & parameters)
      32             :   : FVDirichletBCBase(parameters),
      33         110 :     _fp(getUserObject<SinglePhaseFluidProperties>("fp")),
      34         110 :     _pressure(getFunctor<ADReal>(NS::pressure)),
      35         110 :     _temperature(getFunctor<ADReal>(NS::T_fluid))
      36             : {
      37         110 : }
      38             : 
      39             : ADReal
      40       57799 : FVSpecificEnthalpyFromPressureTemperatureDirichletBC::boundaryValue(
      41             :     const FaceInfo & fi, const Moose::StateArg & state) const
      42             : {
      43       57799 :   auto sfa = singleSidedFaceArg(&fi);
      44       57799 :   return _fp.h_from_p_T(_pressure(sfa, state), _temperature(sfa, state));
      45             : }

Generated by: LCOV version 1.14