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 23 of file NSSUPGBase.h.

Constructor & Destructor Documentation

NSSUPGBase::NSSUPGBase ( const InputParameters &  parameters)

Definition at line 26 of file NSSUPGBase.C.

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
const VariableValue & _temperature
Definition: NSSUPGBase.h:66
const MaterialProperty< Real > & _dynamic_viscosity
Definition: NSSUPGBase.h:31
const VariableValue & _d_rhodot_du
Definition: NSSUPGBase.h:59
const std::string density
Definition: NS.h:15
const VariableValue & _d_rhoudot_du
Definition: NSSUPGBase.h:60
const MaterialProperty< std::vector< RealTensorValue > > & _calC
Definition: NSSUPGBase.h:45
const std::string temperature
Definition: NS.h:25
const VariableValue & _d_rhowdot_du
Definition: NSSUPGBase.h:62
const MaterialProperty< Real > & _thermal_conductivity
Definition: NSSUPGBase.h:32
const MaterialProperty< Real > & _taum
Definition: NSSUPGBase.h:37
const MaterialProperty< RealTensorValue > & _viscous_stress_tensor
Definition: NSSUPGBase.h:30
const std::string momentum_y
Definition: NS.h:17
const MaterialProperty< std::vector< RealTensorValue > > & _calA
Definition: NSSUPGBase.h:42
const MaterialProperty< std::vector< Real > > & _strong_residuals
Definition: NSSUPGBase.h:39
const MaterialProperty< Real > & _tauc
Definition: NSSUPGBase.h:36
const std::string total_energy
Definition: NS.h:19
const std::string momentum_z
Definition: NS.h:18
const VariableValue & _d_rhovdot_du
Definition: NSSUPGBase.h:61
const VariableValue & _enthalpy
Definition: NSSUPGBase.h:69
const MaterialProperty< Real > & _hsupg
Definition: NSSUPGBase.h:35
NSKernel(const InputParameters &parameters)
Definition: NSKernel.C:39
const MaterialProperty< std::vector< std::vector< RealTensorValue > > > & _calE
Definition: NSSUPGBase.h:48
const VariableValue & _d_rhoEdot_du
Definition: NSSUPGBase.h:63
const MaterialProperty< Real > & _taue
Definition: NSSUPGBase.h:38

Member Function Documentation

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 76 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().

77 {
78  if (var == _rho_var_number || var == _rhou_var_number || var == _rhov_var_number ||
79  var == _rhow_var_number || var == _rhoE_var_number)
80  return true;
81  else
82  return false;
83 }
unsigned _rhov_var_number
Definition: NSKernel.h:54
unsigned _rho_var_number
Definition: NSKernel.h:52
unsigned _rhow_var_number
Definition: NSKernel.h:55
unsigned _rhoE_var_number
Definition: NSKernel.h:56
unsigned _rhou_var_number
Definition: NSKernel.h:53
unsigned NSKernel::mapVarNumber ( unsigned  var)
protectedinherited

Definition at line 86 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().

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

Member Data Documentation

const MaterialProperty<std::vector<RealTensorValue> >& NSSUPGBase::_calA
protected
const MaterialProperty<std::vector<RealTensorValue> >& NSSUPGBase::_calC
protected
const MaterialProperty<std::vector<std::vector<RealTensorValue> > >& NSSUPGBase::_calE
protected
const VariableValue& NSSUPGBase::_d_rhodot_du
protected

Definition at line 59 of file NSSUPGBase.h.

const VariableValue& NSSUPGBase::_d_rhoEdot_du
protected

Definition at line 63 of file NSSUPGBase.h.

const VariableValue& NSSUPGBase::_d_rhoudot_du
protected

Definition at line 60 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

const VariableValue& NSSUPGBase::_d_rhovdot_du
protected

Definition at line 61 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

const VariableValue& NSSUPGBase::_d_rhowdot_du
protected

Definition at line 62 of file NSSUPGBase.h.

Referenced by NSSUPGMass::computeJacobianHelper().

const MaterialProperty<Real>& NSSUPGBase::_dynamic_viscosity
protected

Definition at line 31 of file NSSUPGBase.h.

const VariableValue& NSSUPGBase::_enthalpy
protected
const IdealGasFluidProperties& NSKernel::_fp
protectedinherited
const VariableGradient& NSKernel::_grad_rho
protectedinherited
const VariableGradient& NSKernel::_grad_rho_E
protectedinherited
const VariableGradient& NSKernel::_grad_rho_u
protectedinherited
const VariableGradient& NSKernel::_grad_rho_v
protectedinherited
const VariableGradient& NSKernel::_grad_rho_w
protectedinherited
const MaterialProperty<Real>& NSSUPGBase::_hsupg
protected

Definition at line 35 of file NSSUPGBase.h.

const VariableValue& NSKernel::_rho
protectedinherited
const VariableValue& NSKernel::_rho_E
protectedinherited

Definition at line 42 of file NSKernel.h.

const VariableValue& NSKernel::_rho_u
protectedinherited
const VariableValue& NSKernel::_rho_v
protectedinherited
unsigned NSKernel::_rho_var_number
protectedinherited
const VariableValue& NSKernel::_rho_w
protectedinherited
unsigned NSKernel::_rhoE_var_number
protectedinherited
unsigned NSKernel::_rhou_var_number
protectedinherited
unsigned NSKernel::_rhov_var_number
protectedinherited
unsigned NSKernel::_rhow_var_number
protectedinherited
const MaterialProperty<std::vector<Real> >& NSSUPGBase::_strong_residuals
protected
const MaterialProperty<Real>& NSSUPGBase::_tauc
protected
const MaterialProperty<Real>& NSSUPGBase::_taue
protected
const MaterialProperty<Real>& NSSUPGBase::_taum
protected
const VariableValue& NSSUPGBase::_temperature
protected

Definition at line 66 of file NSSUPGBase.h.

const MaterialProperty<Real>& NSSUPGBase::_thermal_conductivity
protected

Definition at line 32 of file NSSUPGBase.h.

const VariableValue& NSKernel::_u_vel
protectedinherited
const VariableValue& NSKernel::_v_vel
protectedinherited
const MaterialProperty<RealTensorValue>& NSSUPGBase::_viscous_stress_tensor
protected

Definition at line 30 of file NSSUPGBase.h.

const VariableValue& NSKernel::_w_vel
protectedinherited

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