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 "FVFluxBC.h" 13 : #include "INSFVMomentumResidualObject.h" 14 : 15 : /** 16 : * A flux boundary condition that momentum residual objects that add boundary flux terms should 17 : * inherit from 18 : */ 19 : class INSFVFluxBC : public FVFluxBC, public INSFVMomentumResidualObject 20 : { 21 : public: 22 : static InputParameters validParams(); 23 : INSFVFluxBC(const InputParameters & params); 24 : 25 : using INSFVMomentumResidualObject::gatherRCData; 26 0 : void gatherRCData(const Elem &) override final {} 27 : 28 7500 : virtual ~INSFVFluxBC() = default; 29 : 30 : void computeResidual(const FaceInfo & fi) override; 31 : void computeJacobian(const FaceInfo & fi) override; 32 : void computeResidualAndJacobian(const FaceInfo & fi) override; 33 : 34 : /** 35 : * Process into either the system residual or Jacobian 36 : */ 37 : void addResidualAndJacobian(const ADReal & residual); 38 : 39 : protected: 40 : ADReal computeQpResidual() override final; 41 : 42 : /// Compute the contribution which goes into the residual of the segregated system. This 43 : /// needs to accomodate the different linearization approaches needed to get the suitable 44 : /// system matrix contributions when the Jacobian assembly routine is called. 45 0 : virtual ADReal computeSegregatedContribution() 46 : { 47 0 : mooseError("computeSegregatedContribution not implemented for ", 48 : this->type(), 49 : ". This function needs to be implemented to be able to use this object with a " 50 : "segregated solver!"); 51 : } 52 : };