www.mooseframework.org
EnthalpyAux.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 "EnthalpyAux.h"
11 
12 registerMooseObject("NavierStokesApp", EnthalpyAux);
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<AuxKernel>();
19  params.addRequiredCoupledVar("rho", "Density");
20  params.addRequiredCoupledVar("rho_et", "Total energy");
21  params.addCoupledVar("pressure", "Coupled value pressure");
22 
23  return params;
24 }
25 
26 EnthalpyAux::EnthalpyAux(const InputParameters & parameters)
27  : AuxKernel(parameters),
28  _rho(coupledValue("rho")),
29  _rho_et(coupledValue("rho_et")),
30  _pressure(coupledValue("pressure"))
31 {
32 }
33 
34 Real
36 {
37  return (_rho_et[_qp] + _pressure[_qp]) / _rho[_qp];
38 }
EnthalpyAux::_pressure
const VariableValue & _pressure
Definition: EnthalpyAux.h:36
registerMooseObject
registerMooseObject("NavierStokesApp", EnthalpyAux)
EnthalpyAux::_rho_et
const VariableValue & _rho_et
Definition: EnthalpyAux.h:35
EnthalpyAux.h
EnthalpyAux::computeValue
virtual Real computeValue()
Definition: EnthalpyAux.C:35
EnthalpyAux
Nodal auxiliary variable for enthalpy,.
Definition: EnthalpyAux.h:26
validParams< EnthalpyAux >
InputParameters validParams< EnthalpyAux >()
Definition: EnthalpyAux.C:16
EnthalpyAux::_rho
const VariableValue & _rho
Definition: EnthalpyAux.h:34
EnthalpyAux::EnthalpyAux
EnthalpyAux(const InputParameters &parameters)
Definition: EnthalpyAux.C:26