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 "PhysicsBase.h" 13 : #include "MooseEnum.h" 14 : 15 : #define registerNavierStokesPhysicsBaseTasks(app_name, derived_name) \ 16 : registerPhysicsBaseTasks(app_name, derived_name); \ 17 : registerMooseAction(app_name, derived_name, "add_geometric_rm") 18 : 19 : /** 20 : * Base class to hold common parameters and utilities between all the weakly compressible 21 : * Navier Stokes-based equations (WCNSFV) 22 : * Includes incompressible flow (INSFV). 23 : */ 24 0 : class NavierStokesPhysicsBase : public PhysicsBase 25 : { 26 : public: 27 : static InputParameters validParams(); 28 : 29 : NavierStokesPhysicsBase(const InputParameters & parameters); 30 : 31 : protected: 32 : /// Detects if we are using the new Physics syntax or the old NavierStokesFV action 33 1001 : bool usingNavierStokesFVSyntax() const 34 : { 35 1001 : return (parameters().get<std::string>("registered_identifier") == "Modules/NavierStokesFV"); 36 : } 37 : 38 : /// Parameters to change or add relationship managers 39 : InputParameters getAdditionalRMParams() const override; 40 : 41 : /// Add the FVInterpolationMethod object for an advected interpolation method if absent 42 : void addFVAdvectedInterpolationMethod(const MooseEnum & interpolation_method); 43 : 44 : /// Return the number of ghosting layers needed 45 : virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const = 0; 46 : 47 : /// Whether to define variables if they do not exist 48 : bool _define_variables; 49 : };