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 : #pragma once 11 : 12 : #include "INSFVFluxBC.h" 13 : #include "INSFVFullyDevelopedFlowBC.h" 14 : 15 : class INSFVVelocityVariable; 16 : 17 : /** 18 : * A class for finite volume fully developed outflow boundary conditions for the momentum equation 19 : * It advects momentum at the outflow, and may replace outlet pressure boundary conditions 20 : * when selecting a mean-pressure approach. 21 : */ 22 : class INSFVMomentumAdvectionOutflowBC : public INSFVFluxBC, public INSFVFullyDevelopedFlowBC 23 : { 24 : public: 25 : static InputParameters validParams(); 26 : INSFVMomentumAdvectionOutflowBC(const InputParameters & params); 27 : 28 : using INSFVFluxBC::gatherRCData; 29 : void gatherRCData(const FaceInfo &) override; 30 : 31 : protected: 32 : /** 33 : * A virtual method that can be overridden in PINSFV classes to return a non-unity porosity 34 : */ 35 28676 : virtual const Moose::FunctorBase<ADReal> & epsFunctor() const { return _unity_functor; } 36 : 37 : ADReal computeSegregatedContribution() override; 38 : 39 : /// Computes the advected quantity which is then used on gatherRCData 40 : /// and computeSegregatedContribution 41 : /// @param boundary_face The boundary face argument 42 : /// @param state The state (time, nonolinar iterate) argument 43 : ADReal computeAdvectedQuantity(const Moose::FaceArg & boundary_face, 44 : const Moose::StateArg & state); 45 : 46 : /// x-velocity 47 : const Moose::Functor<ADReal> & _u; 48 : /// y-velocity 49 : const Moose::Functor<ADReal> * const _v; 50 : /// z-velocity 51 : const Moose::Functor<ADReal> * const _w; 52 : 53 : /// the dimension of the simulation 54 : const unsigned int _dim; 55 : 56 : /// The density 57 : const Moose::Functor<ADReal> & _rho; 58 : 59 : /// A unity functor used in the \p epsFunctor virtual method 60 : const Moose::ConstantFunctor<ADReal> _unity_functor{1}; 61 : };