https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
28
29RealVectorValue
34
35RealVectorValue
40
41Real
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
63Real
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
80Real
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}
registerMooseObject("NavierStokesApp", INSMomentumTractionFormRZ)
const VariableValue & _p
Definition INSBase.h:96
const MaterialProperty< Real > & _mu
Definition INSBase.h:133
RealVectorValue strongViscousTermTractionRZ() const
Computes the additional RZ terms for the Traction form of the strong viscous term.
Definition INSBase.C:400
const unsigned int _rz_radial_coord
The radial coordinate index for RZ coordinate systems.
Definition INSBase.h:151
virtual RealVectorValue strongViscousTermTraction()
Definition INSBase.C:177
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp)
Definition INSBase.C:194
const VariableValue & _u_vel
Definition INSBase.h:93
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
unsigned _p_var_number
Definition INSBase.h:128
const VariableValue & _v_vel
Definition INSBase.h:94
This class computes additional momentum equation residual and Jacobian contributions for the incompre...
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
virtual RealVectorValue strongViscousTermTraction() override
virtual Real computeQpJacobian() override
INSMomentumTractionFormRZ(const InputParameters &parameters)
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp) override
static InputParameters validParams()
virtual Real computeQpResidual() override
This class computes momentum equation residual and Jacobian viscous contributions for the "traction" ...
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()