LCOV - code coverage report
Current view: top level - src/kernels - INSMassRZ.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: #32971 (54bef8) with base c6cf66 Lines: 24 25 96.0 %
Date: 2026-05-29 20:37:52 Functions: 8 8 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.14