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 "SaturationTemperatureAux.h" 11 : #include "TwoPhaseFluidProperties.h" 12 : 13 : registerMooseObject("FluidPropertiesApp", SaturationTemperatureAux); 14 : 15 : InputParameters 16 46 : SaturationTemperatureAux::validParams() 17 : { 18 46 : InputParameters params = AuxKernel::validParams(); 19 : 20 46 : params.addClassDescription( 21 : "Computes saturation temperature from pressure and 2-phase fluid properties object"); 22 : 23 92 : params.addRequiredCoupledVar("p", "Pressure at which to evaluate saturation temperature"); 24 92 : params.addRequiredParam<UserObjectName>("fp_2phase", 25 : "The name of the user object with fluid properties"); 26 : 27 46 : return params; 28 0 : } 29 : 30 25 : SaturationTemperatureAux::SaturationTemperatureAux(const InputParameters & parameters) 31 : : AuxKernel(parameters), 32 : 33 25 : _p(coupledValue("p")), 34 50 : _fp_2phase(getUserObject<TwoPhaseFluidProperties>("fp_2phase")) 35 : { 36 25 : } 37 : 38 : Real 39 21 : SaturationTemperatureAux::computeValue() 40 : { 41 21 : return _fp_2phase.T_sat(_p[_qp]); 42 : }