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

This class computes the mass equation residual and Jacobian contributions for the incompressible Navier-Stokes momentum equation. More...

#include <INSMass.h>

Inheritance diagram for INSMass:
[legend]

Public Member Functions

 INSMass (const InputParameters &parameters)
 
virtual ~INSMass ()
 

Protected Member Functions

virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned jvar)
 
virtual Real computeQpPGResidual ()
 
virtual Real computeQpPGJacobian ()
 
virtual Real computeQpPGOffDiagJacobian (unsigned comp)
 
virtual RealVectorValue convectiveTerm ()
 
virtual RealVectorValue dConvecDUComp (unsigned comp)
 
virtual RealVectorValue strongViscousTermLaplace ()
 
virtual RealVectorValue strongViscousTermTraction ()
 
virtual RealVectorValue dStrongViscDUCompLaplace (unsigned comp)
 
virtual RealVectorValue dStrongViscDUCompTraction (unsigned comp)
 
virtual RealVectorValue weakViscousTermLaplace (unsigned comp)
 
virtual RealVectorValue weakViscousTermTraction (unsigned comp)
 
virtual RealVectorValue dWeakViscDUCompLaplace ()
 
virtual RealVectorValue dWeakViscDUCompTraction ()
 
virtual RealVectorValue strongPressureTerm ()
 
virtual Real weakPressureTerm ()
 
virtual RealVectorValue dStrongPressureDPressure ()
 
virtual Real dWeakPressureDPressure ()
 
virtual RealVectorValue gravityTerm ()
 
virtual RealVectorValue timeDerivativeTerm ()
 
virtual RealVectorValue dTimeDerivativeDUComp (unsigned comp)
 
virtual Real tau ()
 
virtual Real dTauDUComp (unsigned comp)
 
virtual Real tauNodal ()
 Provides tau which yields superconvergence for 1D advection-diffusion. More...
 

Protected Attributes

bool _pspg
 
Function & _x_ffn
 
Function & _y_ffn
 
Function & _z_ffn
 
const VariablePhiSecond & _second_phi
 second derivatives of the shape function More...
 
const VariableValue & _u_vel
 
const VariableValue & _v_vel
 
const VariableValue & _w_vel
 
const VariableValue & _p
 
const VariableGradient & _grad_u_vel
 
const VariableGradient & _grad_v_vel
 
const VariableGradient & _grad_w_vel
 
const VariableGradient & _grad_p
 
const VariableSecond & _second_u_vel
 
const VariableSecond & _second_v_vel
 
const VariableSecond & _second_w_vel
 
const VariableValue & _u_vel_dot
 
const VariableValue & _v_vel_dot
 
const VariableValue & _w_vel_dot
 
const VariableValue & _d_u_vel_dot_du
 
const VariableValue & _d_v_vel_dot_dv
 
const VariableValue & _d_w_vel_dot_dw
 
unsigned _u_vel_var_number
 
unsigned _v_vel_var_number
 
unsigned _w_vel_var_number
 
unsigned _p_var_number
 
RealVectorValue _gravity
 
const MaterialProperty< Real > & _mu
 
const MaterialProperty< Real > & _rho
 
const Real & _alpha
 
bool _laplace
 
bool _convective_term
 
bool _transient_term
 

Detailed Description

This class computes the mass equation residual and Jacobian contributions for the incompressible Navier-Stokes momentum equation.

Definition at line 23 of file INSMass.h.

Constructor & Destructor Documentation

INSMass::INSMass ( const InputParameters &  parameters)

Definition at line 27 of file INSMass.C.

28  : INSBase(parameters),
29  _pspg(getParam<bool>("pspg")),
30  _x_ffn(getFunction("x_vel_forcing_func")),
31  _y_ffn(getFunction("y_vel_forcing_func")),
32  _z_ffn(getFunction("z_vel_forcing_func"))
33 
34 {
35 }
bool _pspg
Definition: INSMass.h:39
Function & _z_ffn
Definition: INSMass.h:42
INSBase(const InputParameters &parameters)
Definition: INSBase.C:43
Function & _x_ffn
Definition: INSMass.h:40
Function & _y_ffn
Definition: INSMass.h:41
virtual INSMass::~INSMass ( )
inlinevirtual

Definition at line 28 of file INSMass.h.

28 {}

Member Function Documentation

Real INSMass::computeQpJacobian ( )
protectedvirtual

Implements INSBase.

Definition at line 69 of file INSMass.C.

Referenced by ~INSMass().

70 {
71  // Derivative wrt to p is zero
72  Real r = 0;
73 
74  // Unless we are doing GLS stabilization
75  if (_pspg)
76  r += computeQpPGJacobian();
77 
78  return r;
79 }
bool _pspg
Definition: INSMass.h:39
virtual Real computeQpPGJacobian()
Definition: INSMass.C:82
Real INSMass::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtual

Implements INSBase.

Reimplemented in INSMassRZ.

Definition at line 88 of file INSMass.C.

Referenced by INSMassRZ::computeQpOffDiagJacobian(), and ~INSMass().

89 {
90  if (jvar == _u_vel_var_number)
91  {
92  Real jac = -_grad_phi[_j][_qp](0) * _test[_i][_qp];
93  if (_pspg)
95  return jac;
96  }
97 
98  else if (jvar == _v_vel_var_number)
99  {
100  Real jac = -_grad_phi[_j][_qp](1) * _test[_i][_qp];
101  if (_pspg)
102  jac += computeQpPGOffDiagJacobian(1);
103  return jac;
104  }
105 
106  else if (jvar == _w_vel_var_number)
107  {
108  Real jac = -_grad_phi[_j][_qp](2) * _test[_i][_qp];
109  if (_pspg)
110  jac += computeQpPGOffDiagJacobian(2);
111  return jac;
112  }
113 
114  else
115  return 0.0;
116 }
unsigned _w_vel_var_number
Definition: INSBase.h:96
bool _pspg
Definition: INSMass.h:39
unsigned _u_vel_var_number
Definition: INSBase.h:94
unsigned _v_vel_var_number
Definition: INSBase.h:95
virtual Real computeQpPGOffDiagJacobian(unsigned comp)
Definition: INSMass.C:119
Real INSMass::computeQpPGJacobian ( )
protectedvirtual

Definition at line 82 of file INSMass.C.

Referenced by computeQpJacobian(), and ~INSMass().

83 {
84  return -1. / _rho[_qp] * tau() * _grad_test[_i][_qp] * dStrongPressureDPressure();
85 }
virtual Real tau()
Definition: INSBase.C:268
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
virtual RealVectorValue dStrongPressureDPressure()
Definition: INSBase.C:224
Real INSMass::computeQpPGOffDiagJacobian ( unsigned  comp)
protectedvirtual

Definition at line 119 of file INSMass.C.

Referenced by computeQpOffDiagJacobian(), and ~INSMass().

120 {
121  RealVectorValue convective_term = _convective_term ? convectiveTerm() : RealVectorValue(0, 0, 0);
122  RealVectorValue d_convective_term_d_u_comp =
123  _convective_term ? dConvecDUComp(comp) : RealVectorValue(0, 0, 0);
124  RealVectorValue viscous_term =
126  RealVectorValue d_viscous_term_d_u_comp =
128  RealVectorValue transient_term =
129  _transient_term ? timeDerivativeTerm() : RealVectorValue(0, 0, 0);
130  RealVectorValue d_transient_term_d_u_comp =
131  _transient_term ? dTimeDerivativeDUComp(comp) : RealVectorValue(0, 0, 0);
132 
133  return -1. / _rho[_qp] * tau() * _grad_test[_i][_qp] *
134  (d_convective_term_d_u_comp + d_viscous_term_d_u_comp + d_transient_term_d_u_comp) -
135  1. / _rho[_qp] * dTauDUComp(comp) * _grad_test[_i][_qp] *
136  (convective_term + viscous_term + transient_term + strongPressureTerm() +
137  gravityTerm() - RealVectorValue(_x_ffn.value(_t, _q_point[_qp]),
138  _y_ffn.value(_t, _q_point[_qp]),
139  _z_ffn.value(_t, _q_point[_qp])));
140 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:117
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:141
virtual Real tau()
Definition: INSBase.C:268
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
virtual Real dTauDUComp(unsigned comp)
Definition: INSBase.C:296
virtual RealVectorValue timeDerivativeTerm()
Definition: INSBase.C:242
virtual RealVectorValue convectiveTerm()
Definition: INSBase.C:94
bool _convective_term
Definition: INSBase.h:107
virtual RealVectorValue strongPressureTerm()
Definition: INSBase.C:212
bool _transient_term
Definition: INSBase.h:108
Function & _z_ffn
Definition: INSMass.h:42
virtual RealVectorValue dConvecDUComp(unsigned comp)
Definition: INSBase.C:102
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
Definition: INSBase.C:132
bool _laplace
Definition: INSBase.h:106
virtual RealVectorValue gravityTerm()
Definition: INSBase.C:236
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:124
Function & _x_ffn
Definition: INSMass.h:40
Function & _y_ffn
Definition: INSMass.h:41
virtual RealVectorValue dTimeDerivativeDUComp(unsigned comp)
Definition: INSBase.C:248
Real INSMass::computeQpPGResidual ( )
protectedvirtual

Definition at line 52 of file INSMass.C.

Referenced by computeQpResidual(), and ~INSMass().

53 {
54  RealVectorValue viscous_term =
56  RealVectorValue transient_term =
57  _transient_term ? timeDerivativeTerm() : RealVectorValue(0, 0, 0);
58  RealVectorValue convective_term = _convective_term ? convectiveTerm() : RealVectorValue(0, 0, 0);
59  Real r = -1. / _rho[_qp] * tau() * _grad_test[_i][_qp] *
60  (strongPressureTerm() + gravityTerm() + viscous_term + convective_term + transient_term -
61  RealVectorValue(_x_ffn.value(_t, _q_point[_qp]),
62  _y_ffn.value(_t, _q_point[_qp]),
63  _z_ffn.value(_t, _q_point[_qp])));
64 
65  return r;
66 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:117
virtual Real tau()
Definition: INSBase.C:268
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
virtual RealVectorValue timeDerivativeTerm()
Definition: INSBase.C:242
virtual RealVectorValue convectiveTerm()
Definition: INSBase.C:94
bool _convective_term
Definition: INSBase.h:107
virtual RealVectorValue strongPressureTerm()
Definition: INSBase.C:212
bool _transient_term
Definition: INSBase.h:108
Function & _z_ffn
Definition: INSMass.h:42
bool _laplace
Definition: INSBase.h:106
virtual RealVectorValue gravityTerm()
Definition: INSBase.C:236
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:124
Function & _x_ffn
Definition: INSMass.h:40
Function & _y_ffn
Definition: INSMass.h:41
Real INSMass::computeQpResidual ( )
protectedvirtual

Implements INSBase.

Reimplemented in INSMassRZ.

Definition at line 38 of file INSMass.C.

Referenced by INSMassRZ::computeQpResidual(), and ~INSMass().

39 {
40  // (div u) * q
41  // Note: we (arbitrarily) multiply this term by -1 so that it matches the -p(div v)
42  // term in the momentum equation. Not sure if that is really important?
43  Real r = -(_grad_u_vel[_qp](0) + _grad_v_vel[_qp](1) + _grad_w_vel[_qp](2)) * _test[_i][_qp];
44 
45  if (_pspg)
46  r += computeQpPGResidual();
47 
48  return r;
49 }
const VariableGradient & _grad_v_vel
Definition: INSBase.h:74
virtual Real computeQpPGResidual()
Definition: INSMass.C:52
bool _pspg
Definition: INSMass.h:39
const VariableGradient & _grad_u_vel
Definition: INSBase.h:73
const VariableGradient & _grad_w_vel
Definition: INSBase.h:75
RealVectorValue INSBase::convectiveTerm ( )
protectedvirtualinherited

Definition at line 94 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), INSMomentumBase::computeQpResidual(), and INSBase::~INSBase().

95 {
96  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
97  return _rho[_qp] *
98  RealVectorValue(U * _grad_u_vel[_qp], U * _grad_v_vel[_qp], U * _grad_w_vel[_qp]);
99 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _u_vel
Definition: INSBase.h:67
const VariableGradient & _grad_v_vel
Definition: INSBase.h:74
const VariableValue & _w_vel
Definition: INSBase.h:69
const VariableGradient & _grad_u_vel
Definition: INSBase.h:73
const VariableGradient & _grad_w_vel
Definition: INSBase.h:75
const VariableValue & _v_vel
Definition: INSBase.h:68
RealVectorValue INSBase::dConvecDUComp ( unsigned  comp)
protectedvirtualinherited

Definition at line 102 of file INSBase.C.

Referenced by INSMomentumBase::computeQpJacobian(), INSMomentumBase::computeQpOffDiagJacobian(), INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), and INSBase::~INSBase().

103 {
104  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
105  RealVectorValue d_U_d_comp(0, 0, 0);
106  d_U_d_comp(comp) = _phi[_j][_qp];
107 
108  RealVectorValue convective_term = _rho[_qp] * RealVectorValue(d_U_d_comp * _grad_u_vel[_qp],
109  d_U_d_comp * _grad_v_vel[_qp],
110  d_U_d_comp * _grad_w_vel[_qp]);
111  convective_term(comp) += _rho[_qp] * U * _grad_phi[_j][_qp];
112 
113  return convective_term;
114 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _u_vel
Definition: INSBase.h:67
const VariableGradient & _grad_v_vel
Definition: INSBase.h:74
const VariableValue & _w_vel
Definition: INSBase.h:69
const VariableGradient & _grad_u_vel
Definition: INSBase.h:73
const VariableGradient & _grad_w_vel
Definition: INSBase.h:75
const VariableValue & _v_vel
Definition: INSBase.h:68
RealVectorValue INSBase::dStrongPressureDPressure ( )
protectedvirtualinherited

Definition at line 224 of file INSBase.C.

Referenced by INSMomentumBase::computeQpOffDiagJacobian(), computeQpPGJacobian(), and INSBase::~INSBase().

225 {
226  return _grad_phi[_j][_qp];
227 }
RealVectorValue INSBase::dStrongViscDUCompLaplace ( unsigned  comp)
protectedvirtualinherited

Reimplemented in INSMassRZ, and INSMomentumLaplaceFormRZ.

Definition at line 132 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), INSMomentumLaplaceFormRZ::dStrongViscDUCompLaplace(), INSMassRZ::dStrongViscDUCompLaplace(), and INSBase::~INSBase().

133 {
134  RealVectorValue viscous_term(0, 0, 0);
135  viscous_term(comp) = -_mu[_qp] * _second_phi[_j][_qp].tr();
136 
137  return viscous_term;
138 }
const VariablePhiSecond & _second_phi
second derivatives of the shape function
Definition: INSBase.h:64
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
RealVectorValue INSBase::dStrongViscDUCompTraction ( unsigned  comp)
protectedvirtualinherited

Reimplemented in INSMassRZ, and INSMomentumTractionFormRZ.

Definition at line 141 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), INSMomentumTractionFormRZ::dStrongViscDUCompTraction(), INSMassRZ::dStrongViscDUCompTraction(), and INSBase::~INSBase().

142 {
143  RealVectorValue viscous_term(0, 0, 0);
144  viscous_term(comp) = -_mu[_qp] * (_second_phi[_j][_qp](0, 0) + _second_phi[_j][_qp](1, 1) +
145  _second_phi[_j][_qp](2, 2));
146  for (unsigned i = 0; i < 3; i++)
147  viscous_term(i) += -_mu[_qp] * _second_phi[_j][_qp](i, comp);
148 
149  return viscous_term;
150 }
const VariablePhiSecond & _second_phi
second derivatives of the shape function
Definition: INSBase.h:64
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
Real INSBase::dTauDUComp ( unsigned  comp)
protectedvirtualinherited

Definition at line 296 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), and INSBase::~INSBase().

297 {
298  Real nu = _mu[_qp] / _rho[_qp];
299  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
300  Real h = _current_elem->hmax();
301  Real transient_part = _transient_term ? 4. / (_dt * _dt) : 0.;
302  return -_alpha / 2. * std::pow(transient_part + (2. * U.norm() / h) * (2. * U.norm() / h) +
303  9. * (4. * nu / (h * h)) * (4. * nu / (h * h)),
304  -1.5) *
305  2. * (2. * U.norm() / h) * 2. / h * U(comp) * _phi[_j][_qp] /
306  (U.norm() + std::numeric_limits<double>::epsilon());
307 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _u_vel
Definition: INSBase.h:67
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableValue & _w_vel
Definition: INSBase.h:69
bool _transient_term
Definition: INSBase.h:108
ExpressionBuilder::EBTerm pow(const ExpressionBuilder::EBTerm &left, T exponent)
const VariableValue & _v_vel
Definition: INSBase.h:68
const Real & _alpha
Definition: INSBase.h:105
RealVectorValue INSBase::dTimeDerivativeDUComp ( unsigned  comp)
protectedvirtualinherited

Definition at line 248 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), and INSBase::~INSBase().

249 {
250  Real base = _rho[_qp] * _phi[_j][_qp];
251  switch (comp)
252  {
253  case 0:
254  return RealVectorValue(base * _d_u_vel_dot_du[_qp], 0, 0);
255 
256  case 1:
257  return RealVectorValue(0, base * _d_v_vel_dot_dv[_qp], 0);
258 
259  case 2:
260  return RealVectorValue(0, 0, base * _d_w_vel_dot_dw[_qp]);
261 
262  default:
263  mooseError("comp must be 0, 1, or 2");
264  }
265 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _d_v_vel_dot_dv
Definition: INSBase.h:90
const VariableValue & _d_w_vel_dot_dw
Definition: INSBase.h:91
const VariableValue & _d_u_vel_dot_du
Definition: INSBase.h:89
Real INSBase::dWeakPressureDPressure ( )
protectedvirtualinherited

Definition at line 230 of file INSBase.C.

Referenced by INSMomentumBase::computeQpOffDiagJacobian(), and INSBase::~INSBase().

231 {
232  return -_phi[_j][_qp];
233 }
RealVectorValue INSBase::dWeakViscDUCompLaplace ( )
protectedvirtualinherited

Definition at line 200 of file INSBase.C.

Referenced by INSBase::~INSBase().

201 {
202  return _mu[_qp] * _grad_phi[_j][_qp];
203 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
RealVectorValue INSBase::dWeakViscDUCompTraction ( )
protectedvirtualinherited

Definition at line 206 of file INSBase.C.

Referenced by INSBase::~INSBase().

207 {
208  return _mu[_qp] * _grad_phi[_j][_qp];
209 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
RealVectorValue INSBase::gravityTerm ( )
protectedvirtualinherited

Definition at line 236 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), INSMomentumBase::computeQpResidual(), and INSBase::~INSBase().

237 {
238  return -_rho[_qp] * _gravity;
239 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
RealVectorValue _gravity
Definition: INSBase.h:99
RealVectorValue INSBase::strongPressureTerm ( )
protectedvirtualinherited
RealVectorValue INSBase::strongViscousTermLaplace ( )
protectedvirtualinherited

Reimplemented in INSMassRZ, and INSMomentumLaplaceFormRZ.

Definition at line 117 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), INSMomentumLaplaceFormRZ::strongViscousTermLaplace(), INSMassRZ::strongViscousTermLaplace(), INSBase::strongViscousTermTraction(), and INSBase::~INSBase().

118 {
119  return -_mu[_qp] *
120  RealVectorValue(_second_u_vel[_qp].tr(), _second_v_vel[_qp].tr(), _second_w_vel[_qp].tr());
121 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableSecond & _second_u_vel
Definition: INSBase.h:79
const VariableSecond & _second_v_vel
Definition: INSBase.h:80
const VariableSecond & _second_w_vel
Definition: INSBase.h:81
RealVectorValue INSBase::strongViscousTermTraction ( )
protectedvirtualinherited

Reimplemented in INSMassRZ, and INSMomentumTractionFormRZ.

Definition at line 124 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), INSMomentumTractionFormRZ::strongViscousTermTraction(), INSMassRZ::strongViscousTermTraction(), and INSBase::~INSBase().

125 {
126  return strongViscousTermLaplace() -
127  _mu[_qp] *
128  (_second_u_vel[_qp].row(0) + _second_v_vel[_qp].row(1) + _second_w_vel[_qp].row(2));
129 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:117
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableSecond & _second_u_vel
Definition: INSBase.h:79
const VariableSecond & _second_v_vel
Definition: INSBase.h:80
const VariableSecond & _second_w_vel
Definition: INSBase.h:81
Real INSBase::tau ( )
protectedvirtualinherited

Definition at line 268 of file INSBase.C.

Referenced by Advection::computeQpJacobian(), INSMomentumBase::computeQpOffDiagJacobian(), computeQpPGJacobian(), INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), Advection::computeQpResidual(), and INSBase::~INSBase().

269 {
270  Real nu = _mu[_qp] / _rho[_qp];
271  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
272  Real h = _current_elem->hmax();
273  Real transient_part = _transient_term ? 4. / (_dt * _dt) : 0.;
274  return _alpha / std::sqrt(transient_part + (2. * U.norm() / h) * (2. * U.norm() / h) +
275  9. * (4. * nu / (h * h)) * (4. * nu / (h * h)));
276 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _u_vel
Definition: INSBase.h:67
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableValue & _w_vel
Definition: INSBase.h:69
bool _transient_term
Definition: INSBase.h:108
const VariableValue & _v_vel
Definition: INSBase.h:68
const Real & _alpha
Definition: INSBase.h:105
Real INSBase::tauNodal ( )
protectedvirtualinherited

Provides tau which yields superconvergence for 1D advection-diffusion.

Definition at line 279 of file INSBase.C.

Referenced by Advection::computeQpJacobian(), Advection::computeQpResidual(), and INSBase::~INSBase().

280 {
281  Real nu = _mu[_qp] / _rho[_qp];
282  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
283  Real h = _current_elem->hmax();
284  Real xi;
285  if (nu < std::numeric_limits<Real>::epsilon())
286  xi = 1;
287  else
288  {
289  Real alpha = U.norm() * h / (2 * nu);
290  xi = 1. / std::tanh(alpha) - 1. / alpha;
291  }
292  return h / (2 * U.norm()) * xi;
293 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _u_vel
Definition: INSBase.h:67
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableValue & _w_vel
Definition: INSBase.h:69
const VariableValue & _v_vel
Definition: INSBase.h:68
RealVectorValue INSBase::timeDerivativeTerm ( )
protectedvirtualinherited

Definition at line 242 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), computeQpPGOffDiagJacobian(), computeQpPGResidual(), INSMomentumBase::computeQpPGResidual(), and INSBase::~INSBase().

243 {
244  return _rho[_qp] * RealVectorValue(_u_vel_dot[_qp], _v_vel_dot[_qp], _w_vel_dot[_qp]);
245 }
const MaterialProperty< Real > & _rho
Definition: INSBase.h:103
const VariableValue & _w_vel_dot
Definition: INSBase.h:86
const VariableValue & _u_vel_dot
Definition: INSBase.h:84
const VariableValue & _v_vel_dot
Definition: INSBase.h:85
Real INSBase::weakPressureTerm ( )
protectedvirtualinherited

Definition at line 218 of file INSBase.C.

Referenced by INSMomentumBase::computeQpResidual(), and INSBase::~INSBase().

219 {
220  return -_p[_qp];
221 }
const VariableValue & _p
Definition: INSBase.h:70
RealVectorValue INSBase::weakViscousTermLaplace ( unsigned  comp)
protectedvirtualinherited

Definition at line 153 of file INSBase.C.

Referenced by INSBase::~INSBase().

154 {
155  switch (comp)
156  {
157  case 0:
158  return _mu[_qp] * _grad_u_vel[_qp];
159 
160  case 1:
161  return _mu[_qp] * _grad_v_vel[_qp];
162 
163  case 2:
164  return _mu[_qp] * _grad_w_vel[_qp];
165 
166  default:
167  return _zero[_qp];
168  }
169 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableGradient & _grad_v_vel
Definition: INSBase.h:74
const VariableGradient & _grad_u_vel
Definition: INSBase.h:73
const VariableGradient & _grad_w_vel
Definition: INSBase.h:75
RealVectorValue INSBase::weakViscousTermTraction ( unsigned  comp)
protectedvirtualinherited

Definition at line 172 of file INSBase.C.

Referenced by INSBase::~INSBase().

173 {
174  switch (comp)
175  {
176  case 0:
177  {
178  RealVectorValue transpose(_grad_u_vel[_qp](0), _grad_v_vel[_qp](0), _grad_w_vel[_qp](0));
179  return _mu[_qp] * _grad_u_vel[_qp] + _mu[_qp] * transpose;
180  }
181 
182  case 1:
183  {
184  RealVectorValue transpose(_grad_u_vel[_qp](1), _grad_v_vel[_qp](1), _grad_w_vel[_qp](1));
185  return _mu[_qp] * _grad_v_vel[_qp] + _mu[_qp] * transpose;
186  }
187 
188  case 2:
189  {
190  RealVectorValue transpose(_grad_u_vel[_qp](2), _grad_v_vel[_qp](2), _grad_w_vel[_qp](2));
191  return _mu[_qp] * _grad_w_vel[_qp] + _mu[_qp] * transpose;
192  }
193 
194  default:
195  return _zero[_qp];
196  }
197 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
const VariableGradient & _grad_v_vel
Definition: INSBase.h:74
const VariableGradient & _grad_u_vel
Definition: INSBase.h:73
const VariableGradient & _grad_w_vel
Definition: INSBase.h:75

Member Data Documentation

const Real& INSBase::_alpha
protectedinherited

Definition at line 105 of file INSBase.h.

Referenced by INSBase::dTauDUComp(), and INSBase::tau().

bool INSBase::_convective_term
protectedinherited
const VariableValue& INSBase::_d_u_vel_dot_du
protectedinherited

Definition at line 89 of file INSBase.h.

Referenced by INSBase::dTimeDerivativeDUComp().

const VariableValue& INSBase::_d_v_vel_dot_dv
protectedinherited

Definition at line 90 of file INSBase.h.

Referenced by INSBase::dTimeDerivativeDUComp().

const VariableValue& INSBase::_d_w_vel_dot_dw
protectedinherited

Definition at line 91 of file INSBase.h.

Referenced by INSBase::dTimeDerivativeDUComp().

const VariableGradient& INSBase::_grad_p
protectedinherited

Definition at line 76 of file INSBase.h.

Referenced by INSBase::strongPressureTerm().

const VariableGradient& INSBase::_grad_u_vel
protectedinherited
const VariableGradient& INSBase::_grad_v_vel
protectedinherited
const VariableGradient& INSBase::_grad_w_vel
protectedinherited
RealVectorValue INSBase::_gravity
protectedinherited

Definition at line 99 of file INSBase.h.

Referenced by INSBase::gravityTerm().

bool INSBase::_laplace
protectedinherited
const MaterialProperty<Real>& INSBase::_mu
protectedinherited
const VariableValue& INSBase::_p
protectedinherited
unsigned INSBase::_p_var_number
protectedinherited
bool INSMass::_pspg
protected

Definition at line 39 of file INSMass.h.

Referenced by computeQpJacobian(), computeQpOffDiagJacobian(), and computeQpResidual().

const MaterialProperty<Real>& INSBase::_rho
protectedinherited
const VariablePhiSecond& INSBase::_second_phi
protectedinherited

second derivatives of the shape function

Definition at line 64 of file INSBase.h.

Referenced by INSBase::dStrongViscDUCompLaplace(), and INSBase::dStrongViscDUCompTraction().

const VariableSecond& INSBase::_second_u_vel
protectedinherited
const VariableSecond& INSBase::_second_v_vel
protectedinherited
const VariableSecond& INSBase::_second_w_vel
protectedinherited
bool INSBase::_transient_term
protectedinherited
const VariableValue& INSBase::_u_vel
protectedinherited
const VariableValue& INSBase::_u_vel_dot
protectedinherited

Definition at line 84 of file INSBase.h.

Referenced by INSBase::timeDerivativeTerm().

unsigned INSBase::_u_vel_var_number
protectedinherited
const VariableValue& INSBase::_v_vel
protectedinherited
const VariableValue& INSBase::_v_vel_dot
protectedinherited

Definition at line 85 of file INSBase.h.

Referenced by INSBase::timeDerivativeTerm().

unsigned INSBase::_v_vel_var_number
protectedinherited
const VariableValue& INSBase::_w_vel
protectedinherited
const VariableValue& INSBase::_w_vel_dot
protectedinherited

Definition at line 86 of file INSBase.h.

Referenced by INSBase::timeDerivativeTerm().

unsigned INSBase::_w_vel_var_number
protectedinherited
Function& INSMass::_x_ffn
protected

Definition at line 40 of file INSMass.h.

Referenced by computeQpPGOffDiagJacobian(), and computeQpPGResidual().

Function& INSMass::_y_ffn
protected

Definition at line 41 of file INSMass.h.

Referenced by computeQpPGOffDiagJacobian(), and computeQpPGResidual().

Function& INSMass::_z_ffn
protected

Definition at line 42 of file INSMass.h.

Referenced by computeQpPGOffDiagJacobian(), and computeQpPGResidual().


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