https://mooseframework.inl.gov
INSMomentumTractionFormRZ.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
11 
13 
16 {
18  params.addClassDescription("This class computes additional momentum equation residual and "
19  "Jacobian contributions for the incompressible Navier-Stokes momentum "
20  "equation in RZ (axisymmetric cylindrical) coordinates.");
21  return params;
22 }
23 
25  : INSMomentumTractionForm(parameters)
26 {
27 }
28 
31 {
33 }
34 
37 {
39 }
40 
41 Real
43 {
44  // Base class residual contribution
46 
48  {
49  const auto r = _q_point[_qp](_rz_radial_coord);
50  const auto r_vel = (_rz_radial_coord == 0) ? _u_vel[_qp] : _v_vel[_qp];
51 
52  // If this is the radial component of momentum, there is an extra term for RZ.
53  res_base += 2. * _mu[_qp] * r_vel / (r * r) * _test[_i][_qp];
54 
55  // If the pressure is also integrated by parts, there is an extra term in RZ.
57  res_base += -_p[_qp] / r * _test[_i][_qp];
58  }
59 
60  return res_base;
61 }
62 
63 Real
65 {
66  // Base class jacobian contribution
68 
70  {
71  const auto r = _q_point[_qp](_rz_radial_coord);
72 
73  // If this is the radial component of momentum, there is an extra term for RZ.
74  jac_base += 2. * _mu[_qp] * _phi[_j][_qp] / (r * r) * _test[_i][_qp];
75  }
76 
77  return jac_base;
78 }
79 
80 Real
82 {
83  // Base class jacobian contribution
85 
86  // If we're getting the pressure Jacobian contribution, and we
87  // integrated the pressure term by parts, there is an extra term for
88  // RZ.
90  {
91  const auto r = _q_point[_qp](_rz_radial_coord);
92  jac_base += -_phi[_j][_qp] / r * _test[_i][_qp];
93  }
94 
95  return jac_base;
96 }
const VariableValue & _p
Definition: INSBase.h:96
RealVectorValue dStrongViscDUCompTractionRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Traction form of the strong viscous term fo...
Definition: INSBase.C:415
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:194
static InputParameters validParams()
const VariableValue & _u_vel
Definition: INSBase.h:93
INSMomentumTractionFormRZ(const InputParameters &parameters)
const MaterialProperty< Real > & _mu
Definition: INSBase.h:133
virtual Real computeQpResidual()
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition: INSBase.h:151
virtual Real computeQpJacobian()
RealVectorValue strongViscousTermTractionRZ() const
Computes the additional RZ terms for the Traction form of the strong viscous term.
Definition: INSBase.C:400
const VariableTestValue & _test
virtual RealVectorValue strongViscousTermTraction() override
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
unsigned int _i
virtual Real computeQpJacobian() override
This class computes momentum equation residual and Jacobian viscous contributions for the "traction" ...
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
registerMooseObject("NavierStokesApp", INSMomentumTractionFormRZ)
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp) override
unsigned int _j
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This class computes additional momentum equation residual and Jacobian contributions for the incompre...
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:177
void addClassDescription(const std::string &doc_string)
const VariableValue & _v_vel
Definition: INSBase.h:94
virtual Real computeQpResidual() override
const VariablePhiValue & _phi
unsigned _p_var_number
Definition: INSBase.h:128
const MooseArray< Point > & _q_point
unsigned int _qp