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