Microflow 3D  v1.0
CaseParameters.h
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 28.04.19.
4 // Copyright (c) 2019 Wroclaw University of Science and Technology.
5 // Distributed under the Apache License, Version 2.0. You may obtain a copy of the License at
6 // http://www.apache.org/licenses/LICENSE-2.0 or see accompanying file license.txt.
7 // Redistributions of source code must retain the above copyright and license notice.
8 // ==============================================================================================
9 
10 # pragma once
11 
12 #include <string>
13 #include <vector>
14 #include "MFDatabase/ConfigData.h"
15 #include <memory>
16 
17 namespace MF {
18  namespace Solver_CPU {
19 
20 //****************************************************************************************************************************
21 //CASE PARAMETERS
22 //****************************************************************************************************************************
23 
25  enum class FlowTypeClass {
27  };
28 
30  enum class ModelTypeClass {
31  BGK = 0, MRT = 1, FBGK = 2, MRT2 = 3
32  };
33 
35  enum class LatticeTypeClass {
36  D3Q19 = 0
37  };
38 
41  FromSTL = 0
42  };
43 
46  public:
47  explicit CaseParameters(const std::shared_ptr<MF::Database::ConfigData>& ConfigData_Ptr);
48 
49  ~CaseParameters() = default;
50 
51  static std::shared_ptr<MF::Solver_CPU::CaseParameters> New(std::shared_ptr<MF::Database::ConfigData> ConfigData_Ptr) {
52  auto CaseParameters_Ptr = std::make_shared<MF::Solver_CPU::CaseParameters>(ConfigData_Ptr);
53  return CaseParameters_Ptr;
54  };
55 
56  //Geometry parameters
57  std::string GeometryName;
58  double VoxelSize;
60  double AddInnerWall;
61 
62  //Model parameters
67 
68  //Physical parameters of simulation
71  double Tau;
72  double ForceX_fiz;
73  double ForceY_fiz;
74  double ForceZ_fiz;
75 
76  //Case characteristic parameters
79 
80  // Termination conditions
83 
84  // Initial and reference conditions
89 
90  // Parameters of automatic detection and addition of boundary nodes
93 
94  // Global parameters calculated during initialization
95  unsigned int XNodesNumber_Nx1;
96  unsigned int YNodesNumber_Ny1;
97  unsigned int ZNodesNumber_Nz1;
103  double ForceX_LB;
104  double ForceY_LB;
105  double ForceZ_LB;
109 
110  //MFThread parameters
111  uint32_t ThreadMaxSize;
112 
113  // Calculation and display parameters
115  unsigned int VTKWriteStep_VTK_W;
117  unsigned int ConsoleWriteStep_K_W;
118 
119  //Mass balance surface choice params
121 
122  // CPU parameters
123  int CPU_ThreadsNr {0};
124  };
125  } /* namespace Solver_CPU */
126 } /* namespace MF */
127 
double PhysicalVoxelSize
Length in [m] that corresponds to 1 Lu (lattice unit length) or one voxel edge length. Physical length [m] corresponding to one unit length in LB (distance between two nodes).
double FluidLBuViscosity_Nu_LB
Kinematic viscosity LB.
double ForceY_LB
The Y component of the volumetric force, e.g. the force of gravity.
int DefaultWallNode_BN
The default type of node on the wall (40).
ModelTypeClass CollisionModel_KT
Collision models: 0 – BGK, 1 - MRT, 2 - FBGK (BGK with force), MRT2 - with optimized relaxation time...
double YInitialVelocityUy0_Phys
Initial value of velocity [m/s] in the Y direction.
double FluidPhysicalViscosity_Nu_Phys
The physical kinematic viscosity of the fluid [m^2/s].
unsigned int VTKFileMaxNumber_VTK_Max
The maximum number of VTK/VTI files stored on the disk, in addition to initial and final files...
unsigned int XNodesNumber_Nx1
Total number of nodes in X direction (geometry extent).
double AddInnerWall
Adds additional layer of points on inner wals when substracting small closed surfaces from the grid...
FlowTypeClass FluidFlowModel_MT
Flow models: 0 - quasi compressible (e.g air), 1 - incompressible (e.g water) - Zou et al...
double ReferenceDensityLB_Rho0_LB
Density LB at the reference point, ususally at the outflow.
unsigned int VTKWriteStep_VTK_W
Step for save check points and VTK/VTI data files, 0 - write data only at the begining and at the end...
double XInitialVelocityLBu_Ux0_LB
Initial value of LB velocity in the X direction.
LatticeTypeClass
Enumeration class of lattice configurations.
double CharactLengthPhysical_L_CH_Phys
Physical length [m] of characteristic dimension.
double ForceX_fiz
The X component of the volumetric force, e.g. the force of gravity [N/m3].
static std::shared_ptr< MF::Solver_CPU::CaseParameters > New(std::shared_ptr< MF::Database::ConfigData > ConfigData_Ptr)
GeometryDefinitionClass GeometryDefinition
Geometry definition method: 0 - FromSTL.
LatticeTypeClass LatticeType_La
(D3Q19) Lattice type: 0 - D3Q19
double CharacteristicLength_L_CH_LB
Characteristic length [Lu].
GeometryDefinitionClass
Enumeration class of geometry definition method.
double ForceX_LB
The X component of the volumetric force, e.g. the force of gravity.
ModelTypeClass
Enumeration class of collision models.
double Tau
Tau > 0.5, minimal values (0.525 MRT, 0.58 BGK).
double ZInitialVelocityUz0_Phys
Initial value of velocity [m/s] in the Z direction.
double YInitialVelocityLBu_Uy0_LB
Initial value of LB velocity in the Y direction.
double ZInitialVelocityLBu_Uz0_LB
Initial value of LB velocity in the Z direction.
double VoxelSize
Length of edge of square voxel (unite volume). E.g if the length of geometry edge equals 10 units and...
double XInitialVelocityUx0_Phys
Initial value of velocity [m/s] in the X direction.
double ForceY_fiz
The Y component of the volumetric force, e.g. the force of gravity [N/m3].
double MassFlowError_ErrM
Mass flow termination condition - the mass flow error for subsequent steps calculated for balance sur...
double ForceZ_fiz
The Z component of the volumetric force, e.g. the force of gravity [N/m3].
unsigned int ConsoleWriteStep_K_W
The step for displaying information on the console.
A class whose object is responsible for storing all case parameters.
unsigned int YNodesNumber_Ny1
Total number of nodes in Y direction (geometry extent).
int DefaultNode_NN
The default type of node unrecognized (61).
double CharacteristicVelocityLBu_U_Ch_LB
Characteristic velocity LB.
double ForceZ_LB
The Z component of the volumetric force, e.g. the force of gravity.
double ReynoldsNumber_Re
Reynolds number.
double FluidPhysicalReferenceDensity_Rho0_Phys
The physical density of fluid [kg/m3].
FlowTypeClass
Enumeration class of flow models.
unsigned int CheckPointNumberRead_CHP_R
Check point number for resuming calculations, 0 - no check point resuming.
double Sc_VelocityResidueError_ErrV
Velocity termination condition - the mean scaled residue of average velocity for subsequent steps...
double CharactVelocityPhysical_U_CH_Phys
Physical characteristic mean velocity for characteristic dimension [m/s].
double DTPhysical_Dt_Phys
Physical time dt [s] corresponding to one time step LB.
unsigned int ZNodesNumber_Nz1
Total number of nodes in Z direction (geometry extent).
std::string GeometryName
Name of the geometry.