Line data Source code
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 : 12 : registerMooseObject("NavierStokesApp", INSMassRZ); 13 : 14 : InputParameters 15 798 : INSMassRZ::validParams() 16 : { 17 798 : InputParameters params = INSMass::validParams(); 18 798 : 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 798 : return params; 22 0 : } 23 : 24 429 : INSMassRZ::INSMassRZ(const InputParameters & parameters) : INSMass(parameters) {} 25 : 26 : RealVectorValue 27 14907042 : INSMassRZ::strongViscousTermLaplace() 28 : { 29 14907042 : return INSBase::strongViscousTermLaplace() + strongViscousTermLaplaceRZ(); 30 : } 31 : 32 : RealVectorValue 33 12505320 : INSMassRZ::dStrongViscDUCompLaplace(const unsigned int comp) 34 : { 35 12505320 : return INSBase::dStrongViscDUCompLaplace(comp) + dStrongViscDUCompLaplaceRZ(comp); 36 : } 37 : 38 : RealVectorValue 39 3413880 : INSMassRZ::strongViscousTermTraction() 40 : { 41 3413880 : return INSBase::strongViscousTermTraction() + strongViscousTermTractionRZ(); 42 : } 43 : 44 : RealVectorValue 45 2108160 : INSMassRZ::dStrongViscDUCompTraction(const unsigned int comp) 46 : { 47 2108160 : return INSBase::dStrongViscDUCompTraction(comp) + dStrongViscDUCompTractionRZ(comp); 48 : } 49 : 50 : Real 51 9478782 : INSMassRZ::computeQpResidual() 52 : { 53 : // Base class residual contribution 54 9478782 : auto res_base = INSMass::computeQpResidual(); 55 : 56 : // The radial coordinate value. 57 9478782 : const auto r = _q_point[_qp](_rz_radial_coord); 58 : 59 : // The sign of this term is multiplied by -1 here. 60 9478782 : res_base -= ((_rz_radial_coord == 0) ? _u_vel[_qp] : _v_vel[_qp]) / r * _test[_i][_qp]; 61 : 62 9478782 : return res_base; 63 : } 64 : 65 : Real 66 86776920 : INSMassRZ::computeQpOffDiagJacobian(const unsigned int jvar) 67 : { 68 : // Base class jacobian contribution 69 86776920 : auto jac_base = INSMass::computeQpOffDiagJacobian(jvar); 70 : 71 : // The radial coordinate value. 72 86776920 : const auto r = _q_point[_qp](_rz_radial_coord); 73 : 74 86776920 : if (jvar == ((_rz_radial_coord == 0) ? _u_vel_var_number : _v_vel_var_number)) 75 43388460 : jac_base -= _phi[_j][_qp] / r * _test[_i][_qp]; 76 : 77 86776920 : return jac_base; 78 : }