https://mooseframework.inl.gov
SpecificTotalEnthalpyAux.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 
11 
12 registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyAux);
13 
16 {
18  params.addRequiredCoupledVar("rhoA", "Conserved density");
19  params.addRequiredCoupledVar("rhoEA", "Conserved total energy");
20  params.addRequiredCoupledVar("p", "Pressure");
21  params.addRequiredCoupledVar("A", "Cross-sectional area");
22  params.addCoupledVar("alpha", 1., "Volume fraction");
23  params.addClassDescription("Compute the specific total enthalpy");
24 
25  return params;
26 }
27 
29  : AuxKernel(parameters),
30  _rhoA(coupledValue("rhoA")),
31  _rhoEA(coupledValue("rhoEA")),
32  _pressure(coupledValue("p")),
33  _area(coupledValue("A")),
34  _alpha(coupledValue("alpha"))
35 {
36 }
37 
38 Real
40 {
41  return (_rhoEA[_qp] + _alpha[_qp] * _pressure[_qp] * _area[_qp]) / _rhoA[_qp];
42 }
SpecificTotalEnthalpyAux(const InputParameters &parameters)
static InputParameters validParams()
Nodal auxiliary variable for specific total enthalpy.
const VariableValue & _pressure
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
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
registerMooseObject("ThermalHydraulicsApp", SpecificTotalEnthalpyAux)