https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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");
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
40Real
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
47Real
registerMooseObject("NavierStokesApp", TotalEnergyConvectiveFlux)
void addRequiredCoupledVar(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)
void addCoupledVar(const std::string &name, const std::string &doc_string)
unsigned int _qp
unsigned int _i
static InputParameters validParams()
const VariableTestGradient & _grad_test
A kernel for computing total energy convective flux.
const VariableValue & _rho_u
Momentum.
TotalEnergyConvectiveFlux(const InputParameters &parameters)
const VariableValue & _enthalpy
Enthalpy.
static InputParameters validParams()