www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
NSSUPGBase Class Reference

This class acts as a base class for stabilization kernels. More...

#include <NSSUPGBase.h>

Inheritance diagram for NSSUPGBase:
[legend]

Public Member Functions

 NSSUPGBase (const InputParameters &parameters)
 

Protected Member Functions

bool isNSVariable (unsigned var)
 Helper functions for mapping Moose variable numberings into the "canonical" numbering for the compressible NS equations. More...
 
unsigned mapVarNumber (unsigned var)
 

Protected Attributes

const MaterialProperty< RealTensorValue > & _viscous_stress_tensor
 
const MaterialProperty< Real > & _dynamic_viscosity
 
const MaterialProperty< Real > & _thermal_conductivity
 
const MaterialProperty< Real > & _hsupg
 
const MaterialProperty< Real > & _tauc
 
const MaterialProperty< Real > & _taum
 
const MaterialProperty< Real > & _taue
 
const MaterialProperty< std::vector< Real > > & _strong_residuals
 
const MaterialProperty< std::vector< RealTensorValue > > & _calA
 
const MaterialProperty< std::vector< RealTensorValue > > & _calC
 
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _calE
 
const VariableValue & _d_rhodot_du
 
const VariableValue & _d_rhoudot_du
 
const VariableValue & _d_rhovdot_du
 
const VariableValue & _d_rhowdot_du
 
const VariableValue & _d_rhoEdot_du
 
const VariableValue & _temperature
 
const VariableValue & _enthalpy
 
const VariableValue & _u_vel
 
const VariableValue & _v_vel
 
const VariableValue & _w_vel
 
const VariableValue & _rho
 
const VariableValue & _rho_u
 
const VariableValue & _rho_v
 
const VariableValue & _rho_w
 
const VariableValue & _rho_E
 
const VariableGradient & _grad_rho
 
const VariableGradient & _grad_rho_u
 
const VariableGradient & _grad_rho_v
 
const VariableGradient & _grad_rho_w
 
const VariableGradient & _grad_rho_E
 
unsigned _rho_var_number
 
unsigned _rhou_var_number
 
unsigned _rhov_var_number
 
unsigned _rhow_var_number
 
unsigned _rhoE_var_number
 
const IdealGasFluidProperties_fp
 

Detailed Description

This class acts as a base class for stabilization kernels.

This is useful because the stabilization kernels for different equations share a lot of information...

Definition at line 26 of file NSSUPGBase.h.

Constructor & Destructor Documentation

◆ NSSUPGBase()

NSSUPGBase::NSSUPGBase ( const InputParameters &  parameters)

Definition at line 28 of file NSSUPGBase.C.

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 }
Definition: NS.h:15
const std::string momentum_x
Definition: NS.h:18
const VariableValue & _temperature
Definition: NSSUPGBase.h:69
const MaterialProperty< Real > & _dynamic_viscosity
Definition: NSSUPGBase.h:34
const VariableValue & _d_rhodot_du
Definition: NSSUPGBase.h:62
const std::string density
Definition: NS.h:17
const VariableValue & _d_rhoudot_du
Definition: NSSUPGBase.h:63
const MaterialProperty< std::vector< RealTensorValue > > & _calC
Definition: NSSUPGBase.h:48
const std::string temperature
Definition: NS.h:27
const VariableValue & _d_rhowdot_du
Definition: NSSUPGBase.h:65
const MaterialProperty< Real > & _thermal_conductivity
Definition: NSSUPGBase.h:35
const MaterialProperty< Real > & _taum
Definition: NSSUPGBase.h:40
const MaterialProperty< RealTensorValue > & _viscous_stress_tensor
Definition: NSSUPGBase.h:33
const std::string momentum_y
Definition: NS.h:19
const MaterialProperty< std::vector< RealTensorValue > > & _calA
Definition: NSSUPGBase.h:45
const MaterialProperty< std::vector< Real > > & _strong_residuals
Definition: NSSUPGBase.h:42
const MaterialProperty< Real > & _tauc
Definition: NSSUPGBase.h:39
const std::string total_energy
Definition: NS.h:21
const std::string momentum_z
Definition: NS.h:20
const VariableValue & _d_rhovdot_du
Definition: NSSUPGBase.h:64
const VariableValue & _enthalpy
Definition: NSSUPGBase.h:72
const MaterialProperty< Real > & _hsupg
Definition: NSSUPGBase.h:38
NSKernel(const InputParameters &parameters)
Definition: NSKernel.C:41
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _calE
Definition: NSSUPGBase.h:51
const VariableValue & _d_rhoEdot_du
Definition: NSSUPGBase.h:66
const MaterialProperty< Real > & _taue
Definition: NSSUPGBase.h:41

Member Function Documentation

◆ isNSVariable()

bool NSKernel::isNSVariable ( unsigned  var)
protectedinherited

Helper functions for mapping Moose variable numberings into the "canonical" numbering for the compressible NS equations.

Definition at line 78 of file NSKernel.C.

Referenced by NSSUPGEnergy::computeJacobianHelper(), NSSUPGMass::computeJacobianHelper(), NSSUPGMomentum::computeJacobianHelper(), NSMassInviscidFlux::computeQpOffDiagJacobian(), NSEnergyInviscidFlux::computeQpOffDiagJacobian(), NSMomentumInviscidFluxWithGradP::computeQpOffDiagJacobian(), NSMomentumInviscidFlux::computeQpOffDiagJacobian(), NSEnergyViscousFlux::computeQpOffDiagJacobian(), NSMomentumViscousFlux::computeQpOffDiagJacobian(), and NSEnergyThermalFlux::computeQpOffDiagJacobian().

79 {
80  if (var == _rho_var_number || var == _rhou_var_number || var == _rhov_var_number ||
81  var == _rhow_var_number || var == _rhoE_var_number)
82  return true;
83  else
84  return false;
85 }
unsigned _rhov_var_number
Definition: NSKernel.h:57
unsigned _rho_var_number
Definition: NSKernel.h:55
unsigned _rhow_var_number
Definition: NSKernel.h:58
unsigned _rhoE_var_number
Definition: NSKernel.h:59
unsigned _rhou_var_number
Definition: NSKernel.h:56

◆ mapVarNumber()

unsigned NSKernel::mapVarNumber ( unsigned  var)
protectedinherited

Definition at line 88 of file NSKernel.C.

Referenced by NSSUPGEnergy::computeJacobianHelper(), NSSUPGMass::computeJacobianHelper(), NSSUPGMomentum::computeJacobianHelper(), NSMassInviscidFlux::computeQpOffDiagJacobian(), NSMomentumInviscidFluxWithGradP::computeQpOffDiagJacobian(), NSEnergyViscousFlux::computeQpOffDiagJacobian(), NSMomentumInviscidFlux::computeQpOffDiagJacobian(), NSMomentumViscousFlux::computeQpOffDiagJacobian(), and NSEnergyThermalFlux::computeQpOffDiagJacobian().

89 {
90  // Convert the Moose numbering to:
91  // 0 for rho
92  // 1 for rho*u
93  // 2 for rho*v
94  // 3 for rho*w
95  // 4 for rho*e
96  // regardless of the problem dimension, etc.
97  unsigned mapped_var_number = 99;
98 
99  if (var == _rho_var_number)
100  mapped_var_number = 0;
101  else if (var == _rhou_var_number)
102  mapped_var_number = 1;
103  else if (var == _rhov_var_number)
104  mapped_var_number = 2;
105  else if (var == _rhow_var_number)
106  mapped_var_number = 3;
107  else if (var == _rhoE_var_number)
108  mapped_var_number = 4;
109  else
110  mooseError("Invalid var!");
111 
112  return mapped_var_number;
113 }
unsigned _rhov_var_number
Definition: NSKernel.h:57
unsigned _rho_var_number
Definition: NSKernel.h:55
unsigned _rhow_var_number
Definition: NSKernel.h:58
unsigned _rhoE_var_number
Definition: NSKernel.h:59
unsigned _rhou_var_number
Definition: NSKernel.h:56

Member Data Documentation

◆ _calA

const MaterialProperty<std::vector<RealTensorValue> >& NSSUPGBase::_calA
protected

◆ _calC

const MaterialProperty<std::vector<RealTensorValue> >& NSSUPGBase::_calC
protected

◆ _calE

const MaterialProperty<std::vector<std::vector<RealTensorValue> > >& NSSUPGBase::_calE
protected

◆ _d_rhodot_du

const VariableValue& NSSUPGBase::_d_rhodot_du
protected

Definition at line 62 of file NSSUPGBase.h.

◆ _d_rhoEdot_du

const VariableValue& NSSUPGBase::_d_rhoEdot_du
protected

Definition at line 66 of file NSSUPGBase.h.

◆ _d_rhoudot_du

const VariableValue& NSSUPGBase::_d_rhoudot_du
protected

Definition at line 63 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

◆ _d_rhovdot_du

const VariableValue& NSSUPGBase::_d_rhovdot_du
protected

Definition at line 64 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

◆ _d_rhowdot_du

const VariableValue& NSSUPGBase::_d_rhowdot_du
protected

Definition at line 65 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

◆ _dynamic_viscosity

const MaterialProperty<Real>& NSSUPGBase::_dynamic_viscosity
protected

Definition at line 34 of file NSSUPGBase.h.

◆ _enthalpy

const VariableValue& NSSUPGBase::_enthalpy
protected

◆ _fp

const IdealGasFluidProperties& NSKernel::_fp
protectedinherited

◆ _grad_rho

const VariableGradient& NSKernel::_grad_rho
protectedinherited

◆ _grad_rho_E

const VariableGradient& NSKernel::_grad_rho_E
protectedinherited

◆ _grad_rho_u

const VariableGradient& NSKernel::_grad_rho_u
protectedinherited

◆ _grad_rho_v

const VariableGradient& NSKernel::_grad_rho_v
protectedinherited

◆ _grad_rho_w

const VariableGradient& NSKernel::_grad_rho_w
protectedinherited

◆ _hsupg

const MaterialProperty<Real>& NSSUPGBase::_hsupg
protected

Definition at line 38 of file NSSUPGBase.h.

◆ _rho

const VariableValue& NSKernel::_rho
protectedinherited

◆ _rho_E

const VariableValue& NSKernel::_rho_E
protectedinherited

Definition at line 45 of file NSKernel.h.

◆ _rho_u

const VariableValue& NSKernel::_rho_u
protectedinherited

◆ _rho_v

const VariableValue& NSKernel::_rho_v
protectedinherited

◆ _rho_var_number

unsigned NSKernel::_rho_var_number
protectedinherited

◆ _rho_w

const VariableValue& NSKernel::_rho_w
protectedinherited

◆ _rhoE_var_number

unsigned NSKernel::_rhoE_var_number
protectedinherited

◆ _rhou_var_number

unsigned NSKernel::_rhou_var_number
protectedinherited

◆ _rhov_var_number

unsigned NSKernel::_rhov_var_number
protectedinherited

◆ _rhow_var_number

unsigned NSKernel::_rhow_var_number
protectedinherited

◆ _strong_residuals

const MaterialProperty<std::vector<Real> >& NSSUPGBase::_strong_residuals
protected

◆ _tauc

const MaterialProperty<Real>& NSSUPGBase::_tauc
protected

◆ _taue

const MaterialProperty<Real>& NSSUPGBase::_taue
protected

◆ _taum

const MaterialProperty<Real>& NSSUPGBase::_taum
protected

◆ _temperature

const VariableValue& NSSUPGBase::_temperature
protected

Definition at line 69 of file NSSUPGBase.h.

◆ _thermal_conductivity

const MaterialProperty<Real>& NSSUPGBase::_thermal_conductivity
protected

Definition at line 35 of file NSSUPGBase.h.

◆ _u_vel

const VariableValue& NSKernel::_u_vel
protectedinherited

◆ _v_vel

const VariableValue& NSKernel::_v_vel
protectedinherited

◆ _viscous_stress_tensor

const MaterialProperty<RealTensorValue>& NSSUPGBase::_viscous_stress_tensor
protected

Definition at line 33 of file NSSUPGBase.h.

◆ _w_vel

const VariableValue& NSKernel::_w_vel
protectedinherited

The documentation for this class was generated from the following files: