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 : virtual std::vector<UserObjectName> getSuppliedUserObjects() const override; 32 : 33 : protected: 34 : virtual void initializePhysicsAdditional() override; 35 : 36 : private: 37 : virtual void addSolverVariables() override; 38 : virtual void addFVInterpolationMethods() override; 39 : virtual void addFVKernels() override; 40 : virtual void addUserObjects() override; 41 : 42 : /// Function adding kernels for the incompressible pressure correction equation 43 : void addPressureCorrectionKernels(); 44 : 45 : /** 46 : * Functions adding kernels for the incompressible momentum equation 47 : * If the material properties are not constant, these can be used for 48 : * weakly-compressible simulations (except the Boussinesq kernel) as well. 49 : */ 50 : void addMomentumTimeKernels() override; 51 : void addMomentumFluxKernels(); 52 : virtual void addMomentumPressureKernels() override; 53 : virtual void addMomentumGravityKernels() override; 54 : virtual void addMomentumFrictionKernels() override; 55 : virtual void addMomentumBoussinesqKernels() override; 56 : 57 : virtual void addInletBC() override; 58 : virtual void addOutletBC() override; 59 : virtual void addWallsBC() override; 60 169 : virtual void addSeparatorBC() override {} 61 : 62 169 : virtual bool hasForchheimerFriction() const override { return false; }; 63 : 64 : virtual void addRhieChowUserObjects() override; 65 : virtual void addFunctorMaterials() override; 66 : 67 0 : virtual MooseFunctorName getLinearFrictionCoefName() const override 68 : { 69 0 : mooseError("Not implemented"); 70 : } 71 : 72 : unsigned short getNumberAlgebraicGhostingLayersNeeded() const override; 73 : 74 : /// Whether to use the correction term for non-orthogonality 75 : const bool _non_orthogonal_correction; 76 : };