www.mooseframework.org
SpecificEnthalpyAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "SpecificEnthalpyAux.h"
10 
11 template <>
12 InputParameters
14 {
15  InputParameters params = validParams<AuxKernel>();
16  params.addRequiredCoupledVar("p", "Pressure");
17  params.addRequiredCoupledVar("T", "Temperature");
18  params.addRequiredParam<UserObjectName>("fp", "The name of the user object for fluid properties");
19  params.addClassDescription("Computes specific enthalpy from pressure and temperature");
20  return params;
21 }
22 
23 SpecificEnthalpyAux::SpecificEnthalpyAux(const InputParameters & parameters)
24  : AuxKernel(parameters),
25  _pressure(coupledValue("p")),
26  _temperature(coupledValue("T")),
27  _fp(getUserObject<SinglePhaseFluidProperties>("fp"))
28 {
29 }
30 
31 Real
33 {
34  return _fp.h(_pressure[_qp], _temperature[_qp]);
35 }
const VariableValue & _temperature
const VariableValue & _pressure
const SinglePhaseFluidProperties & _fp
virtual Real computeValue() override
Common class for single phase fluid properties.
InputParameters validParams< SpecificEnthalpyAux >()
virtual Real h(Real p, Real T) const =0
Computes specific enthalpy.
SpecificEnthalpyAux(const InputParameters &parameters)