Microflow 3D  v1.0
Initialization.h
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 03.06.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 // OpenVDB
13 #include <openvdb/openvdb.h>
14 
15 #include <memory>
16 #include <vector>
17 
18 #include "MFDatabase/ThreadArray.h"
20 #include "GeometryBuilder/NodeID.h"
21 #include "MFDatabase/ConfigData.h"
22 #include "MFDatabase/Vec3.h"
23 #include "MFDatabase/Vec4.h"
26 #include "MFSolver_CPU/Collision.h"
27 
28 namespace MF::Solver_CPU {
29 
33  public:
34  Initialization () = default;
35  ~Initialization() = default;
36 
38  static void ThreadDataInitialize (const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Database::ConfigData>& ConfigData_Ptr);
39 
41  static void ThreadDefaultDataInitialize (const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr);
42 
44  static void EquilibriumInitialization(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr){
45  if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::QuasiCompressible)
46  EquilibriumQcompr(ThreadArray_Ptr, CaseParameters_Ptr);
47  else if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible)
48  EquilibriumIncompr(ThreadArray_Ptr, CaseParameters_Ptr);
49  else {
50  std::cout << "Error in Initialization.h -> Unknown fluid flow model " << std::endl;
51  exit(EXIT_FAILURE);
52  }
53  };
54 
55  private:
56  static void EquilibriumQcompr(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr);
57  static void EquilibriumIncompr(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr);
58 
59  };
60 } /* namespace MF::Solver_CPU */
61 
static void ThreadDataInitialize(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr)
Initialization of MFThread boundary/initial values from thread.cfg file.
static void EquilibriumInitialization(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Initialization of FEQ pre and post collision tables (equilibrium model).
static void ThreadDefaultDataInitialize(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Initialization of MFThread boundary/initial values from thread.cfg file.
The Initialization class is responsible for initialization of values of particle distribution functio...