https://mooseframework.inl.gov
EnthalpyAux.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 #include "NS.h"
12 
13 registerMooseObject("NavierStokesApp", EnthalpyAux);
14 
17 {
19  params.addRequiredCoupledVar("rho", "Density");
20  params.addRequiredCoupledVar("rho_et", "Total energy");
21  params.addCoupledVar(NS::pressure, "Coupled value pressure");
22  params.addClassDescription("This AuxKernel computes the specific enthalpy of the fluid"
23  "from the total energy and the pressure.");
24 
25  return params;
26 }
27 
29  : AuxKernel(parameters),
30  _rho(coupledValue("rho")),
31  _rho_et(coupledValue("rho_et")),
32  _pressure(coupledValue(NS::pressure))
33 {
34 }
35 
36 Real
38 {
39  return (_rho_et[_qp] + _pressure[_qp]) / _rho[_qp];
40 }
const VariableValue & _pressure
Definition: EnthalpyAux.h:34
registerMooseObject("NavierStokesApp", EnthalpyAux)
const VariableValue & _rho_et
Definition: EnthalpyAux.h:33
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static const std::string pressure
Definition: NS.h:56
virtual Real computeValue()
Definition: EnthalpyAux.C:37
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
Nodal auxiliary variable for enthalpy,.
Definition: EnthalpyAux.h:22
const VariableValue & _rho
Definition: EnthalpyAux.h:32
static InputParameters validParams()
Definition: EnthalpyAux.C:16
EnthalpyAux(const InputParameters &parameters)
Definition: EnthalpyAux.C:28