https://mooseframework.inl.gov
WCNSFVFlowPhysicsBase.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 
10 #include "WCNSFVFlowPhysicsBase.h"
12 #include "NSFVBase.h"
13 #include "MapConversionUtils.h"
14 #include "NS.h"
15 
18 {
20  params.addClassDescription("Base class for Physics defining the Navier Stokes flow equations");
21 
23  params.addParam<bool>("add_flow_equations",
24  true,
25  "Whether to add the flow equations. This parameter is not necessary when "
26  "using the Physics syntax");
27 
28  // We pull in parameters from various flow objects. This helps make sure the parameters are
29  // spelled the same way and match the evolution of other objects.
30  // If we remove these objects, or change their parameters, these parameters should be updated
31  // Downstream actions must either implement all these options, or redefine the parameter with
32  // a restricted MooseEnum, or place an error in the constructor for unsupported configurations
33  // We mostly pull the boundary parameters from NSFV Action
34 
36  params.addParam<bool>(
37  "include_deviatoric_stress",
38  false,
39  "Whether to include the full expansion (the transposed term as well) of the stress tensor");
40 
41  // Momentum boundary conditions are important for advection problems as well
43 
44  // Specify the weakly compressible boundary flux information. They are used for specifying in flux
45  // boundary conditions for advection physics in WCNSFV
47  params.addParam<std::vector<std::vector<MooseFunctorName>>>(
48  "momentum_wall_functors",
49  {},
50  "Functors for each component of the velocity value on walls. This is only necessary for the "
51  "fixed-velocity momentum wall types.");
52 
53  // Most downstream physics implementations are valid for porous media too
54  // If yours is not, please remember to disable the 'porous_medium_treatment' parameter
55  params.transferParam<bool>(NSFVBase::validParams(), "porous_medium_treatment");
56  params.transferParam<MooseFunctorName>(NSFVBase::validParams(), "porosity");
57 
58  // New functor boundary conditions
59  params.deprecateParam("momentum_inlet_function", "momentum_inlet_functors", "01/01/2025");
60  params.deprecateParam("pressure_function", "pressure_functors", "01/01/2025");
61 
62  // Initialization parameters
63  params.transferParam<std::vector<FunctionName>>(NSFVBase::validParams(), "initial_velocity");
64  params.transferParam<FunctionName>(NSFVBase::validParams(), "initial_pressure");
65 
66  // Spatial discretization scheme
67  // Specify the numerical schemes for interpolations of velocity and pressure
68  params.transferParam<MooseEnum>(NSFVBase::validParams(), "velocity_interpolation");
69  params.transferParam<MooseEnum>(NSFVBase::validParams(), "momentum_advection_interpolation");
70  params.transferParam<MooseEnum>(NSFVBase::validParams(), "momentum_face_interpolation");
71  params.transferParam<bool>(NSFVBase::validParams(), "momentum_two_term_bc_expansion");
72  params.transferParam<bool>(NSFVBase::validParams(), "pressure_two_term_bc_expansion");
73  MooseEnum coeff_interp_method("average harmonic", "harmonic");
74  params.addParam<MooseEnum>("mu_interp_method",
75  coeff_interp_method,
76  "Switch that can select face interpolation method for the viscosity.");
77 
78  // Parameter groups
79  params.addParamNamesToGroup(
80  "velocity_variable pressure_variable initial_pressure initial_velocity", "Variables");
81  params.addParamNamesToGroup("density dynamic_viscosity", "Material properties");
82  params.addParamNamesToGroup("inlet_boundaries momentum_inlet_types momentum_inlet_functors",
83  "Inlet boundary conditions");
84  params.addParamNamesToGroup("outlet_boundaries momentum_outlet_types pressure_functors",
85  "Outlet boundary conditions");
86  params.addParamNamesToGroup("wall_boundaries momentum_wall_types momentum_wall_functors",
87  "Wall boundary conditions");
88  params.addParamNamesToGroup(
89  "include_deviatoric_stress velocity_interpolation momentum_advection_interpolation "
90  "momentum_two_term_bc_expansion pressure_two_term_bc_expansion mu_interp_method "
91  "momentum_face_interpolation",
92  "Numerical scheme");
93  params.addParamNamesToGroup("thermal_expansion", "Gravity treatment");
94 
95  return params;
96 }
97 
99  : NavierStokesPhysicsBase(parameters),
100  _has_flow_equations(getParam<bool>("add_flow_equations")),
101  _compressibility(getParam<MooseEnum>("compressibility")),
102  _solve_for_dynamic_pressure(getParam<bool>("solve_for_dynamic_pressure")),
103  _porous_medium_treatment(getParam<bool>("porous_medium_treatment")),
104  _porosity_name(getParam<MooseFunctorName>("porosity")),
105  _flow_porosity_functor_name(_porosity_name),
106  _velocity_names(
107  isParamValid("velocity_variable")
108  ? getParam<std::vector<std::string>>("velocity_variable")
109  : (_porous_medium_treatment
110  ? std::vector<std::string>(NS::superficial_velocity_vector,
112  : std::vector<std::string>(NS::velocity_vector, NS::velocity_vector + 3))),
113  _pressure_name(isParamValid("pressure_variable")
114  ? getParam<NonlinearVariableName>("pressure_variable")
115  : NS::pressure),
116  _fluid_temperature_name(isParamValid("fluid_temperature_variable")
117  ? getParam<NonlinearVariableName>("fluid_temperature_variable")
118  : NS::T_fluid),
119  _density_name(getParam<MooseFunctorName>("density")),
120  _density_gravity_name(isParamValid("density_gravity")
121  ? getParam<MooseFunctorName>("density_gravity")
122  : getParam<MooseFunctorName>("density")),
123  _dynamic_viscosity_name(getParam<MooseFunctorName>("dynamic_viscosity")),
124  _velocity_interpolation(getParam<MooseEnum>("velocity_interpolation")),
125  _momentum_advection_interpolation(getParam<MooseEnum>("momentum_advection_interpolation")),
126  _momentum_face_interpolation(getParam<MooseEnum>("momentum_face_interpolation")),
127  _friction_blocks(getParam<std::vector<std::vector<SubdomainName>>>("friction_blocks")),
128  _friction_types(getParam<std::vector<std::vector<std::string>>>("friction_types")),
129  _friction_coeffs(getParam<std::vector<std::vector<std::string>>>("friction_coeffs")),
130  _inlet_boundaries(getParam<std::vector<BoundaryName>>("inlet_boundaries")),
131  _outlet_boundaries(getParam<std::vector<BoundaryName>>("outlet_boundaries")),
132  _wall_boundaries(getParam<std::vector<BoundaryName>>("wall_boundaries")),
133  _hydraulic_separators(getParam<std::vector<BoundaryName>>("hydraulic_separator_sidesets")),
134  _flux_inlet_pps(getParam<std::vector<PostprocessorName>>("flux_inlet_pps")),
135  _flux_inlet_directions(getParam<std::vector<Point>>("flux_inlet_directions"))
136 {
137  // Inlet boundary parameter checking
138  checkSecondParamSetOnlyIfFirstOneSet("flux_inlet_pps", "flux_inlet_directions");
139  if (_flux_inlet_directions.size())
140  checkVectorParamsSameLengthIfSet<PostprocessorName, Point>("flux_inlet_pps",
141  "flux_inlet_directions");
142 
143  // Boussinesq parameters checks
144  checkSecondParamSetOnlyIfFirstOneTrue("boussinesq_approximation", "ref_temperature");
145  checkSecondParamSetOnlyIfFirstOneSet("gravity", "boussinesq_approximation");
146 
147  // Dynamic pressure parameter checks
148  if (_compressibility != "incompressible" && _solve_for_dynamic_pressure)
149  paramError("compressibility",
150  "Solving for dynamic pressure is only implemented for incompressible flow");
151 
152  // Boundary parameters checking
153  checkVectorParamAndMultiMooseEnumLength<BoundaryName>("inlet_boundaries", "momentum_inlet_types");
154  checkVectorParamAndMultiMooseEnumLength<BoundaryName>("outlet_boundaries",
155  "momentum_outlet_types");
156  checkVectorParamAndMultiMooseEnumLength<BoundaryName>("wall_boundaries", "momentum_wall_types");
158  std::vector<MooseFunctorName>,
159  PostprocessorName>(
160  "inlet_boundaries", "momentum_inlet_functors", "flux_inlet_pps");
161  checkVectorParamsNoOverlap<BoundaryName>(
162  {"inlet_boundaries", "outlet_boundaries", "wall_boundaries"});
163 
164  // Porous media parameters
165  checkSecondParamSetOnlyIfFirstOneTrue("porous_medium_treatment", "porosity");
166 
168  for (const auto & name : NS::velocity_vector)
169  {
170  const auto & it = std::find(_velocity_names.begin(), _velocity_names.end(), name);
171  if (it != _velocity_names.end())
172  paramError("velocity_variable",
173  "For porous medium simulations, functor name " + *it +
174  " is already reserved for the automatically-computed interstitial velocity. "
175  "Please choose another name for your external velocity variable!");
176  }
177 
178  // Friction parameter checks
179  if (_friction_blocks.size())
180  checkVectorParamsSameLength<std::vector<SubdomainName>, std::vector<std::string>>(
181  "friction_blocks", "friction_types");
182  checkTwoDVectorParamsSameLength<std::string, std::string>("friction_types", "friction_coeffs");
183 
184  // Create maps for boundary-restricted parameters
185  _momentum_inlet_types = Moose::createMapFromVectorAndMultiMooseEnum<BoundaryName>(
186  _inlet_boundaries, getParam<MultiMooseEnum>("momentum_inlet_types"));
187  _momentum_outlet_types = Moose::createMapFromVectorAndMultiMooseEnum<BoundaryName>(
188  _outlet_boundaries, getParam<MultiMooseEnum>("momentum_outlet_types"));
189  _momentum_wall_types = Moose::createMapFromVectorAndMultiMooseEnum<BoundaryName>(
190  _wall_boundaries, getParam<MultiMooseEnum>("momentum_wall_types"));
191  if (isParamSetByUser("momentum_inlet_functors"))
192  {
193  // Not all inlet boundary types require the specification of an inlet functor
194  std::vector<BoundaryName> inlet_boundaries_with_functors;
195  for (const auto & boundary : _inlet_boundaries)
196  if (libmesh_map_find(_momentum_inlet_types, boundary) == "fixed-velocity" ||
197  libmesh_map_find(_momentum_inlet_types, boundary) == "fixed-pressure")
198  inlet_boundaries_with_functors.push_back(boundary);
200  Moose::createMapFromVectors<BoundaryName, std::vector<MooseFunctorName>>(
201  inlet_boundaries_with_functors,
202  getParam<std::vector<std::vector<MooseFunctorName>>>("momentum_inlet_functors"));
203  }
204  if (isParamSetByUser("pressure_functors"))
205  {
206  // Not all outlet boundary types require the specification of an inlet functor
207  std::vector<BoundaryName> outlet_boundaries_with_functors;
208  for (const auto & boundary : _outlet_boundaries)
209  if (libmesh_map_find(_momentum_outlet_types, boundary) == "fixed-pressure-zero-gradient" ||
210  libmesh_map_find(_momentum_outlet_types, boundary) == "fixed-pressure")
211  outlet_boundaries_with_functors.push_back(boundary);
212  const auto & pressure_functors = getParam<std::vector<MooseFunctorName>>("pressure_functors");
213  if (outlet_boundaries_with_functors.size() != pressure_functors.size())
214  paramError("pressure_functors",
215  "Size (" + std::to_string(pressure_functors.size()) +
216  ") is not the same as the number of pressure outlet boundaries in "
217  "'fixed-pressure/fixed-pressure-zero-gradient' (size " +
218  std::to_string(outlet_boundaries_with_functors.size()) + ")");
219  _pressure_functors = Moose::createMapFromVectors<BoundaryName, MooseFunctorName>(
220  outlet_boundaries_with_functors, pressure_functors);
221  }
222 
223  if (isParamSetByUser("momentum_wall_functors"))
224  {
225  // Not all wall boundary types require the specification of an inlet functor
226  std::vector<BoundaryName> wall_boundaries_with_functors;
227  for (const auto & boundary : _wall_boundaries)
228  if (libmesh_map_find(_momentum_wall_types, boundary) == "noslip")
229  wall_boundaries_with_functors.push_back(boundary);
230  const auto & momentum_wall_functors =
231  getParam<std::vector<std::vector<MooseFunctorName>>>("momentum_wall_functors");
232  if (wall_boundaries_with_functors.size() != momentum_wall_functors.size())
233  paramError("momentum_wall_functors",
234  "Size (" + std::to_string(momentum_wall_functors.size()) +
235  ") is not the same as the number of momentum_wall wall boundaries with "
236  "no-slip boundary conditions ' (size " +
237  std::to_string(wall_boundaries_with_functors.size()) + ")");
238 
240  Moose::createMapFromVectors<BoundaryName, std::vector<MooseFunctorName>>(
241  wall_boundaries_with_functors, momentum_wall_functors);
242  }
243 }
244 
245 void
247 {
248  getProblem().needFV();
249 }
250 
251 void
253 {
254  // Turbulence physics would not be initialized before this task
255  if (_current_task == "get_turbulence_physics")
257 }
258 
259 void
261 {
262  addInletBC();
263  addOutletBC();
264  addWallsBC();
265  addSeparatorBC();
266 }
267 
268 void
270 {
273  else
275 }
276 
277 void
279 {
280  InputParameters params = getFactory().getValidParams("PINSFVSpeedFunctorMaterial");
281  assignBlocks(params, _blocks);
282 
283  for (unsigned int dim_i = 0; dim_i < dimension(); ++dim_i)
284  params.set<MooseFunctorName>(NS::superficial_velocity_vector[dim_i]) = _velocity_names[dim_i];
286  params.set<MooseFunctorName>(NS::porosity) = _flow_porosity_functor_name;
287  else
288  params.set<MooseFunctorName>(NS::porosity) = "1";
289  params.set<bool>("define_interstitial_velocity_components") = _porous_medium_treatment;
290 
291  getProblem().addMaterial("PINSFVSpeedFunctorMaterial", prefix() + "pins_speed_material", params);
292 }
293 
294 void
296 {
297  const std::string class_name = "ADVectorMagnitudeFunctorMaterial";
298  InputParameters params = getFactory().getValidParams(class_name);
299  assignBlocks(params, _blocks);
300 
301  const std::vector<std::string> param_names{"x_functor", "y_functor", "z_functor"};
302  for (unsigned int dim_i = 0; dim_i < dimension(); ++dim_i)
303  params.set<MooseFunctorName>(param_names[dim_i]) = _velocity_names[dim_i];
304  params.set<MooseFunctorName>("vector_magnitude_name") = NS::speed;
305 
306  getProblem().addMaterial(class_name, prefix() + "ins_speed_material", params);
307 }
308 
309 void
311 {
312  if (!_define_variables && parameters().isParamSetByUser("initial_velocity") &&
313  parameters().isParamSetByUser("velocity_variable") &&
314  getParam<std::vector<FunctionName>>("initial_velocity").size() != 0)
315  // TODO: Rework and remove this last statement once the NSFV action is removed
316  paramError("initial_velocity",
317  "Velocity is defined externally of WCNSFVFlowPhysicsBase, so should the inital "
318  "conditions");
319  if (!_define_variables && parameters().isParamSetByUser("initial_pressure") &&
320  parameters().isParamSetByUser("pressure_variable"))
321  paramError("initial_pressure",
322  "Pressure is defined externally of WCNSFVFlowPhysicsBase, so should the inital "
323  "condition");
324 
325  // Check dimension
326  if (getParam<std::vector<FunctionName>>("initial_velocity").size() != dimension() &&
327  getParam<std::vector<FunctionName>>("initial_velocity").size() != 3 &&
328  getParam<std::vector<FunctionName>>("initial_velocity").size() != 0)
329  // TODO: Rework and remove this last statement once the NSFV action is removed
330  paramError("initial_velocity",
331  "The number of velocity components in the " + type() + " initial condition is not " +
332  std::to_string(dimension()) + " or 3!");
333 
334  InputParameters params = getFactory().getValidParams("FunctionIC");
335  assignBlocks(params, _blocks);
336  auto vvalue = getParam<std::vector<FunctionName>>("initial_velocity");
337 
338  for (const auto d : make_range(dimension()))
339  {
340  params.set<VariableName>("variable") = _velocity_names[d];
341  params.set<FunctionName>("function") = vvalue[d];
342 
344  _blocks,
345  /*whether IC is a default*/ !isParamSetByUser("initial_velocity"),
346  /*error if already an IC*/ isParamSetByUser("initial_velocity")))
347  getProblem().addInitialCondition("FunctionIC", prefix() + _velocity_names[d] + "_ic", params);
348  }
349 
351  _blocks,
352  /*whether IC is a default*/ !isParamSetByUser("initial_pressure"),
353  /*error if already an IC*/ isParamSetByUser("initial_pressure")))
354  {
355  params.set<VariableName>("variable") = _pressure_name;
356  params.set<FunctionName>("function") = getParam<FunctionName>("initial_pressure");
357 
358  getProblem().addInitialCondition("FunctionIC", prefix() + _pressure_name + "_ic", params);
359  }
360 }
361 
362 unsigned short
364 {
365  unsigned short ghost_layers = 2;
366  return ghost_layers;
367 }
368 
369 void
371 {
372  const auto momentum_inlet_types = getParam<MultiMooseEnum>("momentum_inlet_types");
373 
374  for (unsigned int bc_ind = 0; bc_ind < momentum_inlet_types.size(); ++bc_ind)
375  if (momentum_inlet_types[bc_ind] == "flux-mass" ||
376  momentum_inlet_types[bc_ind] == "flux-velocity")
377  {
378  const std::string pp_type = "AreaPostprocessor";
379  InputParameters params = getFactory().getValidParams(pp_type);
380  params.set<std::vector<BoundaryName>>("boundary") = {_inlet_boundaries[bc_ind]};
381  params.set<ExecFlagEnum>("execute_on") = EXEC_INITIAL;
382 
383  const auto name_pp = "area_pp_" + _inlet_boundaries[bc_ind];
384  if (!getProblem().hasUserObject(name_pp))
385  getProblem().addPostprocessor(pp_type, name_pp, params);
386  }
387 }
388 
389 VariableName
390 WCNSFVFlowPhysicsBase::getFlowVariableName(const std::string & short_name) const
391 {
392  if (short_name == NS::pressure)
393  return getPressureName();
394  else if (short_name == NS::velocity_x && dimension() > 0)
395  return getVelocityNames()[0];
396  else if (short_name == NS::velocity_y && dimension() > 1)
397  return getVelocityNames()[1];
398  else if (short_name == NS::velocity_z && dimension() > 2)
399  return getVelocityNames()[2];
400  else if (short_name == NS::temperature)
401  return getFluidTemperatureName();
402  else
403  mooseError("Short Variable name '", short_name, "' not recognized.");
404 }
405 
406 MooseFunctorName
408 {
409  if (smoothed)
411  else
412  return _porosity_name;
413 }
414 
417 {
418  // User passed it, just use that
419  if (isParamValid("coupled_turbulence_physics"))
420  return getCoupledPhysics<WCNSFVTurbulencePhysics>(
421  getParam<PhysicsName>("coupled_flow_physics"));
422  // Look for any physics of the right type, and check the block restriction
423  else
424  {
425  const auto all_turbulence_physics = getCoupledPhysics<const WCNSFVTurbulencePhysics>(true);
426  for (const auto physics : all_turbulence_physics)
428  physics->name(), physics->blocks(), /*error_if_not_identical=*/false))
429  return physics;
430  }
431  // Did not find one
432  return nullptr;
433 }
std::string prefix() const
static InputParameters validParams()
Definition: NSFVBase.C:368
unsigned short getNumberAlgebraicGhostingLayersNeeded() const override
Return the number of algebraic ghosting layers needed.
const std::vector< std::string > & getVelocityNames() const
To interface with other Physics.
void assignBlocks(InputParameters &params, const std::vector< SubdomainName > &blocks) const
Creates all the objects needed to add a turbulence model to an incompressible / weakly-compressible N...
Factory & getFactory()
std::map< BoundaryName, MooseEnum > _momentum_inlet_types
Momentum inlet boundary types.
const std::vector< BoundaryName > _outlet_boundaries
Boundaries with a flow outlet specified on them.
virtual void addSeparatorBC()=0
static const std::string speed
Definition: NS.h:143
void addParam(const std::string &name, const std::initializer_list< typename T::value_type > &value, const std::string &doc_string)
virtual void initializePhysicsAdditional() override
virtual void needFV() override
virtual void addMaterial(const std::string &material_name, const std::string &name, InputParameters &parameters)
virtual void addMaterials() override
T & set(const std::string &name, bool quiet_mode=false)
static const std::string velocity_z
Definition: NS.h:48
virtual void actOnAdditionalTasks() override
InputParameters getValidParams(const std::string &name) const
const WCNSFVTurbulencePhysics * _turbulence_physics
Can be set to a coupled turbulence physics.
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_inlet_functors
Functors describing the momentum inlet for each boundary.
virtual void addOutletBC()=0
std::map< BoundaryName, std::vector< MooseFunctorName > > _momentum_wall_functors
Functors describing the momentum for each wall boundary.
static const std::string velocity_x
Definition: NS.h:46
const NonlinearVariableName _pressure_name
Pressure name.
static const std::string temperature
Definition: NS.h:59
const MooseFunctorName _porosity_name
Name of the porosity functor.
virtual void addWallsBC()=0
bool hasUserObject(const std::string &name) const
bool shouldCreateIC(const VariableName &var_name, const std::vector< SubdomainName > &blocks, const bool ic_is_default_ic, const bool error_if_already_defined) const
static InputParameters validParams()
const bool _porous_medium_treatment
Whether to use the porous medium treatment.
virtual const std::string & name() const
std::vector< SubdomainName > _blocks
const std::vector< BoundaryName > _wall_boundaries
Boundaries which define a wall (slip/noslip/etc.)
virtual void addPostprocessors() override
unsigned int dimension() const
bool isParamValid(const std::string &name) const
virtual void addInitialCondition(const std::string &ic_name, const std::string &name, InputParameters &parameters)
void checkSecondParamSetOnlyIfFirstOneSet(const std::string &param1, const std::string &param2) const
virtual FEProblemBase & getProblem()
virtual void addPostprocessor(const std::string &pp_name, const std::string &name, InputParameters &parameters)
static const std::string porosity
Definition: NS.h:104
static InputParameters validParams()
void checkVectorParamsSameLength(const std::string &param1, const std::string &param2) const
void checkVectorParamLengthSameAsCombinedOthers(const std::string &param1, const std::string &param2, const std::string &param3) const
static InputParameters commonNavierStokesFlowParams()
Definition: NSFVBase.C:17
static const std::string T_fluid
Definition: NS.h:106
std::vector< std::vector< SubdomainName > > _friction_blocks
Subdomains where we want to have volumetric friction.
const NonlinearVariableName & getFluidTemperatureName() const
std::map< BoundaryName, MooseEnum > _momentum_outlet_types
Momentum outlet boundary types.
static const std::string superficial_velocity_vector[3]
Definition: NS.h:54
const std::vector< std::string > _velocity_names
Velocity names.
virtual void addInletBC()=0
Functions adding boundary conditions for the flow simulation.
MooseFunctorName getPorosityFunctorName(const bool smoothed) const
static InputParameters commonMomentumBoundaryFluxesParams()
Definition: NSFVBase.C:162
const std::string & type() const
const T & getParam(const std::string &name) const
const std::string & _current_task
static const std::string velocity_y
Definition: NS.h:47
const WCNSFVTurbulencePhysics * getCoupledTurbulencePhysics() const
Find the turbulence physics.
void paramError(const std::string &param, Args... args) const
const bool _solve_for_dynamic_pressure
Whether we are solving for the total or dynamic pressure.
const MooseEnum _compressibility
Compressibility type, can be compressible, incompressible or weakly-compressible. ...
bool checkBlockRestrictionIdentical(const std::string &object_name, const std::vector< SubdomainName > &blocks, const bool error_if_not_identical=true) const
MooseFunctorName _flow_porosity_functor_name
Name of the porosity functor for the flow equations (if smoothed)
static InputParameters commonMomentumEquationParams()
Definition: NSFVBase.C:55
bool _define_variables
Whether to define variables if they do not exist.
void addPorousMediumSpeedMaterial()
Add material to define the local speed in porous medium flows.
bool isParamSetByUser(const std::string &nm) const
std::map< BoundaryName, MooseEnum > _momentum_wall_types
Momentum wall boundary types.
VariableName getFlowVariableName(const std::string &default_name) const
Convenience routine to be able to retrieve the actual variable names from their default names...
void addNonPorousMediumSpeedMaterial()
Add material to define the local speed with no porous medium treatment.
std::map< BoundaryName, MooseFunctorName > _pressure_functors
Functors describing the outlet pressure on each boundary.
virtual bool hasForchheimerFriction() const =0
Return whether a Forchheimer friction model is in use.
static const std::string pressure
Definition: NS.h:56
IntRange< T > make_range(T beg, T end)
virtual void addFVBCs() override
void mooseError(Args &&... args) const
void addClassDescription(const std::string &doc_string)
const InputParameters & parameters() const
virtual void addInitialConditions() override
WCNSFVFlowPhysicsBase(const InputParameters &parameters)
Base class to hold common parameters and utilities between all the weakly compressible Navier Stokes-...
const std::vector< BoundaryName > _inlet_boundaries
Boundaries with a flow inlet specified on them.
const std::string velocity_vector[3]
Definition: NS.h:49
std::vector< Point > _flux_inlet_directions
Direction of each flux inlet. Indexing based on the number of flux boundaries.
void checkSecondParamSetOnlyIfFirstOneTrue(const std::string &param1, const std::string &param2) const
static InputParameters commonMomentumBoundaryTypesParams()
Definition: NSFVBase.C:138
const ExecFlagType EXEC_INITIAL
const NonlinearVariableName & getPressureName() const