Loading [MathJax]/extensions/tex2jax.js
https://mooseframework.inl.gov
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends
NavierStokesPhysicsBase.C
Go to the documentation of this file.
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 
12 #include "RelationshipManager.h"
13 #include "WCNSFVFlowPhysics.h"
14 
17 {
19  params.addClassDescription(
20  "Base class to define the Navier Stokes incompressible and weakly-compressible equation");
21 
22  params.addParam<bool>(
23  "define_variables",
24  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  params.addParam<unsigned short>(
30  "ghost_layers", 2, "Number of layers of elements to ghost near process domain boundaries");
31  params.addParamNamesToGroup("define_variables ghost_layers", "Advanced");
32 
33  return params;
34 }
35 
37  : PhysicsBase(parameters), _define_variables(getParam<bool>("define_variables"))
38 {
39 }
40 
43 {
44  unsigned short necessary_layers = getParam<unsigned short>("ghost_layers");
45  necessary_layers = std::max(necessary_layers, getNumberAlgebraicGhostingLayersNeeded());
46 
47  // Just an object that has a ghost_layers parameter
48  const std::string kernel_type = "INSFVMixingLengthReynoldsStress";
49  InputParameters params = getFactory().getValidParams(kernel_type);
50  params.template set<unsigned short>("ghost_layers") = necessary_layers;
51 
52  return params;
53 }
Factory & getFactory()
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
InputParameters getValidParams(const std::string &name) const
static InputParameters validParams()
NavierStokesPhysicsBase(const InputParameters &parameters)
virtual unsigned short getNumberAlgebraicGhostingLayersNeeded() const =0
Return the number of ghosting layers needed.
static InputParameters validParams()
void addClassDescription(const std::string &doc_string)
InputParameters getAdditionalRMParams() const override
Parameters to change or add relationship managers.
void addParamNamesToGroup(const std::string &space_delim_names, const std::string group_name)