LCOV - code coverage report
Current view: top level - include/linearfvkernels - LinearWCNSFV2PMomentumDriftFlux.h (source / functions) Hit Total Coverage
Test: idaholab/moose navier_stokes: 9fc4b0 Lines: 2 2 100.0 %
Date: 2025-08-14 10:14:56 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://www.mooseframework.org
       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             : #pragma once
      11             : 
      12             : #include "MathFVUtils.h"
      13             : #include "LinearFVFluxKernel.h"
      14             : 
      15             : class RhieChowMassFlux;
      16             : class LinearFVBoundaryCondition;
      17             : 
      18             : /**
      19             :  * Adds drift flux kernel coming for two-phase mixture model for the linear finite volume
      20             :  * discretization
      21             :  */
      22             : class LinearWCNSFV2PMomentumDriftFlux : public LinearFVFluxKernel
      23             : {
      24             : public:
      25             :   static InputParameters validParams();
      26             :   LinearWCNSFV2PMomentumDriftFlux(const InputParameters & params);
      27             : 
      28             :   virtual Real computeElemMatrixContribution() override;
      29             : 
      30             :   virtual Real computeNeighborMatrixContribution() override;
      31             : 
      32             :   virtual Real computeElemRightHandSideContribution() override;
      33             : 
      34             :   virtual Real computeNeighborRightHandSideContribution() override;
      35             : 
      36      102816 :   virtual Real computeBoundaryMatrixContribution(const LinearFVBoundaryCondition &) override
      37             :   {
      38      102816 :     return 0;
      39             :   }
      40             :   virtual Real computeBoundaryRHSContribution(const LinearFVBoundaryCondition & bc) override;
      41             : 
      42             :   /**
      43             :    * Set the current FaceInfo object. We override this here to make sure the face velocity
      44             :    * evaluation happens only once and that it can be reused for the matrix and right hand side
      45             :    * contributions.
      46             :    * @param face_info The face info which will be used as current face info
      47             :    */
      48             :   virtual void setupFaceData(const FaceInfo * face_info) override;
      49             : 
      50             : protected:
      51             :   /// Computes the matrix contribution of the advective flux on the element side of current face
      52             :   /// when the face is an internal face (doesn't have associated boundary conditions).
      53             :   Real computeInternalAdvectionElemMatrixContribution();
      54             : 
      55             :   /// Computes the matrix contribution of the advective flux on the neighbor side of current face
      56             :   /// when the face is an internal face (doesn't have associated boundary conditions).
      57             :   Real computeInternalAdvectionNeighborMatrixContribution();
      58             : 
      59             :   /// Compute the face flux
      60             :   void computeFlux();
      61             : 
      62             :   /// The dimension of the simulation
      63             :   const unsigned int _dim;
      64             : 
      65             :   /// The Rhie-Chow user object that provides us with the face velocity
      66             :   const RhieChowMassFlux & _mass_flux_provider;
      67             : 
      68             :   /// Dispersed phase density
      69             :   const Moose::Functor<Real> & _rho_d;
      70             : 
      71             :   /// Dispersed phase fraction
      72             :   const Moose::Functor<Real> & _f_d;
      73             : 
      74             :   /// slip velocity in direction x
      75             :   const Moose::Functor<Real> & _u_slip;
      76             :   /// slip velocity in direction y
      77             :   const Moose::Functor<Real> * const _v_slip;
      78             :   /// slip velocity in direction z
      79             :   const Moose::Functor<Real> * const _w_slip;
      80             : 
      81             :   /// The index of the momentum component
      82             :   const unsigned int _index;
      83             : 
      84             :   /// The face interpolation method for the density
      85             :   const Moose::FV::InterpMethod _density_interp_method;
      86             : 
      87             :   /// Face flux
      88             :   Real _face_flux;
      89             :   /// Advected coefficients
      90             :   std::pair<Real, Real> _velocity_interp_coeffs;
      91             : };

Generated by: LCOV version 1.14