https://mooseframework.inl.gov
SpecificInternalEnergyAux.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 
13 
16 {
18  params.addRequiredCoupledVar("rho", "Density");
19  params.addRequiredCoupledVar("rho_u", "Momentum x-component");
20  params.addCoupledVar("rho_v", 0, "Momentum y-component");
21  params.addCoupledVar("rho_w", 0, "Momentum z-component");
22  params.addRequiredCoupledVar("rho_et", "Total energy");
23  params.addClassDescription("This AuxKernel computes the specific internal energy based "
24  "from the total and the kinetic energy.");
25 
26  return params;
27 }
28 
30  : AuxKernel(parameters),
31  _rho(coupledValue("rho")),
32  _rho_u(coupledValue("rho_u")),
33  _rho_v(coupledValue("rho_v")),
34  _rho_w(coupledValue("rho_w")),
35  _rho_et(coupledValue("rho_et"))
36 {
37 }
38 
39 Real
41 {
42  RealVectorValue rhou_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
43  return (_rho_et[_qp] - 0.5 * rhou_vec * rhou_vec / _rho[_qp]) / _rho[_qp];
44 }
registerMooseObject("NavierStokesApp", SpecificInternalEnergyAux)
Computes specific internal energy.
SpecificInternalEnergyAux(const InputParameters &parameters)
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()
static InputParameters validParams()