LCOV - code coverage report
Current view: top level - src/bcs - NSMomentumInviscidNoPressureImplicitFlowBC.C (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 0 19 0.0 %
Date: 2025-08-14 10:14:56 Functions: 0 5 0.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 "NSMomentumInviscidNoPressureImplicitFlowBC.h"
      11             : 
      12             : registerMooseObject("NavierStokesApp", NSMomentumInviscidNoPressureImplicitFlowBC);
      13             : 
      14             : InputParameters
      15           0 : NSMomentumInviscidNoPressureImplicitFlowBC::validParams()
      16             : {
      17           0 :   InputParameters params = NSMomentumInviscidBC::validParams();
      18           0 :   params.addClassDescription(
      19             :       "Momentum equation boundary condition used when pressure *is not* integrated by parts.");
      20           0 :   return params;
      21           0 : }
      22             : 
      23           0 : NSMomentumInviscidNoPressureImplicitFlowBC::NSMomentumInviscidNoPressureImplicitFlowBC(
      24           0 :     const InputParameters & parameters)
      25           0 :   : NSMomentumInviscidBC(parameters)
      26             : {
      27           0 : }
      28             : 
      29             : Real
      30           0 : NSMomentumInviscidNoPressureImplicitFlowBC::computeQpResidual()
      31             : {
      32             :   // Velocity vector object
      33           0 :   RealVectorValue vel(_u_vel[_qp], _v_vel[_qp], _w_vel[_qp]);
      34             : 
      35             :   // Velocity vector dotted with normal
      36           0 :   Real u_dot_n = vel * _normals[_qp];
      37             : 
      38             :   // The current value of the vector (rho*u)(u.n)
      39           0 :   RealVectorValue rhou_udotn = u_dot_n * _rho[_qp] * vel;
      40             : 
      41           0 :   return convectiveQpResidualHelper(rhou_udotn(_component));
      42             : }
      43             : 
      44             : Real
      45           0 : NSMomentumInviscidNoPressureImplicitFlowBC::computeQpJacobian()
      46             : {
      47             :   // There is no Jacobian for the pressure term when the pressure is specified,
      48             :   // so all we have left is the convective part.  The on-diagonal variable number
      49             :   // is _component+1
      50           0 :   return convectiveQpJacobianHelper(_component + 1);
      51             : }
      52             : 
      53             : Real
      54           0 : NSMomentumInviscidNoPressureImplicitFlowBC::computeQpOffDiagJacobian(unsigned int jvar)
      55             : {
      56           0 :   if (isNSVariable(jvar))
      57           0 :     return convectiveQpJacobianHelper(mapVarNumber(jvar));
      58             :   else
      59             :     return 0.0;
      60             : }

Generated by: LCOV version 1.14