www.mooseframework.org
SpecificEnthalpyAux.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 
10 #include "SpecificEnthalpyAux.h"
12 
13 registerMooseObject("FluidPropertiesApp", SpecificEnthalpyAux);
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<AuxKernel>();
20  params.addRequiredCoupledVar("p", "Pressure");
21  params.addRequiredCoupledVar("T", "Temperature");
22  params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
23  params.addClassDescription("Computes specific enthalpy from pressure and temperature");
24  return params;
25 }
26 
27 SpecificEnthalpyAux::SpecificEnthalpyAux(const InputParameters & parameters)
28  : AuxKernel(parameters),
29  _pressure(coupledValue("p")),
30  _temperature(coupledValue("T")),
31  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
32 {
33 }
34 
35 Real
37 {
38  return _fp.h_from_p_T(_pressure[_qp], _temperature[_qp]);
39 }
registerMooseObject
registerMooseObject("FluidPropertiesApp", SpecificEnthalpyAux)
SpecificEnthalpyAux::SpecificEnthalpyAux
SpecificEnthalpyAux(const InputParameters &parameters)
Definition: SpecificEnthalpyAux.C:27
SinglePhaseFluidProperties
Common class for single phase fluid properties.
Definition: SinglePhaseFluidProperties.h:89
SpecificEnthalpyAux
Computes specific enthalpy from pressure and temperature.
Definition: SpecificEnthalpyAux.h:23
SinglePhaseFluidProperties.h
SpecificEnthalpyAux.h
SpecificEnthalpyAux::_pressure
const VariableValue & _pressure
Definition: SpecificEnthalpyAux.h:31
SpecificEnthalpyAux::computeValue
virtual Real computeValue() override
Definition: SpecificEnthalpyAux.C:36
SpecificEnthalpyAux::_fp
const SinglePhaseFluidProperties & _fp
Definition: SpecificEnthalpyAux.h:34
validParams< SpecificEnthalpyAux >
InputParameters validParams< SpecificEnthalpyAux >()
Definition: SpecificEnthalpyAux.C:17
SpecificEnthalpyAux::_temperature
const VariableValue & _temperature
Definition: SpecificEnthalpyAux.h:32