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

This class computes additional momentum equation residual and Jacobian contributions for the incompressible Navier-Stokes momentum equation in RZ (axisymmetric cylindrical) coordinates. More...

#include <INSMomentumTractionFormRZ.h>

Inheritance diagram for INSMomentumTractionFormRZ:
[legend]

Public Member Functions

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

Protected Member Functions

virtual RealVectorValue strongViscousTermTraction () override
 
virtual RealVectorValue dStrongViscDUCompTraction (unsigned comp) override
 
virtual Real computeQpResidual () override
 
virtual Real computeQpJacobian () override
 
virtual Real computeQpOffDiagJacobian (unsigned jvar) override
 
virtual Real computeQpResidualViscousPart () override
 
virtual Real computeQpJacobianViscousPart () override
 
virtual Real computeQpOffDiagJacobianViscousPart (unsigned jvar) override
 
virtual Real computeQpPGResidual ()
 
virtual Real computeQpPGJacobian (unsigned comp)
 
virtual RealVectorValue convectiveTerm ()
 
virtual RealVectorValue dConvecDUComp (unsigned comp)
 
virtual RealVectorValue strongViscousTermLaplace ()
 
virtual RealVectorValue dStrongViscDUCompLaplace (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 additional momentum equation residual and Jacobian contributions for the incompressible Navier-Stokes momentum equation in RZ (axisymmetric cylindrical) coordinates.

Definition at line 23 of file INSMomentumTractionFormRZ.h.

Constructor & Destructor Documentation

INSMomentumTractionFormRZ::INSMomentumTractionFormRZ ( const InputParameters &  parameters)

Definition at line 20 of file INSMomentumTractionFormRZ.C.

21  : INSMomentumTractionForm(parameters)
22 {
23 }
INSMomentumTractionForm(const InputParameters &parameters)
virtual INSMomentumTractionFormRZ::~INSMomentumTractionFormRZ ( )
inlinevirtual

Definition at line 28 of file INSMomentumTractionFormRZ.h.

28 {}

Member Function Documentation

Real INSMomentumTractionFormRZ::computeQpJacobian ( )
overrideprotectedvirtual

Reimplemented from INSMomentumBase.

Definition at line 73 of file INSMomentumTractionFormRZ.C.

Referenced by ~INSMomentumTractionFormRZ().

74 {
75  // Base class jacobian contribution
77 
78  // If this is the radial component of momentum, there is an extra term for RZ.
79  if (_component == 0)
80  {
81  const Real r = _q_point[_qp](0);
82  jac_base += 2. * _mu[_qp] * _phi[_j][_qp] * _test[_i][_qp] / (r * r);
83  }
84 
85  return jac_base;
86 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
virtual Real computeQpJacobian()
Real INSMomentumTractionForm::computeQpJacobianViscousPart ( )
overrideprotectedvirtualinherited

Implements INSMomentumBase.

Definition at line 59 of file INSMomentumTractionForm.C.

Referenced by INSMomentumTractionForm::~INSMomentumTractionForm().

60 {
61  // Viscous part, full stress tensor. The extra contribution comes from the "2"
62  // on the diagonal of the viscous stress tensor.
63  return _mu[_qp] * (_grad_phi[_j][_qp] * _grad_test[_i][_qp] +
64  _grad_phi[_j][_qp](_component) * _grad_test[_i][_qp](_component));
65 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
Real INSMomentumTractionFormRZ::computeQpOffDiagJacobian ( unsigned  jvar)
overrideprotectedvirtual

Reimplemented from INSMomentumBase.

Definition at line 89 of file INSMomentumTractionFormRZ.C.

Referenced by ~INSMomentumTractionFormRZ().

90 {
91  // Base class jacobian contribution
93 
94  // If we're getting the pressure Jacobian contribution, and we
95  // integrated the pressure term by parts, there is an extra term for
96  // RZ.
97  if (jvar == _p_var_number && _component == 0 && _integrate_p_by_parts)
98  {
99  const Real r = _q_point[_qp](0);
100  jac_base += -_phi[_j][_qp] / r * _test[_i][_qp];
101  }
102 
103  return jac_base;
104 }
virtual Real computeQpOffDiagJacobian(unsigned jvar)
unsigned _p_var_number
Definition: INSBase.h:97
Real INSMomentumTractionForm::computeQpOffDiagJacobianViscousPart ( unsigned  jvar)
overrideprotectedvirtualinherited

Implements INSMomentumBase.

Definition at line 68 of file INSMomentumTractionForm.C.

Referenced by INSMomentumTractionForm::~INSMomentumTractionForm().

69 {
70  // In Stokes/Laplacian version, off-diag Jacobian entries wrt u,v,w are zero
71  if (jvar == _u_vel_var_number)
72  return _mu[_qp] * _grad_phi[_j][_qp](_component) * _grad_test[_i][_qp](0);
73 
74  else if (jvar == _v_vel_var_number)
75  return _mu[_qp] * _grad_phi[_j][_qp](_component) * _grad_test[_i][_qp](1);
76 
77  else if (jvar == _w_vel_var_number)
78  return _mu[_qp] * _grad_phi[_j][_qp](_component) * _grad_test[_i][_qp](2);
79 
80  else
81  return 0;
82 }
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
unsigned _w_vel_var_number
Definition: INSBase.h:96
unsigned _u_vel_var_number
Definition: INSBase.h:94
unsigned _v_vel_var_number
Definition: INSBase.h:95
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 INSMomentumTractionFormRZ::computeQpResidual ( )
overrideprotectedvirtual

Reimplemented from INSMomentumBase.

Definition at line 52 of file INSMomentumTractionFormRZ.C.

Referenced by ~INSMomentumTractionFormRZ().

53 {
54  // Base class residual contribution
56 
57  if (_component == 0)
58  {
59  const Real r = _q_point[_qp](0);
60 
61  // If this is the radial component of momentum, there is an extra term for RZ.
62  res_base += 2. * _mu[_qp] * _u_vel[_qp] / (r * r) * _test[_i][_qp];
63 
64  // If the pressure is also integrated by parts, there is an extra term in RZ.
66  res_base += -_p[_qp] / r * _test[_i][_qp];
67  }
68 
69  return res_base;
70 }
const VariableValue & _p
Definition: INSBase.h:70
const VariableValue & _u_vel
Definition: INSBase.h:67
const MaterialProperty< Real > & _mu
Definition: INSBase.h:102
virtual Real computeQpResidual()
Real INSMomentumTractionForm::computeQpResidualViscousPart ( )
overrideprotectedvirtualinherited

Implements INSMomentumBase.

Definition at line 25 of file INSMomentumTractionForm.C.

Referenced by INSMomentumTractionForm::~INSMomentumTractionForm().

26 {
27  // The component'th row (or col, it's symmetric) of the viscous stress tensor
28  RealVectorValue tau_row;
29 
30  switch (_component)
31  {
32  case 0:
33  tau_row(0) = 2. * _grad_u_vel[_qp](0); // 2*du/dx1
34  tau_row(1) = _grad_u_vel[_qp](1) + _grad_v_vel[_qp](0); // du/dx2 + dv/dx1
35  tau_row(2) = _grad_u_vel[_qp](2) + _grad_w_vel[_qp](0); // du/dx3 + dw/dx1
36  break;
37 
38  case 1:
39  tau_row(0) = _grad_v_vel[_qp](0) + _grad_u_vel[_qp](1); // dv/dx1 + du/dx2
40  tau_row(1) = 2. * _grad_v_vel[_qp](1); // 2*dv/dx2
41  tau_row(2) = _grad_v_vel[_qp](2) + _grad_w_vel[_qp](1); // dv/dx3 + dw/dx2
42  break;
43 
44  case 2:
45  tau_row(0) = _grad_w_vel[_qp](0) + _grad_u_vel[_qp](2); // dw/dx1 + du/dx3
46  tau_row(1) = _grad_w_vel[_qp](1) + _grad_v_vel[_qp](2); // dw/dx2 + dv/dx3
47  tau_row(2) = 2. * _grad_w_vel[_qp](2); // 2*dw/dx3
48  break;
49 
50  default:
51  mooseError("Unrecognized _component requested.");
52  }
53 
54  // The viscous part, _mu[_qp] * tau : grad(v)
55  return _mu[_qp] * (tau_row * _grad_test[_i][_qp]);
56 }
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::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 INSMomentumTractionFormRZ::dStrongViscDUCompTraction ( unsigned  comp)
overrideprotectedvirtual

Reimplemented from INSBase.

Definition at line 36 of file INSMomentumTractionFormRZ.C.

Referenced by ~INSMomentumTractionFormRZ().

37 {
38  const Real & r = _q_point[_qp](0);
39  RealVectorValue add_jac(0, 0, 0);
40  if (comp == 0)
41  {
42  add_jac(0) = 2. * _mu[_qp] * (_phi[_j][_qp] / (r * r) - _grad_phi[_j][_qp](0) / r);
43  add_jac(1) = -_mu[_qp] / r * _grad_phi[_j][_qp](1);
44  }
45  else if (comp == 1)
46  add_jac(1) = -_mu[_qp] * _grad_phi[_j][_qp](0) / r;
47 
48  return INSBase::dStrongViscDUCompTraction(comp) + add_jac;
49 }
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:141
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 INSMomentumTractionFormRZ::strongViscousTermTraction ( )
overrideprotectedvirtual

Reimplemented from INSBase.

Definition at line 26 of file INSMomentumTractionFormRZ.C.

Referenced by ~INSMomentumTractionFormRZ().

27 {
28  const Real & r = _q_point[_qp](0);
30  RealVectorValue(2. * _mu[_qp] * (_u_vel[_qp] / (r * r) - _grad_u_vel[_qp](0) / r),
31  -_mu[_qp] / r * (_grad_v_vel[_qp](0) + _grad_u_vel[_qp](1)),
32  0);
33 }
const VariableValue & _u_vel
Definition: INSBase.h:67
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
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:124
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: