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 "EnthalpyAux.h" 11 : #include "NS.h" 12 : 13 : registerMooseObject("NavierStokesApp", EnthalpyAux); 14 : 15 : InputParameters 16 0 : EnthalpyAux::validParams() 17 : { 18 0 : InputParameters params = AuxKernel::validParams(); 19 0 : params.addRequiredCoupledVar("rho", "Density"); 20 0 : params.addRequiredCoupledVar("rho_et", "Total energy"); 21 0 : params.addCoupledVar(NS::pressure, "Coupled value pressure"); 22 0 : params.addClassDescription("This AuxKernel computes the specific enthalpy of the fluid" 23 : "from the total energy and the pressure."); 24 : 25 0 : return params; 26 0 : } 27 : 28 0 : EnthalpyAux::EnthalpyAux(const InputParameters & parameters) 29 : : AuxKernel(parameters), 30 0 : _rho(coupledValue("rho")), 31 0 : _rho_et(coupledValue("rho_et")), 32 0 : _pressure(coupledValue(NS::pressure)) 33 : { 34 0 : } 35 : 36 : Real 37 0 : EnthalpyAux::computeValue() 38 : { 39 0 : return (_rho_et[_qp] + _pressure[_qp]) / _rho[_qp]; 40 : }