www.mooseframework.org
SpecificInternalEnergyAux.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 
11 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<AuxKernel>();
19  params.addRequiredCoupledVar("rho", "Density");
20  params.addRequiredCoupledVar("rho_u", "Momentum x-component");
21  params.addCoupledVar("rho_v", 0, "Momentum y-component");
22  params.addCoupledVar("rho_w", 0, "Momentum z-component");
23  params.addRequiredCoupledVar("rho_et", "Total energy");
24  return params;
25 }
26 
27 SpecificInternalEnergyAux::SpecificInternalEnergyAux(const InputParameters & parameters)
28  : AuxKernel(parameters),
29  _rho(coupledValue("rho")),
30  _rho_u(coupledValue("rho_u")),
31  _rho_v(coupledValue("rho_v")),
32  _rho_w(coupledValue("rho_w")),
33  _rho_et(coupledValue("rho_et"))
34 {
35 }
36 
37 Real
39 {
40  RealVectorValue rhou_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
41  return (_rho_et[_qp] - 0.5 * rhou_vec * rhou_vec / _rho[_qp]) / _rho[_qp];
42 }
SpecificInternalEnergyAux
Computes specific internal energy.
Definition: SpecificInternalEnergyAux.h:22
SpecificInternalEnergyAux::SpecificInternalEnergyAux
SpecificInternalEnergyAux(const InputParameters &parameters)
Definition: SpecificInternalEnergyAux.C:27
SpecificInternalEnergyAux.h
validParams< SpecificInternalEnergyAux >
InputParameters validParams< SpecificInternalEnergyAux >()
Definition: SpecificInternalEnergyAux.C:16
SpecificInternalEnergyAux::_rho_v
const VariableValue & _rho_v
Definition: SpecificInternalEnergyAux.h:32
SpecificInternalEnergyAux::_rho_w
const VariableValue & _rho_w
Definition: SpecificInternalEnergyAux.h:33
SpecificInternalEnergyAux::_rho_et
const VariableValue & _rho_et
Definition: SpecificInternalEnergyAux.h:34
registerMooseObject
registerMooseObject("NavierStokesApp", SpecificInternalEnergyAux)
SpecificInternalEnergyAux::computeValue
virtual Real computeValue()
Definition: SpecificInternalEnergyAux.C:38
SpecificInternalEnergyAux::_rho_u
const VariableValue & _rho_u
Definition: SpecificInternalEnergyAux.h:31
SpecificInternalEnergyAux::_rho
const VariableValue & _rho
Definition: SpecificInternalEnergyAux.h:30