LCOV - code coverage report
Current view: top level - src/auxkernels - SpecificInternalEnergyAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 0 20 0.0 %
Date: 2025-08-14 10:14:56 Functions: 0 3 0.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 "SpecificInternalEnergyAux.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", SpecificInternalEnergyAux);
      13             : 
      14             : InputParameters
      15           0 : SpecificInternalEnergyAux::validParams()
      16             : {
      17           0 :   InputParameters params = AuxKernel::validParams();
      18           0 :   params.addRequiredCoupledVar("rho", "Density");
      19           0 :   params.addRequiredCoupledVar("rho_u", "Momentum x-component");
      20           0 :   params.addCoupledVar("rho_v", 0, "Momentum y-component");
      21           0 :   params.addCoupledVar("rho_w", 0, "Momentum z-component");
      22           0 :   params.addRequiredCoupledVar("rho_et", "Total energy");
      23           0 :   params.addClassDescription("This AuxKernel computes the specific internal energy based "
      24             :                              "from the total and the kinetic energy.");
      25             : 
      26           0 :   return params;
      27           0 : }
      28             : 
      29           0 : SpecificInternalEnergyAux::SpecificInternalEnergyAux(const InputParameters & parameters)
      30             :   : AuxKernel(parameters),
      31           0 :     _rho(coupledValue("rho")),
      32           0 :     _rho_u(coupledValue("rho_u")),
      33           0 :     _rho_v(coupledValue("rho_v")),
      34           0 :     _rho_w(coupledValue("rho_w")),
      35           0 :     _rho_et(coupledValue("rho_et"))
      36             : {
      37           0 : }
      38             : 
      39             : Real
      40           0 : SpecificInternalEnergyAux::computeValue()
      41             : {
      42           0 :   RealVectorValue rhou_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
      43           0 :   return (_rho_et[_qp] - 0.5 * rhou_vec * rhou_vec / _rho[_qp]) / _rho[_qp];
      44             : }

Generated by: LCOV version 1.14