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 : }