www.mooseframework.org
NSSUPGBase.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 // Navier-Stokes includes
9 #include "NSSUPGBase.h"
10 #include "NS.h"
11 
12 // MOOSE includes
13 #include "MooseMesh.h"
14 
15 template <>
16 InputParameters
18 {
19  InputParameters params = validParams<NSKernel>();
20  params.addClassDescription("This class acts as a base class for stabilization kernels.");
21  params.addRequiredCoupledVar(NS::temperature, "temperature");
22  params.addRequiredCoupledVar(NS::enthalpy, "total enthalpy");
23  return params;
24 }
25 
26 NSSUPGBase::NSSUPGBase(const InputParameters & parameters)
27  : NSKernel(parameters),
28 
29  // Material properties
30  _viscous_stress_tensor(getMaterialProperty<RealTensorValue>("viscous_stress_tensor")),
31  _dynamic_viscosity(getMaterialProperty<Real>("dynamic_viscosity")),
32  _thermal_conductivity(getMaterialProperty<Real>("thermal_conductivity")),
33 
34  // SUPG-related material properties
35  _hsupg(getMaterialProperty<Real>("hsupg")),
36  _tauc(getMaterialProperty<Real>("tauc")),
37  _taum(getMaterialProperty<Real>("taum")),
38  _taue(getMaterialProperty<Real>("taue")),
39  _strong_residuals(getMaterialProperty<std::vector<Real>>("strong_residuals")),
40 
41  // Momentum equation inviscid flux matrices
42  _calA(getMaterialProperty<std::vector<RealTensorValue>>("calA")),
43 
44  // "velocity column" matrices
45  _calC(getMaterialProperty<std::vector<RealTensorValue>>("calC")),
46 
47  // energy inviscid flux matrices
48  _calE(getMaterialProperty<std::vector<std::vector<RealTensorValue>>>("calE")),
49 
50  // Old coupled variable values
51  // _rho_old(coupledValueOld(NS::density)),
52  // _rho_u_old(coupledValueOld(NS::momentum_x)),
53  // _rho_v_old(_mesh.dimension() >= 2 ? coupledValueOld(NS::momentum_y) : _zero),
54  // _rho_w_old(_mesh.dimension() == 3 ? coupledValueOld(NS::momentum_z) : _zero),
55  // _rho_E_old(coupledValueOld(NS::total_energy)),
56 
57  // Time derivative derivatives (no, that's not a typo). You can
58  // just think of these as 1/dt for simplicity, they usually are...
59  _d_rhodot_du(coupledDotDu(NS::density)),
60  _d_rhoudot_du(coupledDotDu(NS::momentum_x)),
61  _d_rhovdot_du(_mesh.dimension() >= 2 ? coupledDotDu(NS::momentum_y) : _zero),
62  _d_rhowdot_du(_mesh.dimension() == 3 ? coupledDotDu(NS::momentum_z) : _zero),
63  _d_rhoEdot_du(coupledDotDu(NS::total_energy)),
64 
65  // Coupled aux variables
66  _temperature(coupledValue(NS::temperature)),
67  _enthalpy(coupledValue("enthalpy"))
68 {
69 }
Definition: NS.h:13
const std::string momentum_x
Definition: NS.h:16
This class couples together all the variables for the compressible Navier-Stokes equations to allow t...
Definition: NSKernel.h:27
const std::string density
Definition: NS.h:15
const std::string temperature
Definition: NS.h:25
InputParameters validParams< NSKernel >()
Definition: NSKernel.C:20
const std::string enthalpy
Definition: NS.h:26
InputParameters validParams< NSSUPGBase >()
Definition: NSSUPGBase.C:17
const std::string momentum_y
Definition: NS.h:17
NSSUPGBase(const InputParameters &parameters)
Definition: NSSUPGBase.C:26
const std::string total_energy
Definition: NS.h:19
const std::string momentum_z
Definition: NS.h:18