www.mooseframework.org
SaturationTemperatureAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
12 
13 registerMooseObject("FluidPropertiesApp", SaturationTemperatureAux);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<AuxKernel>();
20 
21  params.addClassDescription(
22  "Computes saturation temperature from pressure and 2-phase fluid properties object");
23 
24  params.addRequiredCoupledVar("p", "Pressure at which to evaluate saturation temperature");
25  params.addRequiredParam<UserObjectName>("fp_2phase",
26  "The name of the user object with fluid properties");
27 
28  return params;
29 }
30 
31 SaturationTemperatureAux::SaturationTemperatureAux(const InputParameters & parameters)
32  : AuxKernel(parameters),
33 
34  _p(coupledValue("p")),
35  _fp_2phase(getUserObject<TwoPhaseFluidProperties>("fp_2phase"))
36 {
37 }
38 
39 Real
41 {
42  return _fp_2phase.T_sat(_p[_qp]);
43 }
validParams< SaturationTemperatureAux >
InputParameters validParams< SaturationTemperatureAux >()
Definition: SaturationTemperatureAux.C:17
TwoPhaseFluidProperties.h
registerMooseObject
registerMooseObject("FluidPropertiesApp", SaturationTemperatureAux)
SaturationTemperatureAux.h
SaturationTemperatureAux::computeValue
virtual Real computeValue()
Definition: SaturationTemperatureAux.C:40
TwoPhaseFluidProperties
Base class for fluid properties used with two-phase flow.
Definition: TwoPhaseFluidProperties.h:23
SaturationTemperatureAux
Computes saturation temperature from pressure and 2-phase fluid properties object.
Definition: SaturationTemperatureAux.h:23
SaturationTemperatureAux::SaturationTemperatureAux
SaturationTemperatureAux(const InputParameters &parameters)
Definition: SaturationTemperatureAux.C:31
TwoPhaseFluidProperties::T_sat
virtual Real T_sat(Real p) const =0
Computes the saturation temperature at a pressure.
SaturationTemperatureAux::_p
const VariableValue & _p
Pressure at which to evaluate saturation temperature.
Definition: SaturationTemperatureAux.h:32
SaturationTemperatureAux::_fp_2phase
const TwoPhaseFluidProperties & _fp_2phase
2-phase fluid properties object
Definition: SaturationTemperatureAux.h:34