LCOV - code coverage report
Current view: top level - src/ics - SpecificInternalEnergyIC.C (source / functions) Hit Total Coverage
Test: idaholab/moose thermal_hydraulics: #31761 (28487c) with base 701993 Lines: 14 15 93.3 %
Date: 2025-11-11 13:57:23 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 "SpecificInternalEnergyIC.h"
      11             : 
      12             : registerMooseObject("ThermalHydraulicsApp", SpecificInternalEnergyIC);
      13             : 
      14             : InputParameters
      15        8918 : SpecificInternalEnergyIC::validParams()
      16             : {
      17        8918 :   InputParameters params = InitialCondition::validParams();
      18       17836 :   params.addRequiredCoupledVar("rhoA", "Conserved density");
      19       17836 :   params.addRequiredCoupledVar("rhouA", "Conserved momentum");
      20       17836 :   params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
      21        8918 :   params.addClassDescription(
      22             :       "Sets the initial condition for the specific internal energy of a phase");
      23        8918 :   return params;
      24           0 : }
      25             : 
      26        4863 : SpecificInternalEnergyIC::SpecificInternalEnergyIC(const InputParameters & parameters)
      27             :   : InitialCondition(parameters),
      28        4863 :     _rho(coupledValue("rhoA")),
      29        4863 :     _rhou(coupledValue("rhouA")),
      30        9726 :     _rhoE(coupledValue("rhoEA"))
      31             : {
      32        4863 : }
      33             : 
      34             : Real
      35       62820 : SpecificInternalEnergyIC::value(const Point & /*p*/)
      36             : {
      37       62820 :   return (_rhoE[_qp] - 0.5 * _rhou[_qp] * _rhou[_qp] / _rho[_qp]) / _rho[_qp];
      38             : }

Generated by: LCOV version 1.14