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 "WCNSFVFlowPhysicsBase.h" 13 : #include "WCNSFVTurbulencePhysics.h" 14 : 15 : /** 16 : * Creates all the objects needed to solve the Navier-Stokes equations with the SIMPLE algorithm 17 : * using the linear finite volume discretization 18 : * Currently does not implement: 19 : * - friction 20 : * - other momentum sources and sinks 21 : * - porous media 22 : * - transients 23 : */ 24 168 : class WCNSLinearFVFlowPhysics final : public WCNSFVFlowPhysicsBase 25 : { 26 : public: 27 : static InputParameters validParams(); 28 : 29 : WCNSLinearFVFlowPhysics(const InputParameters & parameters); 30 : 31 : protected: 32 : virtual void initializePhysicsAdditional() override; 33 : 34 : private: 35 : virtual void addSolverVariables() override; 36 : virtual void addFVInterpolationMethods() override; 37 : virtual void addFVKernels() override; 38 : virtual void addUserObjects() override; 39 : 40 : /// Function adding kernels for the incompressible pressure correction equation 41 : void addPressureCorrectionKernels(); 42 : 43 : /** 44 : * Functions adding kernels for the incompressible momentum equation 45 : * If the material properties are not constant, these can be used for 46 : * weakly-compressible simulations (except the Boussinesq kernel) as well. 47 : */ 48 : void addMomentumTimeKernels() override; 49 : void addMomentumFluxKernels(); 50 : virtual void addMomentumPressureKernels() override; 51 : virtual void addMomentumGravityKernels() override; 52 : virtual void addMomentumFrictionKernels() override; 53 : virtual void addMomentumBoussinesqKernels() override; 54 : 55 : virtual void addInletBC() override; 56 : virtual void addOutletBC() override; 57 : virtual void addWallsBC() override; 58 169 : virtual void addSeparatorBC() override {} 59 : 60 169 : virtual bool hasForchheimerFriction() const override { return false; }; 61 : 62 : virtual void addRhieChowUserObjects() override; 63 : virtual void addFunctorMaterials() override; 64 : 65 0 : virtual MooseFunctorName getLinearFrictionCoefName() const override 66 : { 67 0 : mooseError("Not implemented"); 68 : } 69 : 70 : unsigned short getNumberAlgebraicGhostingLayersNeeded() const override; 71 : 72 : /// Whether to use the correction term for non-orthogonality 73 : const bool _non_orthogonal_correction; 74 : };