www.mooseframework.org
NSEnthalpyAux.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 // Navier-Stokes includes
9 #include "NSEnthalpyAux.h"
10 #include "NS.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<AuxKernel>();
17 
18  params.addClassDescription("Nodal auxiliary variable, for computing enthalpy at the nodes.");
19  // Mark variables as required
20  params.addRequiredCoupledVar(NS::density, "density");
21  params.addRequiredCoupledVar(NS::total_energy, "total energy");
22  params.addRequiredCoupledVar(NS::pressure, "pressure");
23 
24  return params;
25 }
26 
27 NSEnthalpyAux::NSEnthalpyAux(const InputParameters & parameters)
28  : AuxKernel(parameters),
29  _rho(coupledValue(NS::density)),
30  _rhoE(coupledValue(NS::total_energy)),
31  _pressure(coupledValue(NS::pressure))
32 {
33 }
34 
35 Real
37 {
38  // H = (rho*E + P) / rho
39  return (_rhoE[_qp] + _pressure[_qp]) / _rho[_qp];
40 }
Definition: NS.h:13
NSEnthalpyAux(const InputParameters &parameters)
Definition: NSEnthalpyAux.C:27
const VariableValue & _rhoE
Definition: NSEnthalpyAux.h:38
const std::string density
Definition: NS.h:15
const VariableValue & _rho
Definition: NSEnthalpyAux.h:37
const VariableValue & _pressure
Definition: NSEnthalpyAux.h:39
const std::string pressure
Definition: NS.h:24
virtual Real computeValue()
Definition: NSEnthalpyAux.C:36
const std::string total_energy
Definition: NS.h:19
InputParameters validParams< NSEnthalpyAux >()
Definition: NSEnthalpyAux.C:14