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 : #include "NavierStokesPhysicsBase.h" 11 : #include "INSFVRhieChowInterpolator.h" 12 : #include "RelationshipManager.h" 13 : #include "WCNSFVFlowPhysics.h" 14 : 15 : InputParameters 16 5511 : NavierStokesPhysicsBase::validParams() 17 : { 18 5511 : InputParameters params = PhysicsBase::validParams(); 19 5511 : params.addClassDescription( 20 : "Base class to define the Navier Stokes incompressible and weakly-compressible equation"); 21 : 22 11022 : params.addParam<bool>( 23 : "define_variables", 24 11022 : true, 25 : "Whether to define variables if the variables with the specified names do not exist. Note " 26 : "that if the variables are defined externally from the Physics, the initial conditions will " 27 : "not be created in the Physics either."); 28 : 29 11022 : params.addParam<unsigned short>( 30 11022 : "ghost_layers", 2, "Number of layers of elements to ghost near process domain boundaries"); 31 11022 : params.addParamNamesToGroup("define_variables ghost_layers", "Advanced"); 32 : 33 5511 : return params; 34 0 : } 35 : 36 5511 : NavierStokesPhysicsBase::NavierStokesPhysicsBase(const InputParameters & parameters) 37 11022 : : PhysicsBase(parameters), _define_variables(getParam<bool>("define_variables")) 38 : { 39 5511 : } 40 : 41 : InputParameters 42 15999 : NavierStokesPhysicsBase::getAdditionalRMParams() const 43 : { 44 31998 : unsigned short necessary_layers = getParam<unsigned short>("ghost_layers"); 45 15999 : necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded()); 46 : 47 : // Just an object that has a ghost_layers parameter 48 15999 : const std::string kernel_type = "INSFVMixingLengthReynoldsStress"; 49 15999 : InputParameters params = getFactory().getValidParams(kernel_type); 50 15999 : params.template set<unsigned short>("ghost_layers") = necessary_layers; 51 : 52 15999 : return params; 53 0 : }