MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
postprocessinglpt.cpp
Go to the documentation of this file.
1// Copyright (C) 2024 The m-AIA AUTHORS
2//
3// This file is part of m-AIA (https://git.rwth-aachen.de/aia/m-AIA/m-AIA)
4//
5// SPDX-License-Identifier: LGPL-3.0-only
6
7#include "postprocessinglpt.h"
8#include <fstream>
9#include <iostream>
10#include "postdata.h"
11#include "postprocessing.cpp"
12
13using namespace std;
14
15template <MInt nDim>
17 : PostProcessingInterface(postprocessingId_), PostProcessing<nDim, PostProcessingLPT<nDim>>(postprocessingId_, data) {
18 m_ppSolver = ppSolver_;
19}
20
27template <MInt nDim>
30 TRACE();
31
32 if(solver().domainId() == 0) {
33 cerr << "Allocating Post-processing LPT data!" << endl;
34 }
35
36 // gatherd in the postProcTimeInterval
37 mAlloc(m_particleCV, m_sprayDataSize, 2 + nDim, "m_particleCV", F0, AT_);
38 mAlloc(m_particlePen, m_sprayDataSize, 19, "m_particlePen", F0, AT_);
39 mAlloc(m_sprayStat, m_sprayDataSize, 5, "m_sprayStat", F0, AT_);
40 mAlloc(m_sprayTimes, m_sprayDataSize, 3, "m_sprayTimes", F0, AT_);
41
42 if(solver().m_sprayModel == nullptr) return;
43
44 // gatherd every timeStep
45 mAlloc(m_injectionData, this->m_sprayWriteInterval, 15, "m_injectionData", F0, AT_);
46 mAlloc(m_cInjData, this->m_sprayWriteInterval + 1, nDim + 5, "m_cInjData", F0, AT_);
47
48 if(!solver().isActive()) return;
49
50 array<MFloat, nDim + 5> loadedVariables = {};
51 // load the sum of the injected mass from last file
52 if(solver().m_restartFile && solver().domainId() == 0) {
53 ifstream readFile;
54 stringstream filename;
55 filename.clear();
56 filename.str("");
57 filename << solver().restartDir() << "injSums";
58 readFile.open(filename.str(), ios_base::in);
59 if(!readFile) {
60 filename.clear();
61 filename.str("");
62 filename << solver().restartDir() << "injSums_" << globalTimeStep;
63 readFile.open(filename.str(), ios_base::in);
64 if(!readFile) {
65 mTerm(1, AT_, "Error reading injection file!");
66 }
67 } else {
68 // file found -> create backup
69 MString backupName = solver().restartDir() + "injSums_" + to_string(globalTimeStep);
70 std::ifstream src(filename.str(), std::ios::binary);
71 std::ofstream dst(backupName, std::ios::binary);
72 dst << src.rdbuf();
73 }
74 readFile.seekg(-1, ios_base::end);
75
76 MChar ch;
77 MString lastLine;
78 readFile.get(ch);
79 if(ch == '\n') {
80 readFile.seekg(-2, ios::cur);
81 readFile.seekg(-1, ios::cur);
82 readFile.get(ch);
83 while(ch != '\n') {
84 readFile.seekg(-2, std::ios::cur);
85 readFile.get(ch);
86 }
87 getline(readFile, lastLine);
88 } else {
89 mTerm(1, AT_, "Wrong injection file-format!");
90 }
91 stringstream ss(lastLine);
92 MFloat timeStep;
93 ss >> timeStep;
94
95 if((MInt)timeStep == globalTimeStep) {
96 // matching time-step -> load data
97 for(MInt i = 0; i < nDim + 5; i++) {
98 ss >> loadedVariables[i];
99 cerr << "Loaded injected Data " << i << " is " << loadedVariables[i] << endl;
100 }
101 } else if((MInt)timeStep > globalTimeStep) {
102 cerr << "Searching correct line in injection data-file for " << globalTimeStep << " from last output " << timeStep
103 << endl;
104 while(timeStep > globalTimeStep) {
105 ss.str("");
106 readFile.seekg(-2, std::ios::cur);
107 readFile.seekg(-1, std::ios::cur);
108 readFile.get(ch);
109 const MInt oldPos = readFile.tellg();
110 while(ch != '\n') {
111 readFile.seekg(-2, std::ios::cur);
112 readFile.get(ch);
113 }
114 MString lastLine2;
115 getline(readFile, lastLine2);
116 const MInt newPos = readFile.tellg();
117 const MInt difPos = -(newPos - oldPos);
118 readFile.seekg(difPos, std::ios::cur);
119 ss.str(lastLine2);
120 ss >> timeStep;
121 }
122 for(MInt i = 0; i < nDim + 5; i++) {
123 ss >> loadedVariables[i];
124 cerr << "Loaded injected Data " << i << " is " << loadedVariables[i] << endl;
125 }
126
127 } else if((MInt)timeStep < globalTimeStep) {
128 for(MInt i = 0; i < nDim + 5; i++) {
129 loadedVariables[i] = 0;
130 }
131 readFile.close();
132
133 // if the restart timeStep is smaller than the last computed/written timeStep info
134 //-> search for matching timeStep in the backup file
135 filename.clear();
136 filename.str("");
137 filename << solver().restartDir() << "injSums_" << globalTimeStep;
138 readFile.open(filename.str(), ios_base::in);
139 if(readFile) {
140 mTerm(1, AT_, "Error reading injection file!");
141 }
142 readFile.seekg(-1, ios_base::end);
143 readFile.get(ch);
144 MString lastLine2;
145 if(ch == '\n') {
146 readFile.seekg(-2, ios::cur);
147 readFile.seekg(-1, ios::cur);
148 readFile.get(ch);
149 while(ch != '\n') {
150 readFile.seekg(-2, std::ios::cur);
151 readFile.get(ch);
152 }
153 getline(readFile, lastLine2);
154 } else {
155 mTerm(1, AT_, "Wrong injection file-format!");
156 }
157 stringstream ss2(lastLine2);
158 ss2 >> timeStep;
159 if((MInt)timeStep == globalTimeStep) {
160 for(MInt i = 0; i < nDim + 5; i++) {
161 ss2 >> loadedVariables[i];
162 if(solver().domainId() == 0) {
163 cerr << "Loaded injected Data " << i << " is " << loadedVariables[i] << endl;
164 }
165 }
166 } else {
167 cerr << "Correct Timestep count not be found at the end of in any of the injSums files!"
168 << "Either trunkate the files of implement version which checks through all lines!" << endl;
169 }
170 }
171 readFile.close();
172
173 for(MInt i = 0; i < nDim + 5; i++) {
174 m_cInjData[this->m_sprayWriteInterval][i] = loadedVariables[i];
175 }
176 }
177
178 if(solver().m_restartFile) {
179 MPI_Allreduce(MPI_IN_PLACE, &(m_cInjData[0][0]), (nDim + 5) * (this->m_sprayWriteInterval + 1), MPI_DOUBLE, MPI_MAX,
180 solver().mpiComm(), AT_, "INPLACE", "m_cInjData");
181 }
182}
183
190template <MInt nDim>
192 TRACE();
193
194 // calculate conservative particle values
195 MFloat partMass = 0;
196 MFloat partE = 0;
197 MFloat partMomentum[nDim] = {};
198 for(MInt i = 0; i < nDim; i++) {
199 partMomentum[i] = 0;
200 }
201 for(MInt id = 0; id < solver().a_noParticles(); ++id) {
202 if(solver().m_partList[id].isInvalid()) continue;
203 MFloat mass = solver().m_partList[id].sphericalMass() * solver().m_partList[id].m_noParticles;
204 partMass += mass;
205 partE +=
206 solver().m_material->cp() / solver().m_material->gammaMinusOne() * mass * solver().m_partList[id].m_temperature;
207 MFloat velMagSquared = 0;
208 for(MInt i = 0; i < nDim; i++) {
209 partMomentum[i] += (mass * solver().m_partList[id].m_velocity[i]);
210 velMagSquared += POW2(solver().m_partList[id].m_velocity[i]);
211 }
212 partE += 0.5 * mass * velMagSquared;
213 }
214 m_particleCV[m_sprayDataStep][0] = partMass;
215 m_particleCV[m_sprayDataStep][1] = partE;
216 for(MInt i = 0; i < nDim; i++) {
217 m_particleCV[m_sprayDataStep][2 + i] = partMomentum[i];
218 }
219}
220
221
228template <MInt nDim>
230 TRACE();
231
232 // different penetration measurements
233 // 0: overal all maximum
234 // 1: parcel with 90% liquid mass fraction
235 // 2: parcel with LVFlimit
236 // 3: parcel with LVFlimit on refLvl
237 const MInt noPen = 4;
238 array<array<MFloat, noPen>, nDim + 1> maxLiqPen{};
239
240 const MFloat massFracLimit = 0.90;
241 const MFloat LVFlimit = 0.025; // 0.01 as first estimate
242 const MInt refLvl = 10;
243
244 // spray-width measurements in certain plans
245 static constexpr MInt nPlanes = 3;
246 // static constexpr MFloat yPlaneBorder = 0.1/75.0;
247 static constexpr MFloat yPlaneBorder = 0.001333;
248 // static constexpr MFloat yPlanes[nPlanes] = {15.0/75.0 , 25.0/75.0, 35.0/75.0};
249 static constexpr MFloat yPlanes[nPlanes] = {0.2, 0.3333, 0.46667};
250
251 vector<MFloat> width(nPlanes);
252 for(MInt n = 0; n < nPlanes; n++) {
253 width[n] = 0.0;
254 }
255
256 auto assignLarger = [&](MFloat& A, MFloat b) {
257 if(b > A) {
258 A = b;
259 }
260 };
261
262
263 for(MInt id = 0; id < solver().a_noParticles(); ++id) {
264 array<MFloat, nDim + 1> distance{};
265 for(MInt i = 0; i < nDim; i++) {
266 distance[i] = abs(solver().m_partList[id].m_position[i] - solver().m_spawnCoord[i]);
267 }
268
269 distance[nDim] = sqrt(POW2(distance[0]) + POW2(distance[1]) + POW2(distance[2]));
270
271
272 for(MInt i = 0; i < nDim + 1; i++) {
273 assignLarger(maxLiqPen[i][0], distance[i]);
274 }
275
276 for(MInt i = 0; i < nPlanes; i++) {
277 if(fabs(distance[1] - yPlanes[i]) < yPlaneBorder) {
278 assignLarger(width[i], distance[0]);
279 assignLarger(width[i], distance[2]);
280 }
281 }
282 const MInt cellId = solver().m_partList[id].m_cellId;
283 if(cellId < 0) continue;
284 if(solver().a_volumeFraction(cellId) > LVFlimit) {
285 for(MInt i = 0; i < nDim + 1; i++) {
286 assignLarger(maxLiqPen[i][1], distance[i]);
287 }
288 }
289 }
290
291 for(MInt cellId = 0; cellId < solver().noInternalCells(); cellId++) {
292 const MFloat massFraction =
293 solver().a_volumeFraction(cellId) * solver().m_material->density() / solver().a_fluidDensity(cellId);
294 array<MFloat, nDim + 1> distance{};
295
296 if(massFraction > massFracLimit) {
297 array<MFloat, nDim> cellCoordinate{};
298 for(MInt i = 0; i < nDim; i++) {
299 cellCoordinate[i] = solver().c_coordinate(cellId, i);
300 distance[i] = abs(cellCoordinate[i] - solver().m_spawnCoord[i]);
301 }
302 distance[nDim] = sqrt(POW2(distance[0]) + POW2(distance[1]) + POW2(distance[2]));
303
304 for(MInt i = 0; i < nDim + 1; i++) {
305 assignLarger(maxLiqPen[i][2], distance[i]);
306 }
307 }
308 if(solver().a_level(cellId) == refLvl) {
309 solver().reduceData(cellId, &solver().a_volumeFraction(0), 1);
310 if(solver().a_volumeFraction(cellId) > LVFlimit) {
311 array<MFloat, nDim> cellCoordinate{};
312 for(MInt i = 0; i < nDim; i++) {
313 cellCoordinate[i] = solver().c_coordinate(cellId, i);
314 distance[i] = abs(cellCoordinate[i] - solver().m_spawnCoord[i]);
315 }
316 distance[nDim] = sqrt(POW2(distance[0]) + POW2(distance[1]) + POW2(distance[2]));
317
318 for(MInt i = 0; i < nDim + 1; i++) {
319 assignLarger(maxLiqPen[i][3], distance[i]);
320 }
321 }
322 }
323 }
324
325 // save data:
326 MInt it = 0;
327 for(MInt n = 0; n < noPen; n++) {
328 for(MInt i = 0; i < nDim + 1; i++) {
329 m_particlePen[m_sprayDataStep][it++] = maxLiqPen[i][n];
330 }
331 }
332
333 for(MInt n = 0; n < nPlanes; n++) {
334 m_particlePen[m_sprayDataStep][it++] = width[n];
335 }
336
337 if(it > 19) {
338 mTerm(1, AT_, "PP: Penetration-Storage not matching!");
339 }
340}
341
348template <MInt nDim>
350 TRACE();
351
352 const MInt noPart = solver().a_noParticles();
353
354 MLong noDroplets = 0;
355 MFloat diameter = 0;
356 MFloat surfaceArea = 0;
357 MFloat volume = 0;
358 for(MInt id = 0; id < noPart; ++id) {
359 noDroplets += solver().m_partList[id].m_noParticles;
360 diameter += solver().m_partList[id].m_noParticles * solver().m_partList[id].m_diameter;
361 surfaceArea += solver().m_partList[id].m_noParticles * POW2(solver().m_partList[id].m_diameter);
362 volume += solver().m_partList[id].m_noParticles * POW3(solver().m_partList[id].m_diameter);
363 }
364
365
366 // const MFloat SMD = volume / surfaceArea;
367 // const MFloat meanD = diameter / noDroplets;
368
369 m_sprayStat[m_sprayDataStep][0] = noPart;
370 m_sprayStat[m_sprayDataStep][1] = noDroplets;
371 m_sprayStat[m_sprayDataStep][2] = diameter;
372 m_sprayStat[m_sprayDataStep][3] = surfaceArea;
373 m_sprayStat[m_sprayDataStep][4] = volume;
374}
375
376
377template <MInt nDim>
379 TRACE();
380
381
382 if(solver().m_sprayModel == nullptr) {
383 return 0;
384 }
385
386 if(!solver().isActive()) {
387 solver().m_injData.clear();
388 return 0;
389 }
390
391 const MInt injectorCellId = solver().injectorCellId();
392 MInt count = 0;
393
394 // gather and sum all spray injection solver data
395 for(auto it = solver().m_injData.begin(); it != solver().m_injData.end(); it++) {
396 const MInt timeStep = it->first;
397 if(solver().domainId() == 0) {
398 m_injectionData[count][0] = timeStep;
399 } else {
400 m_injectionData[count][0] = 0.0;
401 }
402
403 for(MInt i = 0; i < 14; i++) {
404 const MFloat data = (it->second)[i];
405 m_injectionData[count][i + 1] = data;
406 }
407 count++;
408 }
409 count = 0;
410
411 MPI_Allreduce(MPI_IN_PLACE, &(m_injectionData[0][0]), 15 * this->m_sprayWriteInterval, MPI_DOUBLE, MPI_SUM,
412 solver().mpiComm(), AT_, "INPLACE", "m_injectionData");
413
414 MPI_Allreduce(MPI_IN_PLACE, &(m_cInjData[0][0]), (nDim + 5) * (this->m_sprayWriteInterval + 1), MPI_DOUBLE, MPI_MAX,
415 solver().mpiComm(), AT_, "INPLACE", "m_cInjData");
416
417 if(injectorCellId > -1) {
418 // get storage value
419 for(MInt i = 0; i < nDim + 5; i++) {
420 m_cInjData[0][i] = m_cInjData[this->m_sprayWriteInterval][i];
421 }
422
423 for(auto it = solver().m_injData.begin(); it != solver().m_injData.end(); it++) {
424 // add data from:
425 // injMass, injXMom, injYMom, injZMom, injEnergy, sumEvapMass, noRT-breakup, noKH-breakup
426 for(MInt i = 0; i < nDim + 5; i++) {
427 m_cInjData[count][i] += m_injectionData[count][7 + i];
428 }
429 count++;
430
431 // set pervious mass as mass in the next timeStep
432 for(MInt i = 0; i < nDim + 5; i++) {
433 m_cInjData[count][i] = m_cInjData[count - 1][i];
434 }
435 }
436 // put last value into storage
437 for(MInt i = 0; i < nDim + 5; i++) {
438 m_cInjData[this->m_sprayWriteInterval][i] = m_cInjData[count][i];
439 }
440
441 } else {
442 for(MInt id = 0; id < this->m_sprayWriteInterval + 1; id++) {
443 for(MInt j = 0; j < nDim + 5; j++) {
444 m_cInjData[id][j] = 0;
445 }
446 }
447 }
448
449 solver().m_injData.clear();
450
451 return count;
452}
453
458template <MInt nDim>
460 TRACE();
461 m_LPTSolutionInterval =
462 Context::getSolverProperty<MInt>("particleSolutionInterval", m_postprocessingId, AT_, &m_LPTSolutionInterval);
463
464 m_writeParLog = Context::getSolverProperty<MBool>("writeParLog", m_postprocessingId, AT_, &m_writeParLog);
465 if(m_writeParLog) initParticleLog();
466}
467
474template <MInt nDim>
476 TRACE();
477
478 if(!solver().isActive()) return;
479
480 solver().crankAngleSolutionOutput();
481
482 if(m_writeParLog && globalTimeStep % m_parLogInterval == 0) writeParticleLog();
483
484 if((m_LPTSolutionInterval > 0 && globalTimeStep % m_LPTSolutionInterval == 0) || this->m_finalTimeStep
485 || this->m_forceOutput) {
486 if(solver().domainId() == 0) {
487 cerr << "Writing particle File @" << globalTimeStep << "(" << solver().m_time << ")... ";
488 }
489 solver().writePartData();
490
491 if(solver().m_collisions > 0) {
492 solver().writeCollData();
493 }
494
495 if(solver().domainId() == 0) {
496 cerr << " done. " << endl;
497 }
498 }
499}
500
505template <MInt nDim>
507 if(solver().m_restart && m_writeParLog) m_parLogApp = true;
508
509 m_parLogInterval =
510 Context::getSolverProperty<MInt>("particleLogInterval", m_postprocessingId, AT_, &m_parLogInterval);
511
512 if(solver().domainId() == 0) {
513 std::ofstream parLog;
514 if(m_parLogApp) {
515 parLog.open("particle.log", ios::app);
516 } else {
517 parLog.open("particle.log");
518 const MString columns[9] = {"x", "y", "z", "vel_x", "vel_y", "vel_z", "Re", "C_D"};
519 parLog << std::setw(5) << "t"
520 << "\t";
521 for(auto& i : columns) {
522 parLog << std::setw(15) << i << "\t";
523 }
524 }
525 parLog << std::endl;
526 parLog.close();
527 }
528}
529
536template <MInt nDim>
538 if(solver().globalNoParticles() > 1) {
539 m_writeParLog = false;
540 std::cerr << "writing particle.log is currently only implemented for single particles!" << std::endl;
541 return;
542 }
543
544 if(solver().m_partList.size() < 1) return;
545
546
547 std::ofstream parLog;
548 LPTSpherical<nDim>& part = solver().m_partList[0];
549 if(m_writeParLog) {
550 parLog.open("particle.log", std::ios::app);
551
552 parLog << std::setw(5) << globalTimeStep << "\t";
553 for(const MFloat& i : part.m_position) {
554 parLog << std::setw(10) << std::setprecision(12) << i << "\t";
555 }
556 for(const MFloat& i : part.m_velocity) {
557 parLog << std::setw(10) << i << "\t";
558 }
559
560 const MFloat T = solver().a_fluidTemperature(part.m_cellId);
561 const MFloat fluidViscosity = solver().m_material->dynViscosityFun(T);
562 const MFloat relVel = part.magRelVel(&part.m_oldFluidVel[0], &part.m_oldVel[0]);
563
564 const MFloat ReP = part.particleRe(relVel, part.m_oldFluidDensity, fluidViscosity) * part.s_Re;
565 const MFloat CD = part.dragFactor(ReP) * 24 / ReP;
566
567 parLog << std::setw(10) << ReP << "\t";
568 parLog << std::setw(10) << CD << "\t" << std::endl;
569 parLog.close();
570 }
571}
572
577template <MInt nDim>
579 TRACE();
580
581 if(solver().domainId() == 0) {
582 std::ofstream Plog;
583 Plog.open("ParticleStatistics.log", ios::app);
584 Plog << std::setw(5) << "t"
585 << "\t" << std::setw(10) << "VpRMS"
586 << "\t" << std::setw(10) << "AverageReP"
587 << "\t" << std::setw(10) << "EkinP" << endl;
588 Plog.close();
589 }
590}
600template <MInt nDim>
602 TRACE();
603
604 if((m_LPTSolutionInterval > 0 && globalTimeStep % m_LPTSolutionInterval == 0) || this->m_finalTimeStep
605 || this->m_forceOutput) {
606 const MInt globalNoPart = solver().globalNoParticles();
607 MFloat RePSum = F0;
608 MFloat VelmagnitudeSqSum = F0;
609 MFloat EkinSum = F0;
610
611 for(LPTSpherical<nDim>& part : solver().m_partList) {
612 const MFloat T = solver().a_fluidTemperature(part.m_cellId);
613 const MFloat fluidViscosity = solver().m_material->dynViscosityFun(T);
614 const MFloat relVel = part.magRelVel(&part.m_oldFluidVel[0], &part.m_oldVel[0]);
615
616 RePSum += part.particleRe(relVel, part.m_oldFluidDensity, fluidViscosity) * part.s_Re;
617
618 MFloat VelmagnitudeSq = F0;
619 for(MInt j = 0; j < nDim; j++) {
620 VelmagnitudeSq += POW2(part.m_velocity[j]);
621 }
622 VelmagnitudeSqSum += VelmagnitudeSq;
623
624 EkinSum += part.sphericalMass() * VelmagnitudeSq;
625 }
626
627 MPI_Allreduce(MPI_IN_PLACE, &RePSum, 1, MPI_DOUBLE, MPI_SUM, solver().mpiComm(), AT_, "INPLACE", "RePsum");
628
629 MFloat AverageReP = RePSum / globalNoPart;
630
631 MPI_Allreduce(MPI_IN_PLACE, &VelmagnitudeSqSum, 1, MPI_DOUBLE, MPI_SUM, solver().mpiComm(), AT_, "INPLACE",
632 "VelMagnitudesum");
633
634 MFloat VpRMS = sqrt(VelmagnitudeSqSum / globalNoPart);
635
636 MPI_Allreduce(MPI_IN_PLACE, &EkinSum, 1, MPI_DOUBLE, MPI_SUM, solver().mpiComm(), AT_, "INPLACE", "EkinSum");
637
638 MFloat EkinP = 0.5 * EkinSum;
639
640 if(solver().domainId() == 0) {
641 std::ofstream Plog;
642 Plog.open("ParticleStatistics.log", ios::app);
643 Plog << std::setw(5) << globalTimeStep << "\t" << std::setw(10) << VpRMS << "\t" << std::setw(10) << AverageReP
644 << "\t" << std::setw(10) << EkinP << endl;
645 Plog.close();
646 }
647 } else {
648 return;
649 }
650}
651
652
653template class PostProcessingLPT<3>;
void mAlloc(T *&a, const MLong N, const MString &objectName, MString function)
allocates memory for one-dimensional array 'a' of size N
Definition: alloc.h:173
std::array< MFloat, nDim > m_position
Definition: lptbase.h:34
std::array< MFloat, nDim > m_velocity
Definition: lptbase.h:35
std::array< MFloat, nDim > m_oldVel
particle velocity of the last time step
Definition: lptbase.h:41
MInt m_cellId
Definition: lptbase.h:46
Definition: lpt.h:82
std::array< MFloat, nDim > m_oldFluidVel
fluid velocity of the last time step
Definition: lptspherical.h:70
MFloat m_oldFluidDensity
old fluid density
Definition: lptspherical.h:73
MFloat magRelVel(const MFloat *const velocity1, const MFloat *const velocity2) const
Calculate the magnitude of the relative velocity of the two given velocity vectors.
Definition: lptspherical.h:131
MFloat particleRe(const MFloat velocity, const MFloat density, const MFloat dynamicViscosity)
Calculate the particle reynoldsnumber.
Definition: lptspherical.h:149
MFloat dragFactor(const MFloat partRe)
Calculate drag factor of the current particle for the given particle Reynolds number....
static MFloat s_Re
Definition: lptspherical.h:96
Definition: postdata.h:23
void initParticleStatistics() override
init function for LPT particle statistics file
void parcelStatistics()
computes parcel statistics
void writeLPTSolutionFile() override
base function which is called every time-Step in postprocessInSolve
void initParticleLog()
initialize particle.log
void computeParticleStatistics() override
compute average quantites of particle phase average particle Reynolds number ReP the root mean square...
void particleMass()
computes conervation variables (mass/momentum/energy!)
void initSprayData() override
init arrays
void particlePenetration()
calculate vertical and horizontal penetration from given coordinate
PostProcessingLPT(MInt postprocessingId_, PostData< nDim > *data, SolverType *ppSolver_)
SolverType * m_ppSolver
void initLPTSolutionFile() override
init function for LPT particle solution file
MInt getInjectionData()
void writeParticleLog()
write particle Log file, containing particle position and velocity at timestep t
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
constexpr Real POW3(const Real x)
Definition: functions.h:123
constexpr Real POW2(const Real x)
Definition: functions.h:119
MInt globalTimeStep
int32_t MInt
Definition: maiatypes.h:62
std::basic_string< char > MString
Definition: maiatypes.h:55
double MFloat
Definition: maiatypes.h:52
int64_t MLong
Definition: maiatypes.h:64
char MChar
Definition: maiatypes.h:56
MInt id
Definition: maiatypes.h:71
int MPI_Allreduce(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatype, MPI_Op op, MPI_Comm comm, const MString &name, const MString &sndvarname, const MString &rcvvarname)
same as MPI_Allreduce