19 for (
auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
20 if (Thread_it->m_uidThreadNr > 0) {
21 int32_t uidThread = Thread_it->m_uidThreadNr - 1;
22 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"Pressure_fiz") > 0) {
23 pressure_fiz = ConfigData_Ptr->getThreadFloatParam(uidThread,
"Pressure_fiz");
26 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"IsInletBalanceSurface") > 0) {
27 Thread_it->m_IsInletBalanceSurface = ConfigData_Ptr->getThreadBooleanParam(uidThread,
"IsInletBalanceSurface");
29 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"IsOutletBalanceSurface") > 0) {
30 Thread_it->m_IsOutletBalanceSurface = ConfigData_Ptr->getThreadBooleanParam(uidThread,
"IsOutletBalanceSurface");
32 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"Velocity_fiz") > 0) {
33 velocity_fiz.
x = ConfigData_Ptr->getThreadFloatVectorParam(0, uidThread,
"Velocity_fiz");
34 velocity_fiz.
y = ConfigData_Ptr->getThreadFloatVectorParam(1, uidThread,
"Velocity_fiz");
35 velocity_fiz.
z = ConfigData_Ptr->getThreadFloatVectorParam(2, uidThread,
"Velocity_fiz");
38 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"XYZForce_fiz") > 0) {
39 XYZForce_fiz.
x = ConfigData_Ptr->getThreadFloatVectorParam(0, uidThread,
"XYZForce_fiz");
40 XYZForce_fiz.
y = ConfigData_Ptr->getThreadFloatVectorParam(1, uidThread,
"XYZForce_fiz");
41 XYZForce_fiz.
z = ConfigData_Ptr->getThreadFloatVectorParam(2, uidThread,
"XYZForce_fiz");
44 if (ConfigData_Ptr->getThreadParamLength(uidThread,
"ThreadName") > 0){
45 Thread_it->m_ThreadName = ConfigData_Ptr->getThreadStringParam(uidThread,
"ThreadName");
51 void MF::Solver_CPU::Initialization::EquilibriumQcompr(
const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr,
const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr) {
55 for (
auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
56 if (Thread_it->m_DoPreCollision && Thread_it->m_uidThreadNr > 0) {
57 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
58 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
59 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
60 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
64 if (Thread_it->m_DoPreCollision) {
65 Thread_it->m_BoundaryValue_RhoLB = CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB;
66 Thread_it->m_BoundaryValue_ULB.x = 0;
67 Thread_it->m_BoundaryValue_ULB.y = 0;
68 Thread_it->m_BoundaryValue_ULB.z = 0;
70 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
71 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
72 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
73 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
76 Thread_it->m_BoundaryValue_RhoLB = CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB;
77 Thread_it->m_BoundaryValue_ULB.x = CaseParameters_Ptr->XInitialVelocityLBu_Ux0_LB;
78 Thread_it->m_BoundaryValue_ULB.y = CaseParameters_Ptr->YInitialVelocityLBu_Uy0_LB;
79 Thread_it->m_BoundaryValue_ULB.z = CaseParameters_Ptr->ZInitialVelocityLBu_Uz0_LB;
81 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
82 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
83 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
84 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
89 for (
auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
90 for (
unsigned char k = 0; k <
MFQ19; k++) {
97 void MF::Solver_CPU::Initialization::EquilibriumIncompr(
const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr,
const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr) {
101 for (
auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
102 if (Thread_it->m_DoPreCollision && Thread_it->m_uidThreadNr > 0) {
103 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
104 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
105 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
106 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
110 if (Thread_it->m_DoPreCollision) {
111 Thread_it->m_BoundaryValue_RhoLB = CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB;
112 Thread_it->m_BoundaryValue_ULB.x = 0;
113 Thread_it->m_BoundaryValue_ULB.y = 0;
114 Thread_it->m_BoundaryValue_ULB.z = 0;
116 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
117 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
118 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
119 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
122 Thread_it->m_BoundaryValue_RhoLB = CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB;
123 Thread_it->m_BoundaryValue_ULB.x = CaseParameters_Ptr->XInitialVelocityLBu_Ux0_LB;
124 Thread_it->m_BoundaryValue_ULB.y = CaseParameters_Ptr->YInitialVelocityLBu_Uy0_LB;
125 Thread_it->m_BoundaryValue_ULB.z = CaseParameters_Ptr->ZInitialVelocityLBu_Uz0_LB;
127 Vector4.
x = Thread_it->m_BoundaryValue_ULB.x;
128 Vector4.
y = Thread_it->m_BoundaryValue_ULB.y;
129 Vector4.
z = Thread_it->m_BoundaryValue_ULB.z;
130 Vector4.
rho = Thread_it->m_BoundaryValue_RhoLB;
134 for (
auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
135 for (
unsigned char k = 0; k <
MFQ19; k++) {
144 for (
auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
147 Thread_it->m_XYZForce_LB.x = CaseParameters_Ptr->ForceX_LB;
148 Thread_it->m_XYZForce_LB.y = CaseParameters_Ptr->ForceY_LB;
149 Thread_it->m_XYZForce_LB.z = CaseParameters_Ptr->ForceZ_LB;
static double GetBGKFeq_Incompr(const MF::Database::Vec4< double > &Vector4, const unsigned char &k)
Gets FEQ from quasi incompressible BGK model.
#define MFQ19
Number of lattice directions D3Q19.
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 double GetBGKFeq_Qcompr(const MF::Database::Vec4< double > &Vector4, const unsigned char &k)
Gets FEQ from quasi compressible BGK 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.
static double PressurePhys_toRhoLB(double p_phys)
Converts physical pressure to rho LB.
static double FPhys_toFLB(double F_phys)
Physical force to LB force.
static double UPhys_toLB(double u_phys)
Converts physical velocity to LB velocity.