www.mooseframework.org
TotalEnergyConvectiveFlux.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 pars = validParams<Kernel>();
19 
20  pars.addRequiredCoupledVar("rho", "density");
21  pars.addRequiredCoupledVar("rho_u", "rho*u");
22  pars.addCoupledVar("rho_v", "rho*v");
23  pars.addCoupledVar("rho_w", "rho*w");
24  pars.addRequiredCoupledVar("enthalpy", "Enthalpy");
25 
26  return pars;
27 }
28 
29 TotalEnergyConvectiveFlux::TotalEnergyConvectiveFlux(const InputParameters & parameters)
30  : Kernel(parameters),
31  _rho(coupledValue("rho")),
32  _rho_u(coupledValue("rho_u")),
33  _rho_v(isCoupled("rho_v") ? coupledValue("rho_v") : _zero),
34  _rho_w(isCoupled("rho_w") ? coupledValue("rho_w") : _zero),
35  _enthalpy(coupledValue("enthalpy"))
36 {
37 }
38 
39 Real
41 {
42  RealVectorValue rho_u_vec(_rho_u[_qp], _rho_v[_qp], _rho_w[_qp]);
43  return -_enthalpy[_qp] * (rho_u_vec * _grad_test[_i][_qp]);
44 }
45 
46 Real
48 {
49  return 0.;
50 }
TotalEnergyConvectiveFlux::computeQpJacobian
virtual Real computeQpJacobian()
Definition: TotalEnergyConvectiveFlux.C:47
TotalEnergyConvectiveFlux::_rho_u
const VariableValue & _rho_u
Momentum.
Definition: TotalEnergyConvectiveFlux.h:37
TotalEnergyConvectiveFlux
A kernel for computing total energy convective flux.
Definition: TotalEnergyConvectiveFlux.h:25
validParams< TotalEnergyConvectiveFlux >
InputParameters validParams< TotalEnergyConvectiveFlux >()
Definition: TotalEnergyConvectiveFlux.C:16
TotalEnergyConvectiveFlux::TotalEnergyConvectiveFlux
TotalEnergyConvectiveFlux(const InputParameters &parameters)
Definition: TotalEnergyConvectiveFlux.C:29
TotalEnergyConvectiveFlux::computeQpResidual
virtual Real computeQpResidual()
Definition: TotalEnergyConvectiveFlux.C:40
TotalEnergyConvectiveFlux::_rho_v
const VariableValue & _rho_v
Definition: TotalEnergyConvectiveFlux.h:38
registerMooseObject
registerMooseObject("NavierStokesApp", TotalEnergyConvectiveFlux)
TotalEnergyConvectiveFlux.h
TotalEnergyConvectiveFlux::_rho_w
const VariableValue & _rho_w
Definition: TotalEnergyConvectiveFlux.h:39
TotalEnergyConvectiveFlux::_enthalpy
const VariableValue & _enthalpy
Enthalpy.
Definition: TotalEnergyConvectiveFlux.h:41