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