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