www.mooseframework.org
INSMassRZ.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 
10 #include "INSMassRZ.h"
11 
12 registerMooseObject("NavierStokesApp", INSMassRZ);
13 
16 {
18  params.addClassDescription("This class computes the mass equation residual and Jacobian "
19  "contributions for the incompressible Navier-Stokes momentum equation "
20  "in RZ coordinates.");
21  return params;
22 }
23 
24 INSMassRZ::INSMassRZ(const InputParameters & parameters) : INSMass(parameters) {}
25 
28 {
30 }
31 
33 INSMassRZ::dStrongViscDUCompLaplace(const unsigned int comp)
34 {
36 }
37 
40 {
42 }
43 
45 INSMassRZ::dStrongViscDUCompTraction(const unsigned int comp)
46 {
48 }
49 
50 Real
52 {
53  // Base class residual contribution
54  auto res_base = INSMass::computeQpResidual();
55 
56  // The radial coordinate value.
57  const auto r = _q_point[_qp](_rz_radial_coord);
58 
59  // The sign of this term is multiplied by -1 here.
60  res_base -= ((_rz_radial_coord == 0) ? _u_vel[_qp] : _v_vel[_qp]) / r * _test[_i][_qp];
61 
62  return res_base;
63 }
64 
65 Real
66 INSMassRZ::computeQpOffDiagJacobian(const unsigned int jvar)
67 {
68  // Base class jacobian contribution
69  auto jac_base = INSMass::computeQpOffDiagJacobian(jvar);
70 
71  // The radial coordinate value.
72  const auto r = _q_point[_qp](_rz_radial_coord);
73 
74  if (jvar == ((_rz_radial_coord == 0) ? _u_vel_var_number : _v_vel_var_number))
75  jac_base -= _phi[_j][_qp] / r * _test[_i][_qp];
76 
77  return jac_base;
78 }
virtual RealVectorValue strongViscousTermLaplace()
Definition: INSBase.C:170
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) override
Definition: INSMassRZ.C:45
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
Definition: INSMassRZ.C:66
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition: INSBase.C:194
virtual RealVectorValue strongViscousTermTraction() override
Definition: INSMassRZ.C:39
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition: INSMass.C:92
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 unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition: INSBase.h:151
registerMooseObject("NavierStokesApp", INSMassRZ)
This class computes the mass equation residual and Jacobian contributions for the incompressible Navi...
Definition: INSMass.h:21
static InputParameters validParams()
Definition: INSMass.C:16
static InputParameters validParams()
Definition: INSMassRZ.C:15
virtual Real computeQpResidual() override
Definition: INSMassRZ.C:51
RealVectorValue strongViscousTermTractionRZ() const
Computes the additional RZ terms for the Traction form of the strong viscous term.
Definition: INSBase.C:400
const VariableTestValue & _test
INSMassRZ(const InputParameters &parameters)
Definition: INSMassRZ.C:24
unsigned int _i
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp) override
Definition: INSMassRZ.C:33
unsigned int _j
unsigned _u_vel_var_number
Definition: INSBase.h:125
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
Definition: INSBase.C:185
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
This class computes the mass equation residual and Jacobian contributions for the incompressible Navi...
Definition: INSMassRZ.h:23
RealVectorValue strongViscousTermLaplaceRZ() const
Computes the additional RZ terms for the Laplace form of the strong viscous term. ...
Definition: INSBase.C:364
virtual RealVectorValue strongViscousTermLaplace() override
Definition: INSMassRZ.C:27
virtual RealVectorValue strongViscousTermTraction()
Definition: INSBase.C:177
void addClassDescription(const std::string &doc_string)
const VariableValue & _v_vel
Definition: INSBase.h:94
unsigned _v_vel_var_number
Definition: INSBase.h:126
virtual Real computeQpResidual()
Definition: INSMass.C:42
const VariablePhiValue & _phi
const MooseArray< Point > & _q_point
unsigned int _qp