Microflow 3D  v1.0
Calculations.cpp
Go to the documentation of this file.
1 // ==============================================================================================
2 // Microflow 3D, http://www.microflow.pwr.edu.pl/
3 // Created by Roman Szafran on 05.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 #include "Calculations.h"
11 
12 double MF::Solver_CPU::Calculations::VelocityLBVolumeSum(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr){
13 
14  double VelocitySum = 0.0;
16 
17  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
18  if (Thread_it->m_NodeType == 1) // fluid nodes only
19  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
20  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
21  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
22  }
23  }
24  return (VelocitySum);
25 }
26 
27 double MF::Solver_CPU::Calculations::VelocityLBMeanForVNodes(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
28  double VelocitySum = 0;
29  unsigned int n = 0;
31 
32  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
33  if (Thread_it->m_NodeType >= 21 && Thread_it->m_NodeType <= 26) { // velocity nodes
34  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
35  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
36  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
37  n++;
38  }
39  }
40  }
41  return(VelocitySum/n);
42 }
43 
44 double MF::Solver_CPU::Calculations::VelocityFizMeanForVNodes(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
45  double VelocitySum = 0;
46  unsigned int n = 0;
48 
49  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
50  if (Thread_it->m_NodeType >= 21 && Thread_it->m_NodeType <= 26) { // velocity nodes
51  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
52  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
53  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
54  n++;
55  }
56  }
57  }
58  return(MF::LBPC::ParametersConversion::ULB_toPhys(VelocitySum/n));
59 }
60 
61 double MF::Solver_CPU::Calculations::VelocityLBMeanForPNodes(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr)
62 {
63  double VelocitySum = 0;
64  unsigned int n = 0;
66 
67  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
68  if (Thread_it->m_NodeType >= 31 && Thread_it->m_NodeType <= 36) { // velocity nodes
69  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
70  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
71  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
72  n++;
73  }
74  }
75  }
76  return(VelocitySum/n);
77 }
78 
80  const std::shared_ptr<MF::Database::ThreadArray> &ThreadArray_Ptr) {
81  double VelocitySum = 0;
82  unsigned int n = 0;
84 
85  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
86  if (Thread_it->m_NodeType >= 31 && Thread_it->m_NodeType <= 36) { // velocity nodes
87  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
88  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
89  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
90  n++;
91  }
92  }
93  }
94  return(MF::LBPC::ParametersConversion::ULB_toPhys(VelocitySum/n));
95 }
96 
97 double MF::Solver_CPU::Calculations::VelocityLBMeanForThread(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, std::string &ThreadName) {
98  double VelocitySum = 0;
99  unsigned int n = 0;
101 
102  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
103  if (Thread_it->m_ThreadName == ThreadName && Thread_it->m_NodeType != 61) { // Excluding BB 61 nodes
104  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
105  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
106  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
107  n++;
108  }
109  }
110  }
111  return(VelocitySum/n);
112 }
113 
114 double MF::Solver_CPU::Calculations::VelocityFizMeanForInlet(const std::shared_ptr<MF::Database::ThreadArray> &ThreadArray_Ptr) {
115  double VelocitySum = 0;
116  unsigned int n = 0;
118 
119  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
120  if (Thread_it->m_IsInletBalanceSurface && Thread_it->m_NodeType != 61) { // Excluding BB 61 nodes
121  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
122  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
123  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
124  n++;
125  }
126  }
127  else if (Thread_it->m_IsInletBalanceSurface) {
128  n = n+(Thread_it->getNumberOfNodes()/2); // Half of number of BB nodes because we need cell mean velocity
129  }
130  }
131  return(MF::LBPC::ParametersConversion::ULB_toPhys(VelocitySum/n));
132 }
133 
135  const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
136  double VelocitySum = 0;
137  uint64_t n = 0;
139 
140  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
141  if (Thread_it->m_IsOutletBalanceSurface && Thread_it->m_NodeType != 61) { // Excluding BB 61 nodes
142  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
143  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
144  VelocitySum += sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
145  n++;
146  }
147  }
148  else if (Thread_it->m_IsOutletBalanceSurface) {
149  n = n+(Thread_it->getNumberOfNodes()/2); // Half of number of BB nodes because we need cell mean velocity
150  }
151  }
152  return(MF::LBPC::ParametersConversion::ULB_toPhys(VelocitySum/n));
153 }
154 
155 double MF::Solver_CPU::Calculations::DeltaMassFlowLB(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr)
156 {
157  double sum1 = 0.0, sum2 = 0.0, Velocity;
159 
160  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
161  if (Thread_it->m_NodeType >= 21 && Thread_it->m_NodeType <= 26) { // velocity nodes type 20
162  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
163  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
164  Velocity = sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
165  if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible)
166  sum1 += (Velocity * CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB);
167  else //quasi compressible
168  sum1 += (Velocity * Vector4.rho);
169  }
170  }
171  else if (Thread_it->m_NodeType >= 31 && Thread_it->m_NodeType <= 36) { // pressure nodes type 30
172  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
173  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
174  Velocity = sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
175  if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible)
176  sum2 += (Velocity * CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB);
177  else //quasi compressible
178  sum2 += (Velocity * Vector4.rho);
179  }
180  }
181  }
182  //auto NumberOfVelocity20Nodes = MF::Solver_CPU::Calculations::getVelocityNodeNumber_20(ThreadArray_Ptr);
183  //auto NumberOfPressure30Nodes = MF::Solver_CPU::Calculations::getPressureNodeNumber_30(ThreadArray_Ptr);
184  return(sum1-sum2)/sum1*100;
185 }
186 
187 double MF::Solver_CPU::Calculations::DeltaMassFlow_fiz(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr, const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr)
188 {
189  double sum1 = 0.0, sum2 = 0.0, Velocity;
191 
192  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
193  if (Thread_it->m_NodeType >= 21 && Thread_it->m_NodeType <= 26) { // velocity nodes type 20
194  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
195  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
196  Velocity = MF::LBPC::ParametersConversion::ULB_toPhys(sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z));
197  sum1 += (Velocity * MF::LBPC::ParametersConversion::RhoLB_toRhoPhys(Vector4.rho));
198  }
199  }
200  else if (Thread_it->m_NodeType >= 31 && Thread_it->m_NodeType <= 36) { // pressure nodes type 30
201  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
202  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
203  Velocity = MF::LBPC::ParametersConversion::ULB_toPhys(sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z));
204  sum2 += (Velocity * MF::LBPC::ParametersConversion::RhoLB_toRhoPhys(Vector4.rho));
205  }
206  }
207  }
208  //auto NumberOfVelocity20Nodes = MF::Solver_CPU::Calculations::getVelocityNodeNumber_20(ThreadArray_Ptr);
209  //auto NumberOfPressure30Nodes = MF::Solver_CPU::Calculations::getPressureNodeNumber_30(ThreadArray_Ptr);
210  //double unitA = CaseParameters_Ptr->its_DXPhysical_Dx_Phys*CaseParameters_Ptr->its_DXPhysical_Dx_Phys;
211  return((sum1-sum2)/sum1*100);
212 }
213 
214 double MF::Solver_CPU::Calculations::DeltaMassFlowThread_LB(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr,
215  const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr) {
216  double sum1 = 0.0, sum2 = 0.0, Velocity;
218  //uint64_t NrSum1 = 0 , NrSum2 = 0;
219 
220  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
221  if (Thread_it->m_IsInletBalanceSurface && Thread_it->m_NodeType != 61) { // inlet thread except BB 61 nodes
222  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
223  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
224  Velocity = sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
225  if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible) {
226  sum1 += (Velocity * CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB);
227  //NrSum1++;
228  }
229  else {//quasi compressible
230  sum1 += (Velocity * Vector4.rho);
231  //NrSum1++;
232  }
233  }
234  }
235  else if (Thread_it->m_IsOutletBalanceSurface && Thread_it->m_NodeType != 61) { // outled thread except BB 61 nodes
236  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
237  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
238  Velocity = sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z);
239  if (CaseParameters_Ptr->FluidFlowModel_MT == MF::Solver_CPU::FlowTypeClass::Incompressible) {
240  sum2 += (Velocity * CaseParameters_Ptr->ReferenceDensityLB_Rho0_LB);
241  //NrSum2++;
242  }
243  else {//quasi compressible
244  sum2 += (Velocity * Vector4.rho);
245  //NrSum2++;
246  }
247  }
248  }
249  }
250  return(sum1-sum2)/sum1*100;
251 }
252 
253 double MF::Solver_CPU::Calculations::DeltaMassFlowThread_fiz(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr,
254  const std::shared_ptr<MF::Solver_CPU::CaseParameters>& CaseParameters_Ptr) {
255  double sum1 = 0.0, sum2 = 0.0, Velocity;
257  //uint64_t NrSum1 = 0 , NrSum2 = 0;
258 
259  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
260  if (Thread_it->m_IsInletBalanceSurface && Thread_it->m_NodeType != 61) { // inlet thread except BB 61 nodes
261  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
262  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
263  Velocity = MF::LBPC::ParametersConversion::ULB_toPhys(sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z));
264  sum1 += (Velocity * MF::LBPC::ParametersConversion::RhoLB_toRhoPhys(Vector4.rho));
265  //NrSum1++;
266  }
267  }
268  else if (Thread_it->m_IsOutletBalanceSurface && Thread_it->m_NodeType != 61) { // outled thread except BB 61 nodes
269  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
270  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
271  Velocity = MF::LBPC::ParametersConversion::ULB_toPhys(sqrt(Vector4.x * Vector4.x + Vector4.y * Vector4.y + Vector4.z * Vector4.z));
272  sum2 += (Velocity * MF::LBPC::ParametersConversion::RhoLB_toRhoPhys(Vector4.rho));
273  //NrSum2++;
274  }
275  }
276  }
277  return((sum1-sum2)/sum1*100);
278 }
279 
280 double MF::Solver_CPU::Calculations::getULBmaks(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr)
281 {
282  double uLB_maks = 0.0;
284 
285  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
286  if (Thread_it->m_NodeType == 1) { // only fluid nodes
287  for (auto & Node_it : *Thread_it->m_NodeArray_Ptr) {
288  Vector4 = (*Thread_it->m_pVRLBFunction)(&Node_it);
289  if (fabs(Vector4.x) > fabs(uLB_maks)) {
290  uLB_maks = Vector4.x;
291  }
292  if (fabs(Vector4.y) > fabs(uLB_maks)) {
293  uLB_maks = Vector4.y;
294  }
295  if (fabs(Vector4.z) > fabs(uLB_maks)) {
296  uLB_maks = Vector4.z;
297  }
298  }
299  }
300  }
301  return(uLB_maks);
302 }
303 
304 uint64_t MF::Solver_CPU::Calculations::getFluidNodeNumber_1(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
305  unsigned int sum = 0;
306  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
307  if (Thread_it->m_NodeType == 1) { // only fluid nodes
308  sum += Thread_it->m_NodeArray_Ptr->size();
309  }
310  }
311  return sum;
312 }
313 
314 uint64_t MF::Solver_CPU::Calculations::getSolidNodeNumber_1(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
315  unsigned int sum = 0;
316  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
317  if (Thread_it->m_NodeType == 0) { // only fluid nodes
318  sum += Thread_it->m_NodeArray_Ptr->size();
319  }
320  }
321  return sum;
322 }
323 
324 uint64_t MF::Solver_CPU::Calculations::getBBNodeNumber_61(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
325  unsigned int sum = 0;
326  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
327  if (Thread_it->m_NodeType == 61) { // only fluid nodes
328  sum += Thread_it->m_NodeArray_Ptr->size();
329  }
330  }
331  return sum;
332 }
333 
334 uint64_t MF::Solver_CPU::Calculations::getVelocityNodeNumber_20(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
335  unsigned int sum = 0;
336  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
337  if (Thread_it->m_NodeType >= 21 && Thread_it->m_NodeType <= 26) { // only nodes of type 20
338  sum += Thread_it->m_NodeArray_Ptr->size();
339  }
340  }
341  return sum;
342 }
343 
344 uint64_t MF::Solver_CPU::Calculations::getPressureNodeNumber_30(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
345  unsigned int sum = 0;
346  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
347  if (Thread_it->m_NodeType >= 31 && Thread_it->m_NodeType <= 36) { // only nodes of type 30
348  sum += Thread_it->m_NodeArray_Ptr->size();
349  }
350  }
351  return sum;
352 }
353 
354 uint64_t MF::Solver_CPU::Calculations::getVelocity0NodeNumber_40(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
355  unsigned int sum = 0;
356  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
357  if (Thread_it->m_NodeType >= 41 && Thread_it->m_NodeType <= 46) { // only nodes of type 40
358  sum += Thread_it->m_NodeArray_Ptr->size();
359  }
360  }
361  return sum;
362 }
363 
364 uint64_t MF::Solver_CPU::Calculations::getPeriodicNodeNumber_4(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
365  unsigned int sum = 0;
366  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
367  if (Thread_it->m_NodeType == 4 || Thread_it->m_NodeType == 5) { // only nodes of type 4 and 5
368  sum += Thread_it->m_NodeArray_Ptr->size();
369  }
370  }
371  return sum;
372 }
373 
374 uint64_t MF::Solver_CPU::Calculations::getTotalNodeNumber(const std::shared_ptr<MF::Database::ThreadArray>& ThreadArray_Ptr) {
375  unsigned int sum = 0;
376  for (auto & Thread_it : *ThreadArray_Ptr->m_ThreadsTable_Ptr) {
377  sum += Thread_it->m_NodeArray_Ptr->size();
378  }
379  return sum;
380 }
T rho
Rho value.
Definition: Vec4.h:22
static double VelocityLBMeanForPNodes(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Mean LB velocity for all nodes type 30.
static double VelocityFizMeanForOutlet(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Scaled (surface weighted) fiz velocity for all outlet threads.
static double VelocityFizMeanForPNodes(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Scaled (surface weighted) fiz velocity for all nodes type 30.
static double VelocityFizMeanForVNodes(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Mean Fiz velocity for all nodes type 20.
static double DeltaMassFlowThread_LB(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Returns the difference in mass flow rate in LB units (inlet-outlet)/inlet*100. Surfaces are defined i...
static double VelocityLBMeanForVNodes(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Mean LB velocity for all nodes type 20.
static double DeltaMassFlow_fiz(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Returns the difference in mass flow rate (inlet-outlet)/inlet*100. Surfaces are automatically detecte...
static double VelocityFizMeanForInlet(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Mean Fiz velocity for all inlet threads.
static double DeltaMassFlowLB(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Returns the difference in mass flow rate in LB units (inlet-outlet)/inlet*100. Surfaces are automatic...
T z
Z direction value.
Definition: Vec4.h:21
static double RhoLB_toRhoPhys(double rho_LB)
Converts rho LB to physical density.
static uint64_t getSolidNodeNumber_1(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of solid nodes.
static uint64_t getVelocityNodeNumber_20(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of boundary velocity nodes.
static uint64_t getTotalNodeNumber(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns total number of computational nodes (non-solid).
static uint64_t getPeriodicNodeNumber_4(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of boundary periodic nodes.
static double getULBmaks(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns the maximal value of LB velocity noticed in lattice node.
static double VelocityLBMeanForThread(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, std::string &ThreadName)
Mean LB velocity for all nodes in thread of name ThreadName excluding nodes type BB 61...
static uint64_t getBBNodeNumber_61(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of bounce-back nodes.
static double DeltaMassFlowThread_fiz(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr, const std::shared_ptr< MF::Solver_CPU::CaseParameters > &CaseParameters_Ptr)
Returns the difference in mass flow rate (inlet-outlet)/inlet*100. Surfaces are defined in thread_par...
static uint64_t getVelocity0NodeNumber_40(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of boundary velocity 0 nodes.
static double ULB_toPhys(double u_LB)
Converts LB velocity to physical velocity.
static uint64_t getPressureNodeNumber_30(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of boundary pressure nodes.
static uint64_t getFluidNodeNumber_1(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Returns number of fluid nodes.
T x
X direction value.
Definition: Vec4.h:19
static double VelocityLBVolumeSum(const std::shared_ptr< MF::Database::ThreadArray > &ThreadArray_Ptr)
Mean LB velocity for all fluid nodes type 1.
T y
Y direction value.
Definition: Vec4.h:20