434 Commits

Author SHA1 Message Date
0d9de2c601 Merge pull request #222 from PhasicFlow/main
from main
2025-05-02 23:04:23 +03:30
b4bc724a68 readme helical 2025-05-02 22:28:56 +03:30
ee33469295 readme helical 2025-05-02 22:26:38 +03:30
3933d65303 yaml update5 2025-05-02 22:03:16 +03:30
cf4d22c963 yaml update4 2025-05-02 21:59:31 +03:30
86367c7e2c yaml update3 2025-05-02 21:51:03 +03:30
a7e51a91aa yaml update2 2025-05-02 21:46:43 +03:30
5e56bf1b8c yaml update1 2025-05-02 21:28:40 +03:30
343ac1fc04 yaml update 2025-05-02 21:27:23 +03:30
6b04d17c7f sync-wiki to process img<> tags 2025-05-02 20:47:21 +03:30
97f46379c7 image resize 2025-05-02 20:25:20 +03:30
32fd6cb12e features update 2025-05-02 20:06:49 +03:30
be16fb0684 tutorials link added 2025-05-02 18:29:08 +03:30
4c96c6fa1e test 2025-04-30 19:01:51 +03:30
196b7a1833 how to build readme.md to wiki 2025-04-30 18:52:15 +03:30
316e71ff7a test readme.md 2025-04-30 18:36:53 +03:30
7a4a33ef37 a new workflow for readme.md files to wiki 2025-04-30 18:34:53 +03:30
edfbdb22e9 readmd.md update8 2025-04-30 08:56:11 +03:30
c6725625b3 readmd.md update7 2025-04-30 08:45:28 +03:30
253d6fbaf7 readmd.md update6 2025-04-30 08:40:46 +03:30
701baf09e6 readmd.md update5 2025-04-30 08:37:17 +03:30
20c94398a9 readmd.md update4 2025-04-30 08:34:51 +03:30
dd36e32da4 readmd.md update3 2025-04-30 08:31:19 +03:30
a048c2f5d7 readmd.md update2 2025-04-30 08:27:07 +03:30
8b324bc2b6 readmd.md update1 2025-04-30 08:18:29 +03:30
c7f790a1fa readmd.md update 2025-04-30 08:14:10 +03:30
166d7e72c2 rrr 2025-04-29 20:23:08 +03:30
c126f9a8a3 rr 2025-04-29 20:19:25 +03:30
7104a33a4b r 2025-04-29 20:14:34 +03:30
16b6084d98 readme update 2025-04-29 20:10:06 +03:30
2afea7b273 workflow update 2025-04-29 20:09:22 +03:30
2c5b4f55d1 readme.test 2025-04-29 20:01:13 +03:30
a7dc69a801 Merge branch 'main' of github.com:PhasicFlow/phasicFlow 2025-04-29 19:59:36 +03:30
32287404fa workflow update 2025-04-29 19:54:20 +03:30
8b3530c289 Merge pull request #221 from wanqing0421/benchmarks
update phasicFlow snapshot
2025-04-29 19:47:25 +03:30
d8c3fc02d5 update phasicFlow snapshot 2025-04-29 20:46:30 +08:00
4dab700a47 update image 2025-04-29 20:30:10 +08:00
a50ceeee2c update readme and figure 2025-04-29 20:25:00 +08:00
468730289b test for wiki 2025-04-28 23:06:29 +03:30
27f0202002 workflow for wiki 2025-04-28 23:04:42 +03:30
c69bfc79e1 endsolid bug fix for space separated names 2025-04-28 19:42:49 +03:30
69909b3c01 bug fix in reading stl file 2025-04-28 13:56:21 +03:30
8986c47b69 readmd.md for benchmark is updated 2025-04-28 12:25:53 +03:30
37282f16ac Merge branch 'PhasicFlow:main' into importStl 2025-04-28 09:35:49 +08:00
cd051a6497 Merge pull request #220 from wanqing0421/benchmarks
update readme
2025-04-27 21:57:40 +03:30
8b5d14afe6 update readme figure 2025-04-28 02:20:42 +08:00
eb37affb94 update readme 2025-04-28 02:17:04 +08:00
c0d12f4243 Merge pull request #219 from PhasicFlow/postprocessPhasicFlow
diameter -> distance for benchmarks
2025-04-27 21:08:04 +03:30
a1b5a9bd5d Merge pull request #218 from wanqing0421/benchmarks
upload readme for benchmarks
2025-04-27 20:59:37 +03:30
dc0edbc845 diameter -> distance for benchmarks 2025-04-26 21:22:59 +03:30
b423b6ceb7 upload readme for benchmarks 2025-04-26 15:17:57 +08:00
1f6a953154 fix bug when endsolid with a suffix name 2025-04-26 14:58:56 +08:00
bbd3afea0e Merge pull request #216 from PhasicFlow/postprocessPhasicFlow
readme.md for geometryPhasicFlow
2025-04-25 21:04:53 +03:30
53f0e959b0 readme.md for geometryPhasicFlow 2025-04-25 21:04:18 +03:30
c12022fb19 Merge pull request #215 from wanqing0421/importStl
add scale and transform function during the stl model importing process
2025-04-25 20:45:53 +03:30
d876bb6246 correction for tab 2025-04-26 01:13:42 +08:00
cb40e01b7e Merge pull request #206 from wanqing0421/main
fixed selectorStride bug
2025-04-25 20:35:11 +03:30
5f6400c032 add scale and transform function during the stl model importing process 2025-04-26 00:43:56 +08:00
8863234c1c update stride selector 2025-04-25 23:11:19 +08:00
1cd64fb2ec Merge branch 'PhasicFlow:main' into main 2025-04-25 23:00:10 +08:00
3fc121ef2b Merge pull request #214 from PhasicFlow/postprocessPhasicFlow
readme.md files update
2025-04-25 16:42:06 +03:30
953059cec5 tutorials readme.md 2025-04-25 16:37:24 +03:30
2593e2acf1 diameter->distance, update in tutorials, v-Blender readme.md 2025-04-25 16:14:16 +03:30
7c3b90a22d tutorials-1 after diameter->distance 2025-04-25 14:17:09 +03:30
72b9b74cc9 Merge pull request #213 from PhasicFlow/postprocessPhasicFlow
readme.md for particlesPhasicFlow and change diameter to distance in …
2025-04-25 11:38:49 +03:30
a545acb374 readme.md for particlesPhasicFlow and change diameter to distance in dict files 2025-04-25 11:36:46 +03:30
59fbee9711 Merge pull request #212 from PhasicFlow/postprocessPhasicFlow
Postprocess phasic flow
2025-04-25 09:29:02 +03:30
6cc4b3954a readme.md file for pFlowToVTK 2025-04-25 09:26:56 +03:30
d8c9135700 readme.md file for postprocessPhasicFlow 2025-04-25 00:40:41 +03:30
544624d579 Merge pull request #211 from PhasicFlow/postProcessing
pFlow -> pFlow::postprocessData
2025-04-24 23:40:34 +03:30
cbac1e97b5 pFlow -> pFlow::postprocessData 2025-04-24 23:39:31 +03:30
8c543e1649 Merge pull request #210 from PhasicFlow/postProcessing
Post processing readme.md
2025-04-24 23:32:46 +03:30
be807e4a71 change of namespace from pFlow to pFlow::postprocessData 2025-04-24 23:31:43 +03:30
d5ea338ab3 spell check readme.md 2025-04-24 14:41:31 +03:30
a448ce5f8d minor changes to readme.md 2025-04-24 14:28:28 +03:30
e2582f5fd9 minor change to readme.md 2025-04-24 14:18:08 +03:30
f2e8e69899 prime2 is added and readme update 2025-04-24 14:08:17 +03:30
a9e5b9bb59 Update readme.md 2025-04-23 01:19:10 +03:30
77eda47a87 Merge pull request #209 from PhasicFlow/postProcessing
corrections for readme.md file postprocessing
2025-04-23 01:08:36 +03:30
acb8d0e4eb corrections for readme.md file postprocessing 2025-04-23 01:08:03 +03:30
19fa3e2822 Merge pull request #208 from PhasicFlow/postProcessing
readme.md file is added for postprocessing
2025-04-23 00:48:16 +03:30
73f4b35fd4 readme.md file is added for postprocessing 2025-04-23 00:47:03 +03:30
5f8ea2d841 fixed selectorStride bug 2025-04-22 14:46:12 +08:00
8da8afbe63 V-blender finalized for v-1.0 2025-04-21 15:52:51 +03:30
cde93e953e Merge pull request #202 from PhasicFlow/postprocessPhasicFlow
postprocessPhasicFlow is now updated with new postprocessData auxFunc…
2025-04-21 10:29:55 +03:30
c80ee030db Merge pull request #200 from wanqing0421/benchmarks
Benchmarks of rotatingDrum
2025-04-21 10:26:21 +03:30
b679b9dcd3 Merge pull request #203 from Nimajhi/main
corrections for V-blender
2025-04-21 10:05:21 +03:30
1a2ad8ffa3 Merge pull request #201 from wanqing0421/main
fixed the cuda compilation error
2025-04-21 00:17:48 +03:30
9de1fa2dc7 postprocessPhasicFlow is now updated with new postprocessData auxFunction. It now uses postprocessDataDict. 2025-04-21 00:13:54 +03:30
b33fb61672 fixed the cuda compilation error 2025-04-21 03:07:06 +08:00
245ff9608f update rotatingDrum benchmarks 2025-04-21 01:50:57 +08:00
58ef463021 Merge branch 'PhasicFlow:main' into benchmarks 2025-04-21 01:47:29 +08:00
1100556d72 minor correction 2025-04-20 18:49:36 +03:30
14954b3ca6 minor correction 2025-04-20 14:15:31 +03:30
3710b19614 minor correction 2025-04-20 14:09:04 +03:30
40deb1f9c0 PostprocessData-update to work after simulation too
Postprocessing: IncludeMask documentation
2025-04-18 15:36:02 +03:30
d69203168e PostprocessData update
Modifications on fieldsDataBase to work both during simulation and post-simulation
Some bug fixes and changes to the code based
Correction for region volume
2025-04-18 15:32:53 +03:30
61be8c60fb Merge branch 'main' into postProcessing 2025-04-17 02:43:37 +03:30
549cb2ffdc Merge branch 'main' of github.com:PhasicFlow/phasicFlow 2025-04-17 02:42:25 +03:30
98a30bc98c keepHistory for integration to automatically remove the fields related to integration. The default is no save on the disk 2025-04-17 02:41:36 +03:30
7c9a724174 Postprocessing: IncludeMask documentation 2025-04-15 22:20:00 +03:30
abd36d4ae7 Merge pull request #198 from PhasicFlow/postProcessing
Post processing
2025-04-15 21:36:37 +03:30
35f10e5a94 Operations averge, mass velocity and region multisphereRegion are added 2025-04-15 21:30:54 +03:30
093160ba32 Postprocess framework
- Executed has been completed and testd.
- regions multipleSpheres are compelete
- Docs for regions is comelete.
2025-04-15 21:27:49 +03:30
077f25842a Merge branch 'main' of github.com:PhasicFlow/phasicFlow 2025-04-11 10:17:20 +03:30
d136ac0262 autoComplete improved for better time folder filtering and fields improved for better field filtering 2025-04-11 10:13:53 +03:30
c3acea1415 Merge pull request #197 from PhasicFlow/postProcessing
Post processing - merge to main
2025-04-10 21:23:58 +03:30
8e87333973 Push after adding PostptocessData lib 2025-04-10 21:22:35 +03:30
162cfd3b6a The main structure is tested. functons like execute and write are added and tested.
other components are left
2025-04-10 21:16:31 +03:30
ab7f700ead first commit for post-processing
- the whole structure is ready.
- next step whould be execute methods and then write methods
- post-processing after simulation is not started yet.
2025-04-09 19:47:57 +03:30
671b929f52 Merge branch 'PhasicFlow:main' into benchmarks 2025-04-07 11:30:52 +08:00
c78ab398f6 Merge pull request #195 from dalg24/patch-1
Update Kokkos dependencies description in README
2025-03-28 17:08:57 +03:30
d1189c0b2c Update Kokkos dependencies description in README 2025-03-28 07:55:36 -04:00
ccb7a6dd41 Update README.md 2025-03-27 02:50:30 +03:30
9e3bb1cfa1 Contribution-readme
Update README.md
2025-03-27 02:09:52 +03:30
7bb0a0453a Update README.md 2025-03-27 02:09:29 +03:30
577a94d07b Contribute README.md 2025-03-27 02:07:32 +03:30
5fee39cdd8 Update codingStyle.md
doxygen documentation is added
2025-03-24 17:21:50 +03:30
8fe63cca53 Create codingStyle.md 2025-03-24 14:45:05 +03:30
7b534a9e91 Merge branch 'PhasicFlow:main' into benchmarks 2025-03-22 21:17:33 +08:00
97e6592524 Merge pull request #192 from wanqing0421/main
fix the cuda build error with multiRotatingAxis
2025-03-20 01:03:30 +03:30
b7d47a65ad fix the cuda build error with multiRotatingAxis 2025-03-20 00:55:46 +08:00
3441b03167 Merge pull request #191 from PhasicFlow/multiRotatingAxis
Multi rotating axis
2025-03-19 18:14:09 +03:30
340f3a551a Multirotating axis motion for version 1.0 2025-03-19 18:10:50 +03:30
be7b2eb632 multiRotaingAxis debug 2025-03-16 22:08:07 +08:00
71057e9575 fill the multiRotatingAxis 2025-03-16 15:15:49 +08:00
0613b15c93 init commit of rotatingDrum 2025-03-16 00:56:31 +08:00
797334af87 adapt the multiRotatingAxisMotion to v-1.0 2025-03-16 00:36:38 +08:00
5eef26a6ed Bug fix for memory leak on CPU
- the call for tbb is disabled.
- parallel sort of Kokkos is also very slow.
- for now, std::sort is used for sort, which is more performant than both avaible options. This would be changed anytime any possible solution is found.
2025-03-15 17:15:32 +03:30
892f5395bc Bug fix for observed in particles, getNth and naming for contact lists 2025-03-14 18:33:02 +03:30
b65be8881c end of file corrections 2025-03-13 23:43:52 +03:30
23783b7db9 toteBlender for v-1.0 2025-03-11 17:20:42 +03:30
389e42ee1f Merge branch 'main' of github.com:PhasicFlow/phasicFlow 2025-03-09 21:14:02 +03:30
7f7e06ae7d bug fix for compiling on Ubuntu-24.04LTS 2025-03-09 21:10:41 +03:30
b007426d5d Merge pull request #184 from wanqing0421/main
update benchmarks file and romove the unused comments in rotatingDrumMedium
2025-03-06 21:40:39 +03:30
3ff4ad1469 Merge branch 'PhasicFlow:main' into main 2025-03-07 01:20:31 +08:00
5a5a3c6daf delete the unused comments 2025-03-07 02:53:49 +08:00
bff34bbb9e Merge pull request #185 from ramin1728/RotatingDrumWithBaffles
Rotating drum with baffles
2025-03-06 18:40:59 +03:30
84197bf237 Merge branch 'PhasicFlow:main' into main 2025-03-06 18:39:55 +08:00
169dd73963 Update README.md 2025-03-06 01:06:29 +03:30
baa99c61c0 bug fix for compiling on ubuntu-24 2025-03-06 00:14:14 +03:30
08d0d62d37 ReadMe.md is corrected. 2025-03-05 23:34:37 +03:30
8dcd578a22 RotatingDrumWithBaffles is Updated. 2025-03-05 20:06:25 +03:30
eb62adc87d update benchmarks file and romove the unused comments in rotatingDrumMedium 2025-03-05 22:51:07 +08:00
5394dce7aa Merge pull request #182 from wanqing0421/main
correction for particle insertion region
2025-03-05 17:39:21 +03:30
8038a76699 Correction for settingsDict 2025-03-05 19:59:18 +08:00
c408b60f87 correction for shapes file 2025-03-05 19:56:57 +08:00
ab21acdca5 update rotatingDrumMedium tutorial 2025-03-05 08:37:52 +08:00
07b54c4077 RotatingDrumWithBaffles is Updated. 2025-03-04 22:12:54 +03:30
75f679a234 correction for particle insertion region 2025-03-04 13:57:30 +08:00
c32789f34d Update ReadMe.md 2025-03-02 16:27:00 +03:30
09c303a61e Update interaction 2025-03-02 16:21:51 +03:30
0820e003fc Update particleInsertion 2025-03-02 16:20:56 +03:30
c4c6c2fc45 Update settingsDict 2025-03-02 16:04:20 +03:30
d5dd7af06e Update particlesDict 2025-03-02 16:02:04 +03:30
b03d4825ff Update ReadMe.md 2025-03-02 15:50:04 +03:30
67df8ad206 Merge pull request #181 from ramin1728/RotaryAirLockValve
Rotary air lock valve
2025-03-02 15:47:23 +03:30
2df8133c2d RotaryAirLockValve is Updated. 2025-03-02 12:56:59 +03:30
HRN
dc0504d2fa Merge branch 'main' of github.com:PhasicFlow/phasicFlow into main 2025-02-28 11:37:11 +03:30
HRN
27dfdfa599 stationary motion now does not require the dictionary 2025-02-28 11:36:53 +03:30
8b9a9acd0c RotaryAirLockValve is Updated. 2025-02-27 20:53:20 +03:30
c87c9716ef Update README.md 2025-02-27 20:28:21 +03:30
0ed5b2337c Merge pull request #178 from wanqing0421/main - rotartyDrumSmall
update rotatingDrumSmall tutorial
2025-02-27 20:20:44 +03:30
282d9733fc correctiont for rotatingDrumSmall 2025-02-28 00:43:03 +08:00
cfd188587c revise the readme and domainDict 2025-02-27 23:18:01 +08:00
e8e1081345 update rotatingDrumSmall tutorial 2025-02-26 23:31:52 +08:00
HRN
099e85cfb1 Vector now only accepts one type of allocator, the default allocator 2025-02-26 12:19:36 +03:30
HRN
1cbeb1c963 drum-PeriodictBoundary tutorial added 2025-02-25 22:37:19 +03:30
HRN
a33ec7d8e0 corrections for readMe.md v-1.0 2025-02-24 15:09:38 +03:30
HRN
05ecf37eee box now checks for min and max point consistency 2025-02-24 14:40:29 +03:30
HRN
b44c4de3f6 reading particle position from file for partilclesPhasicFlow 2025-02-24 13:55:56 +03:30
05b256ba39 Merge pull request #170 from wanqing0421/main
New rapid filling implement
2025-02-24 12:34:05 +03:30
25b2e37d93 Merge pull request #175 from ramin1728/banarySystemOfParticles
binarySystemOfParticles is Updated.
2025-02-24 12:33:33 +03:30
a2561f0f12 Merge branch 'PhasicFlow:main' into main 2025-02-23 20:40:36 +08:00
89896c0d69 binarySystemOfParticles is Updated. 2025-02-23 15:59:37 +03:30
HRN
fd45625ce6 cmake_policy 2025-02-21 22:46:31 +03:30
HRN
3e0161a20f version control for cmake_policy 0169 2025-02-21 22:42:11 +03:30
4552d90eac Merge branch 'PhasicFlow:main' into main 2025-02-21 21:58:50 +08:00
HRN
98c8116fd3 rotaryAirlock settingsDict 2025-02-20 21:06:13 +03:30
HRN
fa1211acf8 some minor correction for homogenization silo simulation 2025-02-20 18:48:41 +03:30
HRN
12059faefc corrections for tutorial of screw conveyor 2025-02-20 17:33:55 +03:30
HRN
3954fcf4ab A new screwConveyor tutorial 2025-02-20 17:27:36 +03:30
ef1fa1ddaf Merge branch 'PhasicFlow:main' into main 2025-02-18 19:36:21 +08:00
HRN
354daab7c5 now accepts both kokkos on Home folder and automatic download 2025-02-17 18:39:33 +03:30
HRN
ed4fe6f2f5 Donwloading kokkos and installing tbb is now automatic 2025-02-17 01:13:02 +03:30
d5b9ca4c43 remove rapid filling tutorial 2025-02-16 13:08:09 +08:00
9ccc487a51 Merge branch 'PhasicFlow:main' into main 2025-02-16 12:38:31 +08:00
ae251598a4 update rapid filling 2025-02-16 12:31:11 +08:00
HRN
2a8146c43f add operator << for Set 2025-02-15 22:03:41 +03:30
HRN
fd6b3ebc60 correction for layeredSiloFilling 2025-02-15 22:02:16 +03:30
8e13c377eb Merge pull request #169 from ramin1728/main
layeredSiloFilling is Updated.
2025-02-15 19:57:39 +03:30
5e272cfa1b RotaryAirLockValve is Updated. 2025-02-14 23:30:27 +03:30
252725863f layeredSiloFilling is Updated. 2025-02-14 23:10:46 +03:30
bd4e566dc2 layeredSiloFilling 2025-02-14 23:07:13 +03:30
0532c441a8 Merge pull request #167 from PhasicFlow/develop
bug correction for the time when empty is used
2025-02-14 22:55:22 +03:30
3c1d4d57ad Merge pull request #168 from PhasicFlow/siloHemogenization
New tutorial on hemogenization silo is added
2025-02-14 22:55:09 +03:30
HRN
ff2f1d41e8 New tutorial on hemogenization silo is added 2025-02-14 22:51:46 +03:30
HRN
774afd5f37 bug correction for the time when empty is used 2025-02-14 22:50:28 +03:30
191801b344 Merge pull request #165 from ramin1728/main
binarySystemOfParticles is Updated.
2025-02-14 20:42:14 +03:30
545de300ae Merge pull request #166 from PhasicFlow/develop
edits
2025-02-14 20:40:44 +03:30
HRN
9b3c4f83b9 edits 2025-02-14 20:39:37 +03:30
b315d12357 conveyorBelt is Updated. 2025-02-11 23:35:58 +03:30
7e7184f1c5 binarySystemOfParticles is Updated. 2025-02-11 23:18:29 +03:30
29d922e3c5 A simple rapid filling demo 2025-02-10 23:12:42 +08:00
3aa6be6676 A simple rapid filling 2025-02-10 23:11:33 +08:00
9f489d07cc Merge pull request #163 from PhasicFlow/develop
global damping is activated for velocity and rVelocity in both sphere…
2025-02-10 01:11:30 +03:30
HRN
8466e02d81 global damping is activated for velocity and rVelocity in both sphere and grain solvers 2025-02-10 01:10:13 +03:30
3f1fa4ae90 Merge pull request #162 from wanqing0421/main
bug fix during the build process of cuda mode
2025-02-08 22:39:06 +03:30
f0f185983c bug fix during the build process of cuda mode 2025-02-08 23:47:21 +08:00
cb6d567dab Merge pull request #161 from PhasicFlow/develop
AB5 is added and bug is resolved when particles are being inserted
2025-02-08 18:07:39 +03:30
HRN
db9b1e62e4 AB5 is added and bug is resolved when particles are being inserted 2025-02-08 18:06:30 +03:30
3aff0f1fc6 Merge pull request #160 from PhasicFlow/develop
bug resolve, chekcForCollision is set to true for always, adjustable …
2025-02-07 23:16:48 +03:30
HRN
b9ab015eb1 bug resolve, chekcForCollision is set to true for always, adjustable search box is set to false for always, old hearChanges has been removed 2025-02-07 23:12:53 +03:30
59fbaa91ab Merge pull request #159 from PhasicFlow/develop
All messages are revisited for internal points and boundaries
2025-02-06 11:06:35 +03:30
f84484881c Merge pull request #158 from PhasicFlow/develop
pFlowToVTK now manages when Ctrl+C is used by user
2025-02-06 11:05:21 +03:30
HRN
02e0b72082 All messages are revisited for internal points and boundaries 2025-02-06 11:04:30 +03:30
HRN
edb02ecfc7 pFlowToVTK now manages when Ctrl+C is used by user 2025-02-06 10:51:13 +03:30
1540321a31 Merge pull request #157 from PhasicFlow/develop
the need to provide neighborLength in domain dictionary is lifted. No…
2025-02-03 23:51:31 +03:30
HRN
63bd9c9993 the need to provide neighborLength in domain dictionary is lifted. Now it is optional 2025-02-03 23:49:11 +03:30
f4f5f29e3c Merge pull request #156 from PhasicFlow/develop
Develop
2025-02-03 19:17:08 +03:30
HRN
fac5576df1 periodict boundary condition ->DEBUG and some minor changes boundaries 2025-02-03 19:16:14 +03:30
HRN
f5ba30b901 autoCompelte for time folders and field names 2025-02-03 19:15:08 +03:30
HRN
0f9a19d6ee reduction in boundary class size 2025-02-01 23:33:19 +03:30
d909301f32 Merge pull request #155 from PhasicFlow/develop
Develop
2025-02-01 22:18:23 +03:30
HRN
3b88b6156d Merge branch 'develop' of github.com:PhasicFlow/phasicFlow into develop 2025-02-01 22:15:34 +03:30
HRN
64c041a753 boundaryListPtr is created and other classes were changed accordingly 2025-02-01 22:14:41 +03:30
0410eb6864 Merge pull request #154 from PhasicFlow/main
merge from main
2025-01-31 13:45:24 +03:30
2d7f7ec17f Merge pull request #153 from PhasicFlow/develop
changes in contactSearch and timeControl and timeInfo
2025-01-31 13:44:07 +03:30
HRN
af2572331d some cleanup 2025-01-31 01:06:16 +03:30
HRN
f98a696fc8 changes in contactSearch and timeControl and timeInfo 2025-01-27 14:26:20 +03:30
2168456584 correctoins for running on cuda 2025-01-26 12:19:25 +03:30
6e6cabbefa Merge pull request #152 from PhasicFlow/develop
timeInfo is updated
2025-01-25 19:58:27 +03:30
HRN
42b024e1ed globalDamping is deactivated for future developement 2025-01-25 19:56:01 +03:30
HRN
debb8fd037 bug fix for stridedRange 2025-01-25 19:48:36 +03:30
HRN
0fc9eea561 timeInfo and timeValue
- timeInfo updated
- timeValue type is added = double
- AB2 bug fixed
- updateInterval for broadSearch is activated
2025-01-25 19:18:11 +03:30
HRN
1ccc321c1d Merge branch 'develop' of github.com:PhasicFlow/phasicFlow into develop 2025-01-24 21:15:51 +03:30
HRN
f4b15bc50a timeControl 2025-01-24 21:15:16 +03:30
164eedb27c Merge pull request #151 from PhasicFlow/main
update from main branch
2025-01-24 21:12:53 +03:30
2ec3dfdc7e global damping is added to the code 2025-01-20 21:02:50 +03:30
cb1faf04f8 bug fixes for build with float in cuda 2025-01-20 15:43:56 +03:30
a32786eb8a particlePhasicFlow bug-fix when flag --set-fields-only is used and no shpaeName is set 2025-01-20 15:39:17 +03:30
967bb753aa adding non-linear contact force model for grains 2025-01-20 15:37:48 +03:30
c202f9eaae AB3, AB4 added, and AB2 modified 2025-01-20 14:55:12 +03:30
HRN
8823dd3c94 file headers 2025-01-10 12:27:35 +03:30
3d6fa28221 Merge pull request #150 from PhasicFlow/develop
Auto-complete for command line
2025-01-09 21:03:00 +03:30
HRN
2155771044 autoComplete file 2025-01-09 21:02:01 +03:30
HRN
bfa3759fc9 Auto complete for command line is added to phasicFlow commands 2025-01-09 20:58:33 +03:30
bab1984b8e Merge pull request #149 from PhasicFlow/develop
Binary conversion from pointFiled files to vtk format
2025-01-09 19:20:25 +03:30
HRN
66c3cda39e Binary conversion from pointFiled files to vtk format
- all vtk files are stored in the /particles/ folder
- terminal output is modified
- time series file are added. files with extntions .vtk.series can be loaded into paraview
2025-01-09 19:16:18 +03:30
75975a43de Merge pull request #148 from Alireza77h/main
bug fixes for cuda run in plus side
2025-01-08 11:39:03 +03:30
f74ec1d1ac bug fixes for cuda run in plus side 2025-01-08 08:42:45 +03:30
f169e3fc89 Merge pull request #147 from PhasicFlow/develop
bug fix for memory error in PhasicFlowPlus-fluid interaction
2025-01-04 15:49:27 +03:30
HRN
d39e1ec27b bug fix for memory error in PhasicFlowPlus-fluid interaction 2025-01-04 15:46:30 +03:30
dbb3b5c3a2 Merge pull request #143 from ramin1728/V-blender
updated V1.0 V-blender
2024-12-28 17:45:11 +03:30
c02027f5d2 updated V1.0 V-blender 2024-12-28 14:58:28 +03:30
31ebc5963c updated V1.0 toteblender 2024-12-28 14:09:09 +03:30
0d5f8a98a2 updated V1.0 screwConveyor 2024-12-28 13:46:09 +03:30
018770a1f1 updated V1.0 RotaryDrumWithBaffle 2024-12-28 13:31:17 +03:30
59145425b1 Merge pull request #139 from PhasicFlow/develop
grainDEMSystem folder is added
2024-12-28 13:25:06 +03:30
HRN
ff6c3454c9 grainDEMSystem folder is added 2024-12-28 13:22:12 +03:30
a63ed8b0fa Merge pull request #138 from ramin1728/rotaryairlock
RotaryAirLockValve
2024-12-28 13:20:17 +03:30
278afc8ab6 updated V1.0 RotaryAirLock 2024-12-28 13:09:06 +03:30
6179f6ea3b t 2024-12-28 13:00:42 +03:30
e4eb7d74be Merge pull request #137 from PhasicFlow/develop
Some changes to be compatible with phasicFlowPlus-v1.0
2024-12-27 19:29:31 +03:30
HRN
1f242d8911 Some changes to be compatible with phasicFlowPlus-v1.0 2024-12-27 19:26:09 +03:30
46e862c5e5 Merge pull request #136 from PhasicFlow/develop
sphereDEMSystem is updated for version 1.0
2024-12-26 22:59:03 +03:30
HRN
16f8ab4572 sphereDEMSystem is updated for version 1.0 2024-12-26 19:07:39 +03:30
809d4ca617 Merge pull request #135 from PhasicFlow/develop
DEMSystem updated for version 1.0
2024-12-25 18:28:05 +03:30
HRN
bc22012ecd DEMSystem updated for version 1.0 2024-12-25 18:26:53 +03:30
51d85a0b79 Merge pull request #133 from wanqing0421/main
Add the conveyor belt model and tutorial
2024-12-25 09:39:07 +03:30
bf6ecfb3ff Merge pull request #134 from ramin1728/rotatingDrumMedium
updated V1.0 rotatingDrumMedium
2024-12-25 09:34:07 +03:30
73e4295a25 Undo changes in bashrc and change the velocity_ to tangentVelocity_ 2024-12-25 08:38:09 +08:00
a99278447e update conveyor belt model tutorial 2024-12-24 22:52:18 +08:00
dae2af5354 updated V1.0 rotatingDrumMedium 2024-12-24 18:14:19 +03:30
12b3413306 Merge pull request #131 from ramin1728/rotatingDrumSmall
updated V1.0 rotatingDrumSmall
2024-12-24 18:08:32 +03:30
ebff41619e updated V1.0 rotatingDrumSmall 2024-12-24 18:03:38 +03:30
50750c2574 update conveyor belt model 2024-12-24 17:11:49 +08:00
89a47d1a15 update conveyor belt model 2024-12-24 16:59:42 +08:00
ef2a13dd7e add conveyor belt model 2024-12-24 16:39:40 +08:00
5318610c1f add converyor belt model 2024-12-24 15:37:19 +08:00
acdad47823 Merge pull request #126 from ramin1728/main
binarySystemOfParticles updated V1.0
2024-12-03 16:26:04 +03:30
1008ea8c9a layeredSiloFilling is updated. 2024-12-03 15:49:59 +03:30
93c146391c Tutorial is Updated 2024-12-03 13:31:17 +03:30
5db98b9488 updated V1.0 2024-12-03 12:19:36 +03:30
c5ed2ad1e9 Merge pull request #125 from PhasicFlow/develop
Develop
2024-11-24 19:02:35 +03:30
a6a2d120e7 Merge pull request #123 from ramin1728/main
binarySystemOfParticles tutorial Updated for v1
2024-11-24 19:01:49 +03:30
7f0cb9cdb5 Merge pull request #124 from PhasicFlow/main
merge from main to develop to update everyting
2024-11-24 19:00:53 +03:30
24fe136bb2 Add files via upload 2024-11-24 16:57:44 +03:30
c21d63dacf Add files via upload 2024-11-24 16:13:50 +03:30
a247243d45 Add files via upload 2024-11-24 16:12:56 +03:30
c8132d5067 Add files via upload 2024-11-24 15:58:26 +03:30
51e43f089e Add files via upload 2024-11-24 15:54:02 +03:30
a606e48e66 Merge pull request #122 from PhasicFlow/develop
bug fix for postprocessPhasicFlow
2024-11-22 21:45:47 +03:30
HRN
3e9ac75c93 Merge branch 'develop' of github.com:PhasicFlow/phasicFlow into develop 2024-11-22 21:41:31 +03:30
HRN
5df18532b4 bug fix for postProcess 2024-11-22 21:33:46 +03:30
a113a350d2 Merge pull request #120 from Alireza77h/main
course graining tutorial added
2024-11-18 20:43:42 +03:30
64cda707a9 Merge pull request #121 from PhasicFlow/develop
Utility postProcess is modified to be used in Version 1.0
2024-11-18 20:40:55 +03:30
fdb50d5af8 Merge branch 'main' into develop 2024-11-18 20:40:36 +03:30
HRN
75fba2710e Utility postProcess is modified to be used in Version 1.0
- counting dictionary is added to postProcess
- Code need to be modified to cleaned (fields in the repository should be removed onces postProcess is passed the next time step)
2024-11-18 20:27:44 +03:30
5a00361df6 cours graining tutorial added 2024-11-17 14:59:58 +03:30
192ff67bff Update bashrc
version is added to the end of file name
2024-11-17 14:47:49 +03:30
66539ae97a Merge pull request #119 from Alireza77h/main
course graining added
2024-11-17 14:42:06 +03:30
2bd95b933f course graining added 2024-11-17 10:19:40 +03:30
7eb707f950 Merge pull request #118 from PhasicFlow/develop
Develop
2024-10-19 12:27:41 +03:30
HRN
d3ccf354b7 code recovery regular part 2024-10-18 23:13:20 +03:30
HRN
173d3c4917 first commit after code loss - develop branch 2024-09-21 13:37:03 +03:30
8ee1fe63e6 Merge pull request #114 from ramin1728/main
binary system of particles tutorial is updated
2024-05-28 13:33:29 +03:30
ca1bc218d2 Update README.md 2024-05-28 13:26:34 +03:30
c8a28f82c9 layeredSiloFilling updated 2024-05-28 13:24:34 +04:30
b591d8fda1 binarySystemOfParticles updated 2024-05-28 13:10:19 +04:30
2f9db61983 The Tutorial is updated for version 1.x. 2024-05-28 12:47:31 +04:30
159ec5f1ff Tutorial is updated for version 1.x. 2024-05-28 12:25:10 +04:30
afa7d63c84 Tutorial is updated for version 1.x. 2024-05-28 12:23:05 +04:30
7b2c7c6199 Tutorial is updated for 1.x. 2024-05-28 12:19:37 +04:30
7b6271a165 Tutorial is updated for version 1.x. 2024-05-28 12:15:45 +04:30
526059707b Tutorials are updated. 2024-05-28 12:09:52 +04:30
180bc29df4 Tutorials are updated. 2024-05-28 12:08:25 +04:30
569646c6ac Tutorials are updated 2024-05-28 12:03:10 +04:30
3bbad4487b Merge pull request #113 from PhasicFlow/develop
Develop
2024-05-24 22:17:41 +03:30
HRN
6a66f1edfd bug fix for binary file read when dealing with multiple Fields reading from a single file 2024-05-24 22:02:46 +03:30
HRN
32a2c20613 for write to file binary MPI 2024-05-24 20:50:53 +03:30
HRN
d1b6a04292 makeing beforeIteration step-wise for boundaryBase to implement non-bloking communications 2024-05-24 00:10:49 +03:30
4f9f518b8d Merge pull request #110 from ramin1728/main
binarySystem tutorial
2024-05-22 10:00:24 +03:30
a05cd454a6 Merge pull request #112 from PhasicFlow/develop
Develop
2024-05-22 10:00:02 +03:30
d5ff1d7906 modifications for MPI+CUDA run 2024-05-22 09:56:06 +03:30
5e56671c05 layeredSiloFilling tutorial is updated for phasicFlow version 1.x. 2024-05-21 19:43:58 +04:30
afa790b04d binarySystemOfParticles 2024-05-21 16:59:15 +04:30
74833ce6a6 This toturial has been modified for version 1.x of phasicFlow. 2024-05-21 13:30:16 +04:30
888343c655 Tutorial binarySystemOfParticles are modified based on version 1.x 2024-05-19 20:50:00 +04:30
4e8b921514 bug remove for GPU run after CPU MPI parallelization
- specialization of VectorSingle for word
- dummyFile creation to solve write to file in MPI mode
2024-05-18 18:40:25 +03:30
8eba161d62 Merge pull request #109 from PhasicFlow/develop
develop branch update for changes in MPI branch for data transfer stage
2024-05-12 19:12:40 +03:30
HRN
614b2f732e develop branch update for changes in MPI branch for data transfer stage
mortong indexing is added (messaging is not complete)
2024-05-12 19:10:04 +03:30
99bb58bda7 Merge pull request #108 from PhasicFlow/develop
boundaryProcessor for dataTransfer
2024-05-05 23:10:08 +03:30
HRN
0e54e260e6 boundaryProcessor for dataTransfer
- in boundaryList in afterIteration, data transfer occurs to transfer data between prcocessors
- transferData method is added to boundaryBase
- Some modification to format the output messages in terminal
2024-05-05 23:05:23 +03:30
6a739e79b8 Merge pull request #107 from PhasicFlow/develop
Modification in streams and sphereInteraciton
2024-05-05 23:04:33 +03:30
HRN
97049760c3 Modification in streams and sphereInteraciton
1. processorOutput stream is modified to imporve visualization of output
2. some modifications for sphereInteraction after solving MPI memory leak.
2024-04-30 00:32:18 +03:30
9a69f510a5 Merge pull request #106 from PhasicFlow/develop
modification to the base code for MPI-developement up to processor bo…
2024-04-30 00:25:19 +03:30
e7215159af modification to the base code for MPI-developement up to processor boundaries 2024-04-27 09:03:19 -07:00
04fb9c8c36 Merge pull request #105 from PhasicFlow/develop
dataIO modified for virtual constructor
2024-04-24 18:06:06 +03:30
5c65b92008 dataIO modified for virtual constructor
- In new version dataIO uses virtual constructor to create the object for regular or MPI data transfer
- The instantiation is required for new data types
2024-04-20 06:11:57 -07:00
19caa17642 Merge pull request #104 from PhasicFlow/develop
zAxis is upgraded and array2D is added for support for 2D array opera…
2024-04-19 19:28:27 +03:30
e4c387a801 git ignore and CMAKE 2024-04-18 10:06:07 -07:00
ce57a18c4f Merge pull request #103 from PhasicFlow/develop
Particle insertion upgrade and pointStructure selectors
2024-04-18 00:37:03 +03:30
c432880689 zAxis is upgraded and array2D is added for support for 2D array operations
- Cylinder geometric region is corrected for minPoint and maxPoint
2024-04-17 14:04:34 -07:00
79b987c711 Particle insertion
- particleInsertion is now transfered to time folders to track particle insertion progress
- collision check is added for new inserted particles and old particles in the simulaiton.
- minor changes to dataEntry and triple
2024-04-15 13:19:03 -07:00
edcf2907e6 Merge pull request #102 from PhasicFlow/develop
pointStruture selectors refactored
2024-04-15 23:48:38 +03:30
d6798b5097 pointStructure selector
- selectors for pointStructure are updated and geometric selector is added. With this, any geometric region can also be used as a selector region for particles.
- Also, a pointField selector is added as a free funtion that can be used anywhere that is needed.
2024-04-15 13:14:29 -07:00
07bb9e9003 pointStruture selectors refactored
- geometricRegion was added as selector(for now, box, sphere, and cylinder)
- base class upgraded and new method is added to allow accessing point positions in a vector
- selection is modified to account for inactive points when selection is done based on position
- file interface for particlesPhasicFlow changed.

- TODO
- Tutorials should be updated in new version.
2024-04-13 13:13:53 -07:00
e4cc10fbd7 Merge pull request #101 from PhasicFlow/develop
Collision check and particlePosition -> random
2024-04-13 23:43:05 +03:30
e395c379cb Collision check and particlePosition -> random
- A new class is added for simple collision check
- position particles in utility is upgraded
- morton sorting is not active yet for particlesPhasicFlow
2024-04-13 07:07:36 -07:00
71f2649659 Merge pull request #100 from PhasicFlow/develop
Particle insertion is added with anyList
2024-04-13 12:13:17 +03:30
89d7e1f0ba Particle insertion (domain check)
- Domain check is added to prevent points that are outside of internalDomainBox
2024-04-13 01:41:11 -07:00
9c2a9a81b0 Particle insertion is added with anyList
- collision check is not active yet.
- variable velocity is not active yet.
- events and messages are not active yet.
2024-04-12 22:39:09 -07:00
70c1afceec Merge pull request #99 from PhasicFlow/develop
modifications to typeInfo.hpp and type system
2024-04-12 00:23:19 +03:30
97f0ddf82e modifications to typeInfo.hpp and type system
- ClassInfo is added to support for non-polymorphic typename
- removal template specialization for realx3 and etc.
- addition of new TypeInfo for triple and quadruple
- change in Logial TypeInfo to remove recursive include in some files
2024-04-11 13:48:37 -07:00
fb151f323c Merge pull request #97 from PhasicFlow/develop
Reflective boundary condition is added and tested.
2024-04-12 00:13:42 +03:30
ff8968e595 format clang-format 2024-04-08 12:33:08 -07:00
a9290e911b Reflective boundary condition is added and tested.
It requires messaging integration when changing velocity.
2024-04-05 05:31:09 -07:00
9336498e38 Merge pull request #96 from PhasicFlow/develop
Develop - Boundary conditions are created and tested
2024-04-04 23:07:16 +03:30
821dde9b1c modifications for adding boundary condtions 2024-04-04 12:33:09 -07:00
818106a34a Boundary conditions are created and tested.
- exit and periodic, follows the previous commit.
2024-04-04 12:31:19 -07:00
65b3f5a8a0 phasicFlow core changes for boundary condition addition.
- Exit boundry condition, checked.
- periodic boundary condition added, checked.

to be done:
- messaging events
- reflective
- wall-particle interaction for periodic bc.
2024-04-04 10:36:11 -07:00
89c7be0a20 Merge pull request #95 from PhasicFlow/develop
pFlowToVTK enhanced
2024-03-30 19:08:56 +03:30
ef0e752929 pFlowToVTK finalized and tested
- geometry conversion now can handle separate vtk files.
2024-03-30 08:35:16 -07:00
815b134e1e pFlowToVTK enhanced
- pointField conversion is completed, tested (finalized).
- geometry conversion is not complete yet.
2024-03-30 01:42:51 -07:00
cab49ef036 Merge pull request #94 from PhasicFlow/develop
pFlowToVTK and enhanced wall-particle search
2024-03-30 00:24:04 +03:30
f288f812fd pFlowToVTK is added
- this utility is not complete yet.
- geometry should be ajusted to be converted separately
2024-03-29 13:50:02 -07:00
19d1ad343d changes to cellsWallLevel0 to narrow down the contact list for particle-wall 2024-03-29 13:45:29 -07:00
7be70caa82 Merge pull request #93 from PhasicFlow/develop
Periodic boundary condition implementation
2024-03-26 20:39:43 +03:30
596ebb0262 Periodic boundary condition implementation
- boundaryBase class, some methods has been added, index list on host added, boundaryList friended
- generalBoundary class is created for all boundary types
- searchBoundary class is created for contact search -> (regular, none),
- pointStructure can be accessed through contactSearch

to be done:
- A new class for periodic boundary condtion should be added. This class should handel pp and pw contact searchs.
- Messages should be rearranged for boundaries.
- Events and updates should be synced, so that the same contact list can be used for internal particles and boundary particles.
2024-03-26 09:05:02 -07:00
af75d6a09c Merge pull request #92 from PhasicFlow/develop
Merge (first patch of version 1.x)
2024-03-25 01:03:20 +03:30
c7e5b30959 no changes were made, just debug 2024-03-24 14:26:41 -07:00
a900ff32bb phase1 of periodict boundary condition (serial)
upto now, particles are transfered from one boundary to another (mirro). this has been tested using iterateSphereParticles utility.
2024-03-24 14:25:03 -07:00
593cb9e6ed corrections for methods assign and append
The size change and capacity check was not correct.
A full test should be done on all the methods in this class
2024-03-24 14:22:48 -07:00
38f1c8ec59 change order of files in CMaleLists.txt
this is done for better compilation order and speeding up the compilation
2024-03-24 14:21:29 -07:00
3af1420ff8 Correction for mapperNBS 2024-03-24 03:57:48 -07:00
4c36418ec8 solver sphereGranFlow without particles insertion 2024-03-24 03:57:16 -07:00
3ada371198 iterateGeometry is finalized for version (1.x) 2024-03-24 03:01:08 -07:00
90fc1c6357 particlesPhasicFlow finalized for version (1.x) 2024-03-24 02:59:51 -07:00
93b33deffb finalized gemometryPhasicFlow for version (1.x) 2024-03-24 02:56:37 -07:00
8beaec448a modifications for version (1.0) 2024-03-24 02:49:47 -07:00
6b3a4f017b structured data has been modified for new changes in version (1.0) 2024-03-24 02:02:48 -07:00
22405db699 Trisurface modified with new data structure
This commit is based on changes to geometry class of phasicFlow (version 1.0)
2024-03-24 02:01:02 -07:00
57850119ba containers are modified for errors
This commit is before the first release of phasicFlow from develop to main (version 1.0)
2024-03-24 01:56:49 -07:00
0aa7f2dba9 Integration AB2 2024-03-24 01:56:04 -07:00
d21b7276e1 Interaction folder is finalized with adjustable box and tested for rotating drum 2024-03-24 01:46:19 -07:00
be56d8ee2e MotionModel folder completed 2024-03-22 09:42:23 -07:00
f27fbdd82c message event update for points and boundaries 2024-03-22 09:01:07 -07:00
c3821d03c0 minor correction for localProcessors, localRank and localSize 2024-03-22 08:58:01 -07:00
49af1119f9 particles and sphereParticles classes were tested for exit boundary 2024-03-22 08:26:14 -07:00
9facc73055 Update README.md 2024-03-20 11:48:25 +03:30
acfaacfe4a Geometry folder is finalized 2024-03-20 00:50:58 -07:00
df8bea213d triSurface folder content is finalized 2024-03-19 22:29:31 -07:00
c13231f4f0 Correction for non-trivially-copyable data type on host memory 2024-03-19 07:33:56 -07:00
c0cf200fa8 iterateGeometry and geometryPhasicFlow refactor 2024-02-05 21:28:30 -08:00
5b4a524afe Motion models integrated into geometryMotion, stationaryWall is added 2024-02-05 21:27:24 -08:00
9dfe98eea2 triSurfaceField refactored 2024-02-05 01:29:45 -08:00
80b61d4d73 MotionModel CRTP, rotatingAxis and vibrating 2024-02-04 23:58:57 -08:00
fd039f234f geometryPhasicFlow-pass1 and triSurface and multiTriSurface tested 2024-02-03 11:49:07 -08:00
e10ee2b6b5 periodic boundary condition is added to pointStructure 2024-02-01 12:32:15 -08:00
40d74c846f output message has been removed 2024-01-30 22:51:42 -08:00
5b9b865b08 solver iterateSphereParticles is added for testing (without particle insertion) 2024-01-29 07:58:19 -08:00
182e156786 sphereParticles tested on CPU, iteration, write to file, particle deletion 2024-01-29 07:57:19 -08:00
c0ee29e39c boundaryExit beforeIteration, not tested 2024-01-28 14:43:10 -08:00
0df384f546 sphereParticles tested 2024-01-26 01:10:10 -08:00
206df8924e utility particlesPhasicFlow updated. TODO: upgrade it further more to mandates supplying shapeName in particlesDict 2024-01-25 03:12:01 -08:00
ab6308bb0a code refactor upto pointFields and insertion etc. 2024-01-25 03:10:44 -08:00
8dc8009311 properry class refactored 2024-01-25 03:09:08 -08:00
20be76aed0 Particle base class and sphereParticle class have been updated 2024-01-25 03:07:59 -08:00
9c86fe8f31 refactor up to particles.hpp 2024-01-21 13:26:23 -08:00
46bf08fa91 typeInfo.hpp updated 2024-01-20 12:33:13 -08:00
6bc180275e pointFieild 2024-01-20 06:05:05 -08:00
0096856c98 Field class and pointStructure modified and tested 2024-01-19 22:31:08 -08:00
90a1ac8f16 refactor upto pointField read 2024-01-18 04:51:06 -08:00
f5d8daa608 MPI-parallelization upto IO file 2024-01-13 09:54:23 +03:30
280f53a230 before checking parallelIO for dictionary 2023-12-25 13:59:24 +03:30
f1baff5a59 pointStructure with boundaries, construction tested 2023-12-17 15:27:05 +03:30
143a586730 new-message-observer-subscriber and anyList for holding a list of variables of any type 2023-11-08 20:35:18 +03:30
d65aa02cbb Parallel IO before round 2 2023-10-28 12:09:40 +03:30
66fc880fcd math.hpp modified to remove ambiguis calls in cuda build 2023-10-19 12:18:29 +03:30
d2cd132b62 parallel read and write is added-we still need to consider integrating it with fields 2023-10-17 20:30:20 +03:30
6e5fe608c6 Kokkos folder updated 2023-10-03 11:15:09 +03:30
34e3f5587b correction gitignore 2023-10-01 20:20:18 +03:30
a14ce9f2bf corrections 2023-10-01 20:18:10 +03:30
6248903236 gitignor updated 2023-10-01 20:10:48 +03:30
5a94fc5688 dictionary is updated 2023-10-01 20:04:46 +03:30
59c148afa6 MPI part 2023-10-01 18:47:24 +03:30
8eec685c75 bashrc for Zoltan 2023-10-01 01:22:40 +03:30
100a211645 streams updated, processorsStream, masterStream 2023-09-30 20:18:17 +03:30
c562815bbe Update README.md 2023-09-28 23:30:50 +03:30
fa8044ad23 Update README.md 2023-09-28 23:29:51 +03:30
bb7dc17c67 processors is added and error part modified 2023-09-28 23:14:12 +03:30
503ee6be5e Types folder updated 2023-09-28 07:44:39 +03:30
1696340ada updated cmake for version-1.0 and including MPI 2023-09-27 11:28:39 +03:30
858 changed files with 152597 additions and 44778 deletions

153
.github/scripts/sync-wiki.py vendored Executable file
View File

@ -0,0 +1,153 @@
#!/usr/bin/env python3
import os
import re
import yaml
import sys
# Constants
REPO_URL = "https://github.com/PhasicFlow/phasicFlow"
REPO_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "repo")
WIKI_PATH = os.path.join(os.environ.get("GITHUB_WORKSPACE", ""), "wiki")
MAPPING_FILE = os.path.join(REPO_PATH, ".github/workflows/markdownList.yml")
def load_mapping():
"""Load the markdown to wiki page mapping file."""
try:
with open(MAPPING_FILE, 'r') as f:
data = yaml.safe_load(f)
return data.get('mappings', [])
except Exception as e:
print(f"Error loading mapping file: {e}")
return []
def convert_relative_links(content, source_path):
"""Convert relative links in markdown content to absolute URLs."""
# Find markdown links with regex pattern [text](url)
md_pattern = r'\[([^\]]+)\]\(([^)]+)\)'
# Find HTML img tags
img_pattern = r'<img\s+src=[\'"]([^\'"]+)[\'"]'
def replace_link(match):
link_text = match.group(1)
link_url = match.group(2)
# Skip if already absolute URL or anchor
if link_url.startswith(('http://', 'https://', '#', 'mailto:')):
return match.group(0)
# Get the directory of the source file
source_dir = os.path.dirname(source_path)
# Create absolute path from repository root
if link_url.startswith('/'):
# If link starts with /, it's already relative to repo root
abs_path = link_url
else:
# Otherwise, it's relative to the file location
abs_path = os.path.normpath(os.path.join(source_dir, link_url))
if not abs_path.startswith('/'):
abs_path = '/' + abs_path
# Convert to GitHub URL
github_url = f"{REPO_URL}/blob/main{abs_path}"
return f"[{link_text}]({github_url})"
def replace_img_src(match):
img_src = match.group(1)
# Skip if already absolute URL
if img_src.startswith(('http://', 'https://')):
return match.group(0)
# Get the directory of the source file
source_dir = os.path.dirname(source_path)
# Create absolute path from repository root
if img_src.startswith('/'):
# If link starts with /, it's already relative to repo root
abs_path = img_src
else:
# Otherwise, it's relative to the file location
abs_path = os.path.normpath(os.path.join(source_dir, img_src))
if not abs_path.startswith('/'):
abs_path = '/' + abs_path
# Convert to GitHub URL (use raw URL for images)
github_url = f"{REPO_URL}/raw/main{abs_path}"
return f'<img src="{github_url}"'
# Replace all markdown links
content = re.sub(md_pattern, replace_link, content)
# Replace all img src tags
content = re.sub(img_pattern, replace_img_src, content)
return content
def process_file(source_file, target_wiki_page):
"""Process a markdown file and copy its contents to a wiki page."""
source_path = os.path.join(REPO_PATH, source_file)
target_path = os.path.join(WIKI_PATH, f"{target_wiki_page}.md")
print(f"Processing {source_path} -> {target_path}")
try:
# Check if source exists
if not os.path.exists(source_path):
print(f"Source file not found: {source_path}")
return False
# Read source content
with open(source_path, 'r') as f:
content = f.read()
# Convert relative links
content = convert_relative_links(content, source_file)
# Write to wiki page
with open(target_path, 'w') as f:
f.write(content)
return True
except Exception as e:
print(f"Error processing {source_file}: {e}")
return False
def main():
# Check if wiki directory exists
if not os.path.exists(WIKI_PATH):
print(f"Wiki path not found: {WIKI_PATH}")
sys.exit(1)
# Load mapping
mappings = load_mapping()
if not mappings:
print("No mappings found in the mapping file")
sys.exit(1)
print(f"Found {len(mappings)} mappings to process")
# Process each mapping
success_count = 0
for mapping in mappings:
source = mapping.get('source')
target = mapping.get('target')
if not source or not target:
print(f"Invalid mapping: {mapping}")
continue
if process_file(source, target):
success_count += 1
print(f"Successfully processed {success_count} of {len(mappings)} files")
# Exit with error if any file failed
if success_count < len(mappings):
sys.exit(1)
if __name__ == "__main__":
main()

18
.github/workflows/markdownList.yml vendored Normal file
View File

@ -0,0 +1,18 @@
# This file maps source markdown files to their target wiki pages
# format:
# - source: path/to/markdown/file.md
# target: Wiki-Page-Name
mappings:
- source: benchmarks/readme.md
target: Performance-of-phasicFlow
- source: benchmarks/helicalMixer/readme.md
target: Helical-Mixer-Benchmark
- source: benchmarks/rotatingDrum/readme.md
target: Rotating-Drum-Benchmark
- source: doc/mdDocs/howToBuild-V1.0.md
target: How-to-build-PhasicFlowv1.0
- source: tutorials/README.md
target: Tutorials
- source: doc/mdDocs/phasicFlowFeatures.md
target: Features-of-PhasicFlow
# Add more mappings as needed

60
.github/workflows/sync-wiki.yml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Sync-Wiki
on:
push:
branches:
- main
paths:
- "**/*.md"
- ".github/workflows/sync-wiki.yml"
- ".github/workflows/markdownList.yml"
- ".github/scripts/sync-wiki.py"
workflow_dispatch:
jobs:
sync-wiki:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
path: repo
- name: Checkout Wiki
uses: actions/checkout@v3
with:
repository: ${{ github.repository }}.wiki
path: wiki
continue-on-error: true
- name: Create Wiki Directory if Not Exists
run: |
if [ ! -d "wiki" ]; then
mkdir -p wiki
cd wiki
git init
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git remote add origin "https://github.com/${{ github.repository }}.wiki.git"
fi
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: pip install pyyaml
- name: Sync markdown files to Wiki
run: |
python $GITHUB_WORKSPACE/repo/.github/scripts/sync-wiki.py
env:
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Push changes to wiki
run: |
cd wiki
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
git add .
if git status --porcelain | grep .; then
git commit -m "Auto sync wiki from main repository"
git push --set-upstream https://${{ github.actor }}:${{ github.token }}@github.com/${{ github.repository }}.wiki.git master -f
else
echo "No changes to commit"
fi

6
.gitignore vendored
View File

@ -1,6 +1,12 @@
# files
.clang-format
.vscode
.dependencygraph
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo

View File

@ -1,75 +1,64 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
# set the project name and version
project(phasicFlow VERSION 0.1 )
project(phasicFlow VERSION 1.0 )
set(CMAKE_CXX_STANDARD 17 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 20 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD_REQUIRED True)
set(CMAKE_INSTALL_PREFIX ${phasicFlow_SOURCE_DIR} CACHE PATH "Install path of phasicFlow" FORCE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type" FORCE)
message(STATUS ${CMAKE_INSTALL_PREFIX})
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMP)
mark_as_advanced(FORCE var Kokkos_ENABLE_SERIAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
set(CMAKE_BUILD_TYPE Release CACHE STRING "build type")
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
mark_as_advanced(FORCE var BUILD_SHARED_LIBS)
option(USE_STD_PARALLEL_ALG "Use TTB std parallel algorithms" ON)
message(STATUS "Install prefix is:" ${CMAKE_INSTALL_PREFIX})
include(cmake/globals.cmake)
option(pFlow_STD_Parallel_Alg "Use TTB std parallel algorithms" ON)
option(pFlow_Build_Serial "Build phasicFlow and backends for serial execution" OFF)
option(pFlow_Build_OpenMP "Build phasicFlow and backends for OpenMP execution" OFF)
option(pFlow_Build_Cuda "Build phasicFlow and backends for Cuda execution" OFF)
option(pFlow_Build_Double "Build phasicFlow with double precision variables" ON)
option(pFlow_Build_Double "Build phasicFlow with double precision floating-oint variables" ON)
option(pFlow_Build_MPI "Build for MPI parallelization. This will enable multi-gpu run, CPU run on clusters (distributed memory machine). Use this combination Cuda+MPI, OpenMP + MPI or Serial+MPI " OFF)
set(BUILD_SHARED_LIBS ON CACHE BOOL "Build using shared libraries" FORCE)
#for installing the required packages
include(cmake/preReq.cmake)
if(pFlow_Build_Serial)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
elseif(pFlow_Build_OpenMP )
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP ON CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA OFF CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE SERIAL CACHE STRING "" FORCE)
set(Kokkos_DEFAULT_HOST_PARALLEL_EXECUTION_SPACE Serial CACHE STRING "" FORCE)
set(Kokkos_DEFAULT_DEVICE_PARALLEL_EXECUTION_SPACE OpenMP CACHE STRING "" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR OFF CACHE BOOL "Enable constexpr on cuda code" FORCE)
elseif(pFlow_Build_Cuda)
set(Kokkos_ENABLE_SERIAL ON CACHE BOOL "Serial execution" FORCE)
set(Kokkos_ENABLE_OPENMP OFF CACHE BOOL "OpenMP execution" FORCE)
set(Kokkos_ENABLE_CUDA ON CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_LAMBDA ON CACHE BOOL "Cuda execution" FORCE)
set(Kokkos_ENABLE_CUDA_CONSTEXPR ON CACHE BOOL "Enable constexpr on cuda code" FORCE)
endif()
include(cmake/globals.cmake)
message(STATUS "Valid file extensions are ${validFiles}")
if(pFlow_Build_MPI)
find_package(MPI REQUIRED)
endif()
include(cmake/makeLibraryGlobals.cmake)
include(cmake/makeExecutableGlobals.cmake)
configure_file(phasicFlowConfig.H.in phasicFlowConfig.H)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#add a global include directory
include_directories(src/setHelpers src/demComponent "${PROJECT_BINARY_DIR}")
#main subdirectories of the code
set(Kokkos_Source_DIR)
if(DEFINED ENV{Kokkos_DIR})
set(Kokkos_Source_DIR $ENV{Kokkos_DIR})
# add_subdirectory($ENV{Kokkos_DIR} ${phasicFlow_BINARY_DIR}/kokkos)
# message(STATUS "Kokkos directory is $ENV{Kokkos_DIR}")
else()
# add_subdirectory($ENV{HOME}/Kokkos/kokkos ${phasicFlow_BINARY_DIR}/kokkos)
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
endif()
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
add_subdirectory(${Kokkos_Source_DIR} ${phasicFlow_BINARY_DIR}/kokkos)
add_subdirectory(src)
add_subdirectory(solvers)
@ -77,12 +66,9 @@ add_subdirectory(solvers)
add_subdirectory(utilities)
add_subdirectory(DEMSystems)
#add_subdirectory(testIO)
install(FILES "${PROJECT_BINARY_DIR}/phasicFlowConfig.H"
DESTINATION include
)
DESTINATION include)
include(InstallRequiredSystemLibraries)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")

View File

@ -1,9 +1,11 @@
set(SourceFiles
DEMSystem/DEMSystem.cpp
sphereDEMSystem/sphereDEMSystem.cpp
sphereDEMSystem/sphereFluidParticles.cpp
domainDistribute/domainDistribute.cpp
DEMSystem/DEMSystem.cpp
sphereDEMSystem/sphereFluidParticles.cpp
sphereDEMSystem/sphereDEMSystem.cpp
grainDEMSystem/grainFluidParticles.cpp
grainDEMSystem/grainDEMSystem.cpp
)
set(link_libs Kokkos::kokkos phasicFlow Particles Geometry Property Interaction Interaction Utilities)

View File

@ -33,14 +33,14 @@ pFlow::DEMSystem::DEMSystem(
ControlDict_()
{
REPORT(0)<<"Initializing host/device execution spaces . . . \n";
REPORT(1)<<"Host execution space is "<< greenText(DefaultHostExecutionSpace::name())<<endREPORT;
REPORT(1)<<"Device execution space is "<<greenText(DefaultExecutionSpace::name())<<endREPORT;
REPORT(0)<<"Initializing host/device execution spaces . . . \n";
REPORT(1)<<"Host execution space is "<< Green_Text(DefaultHostExecutionSpace::name())<<END_REPORT;
REPORT(1)<<"Device execution space is "<<Green_Text(DefaultExecutionSpace::name())<<END_REPORT;
// initialize Kokkos
Kokkos::initialize( argc, argv );
REPORT(0)<<"\nCreating Control repository . . ."<<endREPORT;
REPORT(0)<<"\nCreating Control repository . . ."<<END_REPORT;
Control_ = makeUnique<systemControl>(
ControlDict_.startTime(),
ControlDict_.endTime(),
@ -87,4 +87,3 @@ pFlow::uniquePtr<pFlow::DEMSystem>
return nullptr;
}

View File

@ -25,6 +25,7 @@ Licence:
#include "types.hpp"
#include "span.hpp"
#include "box.hpp"
#include "virtualConstructor.hpp"
#include "uniquePtr.hpp"
#include "systemControl.hpp"
@ -60,6 +61,7 @@ public:
DEMSystem(const DEMSystem&)=delete;
/// @brief no assignment
DEMSystem& operator = (const DEMSystem&)=delete;
create_vCtor(
@ -111,19 +113,34 @@ public:
int32 numParInDomain(int32 di)const = 0;
virtual
std::vector<int32> numParInDomain()const = 0;
std::vector<int32> numParInDomains()const = 0;
virtual
span<const int32> parIndexInDomain(int32 di)const = 0;
span<const int32> parIndexInDomain(int32 domIndx)const = 0;
virtual
span<real> parDiameter() = 0;
span<real> diameter() = 0;
virtual
span<real> courseGrainFactor() = 0;
virtual
span<realx3> parVelocity() = 0;
span<realx3> acceleration()=0;
virtual
span<realx3> parPosition() = 0;
span<realx3> velocity() = 0;
virtual
span<realx3> position() = 0;
virtual
span<realx3> rAcceleration()=0;
virtual
span<realx3> rVelocity() = 0;
virtual
span<realx3> rPosition() = 0;
virtual
span<realx3> parFluidForce() = 0;
@ -153,7 +170,6 @@ public:
bool iterate(real upToTime) = 0;
static
uniquePtr<DEMSystem>
create(
@ -162,11 +178,9 @@ public:
int argc,
char* argv[]);
};
} // pFlow
#endif // __DEMSystem_hpp__
#endif // __DEMSystem_hpp__

View File

@ -33,7 +33,7 @@ void pFlow::domainDistribute::clcDomains(const std::vector<box>& domains)
pFlow::domainDistribute::domainDistribute(
const Vector<box>& domains,
const std::vector<box>& domains,
real maxBoundingBox)
:
numDomains_(domains.size()),
@ -47,10 +47,10 @@ maxBoundingBoxSize_(maxBoundingBox)
}
bool pFlow::domainDistribute::locateParticles(
ViewType1D<realx3,HostSpace> points, includeMask mask)
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask)
{
range activeRange = mask.activeRange();
const rangeU32 activeRange = mask.activeRange();
for(int32 di=0; di<numDomains_; di++)
@ -59,7 +59,7 @@ bool pFlow::domainDistribute::locateParticles(
}
for(int32 i=activeRange.first; i<activeRange.second; i++)
for(int32 i=activeRange.start(); i<activeRange.end(); i++)
{
if(mask(i))
{

View File

@ -43,19 +43,16 @@ protected:
int32Vector_H numParInDomain_;
real maxBoundingBoxSize_;
real domainExtension_ = 1.0;
using includeMask = typename pointStructure::activePointsHost;
void clcDomains(const std::vector<box>& domains);
public:
domainDistribute(
const Vector<box>& domains,
const std::vector<box>& domains,
real maxBoundingBox);
~domainDistribute()=default;
@ -78,7 +75,7 @@ public:
{
return
span<const int32>(
particlesInDomains_[di].hostVectorAll().data(),
particlesInDomains_[di].hostViewAll().data(),
numParInDomain_[di]
);
}
@ -91,7 +88,7 @@ public:
//template<typename includeMask>
bool locateParticles(
ViewType1D<realx3,HostSpace> points, includeMask mask);
ViewType1D<realx3,HostSpace> points, const pFlagTypeHost& mask);
};

View File

@ -0,0 +1,273 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "grainDEMSystem.hpp"
#include "vocabs.hpp"
bool pFlow::grainDEMSystem::loop()
{
do
{
//
if(! insertion_().insertParticles(
Control().time().currentIter(),
Control().time().currentTime(),
Control().time().dt() ) )
{
fatalError<<
"particle insertion failed in grainDEMSystem.\n";
return false;
}
geometry_->beforeIteration();
interaction_->beforeIteration();
particles_->beforeIteration();
interaction_->iterate();
particles_->iterate();
geometry_->iterate();
particles_->afterIteration();
geometry_->afterIteration();
}while(Control()++);
return true;
}
pFlow::grainDEMSystem::grainDEMSystem(
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[],
bool requireRVel)
:
DEMSystem(demSystemName, domains, argc, argv),
requireRVel_(requireRVel)
{
REPORT(0)<<"\nReading proprties . . . "<<END_REPORT;
property_ = makeUnique<property>(
propertyFile__,
Control().caseSetup().path());
REPORT(0)<< "\nCreating surface geometry for grainDEMSystem . . . "<<END_REPORT;
geometry_ = geometry::create(Control(), Property());
REPORT(0)<<"Reading shape dictionary ..."<<END_REPORT;
grains_ = makeUnique<grainShape>(
pFlow::shapeFile__,
&Control().caseSetup(),
Property() );
REPORT(0)<<"\nReading grain particles . . ."<<END_REPORT;
particles_ = makeUnique<grainFluidParticles>(Control(), grains_());
insertion_ = makeUnique<grainInsertion>(
particles_(),
particles_().grains());
REPORT(0)<<"\nCreating interaction model for grain-grain contact and grain-wall contact . . ."<<END_REPORT;
interaction_ = interaction::create(
Control(),
Particles(),
Geometry());
auto maxD = maxBounndingSphereSize();
particleDistribution_ = makeUnique<domainDistribute>(domains, maxD);
}
pFlow::grainDEMSystem::~grainDEMSystem()
{
}
bool pFlow::grainDEMSystem::updateParticleDistribution(
real extentFraction,
const std::vector<box> domains)
{
if(!particleDistribution_->changeDomainsSize(
extentFraction,
maxBounndingSphereSize(),
domains))
{
fatalErrorInFunction<<
"cannot change the domain size"<<endl;
return false;
}
if(!particleDistribution_->locateParticles(
positionHost_,
particles_->pStruct().activePointsMaskHost()))
{
fatalErrorInFunction<<
"error in locating particles among sub-domains"<<endl;
return false;
}
return true;
}
pFlow::int32
pFlow::grainDEMSystem::numParInDomain(int32 di)const
{
return particleDistribution_().numParInDomain(di);
}
std::vector<pFlow::int32>
pFlow::grainDEMSystem::numParInDomains()const
{
const auto& distribute = particleDistribution_();
int32 numDomains = distribute.numDomains();
std::vector<int32> nums(numDomains);
for(int32 i=0; i<numDomains; i++)
{
nums[i] = distribute.numParInDomain(i);
}
return nums;
}
pFlow::span<const pFlow::int32>
pFlow::grainDEMSystem::parIndexInDomain(int32 di)const
{
return particleDistribution_->particlesInDomain(di);
}
pFlow::span<pFlow::real> pFlow::grainDEMSystem::diameter()
{
return span<real>(diameterHost_.data(), diameterHost_.size());
}
pFlow::span<pFlow::real> pFlow::grainDEMSystem::courseGrainFactor()
{
return span<real>(particles_->courseGrainFactorHost().data(), particles_->courseGrainFactorHost().size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::acceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::velocity()
{
return span<realx3>(velocityHost_.data(), velocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::position()
{
return span<realx3>(positionHost_.data(), positionHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rAcceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rVelocity()
{
return span<realx3>(rVelocityHost_.data(), rVelocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::rPosition()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::parFluidForce()
{
auto& hVec = particles_->fluidForceHost();
return span<realx3>(hVec.data(), hVec.size());
}
pFlow::span<pFlow::realx3> pFlow::grainDEMSystem::parFluidTorque()
{
auto& hVec = particles_->fluidTorqueHost();
return span<realx3>(hVec.data(), hVec.size());
}
bool pFlow::grainDEMSystem::sendFluidForceToDEM()
{
particles_->fluidForceHostUpdatedSync();
return true;
}
bool pFlow::grainDEMSystem::sendFluidTorqueToDEM()
{
particles_->fluidTorqueHostUpdatedSync();
return true;
}
bool pFlow::grainDEMSystem::beforeIteration()
{
velocityHost_ = std::as_const(particles_()).velocity().hostView();
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
diameterHost_ = particles_->diameter().hostView();
if(requireRVel_)
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
return true;
}
bool pFlow::grainDEMSystem::iterate(
real upToTime,
real timeToWrite,
word timeName)
{
Control().time().setStopAt(upToTime);
Control().time().setOutputToFile(timeToWrite, timeName);
return loop();
return true;
}
bool pFlow::grainDEMSystem::iterate(real upToTime)
{
Control().time().setStopAt(upToTime);
return loop();
return true;
}
pFlow::real
pFlow::grainDEMSystem::maxBounndingSphereSize()const
{
real minD, maxD;
particles_->boundingSphereMinMax(minD, maxD);
return maxD;
}

View File

@ -0,0 +1,165 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __grainDEMSystem_hpp__
#define __grainDEMSystem_hpp__
#include "DEMSystem.hpp"
#include "property.hpp"
#include "uniquePtr.hpp"
#include "geometry.hpp"
#include "grainFluidParticles.hpp"
#include "interaction.hpp"
#include "Insertions.hpp"
#include "domainDistribute.hpp"
namespace pFlow
{
class grainDEMSystem
:
public DEMSystem
{
protected:
// protected members
uniquePtr<property> property_ = nullptr;
uniquePtr<geometry> geometry_ = nullptr;
uniquePtr<grainShape> grains_ = nullptr;
uniquePtr<grainFluidParticles> particles_ = nullptr;
uniquePtr<grainInsertion> insertion_ = nullptr;
uniquePtr<interaction> interaction_ = nullptr;
uniquePtr<domainDistribute> particleDistribution_=nullptr;
// to be used for CPU communications
ViewType1D<realx3, HostSpace> velocityHost_;
ViewType1D<realx3, HostSpace> positionHost_;
ViewType1D<real, HostSpace> diameterHost_;
bool requireRVel_ = false;
ViewType1D<realx3, HostSpace> rVelocityHost_;
// protected member functions
auto& Property()
{
return property_();
}
auto& Geometry()
{
return geometry_();
}
auto& Particles()
{
return particles_();
}
auto& Interaction()
{
return interaction_();
}
bool loop();
public:
TypeInfo("grainDEMSystem");
grainDEMSystem(
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[],
bool requireRVel=false);
virtual ~grainDEMSystem();
grainDEMSystem(const grainDEMSystem&)=delete;
grainDEMSystem& operator = (const grainDEMSystem&)=delete;
add_vCtor(
DEMSystem,
grainDEMSystem,
word);
bool updateParticleDistribution(real extentFraction, const std::vector<box> domains) override;
int32 numParInDomain(int32 di)const override;
std::vector<int32> numParInDomains()const override;
span<const int32> parIndexInDomain(int32 di)const override;
span<real> diameter() override;
span<real> courseGrainFactor() override;
span<realx3> acceleration() override;
span<realx3> velocity() override;
span<realx3> position() override;
span<realx3> rAcceleration() override;
span<realx3> rVelocity() override;
span<realx3> rPosition() override;
span<realx3> parFluidForce() override;
span<realx3> parFluidTorque() override;
bool sendFluidForceToDEM() override;
bool sendFluidTorqueToDEM() override;
bool beforeIteration() override;
bool iterate(
real upToTime,
real timeToWrite,
word timeName) override;
bool iterate(real upToTime) override;
real maxBounndingSphereSize()const override;
};
} // pFlow
#endif

View File

@ -0,0 +1,107 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#include "grainFluidParticles.hpp"
#include "grainFluidParticlesKernels.hpp"
void pFlow::grainFluidParticles::checkHostMemory()
{
if(fluidForce_.size()!=fluidForceHost_.size())
{
resizeNoInit(fluidForceHost_, fluidForce_.size());
resizeNoInit(fluidTorqueHost_, fluidTorque_.size());
}
// copy the data (if required) from device to host
courseGrainFactorHost_ = coarseGrainFactor().hostView();
}
pFlow::grainFluidParticles::grainFluidParticles(
systemControl &control,
const grainShape& grains)
: grainParticles(control, grains),
fluidForce_(
objectFile(
"fluidForce",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS),
dynPointStruct(),
zero3),
fluidTorque_(
objectFile(
"fluidTorque",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_NEVER),
dynPointStruct(),
zero3)
{
checkHostMemory();
}
bool pFlow::grainFluidParticles::beforeIteration()
{
grainParticles::beforeIteration();
checkHostMemory();
return true;
}
bool pFlow::grainFluidParticles::iterate()
{
const auto ti = this->TimeInfo();
accelerationTimer().start();
pFlow::grainFluidParticlesKernels::acceleration(
control().g(),
mass().deviceViewAll(),
contactForce().deviceViewAll(),
fluidForce_.deviceViewAll(),
I().deviceViewAll(),
contactTorque().deviceViewAll(),
fluidTorque_.deviceViewAll(),
pStruct().activePointsMaskDevice(),
acceleration().deviceViewAll(),
rAcceleration().deviceViewAll()
);
accelerationTimer().end();
intCorrectTimer().start();
dynPointStruct().correct(ti.dt());
rVelIntegration().correct(ti.dt(), rVelocity(), rAcceleration());
intCorrectTimer().end();
return true;
}
void pFlow::grainFluidParticles::fluidForceHostUpdatedSync()
{
copy(fluidForce_.deviceView(), fluidForceHost_);
return;
}
void pFlow::grainFluidParticles::fluidTorqueHostUpdatedSync()
{
copy(fluidTorque_.deviceView(), fluidTorqueHost_);
return;
}

View File

@ -0,0 +1,105 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
/*!
@class pFlow::grainFluidParticles
@brief Class for managing grain particles with fluid interactions
This is a top-level class that contains the essential components for
defining grain prticles with fluid interactions in a DEM simulation.
*/
#ifndef __grainFluidParticles_hpp__
#define __grainFluidParticles_hpp__
#include "grainParticles.hpp"
namespace pFlow
{
class grainFluidParticles
:
public grainParticles
{
protected:
/// pointField of rotational acceleration of particles on device
realx3PointField_D fluidForce_;
hostViewType1D<realx3> fluidForceHost_;
realx3PointField_D fluidTorque_;
hostViewType1D<realx3> fluidTorqueHost_;
hostViewType1D<real> courseGrainFactorHost_;
void checkHostMemory();
public:
/// construct from systemControl and property
grainFluidParticles(systemControl &control, const grainShape& grains);
~grainFluidParticles() override = default;
/// before iteration step
bool beforeIteration() override;
/// iterate particles
bool iterate() override;
auto& fluidForce()
{
return fluidForce_;
}
auto& fluidTorque()
{
return fluidTorque_;
}
auto& fluidForceHost()
{
return fluidForceHost_;
}
auto& fluidTorqueHost()
{
return fluidTorqueHost_;
}
auto& courseGrainFactorHost()
{
return courseGrainFactorHost_;
}
void fluidForceHostUpdatedSync();
void fluidTorqueHostUpdatedSync();
}; //grainFluidParticles
} // pFlow
#endif //__sphereFluidParticles_hpp__

View File

@ -0,0 +1,79 @@
/*------------------------------- phasicFlow ---------------------------------
O C enter of
O O E ngineering and
O O M ultiscale modeling of
OOOOOOO F luid flow
------------------------------------------------------------------------------
Copyright (C): www.cemf.ir
email: hamid.r.norouzi AT gmail.com
------------------------------------------------------------------------------
Licence:
This file is part of phasicFlow code. It is a free software for simulating
granular and multiphase flows. You can redistribute it and/or modify it under
the terms of GNU General Public License v3 or any other later versions.
phasicFlow is distributed to help others in their research in the field of
granular and multiphase flows, but WITHOUT ANY WARRANTY; without even the
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-----------------------------------------------------------------------------*/
#ifndef __grainFluidParticlesKernels_hpp__
#define __grainFluidParticlesKernels_hpp__
namespace pFlow::grainFluidParticlesKernels
{
using rpAcceleration = Kokkos::RangePolicy<
DefaultExecutionSpace,
Kokkos::Schedule<Kokkos::Static>,
Kokkos::IndexType<int32>
>;
template<typename IncludeFunctionType>
void acceleration(
realx3 g,
deviceViewType1D<real> mass,
deviceViewType1D<realx3> force,
deviceViewType1D<realx3> fluidForce,
deviceViewType1D<real> I,
deviceViewType1D<realx3> torque,
deviceViewType1D<realx3> fluidTorque,
IncludeFunctionType incld,
deviceViewType1D<realx3> lAcc,
deviceViewType1D<realx3> rAcc
)
{
auto activeRange = incld.activeRange();
if(incld.isAllActive())
{
Kokkos::parallel_for(
"pFlow::grainParticlesKernels::acceleration",
rpAcceleration(activeRange.first, activeRange.second),
LAMBDA_HD(int32 i){
lAcc[i] = (force[i]+fluidForce[i])/mass[i] + g;
rAcc[i] = (torque[i]+fluidTorque[i])/I[i];
});
}
else
{
Kokkos::parallel_for(
"pFlow::grainParticlesKernels::acceleration",
rpAcceleration(activeRange.first, activeRange.second),
LAMBDA_HD(int32 i){
if(incld(i))
{
lAcc[i] = (force[i]+fluidForce[i])/mass[i] + g;
rAcc[i] = (torque[i]+fluidTorque[i])/I[i];
}
});
}
Kokkos::fence();
}
}
#endif

View File

@ -19,6 +19,7 @@ Licence:
-----------------------------------------------------------------------------*/
#include "sphereDEMSystem.hpp"
#include "vocabs.hpp"
bool pFlow::sphereDEMSystem::loop()
{
@ -26,16 +27,15 @@ bool pFlow::sphereDEMSystem::loop()
do
{
//
if(! insertion_().insertParticles(
Control().time().currentIter(),
Control().time().currentTime(),
Control().time().dt() ) )
{
fatalError<<
"particle insertion failed in sphereDFlow solver.\n";
"particle insertion failed in sphereDEMSystem.\n";
return false;
}
}
geometry_->beforeIteration();
@ -63,29 +63,37 @@ pFlow::sphereDEMSystem::sphereDEMSystem(
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[])
char* argv[],
bool requireRVel)
:
DEMSystem(demSystemName, domains, argc, argv)
DEMSystem(demSystemName, domains, argc, argv),
requireRVel_(requireRVel)
{
REPORT(0)<<"\nReading proprties . . . "<<endREPORT;
REPORT(0)<<"\nReading proprties . . . "<<END_REPORT;
property_ = makeUnique<property>(
Control().caseSetup().path()+propertyFile__);
propertyFile__,
Control().caseSetup().path());
REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<endREPORT;
REPORT(0)<< "\nCreating surface geometry for sphereDEMSystem . . . "<<END_REPORT;
geometry_ = geometry::create(Control(), Property());
REPORT(0)<<"Reading shapes dictionary..."<<END_REPORT;
spheres_ = makeUnique<sphereShape>(
pFlow::shapeFile__,
&Control().caseSetup(),
Property());
REPORT(0)<<"\nReading sphere particles . . ."<<endREPORT;
particles_ = makeUnique<sphereFluidParticles>(Control(), Property());
REPORT(0)<<"\nReading sphere particles . . ."<<END_REPORT;
particles_ = makeUnique<sphereFluidParticles>(Control(), spheres_());
insertion_ = makeUnique<sphereInsertion>(
Control().caseSetup().path()+insertionFile__,
insertion_ = makeUnique<sphereInsertion>(
particles_(),
particles_().shapes());
particles_().spheres());
REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<endREPORT;
REPORT(0)<<"\nCreating interaction model for sphere-sphere contact and sphere-wall contact . . ."<<END_REPORT;
interaction_ = interaction::create(
Control(),
Particles(),
@ -98,6 +106,7 @@ pFlow::sphereDEMSystem::sphereDEMSystem(
}
pFlow::sphereDEMSystem::~sphereDEMSystem()
{
@ -119,8 +128,8 @@ bool pFlow::sphereDEMSystem::updateParticleDistribution(
}
if(!particleDistribution_->locateParticles(
parPosition_,
particles_->pStruct().activePointsMaskH()))
positionHost_,
particles_->pStruct().activePointsMaskHost()))
{
fatalErrorInFunction<<
"error in locating particles among sub-domains"<<endl;
@ -137,7 +146,7 @@ pFlow::int32
}
std::vector<pFlow::int32>
pFlow::sphereDEMSystem::numParInDomain()const
pFlow::sphereDEMSystem::numParInDomains()const
{
const auto& distribute = particleDistribution_();
int32 numDomains = distribute.numDomains();
@ -156,31 +165,56 @@ pFlow::sphereDEMSystem::parIndexInDomain(int32 di)const
return particleDistribution_->particlesInDomain(di);
}
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::parDiameter()
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::diameter()
{
return span<real>(parDiameter_.data(), parDiameter_.size());
return span<real>(diameterHost_.data(), diameterHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parVelocity()
pFlow::span<pFlow::real> pFlow::sphereDEMSystem::courseGrainFactor()
{
return span<realx3>(parVelocity_.data(), parVelocity_.size());
return span<real>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parPosition()
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::acceleration()
{
return span<realx3>(parPosition_.data(), parPosition_.size());
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::velocity()
{
return span<realx3>(velocityHost_.data(), velocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::position()
{
return span<realx3>(positionHost_.data(), positionHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rAcceleration()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rVelocity()
{
return span<realx3>(rVelocityHost_.data(), rVelocityHost_.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::rPosition()
{
return span<realx3>(nullptr, 0);
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidForce()
{
auto& hVec = particles_->fluidForceHostAll();
auto& hVec = particles_->fluidForceHost();
return span<realx3>(hVec.data(), hVec.size());
}
pFlow::span<pFlow::realx3> pFlow::sphereDEMSystem::parFluidTorque()
{
auto& hVec = particles_->fluidTorqueHostAll();
auto& hVec = particles_->fluidTorqueHost();
return span<realx3>(hVec.data(), hVec.size());
}
@ -198,9 +232,14 @@ bool pFlow::sphereDEMSystem::sendFluidTorqueToDEM()
bool pFlow::sphereDEMSystem::beforeIteration()
{
parVelocity_ = particles_->dynPointStruct().velocityHostAll();
parPosition_ = particles_->dynPointStruct().pointPositionHostAll();
parDiameter_ = particles_->diameter().hostVectorAll();
velocityHost_ = std::as_const(particles_()).velocity().hostView();
positionHost_ = std::as_const(particles_()).pointPosition().hostView();
diameterHost_ = particles_->diameter().hostView();
if(requireRVel_)
rVelocityHost_ = std::as_const(particles_()).rVelocity().hostView();
return true;
}

View File

@ -42,24 +42,31 @@ protected:
// protected members
uniquePtr<property> property_ = nullptr;
uniquePtr<property> property_ = nullptr;
uniquePtr<geometry> geometry_ = nullptr;
uniquePtr<geometry> geometry_ = nullptr;
uniquePtr<sphereFluidParticles> particles_ = nullptr;
uniquePtr<sphereShape> spheres_ = nullptr;
uniquePtr<sphereInsertion> insertion_ = nullptr;
uniquePtr<sphereFluidParticles> particles_ = nullptr;
uniquePtr<interaction> interaction_ = nullptr;
uniquePtr<sphereInsertion> insertion_ = nullptr;
uniquePtr<domainDistribute> particleDistribution_=nullptr;
uniquePtr<interaction> interaction_ = nullptr;
uniquePtr<domainDistribute> particleDistribution_=nullptr;
// to be used for CPU communications
ViewType1D<realx3, HostSpace> parVelocity_;
ViewType1D<realx3, HostSpace> velocityHost_;
ViewType1D<realx3, HostSpace> parPosition_;
ViewType1D<realx3, HostSpace> positionHost_;
ViewType1D<real, HostSpace> diameterHost_;
bool requireRVel_ = false;
ViewType1D<realx3, HostSpace> rVelocityHost_;
ViewType1D<real, HostSpace> parDiameter_;
// protected member functions
auto& Property()
@ -92,7 +99,8 @@ public:
word demSystemName,
const std::vector<box>& domains,
int argc,
char* argv[]);
char* argv[],
bool requireRVel=false);
virtual ~sphereDEMSystem();
@ -110,15 +118,25 @@ public:
int32 numParInDomain(int32 di)const override;
std::vector<int32> numParInDomain()const override;
std::vector<int32> numParInDomains()const override;
span<const int32> parIndexInDomain(int32 di)const override;
span<real> parDiameter() override;
span<real> diameter() override;
span<realx3> parVelocity() override;
span<real> courseGrainFactor() override;
span<realx3> parPosition() override;
span<realx3> acceleration() override;
span<realx3> velocity() override;
span<realx3> position() override;
span<realx3> rAcceleration() override;
span<realx3> rVelocity() override;
span<realx3> rPosition() override;
span<realx3> parFluidForce() override;

View File

@ -21,85 +21,85 @@ Licence:
#include "sphereFluidParticles.hpp"
#include "sphereFluidParticlesKernels.hpp"
void pFlow::sphereFluidParticles::checkHostMemory()
{
if(fluidForce_.size()!=fluidForceHost_.size())
{
resizeNoInit(fluidForceHost_, fluidForce_.size());
resizeNoInit(fluidTorqueHost_, fluidTorque_.size());
}
}
pFlow::sphereFluidParticles::sphereFluidParticles(
systemControl &control,
const property& prop
)
:
sphereParticles(control, prop),
fluidForce_(
this->time().emplaceObject<realx3PointField_HD>(
objectFile(
"fluidForce",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS
),
pStruct(),
zero3
)
),
fluidTorque_(
this->time().emplaceObject<realx3PointField_HD>(
objectFile(
"fluidTorque",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS
),
pStruct(),
zero3
)
)
{}
systemControl &control,
const sphereShape& shpShape)
: sphereParticles(control, shpShape),
fluidForce_(
objectFile(
"fluidForce",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_ALWAYS),
dynPointStruct(),
zero3),
fluidTorque_(
objectFile(
"fluidTorque",
"",
objectFile::READ_IF_PRESENT,
objectFile::WRITE_NEVER),
dynPointStruct(),
zero3)
{
checkHostMemory();
}
bool pFlow::sphereFluidParticles::beforeIteration()
{
sphereParticles::beforeIteration();
checkHostMemory();
return true;
}
bool pFlow::sphereFluidParticles::iterate()
{
accelerationTimer_.start();
const auto ti = this->TimeInfo();
accelerationTimer().start();
pFlow::sphereFluidParticlesKernels::acceleration(
control().g(),
mass().deviceVectorAll(),
contactForce().deviceVectorAll(),
fluidForce().deviceVectorAll(),
I().deviceVectorAll(),
contactTorque().deviceVectorAll(),
fluidTorque().deviceVectorAll(),
pStruct().activePointsMaskD(),
accelertion().deviceVectorAll(),
rAcceleration().deviceVectorAll()
mass().deviceViewAll(),
contactForce().deviceViewAll(),
fluidForce_.deviceViewAll(),
I().deviceViewAll(),
contactTorque().deviceViewAll(),
fluidTorque_.deviceViewAll(),
pStruct().activePointsMaskDevice(),
acceleration().deviceViewAll(),
rAcceleration().deviceViewAll()
);
accelerationTimer_.end();
accelerationTimer().end();
intCorrectTimer_.start();
intCorrectTimer().start();
dynPointStruct_.correct(this->dt(), accelertion_);
dynPointStruct().correct(ti.dt());
rVelIntegration_().correct(this->dt(), rVelocity_, rAcceleration_);
rVelIntegration().correct(ti.dt(), rVelocity(), rAcceleration());
intCorrectTimer_.end();
intCorrectTimer().end();
return true;
}
void pFlow::sphereFluidParticles::fluidForceHostUpdatedSync()
{
fluidForce_.modifyOnHost();
fluidForce_.syncViews();
copy(fluidForce_.deviceView(), fluidForceHost_);
return;
}
void pFlow::sphereFluidParticles::fluidTorqueHostUpdatedSync()
{
fluidTorque_.modifyOnHost();
fluidTorque_.syncViews();
copy(fluidTorque_.deviceView(), fluidTorqueHost_);
return;
}

View File

@ -43,12 +43,17 @@ class sphereFluidParticles
protected:
/// pointField of rotational acceleration of particles on device
realx3PointField_HD& fluidForce_;
realx3PointField_D fluidForce_;
realx3PointField_HD& fluidTorque_;
hostViewType1D<realx3> fluidForceHost_;
realx3PointField_D fluidTorque_;
void zeroFluidForce_H()
hostViewType1D<realx3> fluidTorqueHost_;
void checkHostMemory();
/*void zeroFluidForce_H()
{
fluidForce_.fillHost(zero3);
}
@ -56,12 +61,12 @@ protected:
void zeroFluidTorque_H()
{
fluidTorque_.fillHost(zero3);
}
}*/
public:
/// construct from systemControl and property
sphereFluidParticles(systemControl &control, const property& prop);
sphereFluidParticles(systemControl &control, const sphereShape& shpShape);
/// before iteration step
bool beforeIteration() override;
@ -81,17 +86,16 @@ public:
}
auto& fluidForceHostAll()
auto& fluidForceHost()
{
return fluidForce_.hostVectorAll();
return fluidForceHost_;
}
auto& fluidTorqueHostAll()
auto& fluidTorqueHost()
{
return fluidTorque_.hostVectorAll();
return fluidTorqueHost_;
}
void fluidForceHostUpdatedSync();
void fluidTorqueHostUpdatedSync();

View File

@ -46,7 +46,7 @@ void acceleration(
{
auto activeRange = incld.activeRange();
if(incld.allActive())
if(incld.isAllActive())
{
Kokkos::parallel_for(
"pFlow::sphereParticlesKernels::acceleration",

View File

@ -1,40 +1,76 @@
<div align ="center">
<img src="doc/phasicFlow_logo_github.png" style="width: 400px;">
<div align="center">
<img src="doc/phasicFlow_logo_github.png" style="width: 400px;" alt="PhasicFlow Logo">
</div>
## **PhasicFlow: High-Performance Discrete Element Method Simulations**
**PhasicFlow** is a parallel C++ code for performing DEM simulations. It can run on shared-memory multi-core computational units such as multi-core CPUs or GPUs (for now it works on CUDA-enabled GPUs). The parallelization method mainly relies on loop-level parallelization on a shared-memory computational unit. You can build and run PhasicFlow in serial mode on regular PCs, in parallel mode for multi-core CPUs, or build it for a GPU device to off-load computations to a GPU. In its current statues you can simulate millions of particles (up to 80M particles tested) on a single desktop computer. You can see the [performance tests of PhasicFlow](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow) in the wiki page.
PhasicFlow is a robust, open-source C++ framework designed for the efficient simulation of granular materials using the Discrete Element Method (DEM). Leveraging parallel computing paradigms, PhasicFlow is capable of executing simulations on shared-memory multi-core architectures, including CPUs and NVIDIA GPUs (CUDA-enabled). The core parallelization strategy focuses on loop-level parallelism, enabling significant performance gains on modern hardware. Users can seamlessly transition between serial execution on standard PCs, parallel execution on multi-core CPUs (OpenMP), and accelerated simulations on GPUs. Currently, PhasicFlow supports simulations involving up to 80 million particles on a single desktop workstation. Detailed performance benchmarks are available on the [PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Performance-of-phasicFlow).
## How to build?
You can build PhasicFlow for CPU and GPU executions. [Here is a complete step-by-step procedure](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
**Scalable Parallelism: MPI Integration**
## Online code documentation
You can find a full documentation of the code, its features, and other related materials on [online documentation of the code](https://phasicflow.github.io/phasicFlow/)
Ongoing development includes the integration of MPI-based parallelization with dynamic load balancing. This enhancement will extend PhasicFlow's capabilities to distributed memory environments, such as multi-GPU workstations and high-performance computing clusters. Upon completion, PhasicFlow will offer six distinct execution modes:
## How to use PhasicFlow?
You can navigate into [tutorials folder](./tutorials) in the phasicFlow folder to see some simulation case setups. If you need more detailed discription, visit our [wiki page tutorials](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
1. **Serial Execution:** Single-core CPU.
2. **Shared-Memory Parallelism:** Multi-core CPU (OpenMP).
3. **GPU Acceleration:** NVIDIA GPU (CUDA).
4. **Distributed-Memory Parallelism:** MPI.
5. **Hybrid Parallelism:** MPI + OpenMP.
6. **Multi-GPU Parallelism:** MPI + CUDA.
## [PhasicFlowPlus](https://github.com/PhasicFlow/PhasicFlowPlus)
PhasicFlowPlus is and extension to PhasicFlow for simulating particle-fluid systems using resolved and unresolved CFD-DEM. [See the repository of this package.](https://github.com/PhasicFlow/PhasicFlowPlus)
## **Build and Installation**
PhasicFlow can be compiled for both CPU and GPU execution.
## Supporting packages
* [Kokkos](https://github.com/kokkos/kokkos) from National Technology & Engineering Solutions of Sandia, LLC (NTESS)
* [CLI11 1.8](https://github.com/CLIUtils/CLI11) from University of Cincinnati.
* **Current Development (v-1.0):** Comprehensive build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-build-PhasicFlow%E2%80%90v%E2%80%901.0).
* **Latest Release (v-0.1):** Detailed build instructions are available [here](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-Build-PhasicFlow).
## **Comprehensive Documentation**
In-depth documentation, including code structure, features, and usage guidelines, is accessible via the [online documentation portal](https://phasicflow.github.io/phasicFlow/).
### **Tutorials and Examples**
Practical examples and simulation setups are provided in the [tutorials directory](./tutorials). For detailed explanations and step-by-step guides, please refer to the [tutorial section on the PhasicFlow Wiki](https://github.com/PhasicFlow/phasicFlow/wiki/Tutorials).
## Contributing to PhasicFlow
We welcome contributions to PhasicFlow! Whether you're a developer or a new user, there are many ways to get involved. Here's how you can help:
1. Bug Reports
2. Suggestions for better user experience
3. Feature request and algorithm improvements
4. Tutorials, Simulation Case Setups and documentation
5. Direct Code Contributions
For more details on how you can contribute to PhasicFlow see [this page](https://github.com/PhasicFlow/phasicFlow/wiki/How-to-contribute-to-PhasicFlow).
## **PhasicFlowPlus: Coupled CFD-DEM Simulations**
PhasicFlowPlus is an extension of PhasicFlow that facilitates the simulation of particle-fluid systems using resolved and unresolved CFD-DEM methods. The repository for PhasicFlowPlus can be found [here](https://github.com/PhasicFlow/PhasicFlowPlus).
## How to cite PhasicFlow?
## How to cite PhasicFlow
If you are using PhasicFlow in your research or industrial work, cite the following [article](https://www.sciencedirect.com/science/article/pii/S0010465523001662):
```
@article{NOROUZI2023108821,
title = {PhasicFlow: A parallel, multi-architecture open-source code for DEM simulations},
journal = {Computer Physics Communications},
volume = {291},
pages = {108821},
year = {2023},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2023.108821},
url = {https://www.sciencedirect.com/science/article/pii/S0010465523001662},
author = {H.R. Norouzi},
keywords = {Discrete element method, Parallel computing, CUDA, GPU, OpenMP, Granular flow}
@article
{
NOROUZI2023108821,
title = {PhasicFlow: A parallel, multi-architecture open-source code for DEM simulations},
journal = {Computer Physics Communications},
volume = {291},
pages = {108821},
year = {2023},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2023.108821},
url = {https://www.sciencedirect.com/science/article/pii/S0010465523001662},
author = {H.R. Norouzi},
keywords = {Discrete element method, Parallel computing, CUDA, GPU, OpenMP, Granular flow}
}
```
## **Dependencies**
PhasicFlow relies on the following external libraries:
* **Kokkos:** A community-led performance portability ecosystem within the Linux Foundation's High-Performance Software Foundation (HPSF). ([https://github.com/kokkos/kokkos](https://github.com/kokkos/kokkos))
* **CLI11 1.8:** A command-line interface parser developed by the University of Cincinnati. ([https://github.com/CLIUtils/CLI11](https://github.com/CLIUtils/CLI11))

View File

@ -0,0 +1 @@
# Helical Mixer Benchmark (phasicFlow v-1.0)

7
benchmarks/readme.md Normal file
View File

@ -0,0 +1,7 @@
# Benchmarks
Benchmakrs has been done on two different simulations: a simulation with simple geometry (rotating drum) and a simulation with complex geometry (helical mixer).
- [rotating drum](./rotatingDrum/readme.md)
- [helical mixer](./helicalMixer/readme.md)

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 180 KiB

View File

@ -0,0 +1,96 @@
# Rotating Drum Benchmark (phasicFlow v-1.0)
## Overview
This benchmark compares the performance of phasicFlow with a well-stablished commercial DEM software for simulating a rotating drum with varying particle counts (250k to 8M particles). The benchmark measures both computational efficiency and memory usage across different hardware configurations.
## Simulation Setup
<div align="center">
<img src="./images/commericalDEMsnapshot.png"/>
<div align="center">
<p>Figure 1. Commercial DEM simulation snapshot</p>
</div>
</div>
<div align="center">
<img src="./images/phasicFlow_snapshot.png"/>
<div align="center">
<p>Figure 2. phasicFlow simulation snapshot and visualized using Paraview</p>
</div>
</div>
### Hardware Specifications
<div align="center">
Table 1. Hardware specifications used for benchmarking.
</div>
| System | CPU | GPU | Operating System |
| :---------: | :----------------------: | :--------------------------: | :--------------: |
| Laptop | Intel i9-13900HX 2.2 GHz | NVIDIA GeForce RTX 4050Ti 6G | Windows 11 24H2 |
| Workstation | Intel Xeon 4210 2.2 GHz | NVIDIA RTX A4000 16G | Ubuntu 22.04 |
### Simulation Parameters
<div align="center">
Table 2. Parameters for rotating drum simulations.
</div>
| Case | Particle Diameter | Particle Count | Drum Length | Drum Radius |
| :-------: | :---------------: | :--------------: | :------------------: | :------------------: |
| 250k | 6 mm | 250,000 | 0.8 m | 0.2 m |
| 500k | 5 mm | 500,000 | 0.8 m | 0.2 m |
| 1M | 4 mm | 1,000,000 | 0.8 m | 0.2 m |
| 2M | 3 mm | 2,000,000 | 1.2 m | 0.2 m |
| 4M | 3 mm | 4,000,000 | 1.6 m | 0.2 m |
| 8M | 2 mm | 8,000,000 | 1.6 m | 0.2 m |
The time step for all simulations was set to 1.0e-5 seconds and the simulation ran for 4 seconds.
## Performance Comparison
### Execution Time
<div align="center">
Table 3. Total calculation time (minutes) for different configurations.
</div>
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
| :---------------: | :----: | :-----: | :-----: | :-----: | :-----: | :------: |
| phasicFlow-4050Ti | 54 min | 111 min | 216 min | 432 min | - | - |
| Commercial DEM-4050Ti | 68 min | 136 min | 275 min | 570 min | - | - |
| phasicFlow-A4000 | 38 min | 73 min | 146 min | 293 min | 589 min | 1188 min |
The execution time scales linearly with particle count. phasicFlow demonstrates approximately:
- 20% faster calculation than the well-established commercial DEM software on the same hardware
- 30% performance improvement when using the NVIDIA RTX A4000 compared to the RTX 4050Ti
<div align="center">
<img src="./images/performance1.png"/>
<p>Figure 3. Calculation time comparison between phasicFlow and the well-established commercial DEM software.</p>
</div>
### Memory Usage
<div align="center">
Table 4. Memory consumption for different configurations.
</div>
| Software | 250k | 500k | 1M | 2M | 4M | 8M |
| :---------------: | :-----: | :-----: | :-----: | :-----: | :-----: | :-----: |
| phasicFlow-4050Ti | 252 MB | 412 MB | 710 MB | 1292 MB | - | - |
| Commercial DEM-4050Ti | 485 MB | 897 MB | 1525 MB | 2724 MB | - | - |
| phasicFlow-A4000 | 344 MB | 480 MB | 802 MB | 1386 MB | 2590 MB | 4966 MB |
Memory efficiency comparison:
- phasicFlow uses approximately 0.7 GB of memory per million particles
- Commercial DEM software uses approximately 1.2 GB of memory per million particles
- phasicFlow shows ~42% lower memory consumption compared to the commercial alternative
- The memory usage scales linearly with particle count in both software packages. But due to memory limitations on GPUs, it is possible to run larger simulation on GPUs with phasicFlow.
## Run Your Own Benchmarks
The simulation case setup files are available in this folder for users interested in performing similar benchmarks on their own hardware. These files can be used to reproduce the tests and compare performance across different systems.

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.004); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.004; // minimum space between centers of particles
numPoints 1000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_1mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.006); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.006; // minimum space between centers of particles
numPoints 250000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_250KParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.2);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.2); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.2); // first point of the wall
p2 ( 0.2 -0.2 1.2); // second point
p3 ( 0.2 0.2 1.2); // third point
p4 (-0.2 0.2 1.2); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 2000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.19); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_2mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.6);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.6); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.6); // first point of the wall
p2 ( 0.2 -0.2 1.6); // second point
p3 ( 0.2 0.2 1.6); // third point
p4 (-0.2 0.2 1.6); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 4000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.59); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_4mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.005); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 0.8);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.8); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.8); // first point of the wall
p2 ( 0.2 -0.2 0.8); // second point
p3 ( 0.2 0.2 0.8); // third point
p4 (-0.2 0.2 0.8); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.005; // minimum space between centers of particles
numPoints 500000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 0.79); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_500KParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -0,0 +1,60 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS;
updateInterval 20;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}

View File

@ -0,0 +1,15 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName shapes;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (glassBead); // names of shapes
diameters (0.002); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -0,0 +1,50 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.2 -0.2 0.0);
max ( 0.2 0.2 1.6);
}
boundaries
{
neighborListUpdateInterval 200;
updateInterval 20;
left
{
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodic, reflective
}
}

View File

@ -0,0 +1,86 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model
{
rotAxis
{
p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}
surfaces
{
cylinder
{
type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 1.6); // end point of cylinder axis
radius1 0.2; // radius at p1
radius2 0.2; // radius at p2
resolution 60; // number of divisions
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the rear end of cylinder
*/
wall1
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 0.0); // first point of the wall
p2 ( 0.2 -0.2 0.0); // second point
p3 ( 0.2 0.2 0.0); // third point
p4 (-0.2 0.2 0.0); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // type of the wall
p1 (-0.2 -0.2 1.6); // first point of the wall
p2 ( 0.2 -0.2 1.6); // second point
p3 ( 0.2 0.2 1.6); // third point
p4 (-0.2 0.2 1.6); // fourth point
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

View File

@ -0,0 +1,47 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method ordered;
orderedInfo
{
distance 0.003; // minimum space between centers of particles
numPoints 6000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder for positioning particles
{
p1 (0.0 0.0 0.01); // lower corner point of the box
p2 (0.0 0.0 1.59); // upper corner point of the box
radius 0.195; // radius of cylinder
}
}

View File

@ -0,0 +1,34 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run rotatingDrum_4mParticles;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 4; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat binary; // data writting format (ascii or binary)
timersReport Yes;
timersReportInterval 0.01;

View File

@ -1,59 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName interaction;
objectType dicrionary;
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
contactListType sortedContactList;
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
Yeff (1.0e6 1.0e6 // Young modulus [Pa]
1.0e6);
Geff (0.8e6 0.8e6 // Shear modulus [Pa]
0.8e6);
nu (0.25 0.25 // Poisson's ratio [-]
0.25);
en (0.97 0.85 // coefficient of normal restitution
1.00);
et (1.0 1.0 // coefficient of tangential restitution
1.0);
mu (0.65 0.65 // dynamic friction
0.65);
mur (0.1 0.1 // rolling friction
0.1);
}
contactSearch
{
method NBS;
wallMapping cellMapping;
NBSInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
sizeRatio 1.05; // bounding box size to particle diameter (max)
}
cellMappingInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
}
}

View File

@ -1,14 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particleInsertion;
objectType dicrionary;
active no; // is insertion active?
collisionCheck No; // not implemented for yes

View File

@ -1,11 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes

View File

@ -1,63 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
motionModel rotatingAxisMotion;
surfaces
{
cylinder
{
type cylinderWall;
p1 (0.0 0.0 0.0);
p2 (0.0 0.0 1.6);
radius1 0.2;
radius2 0.2;
resolution 24;
material wallMat;
motion rotAxis;
}
wall1
{
type planeWall;
p1 (-0.2 -0.2 0.0);
p2 ( 0.2 -0.2 0.0);
p3 ( 0.2 0.2 0.0);
p4 (-0.2 0.2 0.0);
material wallMat;
motion rotAxis;
}
/*
This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall;
p1 (-0.2 -0.2 1.6);
p2 ( 0.2 -0.2 1.6);
p3 ( 0.2 0.2 1.6);
p4 (-0.2 0.2 1.6);
material wallMat;
motion rotAxis;
}
}
// information for rotatingAxisMotion motion model
rotatingAxisMotionInfo
{
rotAxis
{
p1 (0.0 0.0 0.0);
p2 (0.0 0.0 1.0);
omega 1.256; // rotation speed (rad/s) => 12 rpm
}
}

View File

@ -1,44 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
selectors
{}
}
positionParticles
{
method positionOrdered;
maxNumberOfParticles 4000001;
mortonSorting Yes;
cylinder // box for positioning particles
{
p1 ( 0.0 0.0 0.01); // lower corner point of the box
p2 ( 0.0 0.0 1.59); // upper corner point of the box
radius 0.195;
}
positionOrderedInfo
{
diameter 0.003; // minimum space between centers of particles
numPoints 4000000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles
}
}

View File

@ -1,32 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;;
run rotatingDrum_1;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 10; // end time for simulation
saveInterval 0.2; // time interval for saving the simulation
timePrecision 5; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
domain
{
min (-0.2 -0.2 -0.0);
max ( 0.2 0.2 1.6);
}
integrationMethod AdamsBashforth3; // integration method
timersReport Yes;
timersReportInterval 0.01;

112
cmake/autoComplete Normal file
View File

@ -0,0 +1,112 @@
PF_cFlags="--description --help --version"
AllTimeFolders=
__getAllTime(){
# Initialize empty array for time folders
local time_folders=()
# Loop through all directories in current folder
for dir in */; do
# Remove trailing slash
dir=${dir%/}
# Check if directory name is a valid floating point number
# This pattern matches integers and floating point numbers
if [[ $dir =~ ^[0-9]+(\.[0-9]+)?$ ]]; then
time_folders+=("$dir")
fi
done
# Set completion reply to the time folders
COMPREPLY=("${time_folders[@]}")
AllTimeFolders="${time_folders[@]}"
}
__getFields(){
__getAllTime
local -A unique_files=()
# Files to exclude from suggestions
local exclude_files=("shapeHash" "pStructure" "particleInsertion" "p" "alpha" "U" "Sp" "Su" "phi")
declare -A exclude_dict
# Build exclude dictionary for faster lookups
for file in "${exclude_files[@]}"; do
exclude_dict["$file"]=1
done
for dir in $AllTimeFolders; do
# Skip if not a directory
[ ! -d "$dir" ] && continue
# Find all files in this time directory
while IFS= read -r filename; do
# Skip empty lines and excluded files
[ -z "$filename" ] || [ "${exclude_dict[$filename]+exists}" ] && continue
# Add to unique files
unique_files["$filename"]=1
done < <(find "$dir" -maxdepth 1 -type f -printf '%f\n')
done
# Set completion reply to the unique filenames
COMPREPLY=(${!unique_files[@]})
# Clear global variable
AllTimeFolders=
}
_pFlowToVTK(){
local cur="${COMP_WORDS[COMP_CWORD]}"
local prev="${COMP_WORDS[COMP_CWORD-1]}"
# Check if we're completing a field
local is_field=0
for ((i=1; i<COMP_CWORD; i++)); do
if [[ "${COMP_WORDS[i]}" == "--fields" ]]; then
is_field=1
break
fi
done
if [ "$prev" == "--time" ]; then
__getAllTime
elif [ "$prev" == "--fields" ] || [ $is_field -eq 1 ]; then
# We're completing field names
__getFields
# Filter the results based on the current word prefix
if [ -n "$cur" ]; then
local filtered=()
for item in "${COMPREPLY[@]}"; do
if [[ "$item" == "$cur"* ]]; then
filtered+=("$item")
fi
done
COMPREPLY=("${filtered[@]}")
fi
else
COMPREPLY=( $(compgen -W "$PF_cFlags --binary --no-geometry --no-particles --out-folder --time --separate-surfaces --fields" -- "$cur") )
fi
}
complete -F _pFlowToVTK pFlowToVTK
_postprocessPhasicFlow(){
if [ "$3" == "--time" ]; then
__getAllTime
else
COMPREPLY=( $(compgen -W "$PF_cFlags --out-folder --time --zeroFolder" -- "$2") )
fi
}
complete -F _postprocessPhasicFlow postprocessPhasicFlow
complete -W "$PF_cFlags --positionParticles-only --setFields-only --coupling" particlesPhasicFlow
complete -W "$PF_cFlags --coupling" geometryPhasicFlow
complete -W "$PF_cFlags --coupling" iterateGeometry
complete -W "$PF_cFlags" iterateSphereParticles
complete -W "$PF_cFlags" sphereGranFlow
complete -W "$PF_cFlags" grainGranFlow
complete -W "$PF_cFlags" checkPhasicFlow

View File

@ -1,8 +1,7 @@
export pFlow_PROJECT_VERSION=v0.1
export pFlow_PROJECT=phasicFlow
export pFlow_PROJECT_VERSION=v-1.0
export pFlow_PROJECT="phasicFlow-$pFlow_PROJECT_VERSION"
projectDir="$HOME/PhasicFlow"
kokkosDir="$HOME/Kokkos/kokkos"
@ -20,6 +19,8 @@ export pFlow_SRC_DIR="$pFlow_PROJECT_DIR/src"
export Kokkos_DIR="$kokkosDir"
export Zoltan_DIR="$projectDir/Zoltan"
# Cleanup variables (done as final statement for a clean exit code)
unset projectDir
@ -27,5 +28,7 @@ export PATH="$pFlow_BIN_DIR:$PATH"
export LD_LIBRARY_PATH="$pFlow_LIB_DIR:$LD_LIBRARY_PATH"
export LD_LIBRARY_PATH="$Zoltan_DIR/lib:$LD_LIBRARY_PATH"
source $pFlow_PROJECT_DIR/cmake/autoComplete
#------------------------------------------------------------------------------

View File

@ -2,3 +2,52 @@
set(validFiles)
list(APPEND validFiles *.C *.cpp *.cxx *.c *.cu *.H *.hpp *.hxx *.h *.cuh)
macro(Kokkos_cmake_settings)
#mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LAMBDA)
mark_as_advanced(FORCE var Kokkos_CXX_STANDARD)
#mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_CONSTEXPR)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMP)
mark_as_advanced(FORCE var Kokkos_ENABLE_SERIAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP)
mark_as_advanced(FORCE var Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION)
mark_as_advanced(FORCE var Kokkos_ENABLE_BENCHMARKS)
mark_as_advanced(FORCE var Kokkos_ENABLE_COMPILE_AS_CMAKE_LANGUAGE)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_LDG_INTRINSIC)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_RELOCATABLE_DEVICE_CODE)
mark_as_advanced(FORCE var Kokkos_ENABLE_CUDA_UVM)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATED_CODE_3)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATED_CODE_4)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEPRECATION_WARNINGS)
mark_as_advanced(FORCE var Kokkos_ENABLE_DESUL_ATOMICS_EXTERNAL)
mark_as_advanced(FORCE var Kokkos_ENABLE_EXAMPLES)
mark_as_advanced(FORCE var Kokkos_ENABLE_HEADER_SELF_CONTAINMENT_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP_MULTIPLE_KERNEL_INSTANTIATIONS)
mark_as_advanced(FORCE var Kokkos_ENABLE_HIP_RELOCATABLE_DEVICE_CODE)
mark_as_advanced(FORCE var Kokkos_ENABLE_HPX)
mark_as_advanced(FORCE var Kokkos_ENABLE_HWLOC)
mark_as_advanced(FORCE var Kokkos_ENABLE_IMPL_CUDA_MALLOC_ASYNC)
mark_as_advanced(FORCE var Kokkos_ENABLE_IMPL_HPX_ASYNC_DISPATCH)
mark_as_advanced(FORCE var Kokkos_ENABLE_LARGE_MEM_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_DEBUG_DUALVIEW_MODIFY_CHECK)
mark_as_advanced(FORCE var Kokkos_ENABLE_LIBQUADMATH)
mark_as_advanced(FORCE var Kokkos_ENABLE_LIBRT)
mark_as_advanced(FORCE var Kokkos_ENABLE_MEMKIND)
mark_as_advanced(FORCE var Kokkos_ENABLE_ONEDPL)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENACC)
mark_as_advanced(FORCE var Kokkos_ENABLE_OPENMPTARGET)
mark_as_advanced(FORCE var Kokkos_ENABLE_ROCM)
mark_as_advanced(FORCE var Kokkos_ENABLE_SYCL)
mark_as_advanced(FORCE var Kokkos_ENABLE_TESTS)
mark_as_advanced(FORCE var Kokkos_ENABLE_THREADS)
mark_as_advanced(FORCE var Kokkos_ENABLE_TUNING)
mark_as_advanced(FORCE var Kokkos_ENABLE_UNSUPPORTED_ARCHS)
mark_as_advanced(FORCE var Kokkos_HPX_DIR)
mark_as_advanced(FORCE var Kokkos_HWLOC_DIR)
mark_as_advanced(FORCE var Kokkos_MEMKIND_DIR)
mark_as_advanced(FORCE var Kokkos_ROCM_DIR)
mark_as_advanced(FORCE var Kokkos_THREADS_DIR)
endmacro()

View File

@ -31,8 +31,8 @@ target_include_directories(${target_name}
message(STATUS "\nCreating make file for executable ${target_name}")
message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}")
message(STATUS " ${target_name} source files are: ${source_files}")
message(STATUS " ${target_name} include dirs are: ${includeDirs}\n")
#message(STATUS " ${target_name} source files are: ${${source_files}}")
#message(STATUS " ${target_name} include dirs are: ${includeDirs}\n")
install(TARGETS ${target_name} DESTINATION bin)

View File

@ -41,8 +41,8 @@ target_include_directories(${target_name}
message(STATUS "\nCreating make file for library ${target_name}")
message(STATUS " ${target_name} link libraries are: ${${target_link_libs}}")
message(STATUS " ${target_name} source files are: ${source_files}")
message(STATUS " ${target_name} include dirs are: ${includeDirs}\n")
#message(STATUS " ${target_name} source files are: ${source_files}")
#message(STATUS " ${target_name} include dirs are: ${includeDirs}\n \n")
install(TARGETS ${target_name} DESTINATION lib)
install(FILES ${includeFiles} DESTINATION include/${target_name})

54
cmake/preReq.cmake Normal file
View File

@ -0,0 +1,54 @@
if(pFlow_STD_Parallel_Alg)
# Check if libtbb-dev is installed
execute_process(
COMMAND dpkg -s libtbb-dev
RESULT_VARIABLE TBB_IS_INSTALLED
OUTPUT_QUIET
ERROR_QUIET)
if(NOT TBB_IS_INSTALLED EQUAL 0)
message(STATUS "libtbb-dev not found. Installing libtbb-dev...")
execute_process(
COMMAND sudo apt-get update
COMMAND sudo apt-get install -y libtbb-dev
RESULT_VARIABLE TBB_INSTALL_RESULT)
if(NOT TBB_INSTALL_RESULT EQUAL 0)
message(FATAL_ERROR "Failed to install libtbb-dev")
endif()
else()
message(STATUS "libtbb-dev is already installed.")
endif()
endif()
# Kokkos folder creation
set(Kokkos_Source_DIR $ENV{HOME}/Kokkos/kokkos)
if(NOT EXISTS "${Kokkos_Source_DIR}/CMakeLists.txt")
# Check CMake version and set policy CMP0169 if CMake version is 3.30 or higher
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.30")
cmake_policy(SET CMP0169 OLD)
endif()
include(FetchContent)
FetchContent_Declare(
kokkos
GIT_REPOSITORY https://github.com/kokkos/kokkos.git
GIT_TAG 4.4.01
)
FetchContent_GetProperties(kokkos)
if(NOT kokkos_POPULATED)
message(STATUS "Kokkos source directory not found. Downloading Kokkos version 4.4.1 ...")
FetchContent_Populate(kokkos)
set(Kokkos_Source_DIR ${kokkos_SOURCE_DIR})
endif()
endif()
message(STATUS "Kokkos source directory is ${Kokkos_Source_DIR}")
add_subdirectory(${Kokkos_Source_DIR} ./kokkos)
#Kokkos_cmake_settings()

231
doc/mdDocs/codingStyle.md Normal file
View File

@ -0,0 +1,231 @@
# PhasicFlow Coding Style Guidelines
This document outlines the coding style guidelines for the PhasicFlow codebase.
Adhering to these guidelines ensures consistency, readability, and maintainability of the project.
## 1. FormattingIndentation:
* Use 4 spaces for every logical level and block.
* Line Spacing: Leave two empty lines between sections (e.g., between functions in a .cpp file, between class members).
## 2. Naming ConventionsGeneral Naming:
* All names should start with lowercase letters, except for special names (e.g., Ergun, Hertz).
* Macro names start with Upper case or all the letters are in UPPER case.
* Compound Names: For compound names, the first word starts with a lowercase letter, and subsequent words start with an uppercase letter (e.g., boundaryBase, motionModel).
## 3. File Structure
* Header Files: Use the .hpp extension for header files.
* Source Files: Use the .cpp extension for source files.
* Header and Source File Headers: All header and source files must include a standardized header that describes the project's intention and licensing information.
* File Naming: Header and source file names should correspond to the class they contain. Aim for one class per file.
* Inline Functions: Place inline functions in a separate classNameI.hpp file to avoid cluttering the main header file.
## 4. Class DesignClass Member Order:
* Private members and methods
* Private static members and methods
* Public methods
* Public static methods
* Enumerations and Nested Classes: Declare enumerations and nested classes before all class members and methods.
* Special Functions: Each class must explicitly define all special functions:Constructor, Copy constructor and assignment operator, Move constructor and assignment operator
* Destructor: Each class must have an explicit destructor declaration:`~className() = default`; or `~className();`
* Interface classes or classes with virtual methods must have a virtual destructor.
* Virtual Method Overrides: When implementing a `virtual` method from a base class in a derived class, use the `override` keyword. The same applies to derived class destructors.
## 5. NamespacesOfficial Namespace:
The official namespace for the codebase is pFlow. All entities should be defined within this namespace.
### Example File Structure
```
src/
├── componentName1/
│ ├── componentName1.hpp
│ ├── componentName1.cpp
│ ├── componentName1I.hpp
│ └── ...
└── componentName2/
├── componentName2.hpp
├── componentName2.cpp
└── ...
```
### Example Class Structure
```C++
namespace pFlow
{
class MyClass
{
public:
enum class MyEnum
{
Value1,
Value2
};
class NestedClass
{
// ...
};
private:
int privateMember_;
void privateMethod();
static int privateStaticMember_;
static void privateStaticMethod();
public:
MyClass();
MyClass(const MyClass& other);
MyClass(MyClass&& other);
MyClass& operator=(const MyClass& other);
MyClass& operator=(MyClass&& other);
~MyClass();
void publicMethod();
static void publicStaticMethod();
};
// assuming base class has virtual methods
class DerivedClass
:
public BaseClass
{
public:
...
~DerivedClass() override;
void virtualMethod() override;
};
} // namespace pFlow
```
## 6. Doxygen Documentation
### 6.1. Ruls
provide the documentations in the header files only. In rare cases where you are generating documentations for executables, the doxygen documentation can be supplied in the .cpp file.
* **General Doxygen Style:**
* Use `///` for short documentations for methods and members.
* Use `/** */` for classes and main methods which play a significant role in the class or code.
* Place Doxygen comments *before* the declaration of the entity being documented (e.g., class, function, variable).
* Use `@param` to document function parameters, `@return` for return values, `@brief` for a short description, and `@details` for a more in-depth explanation.
* Use Markdown syntax within Doxygen comments for formatting.
* **File Headers:** Each file should contain a Doxygen comment at the top, including:
* `@file` : The name of the file.
* `@brief`: A brief description of the file's purpose.
* `@author`: The author(s) of the file.
* `@date` : The date of creation or last modification.
* **Class Documentation:**
* Use `/** */` for class documentation.
* Provide a `@brief` description of the class.
* Use `@tparam` to document template parameters.
* Document the purpose of the class, its invariants, and how it should be used.
* **Function/Method Documentation:**
* Use `///` for short documentations.
* Use `/** */` for main methods which play a significant role.
* Provide a `@brief` description of the function.
* Use `@param` to describe each parameter, including its purpose and whether it is an input, output, or input/output parameter.
* Use `@return` to describe the return value, including its meaning and possible values.
* Use `@pre` to document any preconditions that must be met before calling the function.
* Use `@post` to document any postconditions that will be true after the function returns.
* Use `@throws` to document any exceptions that the function may throw.
* Use `@details` for a more detailed explanation of the function's behavior, algorithms, or any other relevant information.
* **Variable Documentation:**
* Use `///<` for single-line documentation of variables.
### 6.2. Doxygen Documentation Examples
* **Class example**
```cpp
/**
* @brief Represents a particle in the simulation.
* @details This class stores the position, velocity, and other physical
* properties of a particle.
*/
class Particle
{
private:
Point position_; ///< The current position of the particle.
Vector velocity_; ///< The current velocity of the particle.
double mass_; ///< The mass of the particle.
public:
/// Constructs a particle with default values.
Particle();
/**
* @brief Updates the position of the particle based on its velocity
* and the given time step.
* @param deltaTime The time elapsed since the last update, in seconds.
*/
void updatePosition(const timeInfo& ti );
/// Gets the current position of the particle.
Point getPosition() const;
};
```
* **Function Example**
```cpp
/**
* @brief Calculates the distance between two points.
* @param p1 The first point.
* @param p2 The second point.
* @return The distance between the two points.
*/
double calculateDistance(const Point& p1, const Point& p2)
{
// Implementation
return 0.0;
}
/// Returns the velocity of the particle.
Vector getVelocity() const
{
return velocity_;
}
```

View File

@ -0,0 +1,136 @@
# How to build PhasicFlow-v-1.0
You can build PhasicFlow for CPU or GPU. You can have a single build or oven multiple builds on a machine. Here you learn how to have a single build of PhasicFlow, in various modes of execution. You can install PhasicFlow-v-1.0 on **Ubuntu-22.04 LTS** and **Ubuntu-24.04 LTS**. Installing it on older versions of Ubuntu needs some additional steps to meet the requirements which are not covered here.
If you want to install PhasicFlow on **Windows OS**, just see [this page](https://www.cemf.ir/installing-phasicflow-v-1-0-on-ubuntu/) for more information.
# Required packages
You need a list of packages installed on your computer before building PhasicFlow:
* git, for cloning the code and package management
* g++, for compiling the code
* cmake, for generating build system
* Cuda-12.x or above (if GPU is targeted), for compiling the code for CUDA execution.
### Installing packages
Execute the following commands to install the required packages (Except Cuda). tbb is installed automatically.
```bash
sudo apt update
sudo apt install -y git g++ cmake cmake-qt-gui
```
### Installing Cuda for GPU execution
If you want to build PhasicFlow to be executed on an nvidia-GPU, you need to install the latest version of Cuda compiler (Version 12.x or above), which is compatible with your hardware and OS, on your computer.
# How to build?
Here you will learn how to build PhasicFlow for single execution mode. Follow the steps below to install it on your computer.
Tested operating systems are:
* Ubuntu-22.04 LTS
* Ubuntu-24.04 LTS
### Step 1: Package check
Make sure that you have installed all the required packages on your computer. See above for more information.
### Step 2: Cloning PhasicFlow
Create the PhasicFlow folder in your home folder and then clone the source code into that folder:
```bash
cd ~
mkdir PhasicFlow
cd PhasicFlow
git clone https://github.com/PhasicFlow/phasicFlow.git
mv phasicFlow phasicFlow-v-1.0
```
### Step 3: Environmental variables
Opne the bashrc file using the following command:
```bash
$ gedit ~/.bashrc
```
and add the following line to the end of the file, **save** and **close** it.
```bash
source $HOME/PhasicFlow/phasicFlow-v-1.0/cmake/bashrc
```
this will introduce a new source file for setting the environmental variables of PhasicFlow. If you want to load these variables in the current open terminal, you need to source it. Or, simply **close the terminal** and **open a new terminal**.
### Step 4: Building PhasicFlow
Follow one of the followings to build PhasicFlow for one mode of execution.
#### Serial build for CPU
In a **new terminal** enter the following commands:
```bash
cd ~/PhasicFlow/phasicFlow-v-1.0
mkdir build
cd build
cmake ../ -DpFlow_Build_Serial=On -DCMAKE_BUILD_TYPE=Release
make install -j4
```
For faster builds, use `make install -j`. This will use all the CPU cores on your computer for building.
#### OpenMP build for CPU
```bash
cd ~/PhasicFlow/phasicFlow-v-1.0
mkdir build
cd build
cmake ../ -DpFlow_Build_OpenMP=On -DCMAKE_BUILD_TYPE=Release
make install -j4
```
#### GPU build for parallel execution on CUDA-enabled GPUs
```bash
cd ~/PhasicFlow/phasicFlow-v-1.0
mkdir build
cd build
cmake ../ -DpFlow_Build_Cuda=On -DCMAKE_BUILD_TYPE=Release
cmake ../ -DpFlow_Build_Cuda=On -DCMAKE_BUILD_TYPE=Release
make install -j4
```
After building, `bin`, `include`, and `lib` folders will be created in `~/PhasicFlow/phasicFlow-v-1.0/` folder. Now you are ready to use PhasicFlow.
**note 1**: When compiling the code in parallel, you need to have enough RAM on your computer. As a rule, you need 1 GB free RAM per each processor on your computer for compiling in parallel.
You may want to use fewer number of cores on your computer by using the following command:
```bash
make install -j3
```
the above command only uses 3 cores for compiling.
**note 2**: By default PhasicFlow is compiled with **double** as floating point variable. You can compile it with **float**. Just in the command line of camke added `-DpFlow_Build_Double=Off` flag to compile it with float. For example if you are building for cuda, you can enter the following command:
```bash
cmake ../ -DpFlow_Build_Cuda=On -DpFlow_Build_Double=Off
```
### Step 5: Testing
In the current terminal or a new terminal enter the following command:
```bash
checkPhasicFlow
```
This command shows the host and device environments and software version. If PhasicFlow was build correctly, you would get the following output:
```
Initializing host/device execution spaces . . .
Host execution space is Serial
Device execution space is Serial
You are using phasicFlow v-1.0 (copyright(C): www.cemf.ir)
In this build, double is used for floating point operations and uint32for indexing.
This is not a build for MPI execution
Finalizing host/device execution space ....
```

View File

@ -1,151 +0,0 @@
# How to build PhasicFlow {#howToBuildPhasicFlow}
You can build PhasicFlow for CPU or GPU. You can have a single build or oven multiple builds on a machine. Here you learn how to have a single build of PhasicFlow, in various modes of execution.
# Required packages
You need a list of packaged installed on your computer before building PhasicFlow:
* git, for cloning the code and package management
* g++, for compiling the code
* cmake, for generating build system
* tbb, a parallel library for STL algorithms
* Cuda (if GPU is targeted), for compiling the code for CUDA execution.
* Kokkos, the parallelization backend of PhasicFlow
### git
if git is not installed on your computer, enter the following commands
```
$ sudo apt update
$ sudo apt install git
```
### g++ (C++ compiler)
The code is tested with g++ (gnu C++ compiler). The default version of g++ on Ubuntu 18.04 LTS or upper is sufficient for compiling. If it is not installed on your operating system, enter the following command:
```
$ sudo apt update
$ sudo apt install g++
```
### CMake
You also need to have CMake-3.22 or higher installed on your computer.
```
$ sudo apt update
$ sudo apt install cmake
```
### tbb (2020.1-2 or higher)
For **Ubuntu 20.04 LTS or higher versions**, you can install tbb using apt. For now, some parallel algorithms on host side rely on tbb parallel library (C++ parallel backend). Use e following commands to install it:
```
$ sudo apt update
$ sudo apt install libtbb-dev
```
If you are compiling on **Ubuntu-18.04 LTS**, you need to enter the following commands to get the right version (2020.1-2 or higher) of tbb:
```
$ wget "http://archive.ubuntu.com/ubuntu/pool/universe/t/tbb/libtbb2_2020.1-2_amd64.deb"
$ sudo dpkg --install libtbb2_2020.1-2_amd64.deb
$ wget "http://archive.ubuntu.com/ubuntu/pool/universe/t/tbb/libtbb-dev_2020.1-2_amd64.deb"
$ sudo dpkg --install libtbb-dev_2020.1-2_amd64.deb
```
### Cuda
If you want to build PhasicFlow to be executed on an nvidia-GPU, you need to install the latest version of Cuda compiler, which is compatible with your hardware and OS, on your computer.
# How to build?
Here you will learn how to build PhasicFlow for single execution mode. Follow the steps below to install it on your computer.
Tested operating systems are:
* Ubuntu 18.04 LTS
* Ubuntu 20.04 LTS
* Ubuntu 22.04 LTS
### Step 1: Package check
Make sure that you have installed all the required packages on your computer. See above for more information.
### Step 2: Cloning Kokkos
It is assumed that Kokkos source is located in the home folder of your computer. Clone the latest version of Kokkos into your home folder:
```
$ cd ~
$ mkdir Kokkos
$ cd Kokkos
$ git clone https://github.com/kokkos/kokkos.git
```
or simply download and extract the source code of Kokkos in `~/Kokkos` folder. In the end, the top level CMakeLists.txt file should be located in `~/Kokkos/kokkos` folder.
### Step 3: Cloning PhasicFlow
Create the PhasicFlow folder in your home folder and then clone the source code into that folder:
```
$ cd ~
$ mkdir PhasicFlow
$ cd PhasicFlow
$ git clone https://github.com/PhasicFlow/phasicFlow.git
```
### Step 4: Environmental variables
Opne the bashrc file using the following command:
`$ gedit ~/.bashrc`
and add the following line to the end of the file, **save** and **close** it.
`source $HOME/PhasicFlow/phasicFlow/cmake/bashrc`
this will introduce a new source file for setting the environmental variables of PhasicFlow. If you want to load these variables in the current open terminal, you need to source it. Or, simply **close the terminal** and **open a new terminal**.
### Step 5: Building PhasicFlow
Follow one of the followings to build PhasicFlow for one mode of execution.
#### Serial build for CPU
In a **new terminal** enter the following commands:
```
$ cd ~/PhasicFlow/phasicFlow
$ mkdir build
$ cd build
$ cmake ../ -DpFlow_Build_Serial=On
$ make install
```
For faster builds, use `make install -j`. This will use all the CPU cores on your computer for building.
#### OpenMP build for CPU
```
$ cd ~/PhasicFlow/phasicFlow
$ mkdir build
$ cd build
$ cmake ../ -DpFlow_Build_OpenMP=On
$ make install
```
#### GPU build for parallel execution on CUDA-enabled GPUs
```
$ cd ~/PhasicFlow/phasicFlow
$ mkdir build
$ cd build
$ cmake ../ -DpFlow_Build_Cuda=On
$ make install
```
After building, `bin`, `include`, and `lib` folders will be created in `~/PhasicFlow/phasicFlow/` folder. Now you are ready to use PhasicFlow.
**note 1**: When compiling the code in parallel, you need to have enough RAM on your computer. As a rule, you need 1 GB free RAM per each processor in your computer for compiling in parallel.
You may want to use fewer number of cores on your computer by using the following command:
`$ make install -j 3`
the above command only uses 3 cores for compiling.
**note 2**: By default PhasicFlow is compiled with **double** as floating point variable. You can compile it with **float**. Just in the command line of camke added `-DpFlow_Build_Double=Off` flag to compile it with float. For example if you are building for cuda, you can enter the following command:
`$ cmake ../ -DpFlow_Build_Cuda=On -DpFlow_Build_Double=Off`
### Step 6: Testing
In the current terminal or a new terminal enter the following command:
`$ checkPhasicFlow`
This command shows the host and device environments and software version. If PhasicFlow was build correctly, you would get the following output:
```
Initializing host/device execution spaces . . .
Host execution space is Serial
Device execution space is Cuda
ou are using phasicFlow v-0.1 (copyright(C): www.cemf.ir)
In this build, double is used for floating point operations.
Finalizing host/device execution space ....
```

View File

@ -1,64 +1,116 @@
# PhasicFlow Features {#phasicFlowFeatures}
# PhasicFlow Features (v-1.0)
The features of PhasicFlow described here are the main features that are implemented in the code for version 1.0. This document is not a complete list of all the features of PhasicFlow. The features are being added to the code continuously and this document may be behind the latest updates. Of course, the code review will give you the complete list.
## Table of Contents
- [1. Building options](#1-building-options)
- [2. Preprocessing tools](#2-preprocessing-tools)
- [3. Solvers for simulations](#3-solvers-for-simulations)
- [4. Postprocessing tools](#4-postprocessing-tools)
- [5. Models and features for simulations](#5-models-and-features-for-simulations)
- [5.1. General representation of walls](#51-general-representation-of-walls)
- [5.2. High precision integeration methods](#52-high-precision-integeration-methods)
- [5.3. Contact force models](#53-contact-force-models-needs-improvement)
- [5.4. Particle insertion](#54-particle-insertion)
- [5.5. Restarting/resuming a simulation](#55-restartingresuming-a-simulation)
- [5.6. Postprocessing data during simulation](#56-postprocessing-data-during-simulation)
## 1. Building options
You can build PhasicFlow to be executed on multi-core CPUs or GPUs. It is also possible to select the type of floating point variables in PhasicFlow: double or float. float type requires less memory and mostly consumes less time of a processor to complete a mathematical operation. So, there is a benefit for using floats in DEM simulation specially when GPU is targeted for computations.
## Building options
You can build PhasicFlow to be executed on multi-core CPUs or GPUs. It is also possible to select the type of floating point variables in PhasicFlow: double or float. float type requires less memory and mostly consumes less time of a processor to complete a mathematical operation. So, there is a benefit for using floats in DEM simulation specially when GPU is targeted for computations.
Build options for PhasicFlow:
* **serial (double or float type)**: execution on one cpu core
* **OpenMp (double or float type)**: execution on multiple cores of a CPU
* **cuda (double or float type)**: execution on cuda-enabled GPUs
- **serial (double or float type)**: execution on one cpu core
- **OpenMp (double or float type)**: execution on multiple cores of a CPU
- **cuda (double or float type)**: execution on cuda-enabled GPUs
for more information on building PhasicFlow, please refer to the [installation guide](./howToBuild-V1.0.md).
## Preprocessing tools
Preprocessing tools are used to facilitate the process of case setup. They include tools for defining initial state of particles and geometry conversion.
* **particlesPhasicFlow** tool can be used to define the initial position of particles (for example at t = 0 s) and to set the initial field values for particles (like velocity, orientation, acceleration and etc).
* **geometryPhasicFlow** converts user inputs for walls into a data structures that is used by PhasicFlow.
## 2. Preprocessing tools
PhasicFlow provides a set of tools for preprocessing the simulation case. These tools are used to define the initial state of particles, walls and other parameters that are required for running a simulation.
- [**particlesPhasicFlow**](./../../utilities/particlesPhasicFlow/) tool can be used to define the initial position of particles (for example at t = 0 s) and to set the initial field values for particles (like velocity, orientation, acceleration, etc.).
## Models and features for simulations
- [**geometryPhasicFlow**](./../../utilities/geometryPhasicFlow/) converts user inputs for walls into a data structure that is used by PhasicFlow.
## 3. Solvers for simulations
### General representation of walls
- [**sphereGranFlow**](./../../solvers/sphereGranFlow/) is a solver for simulating the flow of spherical particles with particle insertion mechanism. A full set of tutorial on various possible simulations can be found here: [sphereGranFlow tutorial](./../../tutorials/sphereGranFlow/).
- [**grainGranFlow**](./../../solvers/grainGranFlow/) is a solver for simulating the flow of course-grained particles with particle insertion mechanism. A full set of tutorial on various possible simulations can be found here: [grainGranFlow tutorial](./../../tutorials/grainGranFlow/).
- [**iterateGeometry**](./../../solvers/iterateGeometry/) is a solver testing motion of walls without simulating particles. Since simulating with particles may take a long time and we may want to check the motion of geometry to be correct before actual simulation, we created this utility to test the motion of walls. A set of tutorial on various possible simulations can be found here: [iterateGeometry tutorial](./../../tutorials/iterateGeometry/).
## 4. Postprocessing tools
- [**pFlowToVTK**](./../../utilities/pFlowToVTK) is used to convert simulation results into vtk file format. vtk file format can be read by Paraview for visualizing the results.
- [**postprocessPhasicFlow**](./../../utilities/postprocessPhasicFlow/) is a tool for performing various averaging and summation on the fields. Particle probing is also possible.
## 5. Models and features for simulations
### 5.1. General representation of walls
Walls can be defined in three ways in PhasicFlow:
* **Builtin walls** in PhasicFlow that include plane wall, cylinder/cone wall, cuboid, circle.
* **stl wall** that reads the data of the wall from an ASCII stl file.
* **foamPatch wall** that reads the OpenFOAM mesh and converts the boundary patches into PhasicFlow walls (this feature is only available when performing CFD-DEM simulation using OpenFOAM).
Walls can be fixed or in motion during simulations. Various motion models are implemented to cover most of the wall motions in phasicFlow ([see the source code] (./../../../src/MotionModel/)):
* **fixedWall** model, in which all walls are fixed. This model is mostly useful for granular flow under gravity or gas-solid flows (CFD-DEM).
* **rotatingAxisMotion** model, in which walls are rotating around an axis of rotation with specified rotation speed. This model covers a wide range of granular flows in which the whole or a part of geometry is rotating, like mixers.
* **multiRotatingAxisMotion** model, in which a combination of rotations can be specified. One axis of rotation can itself have another axis of rotation, and so on. This creates the possibility of defining very complex motion pattern for walls, like what we see in Nauta blenders.
* **vibratingMotion** model, in which walls vibrates based on a sinusoidal model with specified frequency and amplitude.
In addition to these models, the user can add other motion models to the code based on their need.
- **Builtin walls** in PhasicFlow that include plane wall, cylinder/cone wall, cuboid, circle.
- **stl wall** that reads the data of the wall from an ASCII stl file.
- **foamPatch wall** that reads the OpenFOAM mesh and converts the boundary patches into PhasicFlow walls (this feature is only available when performing CFD-DEM simulation using OpenFOAM).
Walls can be fixed or in motion during simulations. Various motion models are implemented to cover most of the wall motions in phasicFlow ([see the source code](./../../src/MotionModel/)):
- **stationay** model, in which all walls are fixed. This model is mostly useful for granular flow under gravity or gas-solid flows (CFD-DEM).
- **rotatingAxis** model, in which walls are rotating around an axis of rotation with specified rotation speed. This model covers a wide range of granular flows in which the whole or a part of geometry is rotating, like mixers.
- **multiRotatingAxis** model, in which a combination of rotations can be specified. One axis of rotation can itself have another axis of rotation, and so on. This creates the possibility of defining very complex motion pattern for walls, like what we see in Nauta blenders.
- **vibrating** model, in which walls vibrates based on a sinusoidal model with specified frequency and amplitude.
In addition to these models, the user can add other motion models to the code based on their need.
### 5.2. High precision integeration methods
The precision of integration in a DEM simulation is very important. Since sudden changes in the interaction forces occur during simulations (when objects contact or when they rebound). High precision integration methods makes it possible to accurately track position and velocity of objects (specially when they are in contact). When using these methods, it is possible to choose larger time steps for integration without loosing accuracy and causing instability in the simulation. Although a high-precision integration requires more computations, but the benefits of choosing larger time steps in simulation can totally compensate it.
### High precision integeration methods
The precision of integration in a DEM simulation is very important. Since sudden changes in the interaction forces occur during simulations (when objects contact or when they rebound). High precision integration methods makes it possible to accurately track position and velocity of objects (specially when they are in contact). When using these methods, it is possible to choose larger time steps for integration without loosing accuracy and causing instability in the simulation. Although a high-precision integration requires more computations, but the benefits of choosing larger time steps in simulation can totally compensate it.
Various integration methods are implemented in PhasicFlow:
| Integration Method | Order | Type|
|Integration Method | Order | Type|
| :--- | :---: | :---: |
| AdamsBashforth2 | 2 | one-step |
| AdamsBashforth3 | 3 | one-step |
| AdamsBashforth4 | 4 | one-step |
| AdamsBashforth5 | 5 | one-step |
| AdamsMoulton3 | 3 | predictor-corrector |
| AdamsMoulton4 | 4 | predictor-corrector |
| AdamsMoulton5 | 5 | predictor-corrector |
| AdamsMoulton3 | 3 | predictor-corrector (not active)|
| AdamsMoulton4 | 4 | predictor-corrector (not active)|
| AdamsMoulton5 | 5 | predictor-corrector (not active)|
### 5.3. Contact force models (needs improvement)
### Contact force models
Linear and non-linear visco-elastic contact force models are considered in the simulation. In addition to these, limited and non-limited Coulomb's friction model can be used to account for the friction between objects. For spherical objects, rolling friction can also be specified between bodies in contact.
Linear and non-linear visco-elastic contact force models are considered in the simulation. In addition to these, limited and non-limited Coulomb's friction model can be used to account for the friction between objects. For spherical objects, rolling friction can also be specified between bodies in contact.
In addition, for course-grained particles simulation, we developed a speciall set of***
### Particle insertion
Particles can be inserted during simulation from specified region at specified rate and time interval. Any number of insertion regions can be defined in a simulation. Various region types are considered here: box, cylinder and sphere. Particles are inserted into the simulation through the specified region.
### 5.4. Particle insertion
### restarting/resuming a simulation
It is possible to resume a simulation fron any time-folder that is avaiable in the simulation case setup directory. PhasicFlow restart the simulation from that time folder.
Particles can be inserted during simulation from specified region at specified rate and time interval. Any number of insertion regions can be defined in a simulation. Various region types are considered here: `box`, `cylinder` and `sphere`. Particles are inserted into the simulation through the specified region.
## Postprocessing tools
### 5.5. restarting/resuming a simulation
* **pFlowToVTK** is used to convert simulation results into vtk file format. vtk file format can be read by Paraview for visualizing the results.
* **postprocessPhasicFlow** is a tool for performing various cell-based averaging on the fields.
It is possible to resume a simulation from any time-folder that is available in the simulation case setup directory. PhasicFlow restarts the simulation from that time folder.
### 5.6. Postprocessing data during simulation
PhasicFlow provides a powerful in-simulation postprocessing module that allows users to analyze particle data in real-time while the simulation is running. This feature enables:
- **Real-time data analysis** without waiting for simulation completion
- **Region-based processing** in spheres, along lines, or at specific points
- **Various statistical operations** including weighted averages and sums of particle properties
- **Individual particle tracking** to monitor specific particles throughout simulation
- **Multiple processing methods** including arithmetic mean, uniform distribution, and Gaussian distribution
- **Particle filtering** based on properties like diameter, mass, etc.
- **Flexible time control** options for when postprocessing should be executed
To activate in-simulation postprocessing, users need to:
1. Create a `postprocessDataDict` file in the `settings` directory with appropriate configurations
2. Add `libs ("libPostprocessData.so")` and `auxFunctions postprocessData` to the `settings/settingsDict` file
Results are written to output files in the case directory with timestamps, allowing users to monitor simulation behavior as it progresses without interrupting the simulation. for more information on how to use this feature, please refer to the [PostprocessData](./../../src/PostprocessData/) module.
The same postprocessing module can also be used after simulation completion through the [`postprocessPhasicFlow`](./../../utilities/postprocessPhasicFlow/) utility.

View File

@ -5,5 +5,6 @@
#cmakedefine pFlow_Build_Serial
#cmakedefine pFlow_Build_OpenMP
#cmakedefine pFlow_Build_Cuda
#cmakedefine USE_STD_PARALLEL_ALG
#cmakedefine pFlow_Build_Double
#cmakedefine pFlow_STD_Parallel_Alg
#cmakedefine pFlow_Build_Double
#cmakedefine pFlow_Build_MPI

Some files were not shown because too many files have changed in this diff Show More