LCOV - code coverage report
Current view: top level - src/auxkernels - NSSpecificTotalEnthalpyAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 14 15 93.3 %
Date: 2025-08-14 10:14:56 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             : // Navier-Stokes includes
      11             : #include "NSSpecificTotalEnthalpyAux.h"
      12             : #include "NS.h"
      13             : 
      14             : registerMooseObject("NavierStokesApp", NSSpecificTotalEnthalpyAux);
      15             : 
      16             : InputParameters
      17          41 : NSSpecificTotalEnthalpyAux::validParams()
      18             : {
      19          41 :   InputParameters params = AuxKernel::validParams();
      20             : 
      21          41 :   params.addClassDescription("Nodal auxiliary variable, for computing enthalpy at the nodes.");
      22             :   // Mark variables as required
      23          41 :   params.addRequiredCoupledVar(NS::density, "density");
      24          41 :   params.addRequiredCoupledVar(NS::total_energy_density, "total energy");
      25          41 :   params.addRequiredCoupledVar(NS::pressure, "pressure");
      26             : 
      27          41 :   return params;
      28           0 : }
      29             : 
      30          22 : NSSpecificTotalEnthalpyAux::NSSpecificTotalEnthalpyAux(const InputParameters & parameters)
      31             :   : AuxKernel(parameters),
      32          44 :     _rho(coupledValue(NS::density)),
      33          22 :     _rho_et(coupledValue(NS::total_energy_density)),
      34          44 :     _pressure(coupledValue(NS::pressure))
      35             : {
      36          22 : }
      37             : 
      38             : Real
      39      422100 : NSSpecificTotalEnthalpyAux::computeValue()
      40             : {
      41             :   // H = (rho*E + P) / rho
      42      422100 :   return (_rho_et[_qp] + _pressure[_qp]) / _rho[_qp];
      43             : }

Generated by: LCOV version 1.14