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