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 "SpecificEnthalpyAux.h" 11 : #include "SinglePhaseFluidProperties.h" 12 : 13 : registerMooseObject("FluidPropertiesApp", SpecificEnthalpyAux); 14 : 15 : InputParameters 16 41 : SpecificEnthalpyAux::validParams() 17 : { 18 41 : InputParameters params = AuxKernel::validParams(); 19 82 : params.addRequiredCoupledVar("p", "Pressure"); 20 82 : params.addRequiredCoupledVar("T", "Temperature"); 21 82 : params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties"); 22 41 : params.addClassDescription("Computes specific enthalpy from pressure and temperature"); 23 41 : return params; 24 0 : } 25 : 26 22 : SpecificEnthalpyAux::SpecificEnthalpyAux(const InputParameters & parameters) 27 : : AuxKernel(parameters), 28 22 : _pressure(coupledValue("p")), 29 22 : _temperature(coupledValue("T")), 30 44 : _fp(getUserObject<SinglePhaseFluidProperties>("fp")) 31 : { 32 22 : } 33 : 34 : Real 35 135 : SpecificEnthalpyAux::computeValue() 36 : { 37 135 : return _fp.h_from_p_T(_pressure[_qp], _temperature[_qp]); 38 : }