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

This class computes momentum equation residual and Jacobian viscous contributions for the "Laplacian" form of the governing equations. More...

#include <INSMomentumLaplaceForm.h>

Inheritance diagram for INSMomentumLaplaceForm:
[legend]

Public Member Functions

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

Protected Member Functions

virtual Real computeQpResidualViscousPart () override
 
virtual Real computeQpJacobianViscousPart () override
 
virtual Real computeQpOffDiagJacobianViscousPart (unsigned jvar) override
 
virtual Real computeQpResidual ()
 
virtual Real computeQpJacobian ()
 
virtual Real computeQpOffDiagJacobian (unsigned jvar)
 
virtual Real computeQpPGResidual ()
 
virtual Real computeQpPGJacobian (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

unsigned _component
 
bool _integrate_p_by_parts
 
bool _supg
 
Function & _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 momentum equation residual and Jacobian viscous contributions for the "Laplacian" form of the governing equations.

Definition at line 22 of file INSMomentumLaplaceForm.h.

Constructor & Destructor Documentation

INSMomentumLaplaceForm::INSMomentumLaplaceForm ( const InputParameters &  parameters)

Definition at line 19 of file INSMomentumLaplaceForm.C.

20  : INSMomentumBase(parameters)
21 {
22 }
INSMomentumBase(const InputParameters &parameters)
virtual INSMomentumLaplaceForm::~INSMomentumLaplaceForm ( )
inlinevirtual

Definition at line 27 of file INSMomentumLaplaceForm.h.

27 {}

Member Function Documentation

Real INSMomentumBase::computeQpJacobian ( )
protectedvirtualinherited

Implements INSBase.

Reimplemented in INSMomentumLaplaceFormRZ, and INSMomentumTractionFormRZ.

Definition at line 90 of file INSMomentumBase.C.

Referenced by INSMomentumTractionFormRZ::computeQpJacobian(), INSMomentumLaplaceFormRZ::computeQpJacobian(), and INSMomentumBase::~INSMomentumBase().

91 {
92  Real jac = 0;
93 
94  // viscous term
96 
97  // convective term
98  if (_convective_term)
99  jac += _test[_i][_qp] * dConvecDUComp(_component)(_component);
100 
101  if (_supg)
103 
104  return jac;
105 }
virtual Real computeQpJacobianViscousPart()=0
virtual Real computeQpPGJacobian(unsigned comp)
bool _convective_term
Definition: INSBase.h:107
virtual RealVectorValue dConvecDUComp(unsigned comp)
Definition: INSBase.C:102
Real INSMomentumLaplaceForm::computeQpJacobianViscousPart ( )
overrideprotectedvirtual

Implements INSMomentumBase.

Definition at line 32 of file INSMomentumLaplaceForm.C.

Referenced by ~INSMomentumLaplaceForm().

33 {
34  // Viscous part, Laplacian version
35  return _mu[_qp] * (_grad_phi[_j][_qp] * _grad_test[_i][_qp]);
36 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
Real INSMomentumBase::computeQpOffDiagJacobian ( unsigned  jvar)
protectedvirtualinherited

Implements INSBase.

Reimplemented in INSMomentumLaplaceFormRZ, and INSMomentumTractionFormRZ.

Definition at line 134 of file INSMomentumBase.C.

Referenced by INSMomentumTractionFormRZ::computeQpOffDiagJacobian(), INSMomentumLaplaceFormRZ::computeQpOffDiagJacobian(), and INSMomentumBase::~INSMomentumBase().

135 {
136  Real jac = 0;
137  if (jvar == _u_vel_var_number)
138  {
139  Real convective_term = _convective_term ? _test[_i][_qp] * dConvecDUComp(0)(_component) : 0.;
140  Real viscous_term = computeQpOffDiagJacobianViscousPart(jvar);
141 
142  jac += convective_term + viscous_term;
143 
144  if (_supg)
145  jac += computeQpPGJacobian(0);
146 
147  return jac;
148  }
149  else if (jvar == _v_vel_var_number)
150  {
151  Real convective_term = _convective_term ? _test[_i][_qp] * dConvecDUComp(1)(_component) : 0.;
152  Real viscous_term = computeQpOffDiagJacobianViscousPart(jvar);
153 
154  jac += convective_term + viscous_term;
155 
156  if (_supg)
157  jac += computeQpPGJacobian(1);
158 
159  return jac;
160  }
161  else if (jvar == _w_vel_var_number)
162  {
163  Real convective_term = _convective_term ? _test[_i][_qp] * dConvecDUComp(2)(_component) : 0.;
164  Real viscous_term = computeQpOffDiagJacobianViscousPart(jvar);
165 
166  jac += convective_term + viscous_term;
167 
168  if (_supg)
169  jac += computeQpPGJacobian(2);
170 
171  return jac;
172  }
173 
174  else if (jvar == _p_var_number)
175  {
177  jac += _grad_test[_i][_qp](_component) * dWeakPressureDPressure();
178  else
179  jac += _test[_i][_qp] * dStrongPressureDPressure()(_component);
180 
181  if (_supg)
182  {
183  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
184  jac += tau() * U * _grad_test[_i][_qp] * dStrongPressureDPressure()(_component);
185  }
186 
187  return jac;
188  }
189 
190  else
191  return 0;
192 }
virtual Real tau()
Definition: INSBase.C:268
const VariableValue & _u_vel
Definition: INSBase.h:67
const VariableValue & _w_vel
Definition: INSBase.h:69
virtual Real computeQpOffDiagJacobianViscousPart(unsigned jvar)=0
unsigned _w_vel_var_number
Definition: INSBase.h:96
virtual RealVectorValue dStrongPressureDPressure()
Definition: INSBase.C:224
virtual Real computeQpPGJacobian(unsigned comp)
bool _convective_term
Definition: INSBase.h:107
virtual Real dWeakPressureDPressure()
Definition: INSBase.C:230
virtual RealVectorValue dConvecDUComp(unsigned comp)
Definition: INSBase.C:102
unsigned _u_vel_var_number
Definition: INSBase.h:94
const VariableValue & _v_vel
Definition: INSBase.h:68
unsigned _v_vel_var_number
Definition: INSBase.h:95
unsigned _p_var_number
Definition: INSBase.h:97
Real INSMomentumLaplaceForm::computeQpOffDiagJacobianViscousPart ( unsigned  jvar)
overrideprotectedvirtual

Implements INSMomentumBase.

Definition at line 39 of file INSMomentumLaplaceForm.C.

Referenced by ~INSMomentumLaplaceForm().

40 {
41  return 0.;
42 }
Real INSMomentumBase::computeQpPGJacobian ( unsigned  comp)
protectedvirtualinherited

Definition at line 108 of file INSMomentumBase.C.

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

109 {
110  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
111  RealVectorValue d_U_d_U_comp(0, 0, 0);
112  d_U_d_U_comp(comp) = _phi[_j][_qp];
113 
114  Real convective_term = _convective_term ? convectiveTerm()(_component) : 0;
115  Real d_convective_term_d_u_comp = _convective_term ? dConvecDUComp(comp)(_component) : 0;
116  Real viscous_term =
118  Real d_viscous_term_d_u_comp = _laplace ? dStrongViscDUCompLaplace(comp)(_component)
120  Real transient_term = _transient_term ? timeDerivativeTerm()(_component) : 0;
121  Real d_transient_term_d_u_comp = _transient_term ? dTimeDerivativeDUComp(comp)(_component) : 0;
122 
123  return dTauDUComp(comp) * U * _grad_test[_i][_qp] *
124  (convective_term + viscous_term + strongPressureTerm()(_component) +
125  gravityTerm()(_component) + transient_term - _ffn.value(_t, _q_point[_qp])) +
126  tau() * d_U_d_U_comp * _grad_test[_i][_qp] *
127  (convective_term + viscous_term + strongPressureTerm()(_component) +
128  gravityTerm()(_component) + transient_term - _ffn.value(_t, _q_point[_qp])) +
129  tau() * U * _grad_test[_i][_qp] *
130  (d_convective_term_d_u_comp + d_viscous_term_d_u_comp + d_transient_term_d_u_comp);
131 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:117
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:141
virtual Real tau()
Definition: INSBase.C:268
const VariableValue & _u_vel
Definition: INSBase.h:67
virtual Real dTauDUComp(unsigned comp)
Definition: INSBase.C:296
const VariableValue & _w_vel
Definition: INSBase.h:69
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
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
const VariableValue & _v_vel
Definition: INSBase.h:68
virtual RealVectorValue dTimeDerivativeDUComp(unsigned comp)
Definition: INSBase.C:248
Real INSMomentumBase::computeQpPGResidual ( )
protectedvirtualinherited

Definition at line 64 of file INSMomentumBase.C.

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

65 {
66  RealVectorValue U(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
67 
68  RealVectorValue convective_term = _convective_term ? convectiveTerm() : RealVectorValue(0, 0, 0);
69  RealVectorValue viscous_term =
71  RealVectorValue transient_term =
72  _transient_term ? timeDerivativeTerm() : RealVectorValue(0, 0, 0);
73 
74  return tau() * U * _grad_test[_i][_qp] *
75  ((convective_term + viscous_term + transient_term + strongPressureTerm() +
76  gravityTerm())(_component)-_ffn.value(_t, _q_point[_qp]));
77 
78  // For GLS as opposed to SUPG stabilization, one would need to modify the test function functional
79  // space to include second derivatives of the Galerkin test functions corresponding to the viscous
80  // term. This would look like:
81  // Real lap_test =
82  // _second_test[_i][_qp](0, 0) + _second_test[_i][_qp](1, 1) + _second_test[_i][_qp](2, 2);
83 
84  // Real pg_viscous_r = -_mu[_qp] * lap_test * tau() *
85  // (convective_term + viscous_term + strongPressureTerm()(_component) +
86  // gravityTerm())(_component);
87 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:117
virtual Real tau()
Definition: INSBase.C:268
const VariableValue & _u_vel
Definition: INSBase.h:67
const VariableValue & _w_vel
Definition: INSBase.h:69
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
bool _laplace
Definition: INSBase.h:106
virtual RealVectorValue gravityTerm()
Definition: INSBase.C:236
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:124
const VariableValue & _v_vel
Definition: INSBase.h:68
Real INSMomentumBase::computeQpResidual ( )
protectedvirtualinherited

Implements INSBase.

Reimplemented in INSMomentumLaplaceFormRZ, and INSMomentumTractionFormRZ.

Definition at line 37 of file INSMomentumBase.C.

Referenced by INSMomentumTractionFormRZ::computeQpResidual(), INSMomentumLaplaceFormRZ::computeQpResidual(), and INSMomentumBase::~INSMomentumBase().

38 {
39  Real r = 0;
40 
41  // viscous term
43 
44  // pressure term
46  r += _grad_test[_i][_qp](_component) * weakPressureTerm();
47  else
48  r += _test[_i][_qp] * strongPressureTerm()(_component);
49 
50  // body force term
51  r += _test[_i][_qp] * (gravityTerm()(_component) - _ffn.value(_t, _q_point[_qp]));
52 
53  // convective term
54  if (_convective_term)
55  r += _test[_i][_qp] * convectiveTerm()(_component);
56 
57  if (_supg)
58  r += computeQpPGResidual();
59 
60  return r;
61 }
virtual Real computeQpResidualViscousPart()=0
virtual Real computeQpPGResidual()
virtual RealVectorValue convectiveTerm()
Definition: INSBase.C:94
bool _convective_term
Definition: INSBase.h:107
virtual RealVectorValue strongPressureTerm()
Definition: INSBase.C:212
virtual RealVectorValue gravityTerm()
Definition: INSBase.C:236
virtual Real weakPressureTerm()
Definition: INSBase.C:218
Real INSMomentumLaplaceForm::computeQpResidualViscousPart ( )
overrideprotectedvirtual

Implements INSMomentumBase.

Definition at line 25 of file INSMomentumLaplaceForm.C.

Referenced by ~INSMomentumLaplaceForm().

26 {
27  // Simplified version: mu * Laplacian(u_component)
28  return _mu[_qp] * (_grad_u[_qp] * _grad_test[_i][_qp]);
29 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
RealVectorValue INSBase::convectiveTerm ( )
protectedvirtualinherited

Definition at line 94 of file INSBase.C.

Referenced by INSMomentumBase::computeQpPGJacobian(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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(), INSMass::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(), INSMass::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(), INSMass::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(), INSMass::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(), INSMass::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(), INSMass::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(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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(), INSMass::computeQpPGJacobian(), INSMomentumBase::computeQpPGJacobian(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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(), INSMass::computeQpPGOffDiagJacobian(), INSMass::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().

unsigned INSMomentumBase::_component
protectedinherited
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().

Function& INSMomentumBase::_ffn
protectedinherited
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 INSMomentumBase::_integrate_p_by_parts
protectedinherited
bool INSBase::_laplace
protectedinherited
const MaterialProperty<Real>& INSBase::_mu
protectedinherited
const VariableValue& INSBase::_p
protectedinherited
unsigned INSBase::_p_var_number
protectedinherited
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 INSMomentumBase::_supg
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

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