https://mooseframework.inl.gov
Loading...
Searching...
No Matches
INSMassRZ.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
10#include "INSMassRZ.h"
11
12registerMooseObject("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
24INSMassRZ::INSMassRZ(const InputParameters & parameters) : INSMass(parameters) {}
25
26RealVectorValue
31
32RealVectorValue
37
38RealVectorValue
43
44RealVectorValue
49
50Real
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
65Real
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
75 jac_base -= _phi[_j][_qp] / r * _test[_i][_qp];
76
77 return jac_base;
78}
registerMooseObject("NavierStokesApp", INSMassRZ)
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 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
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
const VariableValue & _v_vel
Definition INSBase.h:94
unsigned _v_vel_var_number
Definition INSBase.h:126
virtual RealVectorValue strongViscousTermLaplace()
Definition INSBase.C:170
unsigned _u_vel_var_number
Definition INSBase.h:125
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 the mass equation residual and Jacobian contributions for the incompressible Navi...
Definition INSMassRZ.h:24
virtual RealVectorValue dStrongViscDUCompTraction(unsigned comp) override
Definition INSMassRZ.C:45
virtual Real computeQpResidual() override
Definition INSMassRZ.C:51
virtual RealVectorValue dStrongViscDUCompLaplace(unsigned comp) override
Definition INSMassRZ.C:33
static InputParameters validParams()
Definition INSMassRZ.C:15
virtual Real computeQpOffDiagJacobian(unsigned jvar) override
Definition INSMassRZ.C:66
virtual RealVectorValue strongViscousTermTraction() override
Definition INSMassRZ.C:39
virtual RealVectorValue strongViscousTermLaplace() override
Definition INSMassRZ.C:27
INSMassRZ(const InputParameters &parameters)
Definition INSMassRZ.C:24
This class computes the mass equation residual and Jacobian contributions for the incompressible Navi...
Definition INSMass.h:22
virtual Real computeQpResidual()
Definition INSMass.C:42
virtual Real computeQpOffDiagJacobian(unsigned jvar)
Definition INSMass.C:92
static InputParameters validParams()
Definition INSMass.C:16
void addClassDescription(const std::string &doc_string)
unsigned int _qp
const MooseArray< Point > & _q_point
unsigned int _j
unsigned int _i
const VariablePhiValue & _phi
const VariableTestValue & _test