LCOV - code coverage report
Current view: top level - src/auxkernels - THMSpecificInternalEnergyAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #32971 (54bef8) with base c6cf66 Lines: 14 15 93.3 %
Date: 2026-05-29 20:41:18 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 "THMSpecificInternalEnergyAux.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", THMSpecificInternalEnergyAux);
      13             : 
      14             : InputParameters
      15        4419 : THMSpecificInternalEnergyAux::validParams()
      16             : {
      17        4419 :   InputParameters params = AuxKernel::validParams();
      18        8838 :   params.addRequiredCoupledVar("rhoA", "Conserved density");
      19        8838 :   params.addRequiredCoupledVar("rhouA", "Conserved momentum");
      20        8838 :   params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
      21        4419 :   params.addClassDescription("Computed the specific internal energy.");
      22        4419 :   return params;
      23           0 : }
      24             : 
      25        2353 : THMSpecificInternalEnergyAux::THMSpecificInternalEnergyAux(const InputParameters & parameters)
      26             :   : AuxKernel(parameters),
      27        2353 :     _rho(coupledValue("rhoA")),
      28        2353 :     _rhou(coupledValue("rhouA")),
      29        4706 :     _rhoE(coupledValue("rhoEA"))
      30             : {
      31        2353 : }
      32             : 
      33             : Real
      34      638006 : THMSpecificInternalEnergyAux::computeValue()
      35             : {
      36      638006 :   return (_rhoE[_qp] - 0.5 * _rhou[_qp] * _rhou[_qp] / _rho[_qp]) / _rho[_qp];
      37             : }

Generated by: LCOV version 1.14