www.mooseframework.org
INSMomentumLaplaceFormRZ.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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, using the "
21  "'Laplace' form of the governing equations.");
22  return params;
23 }
24 
26  : INSMomentumLaplaceForm(parameters)
27 {
28 }
29 
32 {
34 }
35 
38 {
40 }
41 
42 Real
44 {
45  // Base class residual contribution
47 
49  {
50  const auto r = _q_point[_qp](_rz_radial_coord);
51 
52  // If this is the radial component of momentum, there is an extra term for RZ.
53  // The only difference between this and the traction form is a factor of 2.
54  res_base +=
55  _mu[_qp] * ((_rz_radial_coord == 0) ? _u_vel[_qp] : _v_vel[_qp]) / (r * r) * _test[_i][_qp];
56 
57  // If the pressure is also integrated by parts, there is an extra term in RZ.
59  res_base += -_p[_qp] / r * _test[_i][_qp];
60  }
61 
62  return res_base;
63 }
64 
65 Real
67 {
68  // Base class jacobian contribution
70 
71  // If this is the radial component of momentum, there is an extra term for RZ.
73  {
74  const auto r = _q_point[_qp](_rz_radial_coord);
75  // The only difference between this and the traction form is a factor of 2.
76  jac_base += _mu[_qp] * _phi[_j][_qp] * _test[_i][_qp] / (r * r);
77  }
78 
79  return jac_base;
80 }
81 
82 Real
84 {
85  // Base class jacobian contribution
87 
88  // If we're getting the pressure Jacobian contribution, and we
89  // integrated the pressure term by parts, there is an extra term for
90  // RZ.
92  {
93  const auto r = _q_point[_qp](_rz_radial_coord);
94  jac_base += -_phi[_j][_qp] / r * _test[_i][_qp];
95  }
96 
97  return jac_base;
98 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:170
const VariableValue & _p
Definition: INSBase.h:96
INSMomentumLaplaceFormRZ(const InputParameters &parameters)
RealVectorValue dStrongViscDUCompLaplaceRZ(const unsigned int comp) const
Computes the Jacobian for the additional RZ terms for the Laplace form of the strong viscous term for...
Definition: INSBase.C:388
const VariableValue & _u_vel
Definition: INSBase.h:93
const MaterialProperty< Real > & _mu
Definition: INSBase.h:133
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp) override
virtual Real computeQpResidual()
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition: INSBase.h:151
virtual Real computeQpJacobian() override
virtual Real computeQpJacobian()
const VariableTestValue & _test
registerMooseObject("NavierStokesApp", INSMomentumLaplaceFormRZ)
virtual Real computeQpResidual() override
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar)
unsigned int _i
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
This class computes additional momentum equation residual and Jacobian contributions for the incompre...
This class computes momentum equation residual and Jacobian viscous contributions for the "Laplacian"...
unsigned int _j
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
Definition: INSBase.C:185
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
RealVectorValue strongViscousTermLaplaceRZ() const
Computes the additional RZ terms for the Laplace form of the strong viscous term. ...
Definition: INSBase.C:364
void addClassDescription(const std::string &doc_string)
const VariableValue & _v_vel
Definition: INSBase.h:94
virtual RealVectorValue strongViscousTermLaplace() override
static InputParameters validParams()
const VariablePhiValue & _phi
unsigned _p_var_number
Definition: INSBase.h:128
const MooseArray< Point > & _q_point
unsigned int _qp