https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSMomentumLaplaceFormRZ.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, using the "
21 "'Laplace' form of the governing equations.");
22 return params;
23}
24
29
30RealVectorValue
35
36RealVectorValue
41
42Real
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
65Real
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
82Real
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}
registerMooseObject("NavierStokesApp", INSMomentumLaplaceFormRZ)
const VariableValue & _p
Definition INSBase.h:96
const MaterialProperty< Real > & _mu
Definition INSBase.h:133
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition INSBase.h:151
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp)
Definition INSBase.C:185
RealVectorValue strongViscousTermLaplaceRZ() const
Computes the additional RZ terms for the Laplace form of the strong viscous term.
Definition INSBase.C:364
const VariableValue & _u_vel
Definition INSBase.h:93
unsigned _p_var_number
Definition INSBase.h:128
const VariableValue & _v_vel
Definition INSBase.h:94
virtual RealVectorValue strongViscousTermLaplace()
Definition INSBase.C:170
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
This class computes additional momentum equation residual and Jacobian contributions for the incompre...
INSMomentumLaplaceFormRZ(const InputParameters &parameters)
virtual Real computeQpJacobian() override
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp) override
static InputParameters validParams()
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
virtual RealVectorValue strongViscousTermLaplace() override
virtual Real computeQpResidual() override
This class computes momentum equation residual and Jacobian viscous contributions for the "Laplacian"...
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const MooseArray< Point > & _q_point
unsigned int _j
unsigned int _i
virtual Real computeQpResidual()=0
const VariablePhiValue & _phi
virtual Real computeQpOffDiagJacobian(unsigned int)
const VariableTestValue & _test
virtual Real computeQpJacobian()