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