LCOV - code coverage report
Current view: top level - src/auxkernels - SpecificTotalEnthalpyAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #30301 (3b550b) with base 2ad78d Lines: 18 19 94.7 %
Date: 2025-07-30 13:02:48 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 "SpecificTotalEnthalpyAux.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyAux);
      13             : 
      14             : InputParameters
      15        9018 : SpecificTotalEnthalpyAux::validParams()
      16             : {
      17        9018 :   InputParameters params = AuxKernel::validParams();
      18       18036 :   params.addRequiredCoupledVar("rhoA", "Conserved density");
      19       18036 :   params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
      20       18036 :   params.addRequiredCoupledVar("p", "Pressure");
      21       18036 :   params.addRequiredCoupledVar("A", "Cross-sectional area");
      22       18036 :   params.addCoupledVar("alpha", 1., "Volume fraction");
      23        9018 :   params.addClassDescription("Compute the specific total enthalpy");
      24             : 
      25        9018 :   return params;
      26           0 : }
      27             : 
      28        4920 : SpecificTotalEnthalpyAux::SpecificTotalEnthalpyAux(const InputParameters & parameters)
      29             :   : AuxKernel(parameters),
      30        4920 :     _rhoA(coupledValue("rhoA")),
      31        4920 :     _rhoEA(coupledValue("rhoEA")),
      32        4920 :     _pressure(coupledValue("p")),
      33        4920 :     _area(coupledValue("A")),
      34        9840 :     _alpha(coupledValue("alpha"))
      35             : {
      36        4920 : }
      37             : 
      38             : Real
      39      816185 : SpecificTotalEnthalpyAux::computeValue()
      40             : {
      41      816185 :   return (_rhoEA[_qp] + _alpha[_qp] * _pressure[_qp] * _area[_qp]) / _rhoA[_qp];
      42             : }

Generated by: LCOV version 1.14