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 "SpecificEnthalpyFromPressureTemperatureIC.h" 11 : #include "SinglePhaseFluidProperties.h" 12 : 13 : registerMooseObject("FluidPropertiesApp", SpecificEnthalpyFromPressureTemperatureIC); 14 : 15 : InputParameters 16 19 : SpecificEnthalpyFromPressureTemperatureIC::validParams() 17 : { 18 19 : InputParameters params = InitialCondition::validParams(); 19 38 : params.addRequiredParam<UserObjectName>("fp", "The name of fluid properties user object."); 20 38 : params.addRequiredCoupledVar("p", "The pressure [Pa]"); 21 38 : params.addRequiredCoupledVar("T", "The temperature [K]"); 22 19 : params.addClassDescription("Computes the specific enthalpy from pressure and temperature."); 23 19 : return params; 24 0 : } 25 : 26 10 : SpecificEnthalpyFromPressureTemperatureIC::SpecificEnthalpyFromPressureTemperatureIC( 27 10 : const InputParameters & parameters) 28 : : InitialCondition(parameters), 29 10 : _spfp(getUserObject<SinglePhaseFluidProperties>("fp")), 30 10 : _p(coupledValue("p")), 31 20 : _T(coupledValue("T")) 32 : { 33 10 : } 34 : 35 : Real 36 12 : SpecificEnthalpyFromPressureTemperatureIC::value(const Point & /*p*/) 37 : { 38 12 : return _spfp.h_from_p_T(_p[_qp], _T[_qp]); 39 : }