https://mooseframework.inl.gov
TotalEnergyConvectiveFlux.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 
19  params.addRequiredCoupledVar("rho", "density");
20  params.addRequiredCoupledVar("rho_u", "rho*u");
21  params.addCoupledVar("rho_v", "rho*v");
22  params.addCoupledVar("rho_w", "rho*w");
23  params.addRequiredCoupledVar("enthalpy", "Enthalpy");
24  params.addClassDescription(
25  "Implements the advection term for the Navier Stokes energy equation.");
26 
27  return params;
28 }
29 
31  : Kernel(parameters),
32  _rho(coupledValue("rho")),
33  _rho_u(coupledValue("rho_u")),
34  _rho_v(isCoupled("rho_v") ? coupledValue("rho_v") : _zero),
35  _rho_w(isCoupled("rho_w") ? coupledValue("rho_w") : _zero),
36  _enthalpy(coupledValue("enthalpy"))
37 {
38 }
39 
40 Real
42 {
43  RealVectorValue rho_u_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
44  return -_enthalpy[_qp] * (rho_u_vec * _grad_test[_i][_qp]);
45 }
46 
47 Real
49 {
50  return 0.;
51 }
static InputParameters validParams()
TotalEnergyConvectiveFlux(const InputParameters &parameters)
unsigned int _i
void addCoupledVar(const std::string &name, const std::string &doc_string)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
registerMooseObject("NavierStokesApp", TotalEnergyConvectiveFlux)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const VariableTestGradient & _grad_test
void addClassDescription(const std::string &doc_string)
static InputParameters validParams()
A kernel for computing total energy convective flux.
const VariableValue & _rho_u
Momentum.
const VariableValue & _enthalpy
Enthalpy.
unsigned int _qp