Compare commits
536 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b8921ec6ca | |||
| 69d4e6ff02 | |||
| 2e14d14a60 | |||
| 70617eb360 | |||
| c7ee75839b | |||
| 006d9c7cd2 | |||
| 652e7b3f74 | |||
| d1c8707c3e | |||
| 91b84ca607 | |||
| 777a50d8b6 | |||
| c4bb208a6a | |||
| dec9b7f959 | |||
| 93faf28a9f | |||
| 23616877fb | |||
| 4e50b3e06c | |||
| 8b3878de65 | |||
| f946c5765f | |||
| 683fd04828 | |||
| 9650aff318 | |||
| d5fbf402cb | |||
| 1b9f7020ac | |||
| 68d9035225 | |||
| 2230dcaa57 | |||
| 6e23baba7f | |||
| bf0ff235b6 | |||
| e6d12f6790 | |||
| 9a1abb5f19 | |||
| 8df363cf97 | |||
| 5b8072b11a | |||
| 2e2701ccf7 | |||
| 5e7b332dd9 | |||
| adc79029a1 | |||
| ad6a169ffd | |||
| 53d0988a4e | |||
| 165a2b9611 | |||
| 2e4c93f8ee | |||
| 668b85582b | |||
| 6343a6a09c | |||
| 76b90cc3cc | |||
| bce10d17c1 | |||
| dd2e21be64 | |||
| e1116e471b | |||
| 67019b0c0b | |||
| 7ade0c27a7 | |||
| df1bf48938 | |||
| a87ed03b61 | |||
| 9f7c801fbe | |||
| 52eed4b351 | |||
| 8f11235d08 | |||
| 15b7c43839 | |||
| 579264952f | |||
| 116bf952ab | |||
| 1213c90a50 | |||
| b2b3363104 | |||
| 8b6222ba79 | |||
| 8e73260cb4 | |||
| 777a9e06ec | |||
| 4ac84930c5 | |||
| 10fd332943 | |||
| 3dc7b6a150 | |||
| 3f8885c9b7 | |||
| dc3f93f401 | |||
| 5f123bb6a1 | |||
| 123280958b | |||
| 1a98e6eaee | |||
| 807c6e30e7 | |||
| 1b51d5ce21 | |||
| fd6d9164c4 | |||
| ec5ed28885 | |||
| df1be8e004 | |||
| a4bf2fdd42 | |||
| ee06cc84cb | |||
| 2c05e6e65f | |||
| 36d5805d2a | |||
| ab49a51003 | |||
| 5563b9bd9c | |||
| 14f5af4727 | |||
| 1fed0679a9 | |||
| 9bd2fcf326 | |||
| fe24c2c7ed | |||
| 13da1dd890 | |||
| c19b04e6d0 | |||
| e11697a9f2 | |||
| ac4c80e148 | |||
| 232e8a75d0 | |||
| e8f8f4668d | |||
| b2a089a444 | |||
| b9cff039ad | |||
| 9113908429 | |||
| a6875d8a4a | |||
| 1e5bc6ef89 | |||
| d1dc21acb8 | |||
| dc8ca8b520 | |||
| dfece32f5f | |||
| dd54ca1bba | |||
| e265039fed | |||
| b04810f2c5 | |||
| ea71689908 | |||
| 7673564896 | |||
| 2f532af9bb | |||
| 4cbec2cffe | |||
| 2a77e96af0 | |||
| 57a929dce2 | |||
| f0e1cbc94d | |||
| fba3a69243 | |||
| cb18593830 | |||
| 69f93a1e27 | |||
| b764943f04 | |||
| 95e35ef0e6 | |||
| 60e1f0c067 | |||
| b6d0bbf31a | |||
| f932c15b2a | |||
| 7b05d10fbc | |||
| 84c4b2945e | |||
| c3fa5607c6 | |||
| 6fd271c377 | |||
| 98cd5ce09f | |||
| 97fd42e376 | |||
| 8efa366ded | |||
| 307588ccc7 | |||
| a628c856f9 | |||
| 12f942a4b9 | |||
| f2085bd900 | |||
| 80aaf69748 | |||
| 2bee441cea | |||
| 4bfb965da8 | |||
| 0b58fbae71 | |||
| 6439975233 | |||
| 678bb3b2cf | |||
| 27811fc5b6 | |||
| ef509dcb72 | |||
| 956a3a3236 | |||
| 9e478e23a6 | |||
| 6eeb0a4f19 | |||
| 72dda78652 | |||
| 4f17c33b4d | |||
| a285248abd | |||
| 849cede6fa | |||
| c40c4ad6fb | |||
| adcb9031ad | |||
| afe55da77e | |||
| 9ce3eb5d24 | |||
| cccb78b4d3 | |||
| 912580a5c6 | |||
| 4975656a94 | |||
| 59149ac886 | |||
| 872f297dfb | |||
| 0808a61cc2 | |||
| 8862308d82 | |||
| 3030f04be0 | |||
| 9ca32ce5f6 | |||
| aff47d3588 | |||
| a13960131c | |||
| 5b560c726b | |||
| d59b7a7cff | |||
| 43f78101a2 | |||
| 15b3f7016d | |||
| 6e71533e60 | |||
| e17e68abcb | |||
| e3799108fd | |||
| e752445880 | |||
| 5ba7f10a29 | |||
| 246f6f08db | |||
| a800b6c426 | |||
| 201cbe16fc | |||
| 1ff6217ae3 | |||
| 09d546cafd | |||
| be4429f995 | |||
| 49c0bc63d7 | |||
| 0d6ed36cf3 | |||
| f1a448883a | |||
| 4fc0edcfca | |||
| 018d4a2eda | |||
| 00b5f4633d | |||
| 01c1d60822 | |||
| 5b7f59548c | |||
| 591f5445ba | |||
| e1db699f40 | |||
| 27cf909571 | |||
| ac6a1aac43 | |||
| f307a18f12 | |||
| 356c1853cd | |||
| 91858c93aa | |||
| 49dbfaf33a | |||
| 490c0e6efb | |||
| ebcc951df3 | |||
| 1b7b190746 | |||
| 011281d449 | |||
| d5b2422bab | |||
| 2c885c84d1 | |||
| ff8db6374f | |||
| 684eb53001 | |||
| cf0d864c96 | |||
| cd614bf299 | |||
| 308cdf27c4 | |||
| ec60bf8eee | |||
| 4ce5838238 | |||
| 4c7b7c7f4e | |||
| 61f633e3b2 | |||
| b49a013474 | |||
| 30a057a87c | |||
| 09d567e963 | |||
| 5062acea1f | |||
| d30f828fe5 | |||
| 0a2f1c793a | |||
| 5f05e074d1 | |||
| 85b7e448c9 | |||
| 37c653945a | |||
| 8bb99ae9ce | |||
| 1265463275 | |||
| 3ad42f2326 | |||
| 44d9b77f07 | |||
| 9b3ed8eda6 | |||
| 4b31e2f36f | |||
| cdc38e7323 | |||
| 618992c2cb | |||
| ea88de9808 | |||
| 270475cd17 | |||
| 403a79d1ac | |||
| 02e80d4406 | |||
| a8796c85da | |||
| da9dd28ee9 | |||
| 6a09f6ce9a | |||
| 41191dff77 | |||
| a8dc59cd7a | |||
| 50885dba56 | |||
| 57b8abfbda | |||
| 34a4282a1e | |||
| 45e11369df | |||
| 0ca7b3a75c | |||
| 57e19765e0 | |||
| 32870ea73f | |||
| 3ba3e19563 | |||
| 4f7c2cbbab | |||
| 5b8749336f | |||
| cc8d3d7272 | |||
| 527d140b00 | |||
| 3a80605540 | |||
| b552c888ba | |||
| 740d366e59 | |||
| 9fc8e046df | |||
| 7abdad8394 | |||
| b94f0f4d28 | |||
| bd8ec597f6 | |||
| d99019ee73 | |||
| 0a6fc10fbc | |||
| 29ec96de52 | |||
| 561bdbc029 | |||
| dada2f98fb | |||
| 39342e4631 | |||
| d9441091f5 | |||
| 9f45e97632 | |||
| 9a98108b02 | |||
| 7b846237ec | |||
| 585dc68ff5 | |||
| 76fd1f1e02 | |||
| 18c2a950a3 | |||
| c4fc6d9229 | |||
| fcd57a17f5 | |||
| 2da9631f20 | |||
| 1be85551c1 | |||
| 057b94ae89 | |||
| 4608b8f228 | |||
| a70c21a77d | |||
| c44bb87ea4 | |||
| ca1263b6a6 | |||
| 8d495580ed | |||
| 686cc4122c | |||
| fc01f7a409 | |||
| a6a2c0bd41 | |||
| 4dd26fa5af | |||
| c9c0e49a0f | |||
| 9aba825507 | |||
| f814cece09 | |||
| 59eb7962f4 | |||
| 7ef2dc93a3 | |||
| 884d99fbb4 | |||
| 3791e818f9 | |||
| a986592e0a | |||
| a731d14e72 | |||
| d4ccd008ba | |||
| d321fb5a2f | |||
| 712b5b9617 | |||
| bdd8244e82 | |||
| 001225b5e4 | |||
| 8eb000e27b | |||
| 8cbaa515e4 | |||
| 6777c7b7dd | |||
| 920d6468d8 | |||
| 8b7e48ac36 | |||
| d8689ee78d | |||
| 32331ab366 | |||
| 5458e4b7d5 | |||
| 0530e6eed8 | |||
| 9e9ca2f0a4 | |||
| ac29491c96 | |||
| b149954ec5 | |||
| 11b8b27bae | |||
| 3071b8a26e | |||
| f2974ddc0c | |||
| 7391e297c6 | |||
| 3314125aab | |||
| 81550e5d46 | |||
| 574ffd3932 | |||
| 949fe61957 | |||
| e2ab9fb68d | |||
| 90cc4d789f | |||
| 4c5ec2e420 | |||
| e9783bb370 | |||
| 41584c876d | |||
| bb3f463352 | |||
| a86e7ee06d | |||
| d28ecb867d | |||
| 1000e08080 | |||
| 3c166d62ea | |||
| 12043fdc30 | |||
| 44ee6fd38d | |||
| 9fc0c932d9 | |||
| 1447d847cf | |||
| 0b120395d3 | |||
| cc4dcedd4c | |||
| 7e6aefc052 | |||
| 8bfe2901b8 | |||
| fff5d45e4c | |||
| 4cb96a17c4 | |||
| 43f0574a72 | |||
| 221cc19233 | |||
| 7242c84635 | |||
| 0a818fa98c | |||
| c0daf66680 | |||
| e2a2cdc6ac | |||
| 6675ec3868 | |||
| e6f51210c4 | |||
| 46111bb4cb | |||
| 9a596eb4d2 | |||
| 434e3983f6 | |||
| 9fc7dcf4f2 | |||
| 8a97305e85 | |||
| 2ec3a3efe7 | |||
| 993af3bea9 | |||
| 892afa5105 | |||
| 7e900b2bbc | |||
| c41e2966d5 | |||
| bd4a11de47 | |||
| eaa75ad0b3 | |||
| 0c66e15979 | |||
| 6c07ee75c0 | |||
| 47772ea9d4 | |||
| e255c3c28e | |||
| 4c5d63e966 | |||
| 46ca306ada | |||
| 077e0ff8aa | |||
| fd3a6362bf | |||
| 7161d6f15f | |||
| e2343661bb | |||
| d387a2117f | |||
| ededde9190 | |||
| 851deae90b | |||
| 6ad466dcea | |||
| f5c277b1c7 | |||
| 87536c03fd | |||
| 5246a1ec66 | |||
| e5dfd4b4eb | |||
| 1f0efcae7f | |||
| 78918f8831 | |||
| 11632e0539 | |||
| 3ee0bf41de | |||
| 3ca84c7dea | |||
| d697c7afe0 | |||
| 981a8390c6 | |||
| d786f9680f | |||
| 3c1e7ca6a5 | |||
| 142d87252b | |||
| 81b8c9cdad | |||
| d3a0036acf | |||
| 29cc6d9d74 | |||
| 343d1cba5b | |||
| 8566c7eaa4 | |||
| acf0673e38 | |||
| c60bf9bf80 | |||
| f4501938ff | |||
| 69d18478fd | |||
| a1d8c61241 | |||
| 0f0ca849f6 | |||
| 4c2d7531d4 | |||
| 3fbfa12318 | |||
| 3bb89106cd | |||
| 8b2292482f | |||
| c5e4f287dd | |||
| 84aa47ff72 | |||
| 99ea452db5 | |||
| 667e806224 | |||
| 1307a0ef22 | |||
| 0a8baeeeb3 | |||
| 54f00c6e53 | |||
| 5fcf7a7091 | |||
| 2e72cfa774 | |||
| 3d1bd01bc4 | |||
| ea0d7b0351 | |||
| 59adfbe6ac | |||
| ee44d40c0e | |||
| 57d121a073 | |||
| fd44270f96 | |||
| 88743b79fd | |||
| 7fa304d58b | |||
| b4949ebd52 | |||
| fb3e8011d1 | |||
| 6d8e15561a | |||
| 30ad85f165 | |||
| 8f38e3323c | |||
| 5472fe1365 | |||
| add7ade558 | |||
| e1f10f705f | |||
| 270d1a9c51 | |||
| 6b9b8c123e | |||
| 610cf500d3 | |||
| ded954c64b | |||
| c1f45f8477 | |||
| ddb19070c5 | |||
| f3e1d1428b | |||
| aaaec21646 | |||
| dfea70fa96 | |||
| 81282bbbc6 | |||
| 4426ba4085 | |||
| c490123018 | |||
| 7d43b2a63e | |||
| 87c12986cd | |||
| cabf5a36f9 | |||
| 48f4f7508b | |||
| c562f96f4a | |||
| 011ab2d3e2 | |||
| fe05da2f16 | |||
| 1c3d9b093c | |||
| a349923c3a | |||
| 409283acc3 | |||
| eb6d45dd7b | |||
| a8c8955d53 | |||
| 43f460dc93 | |||
| b4de650ed5 | |||
| 8fb60fd045 | |||
| 80030014a2 | |||
| 791bf252aa | |||
| b16fb689e1 | |||
| 9e5a37168b | |||
| a2202729bc | |||
| bfafc1ec3b | |||
| 527be9e524 | |||
| affb9e9720 | |||
| ff02919c99 | |||
| 83f8c89120 | |||
| e746c83f7d | |||
| 70e274eb6c | |||
| bcf54bf223 | |||
| f035592c8e | |||
| 275bbed043 | |||
| 6bb5e40c45 | |||
| 5546d49a3f | |||
| b0c9a14b8d | |||
| 8409a90179 | |||
| 11fb74ce69 | |||
| 857f4499ca | |||
| db33ebfef4 | |||
| b20ea25fd4 | |||
| cd4b4be8a2 | |||
| 32d614e017 | |||
| 867a60c965 | |||
| 9e5549b609 | |||
| 3a1f1c1d9b | |||
| 3fa5a83898 | |||
| b969132b10 | |||
| 892ba4fef1 | |||
| dbec0a7a2c | |||
| 3bba346156 | |||
| b9bc51fca2 | |||
| cd1657e412 | |||
| 1d04b8c164 | |||
| 3b2dedf0fd | |||
| a36d316891 | |||
| 32ff1d83af | |||
| b378a79102 | |||
| 444b6f763e | |||
| 6888d13c52 | |||
| 9ad186dabc | |||
| 6e48baf6bc | |||
| 21fbdc17fc | |||
| 92dbaab2c4 | |||
| a26009c9b7 | |||
| 910adb37d0 | |||
| cf56709426 | |||
| 02ad97b3ed | |||
| 27fbdf50f3 | |||
| e3e93ccfd4 | |||
| 0460c28694 | |||
| db5984d24a | |||
| d794e8cac0 | |||
| 6bae5b44d6 | |||
| 6d9b556231 | |||
| e8514b10bc | |||
| ef9d5ebff9 | |||
| 628368e97b | |||
| d3af4fd13a | |||
| 2df88af289 | |||
| b20860e826 | |||
| 09aa5c1efc | |||
| e9e45a2815 | |||
| 65b9902d8f | |||
| d23a5d4972 | |||
| b6550307f4 | |||
| f891594815 | |||
| 2950eeed6f | |||
| f20357eff5 | |||
| c09782151b | |||
| e1862dbbde | |||
| 89fa69ab8d | |||
| 46601ef6be | |||
| 22e1d9d1cc | |||
| 286b03e644 | |||
| 779dc76694 | |||
| 806e505ae3 | |||
| 2eb3439691 | |||
| eafb8c413f | |||
| 2558225dc1 | |||
| ff6189d1ad | |||
| 9f07eafcda | |||
| 2a4845872c | |||
| 586cbb4b88 | |||
| fa70af51b5 | |||
| ee26baa5bb | |||
| 099d914425 | |||
| ee7034701b | |||
| 9c78ca97f7 | |||
| c3bfe130c6 | |||
| 5c9178ce4d | |||
| 64019057ee | |||
| fe57fac365 | |||
| bc7361faf4 |
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
*.dep
|
||||
log_*
|
||||
log.*
|
||||
*~
|
||||
**/linux64GccDPInt32Opt
|
||||
33
README
33
README
@ -5,7 +5,8 @@
|
||||
www.cfdem.com
|
||||
Christoph Goniva, christoph.goniva@cfdem.com
|
||||
Copyright 2009-2012 JKU Linz
|
||||
Copyright 2012- DCS Computing GmbH, Linz
|
||||
Copyright 2012-2015 DCS Computing GmbH, Linz
|
||||
Copyright 2015- JKU Linz
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of CFDEMcoupling.
|
||||
@ -25,16 +26,17 @@ License
|
||||
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
Description
|
||||
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
|
||||
and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER).
|
||||
This code provides models and solvers to realize coupled CFD-DEM simulations
|
||||
using LIGGGHTS and OpenFOAM.
|
||||
Note: this code is not part of OpenFOAM (see DISCLAIMER).
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
CFDEM coupling provides an open source parallel coupled CFD-DEM framework
|
||||
combining the strengths of LIGGGHTS DEM code and the Open Source
|
||||
CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand
|
||||
CFDEM(R) coupling provides an open source parallel coupled CFD-DEM framework
|
||||
combining the strengths of the LIGGGHTS(R) DEM code and the Open Source
|
||||
CFD package OpenFOAM(R)(*). The CFDEM(R)coupling toolbox allows to expand
|
||||
standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM
|
||||
code LIGGGHTS. In this toolbox the particle representation within the
|
||||
code LIGGGHTS(R). In this toolbox the particle representation within the
|
||||
CFD solver is organized by "cloud" classes. Key functionalities are organised
|
||||
in sub-models (e.g. force models, data exchange models, etc.) which can easily
|
||||
be selected and combined by dictionary settings.
|
||||
@ -45,8 +47,6 @@ Features are:
|
||||
|
||||
- its modular approach allows users to easily implement new models
|
||||
- its MPI parallelization enables to use it for large scale problems
|
||||
- the "forum"_lws on CFD-DEM gives the possibility to exchange with other
|
||||
users / developers
|
||||
- the use of GIT allows to easily update to the latest version
|
||||
- basic documentation is provided
|
||||
|
||||
@ -54,7 +54,7 @@ The file structure:
|
||||
|
||||
- "src" directory including the source files of the coupling toolbox and models
|
||||
- "applications" directory including the solver files for coupled CFD-DEM simulations
|
||||
- "doc" directory including the documentation of CFDEMcoupling
|
||||
- "doc" directory including the documentation of CFDEM(R)coupling
|
||||
- "tutorials" directory including basic tutorial cases showing the functionality
|
||||
|
||||
|
||||
@ -64,18 +64,17 @@ Details on installation are given on the "www.cfdem.com"
|
||||
The functionality of this CFD-DEM framwork is described via "tutorial cases" showing
|
||||
how to use different solvers and models.
|
||||
|
||||
CFDEMcoupling stands for Computational Fluid Dynamics (CFD) -
|
||||
CFDEM(R)coupling stands for Computational Fluid Dynamics (CFD) -
|
||||
Discrete Element Method (DEM) coupling.
|
||||
|
||||
CFDEMcoupling is an open-source code, distributed freely under the terms of the
|
||||
CFDEM(R)coupling is an open-source code, distributed freely under the terms of the
|
||||
GNU Public License (GPL).
|
||||
|
||||
Core development of CFDEMcoupling is done by
|
||||
Core development of CFDEM(R)coupling is done by
|
||||
Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
|
||||
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group.
|
||||
This offering is not affiliated, approved or endorsed by ESI Group,
|
||||
the producer of the OpenFOAM® software and owner of the OpenFOAM® trade mark.
|
||||
/*---------------------------------------------------------------------------*\
|
||||
(*) "OpenFOAM(R)" is a registered trade mark of OpenCFD Limited, a wholly owned subsidiary of the ESI Group.
|
||||
This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
7
applications/.gitignore
vendored
Normal file
7
applications/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
*.dep
|
||||
log_*
|
||||
log.*
|
||||
*~
|
||||
@ -1,10 +1,14 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
|
||||
-I$(LIB_SRC)/dynamicMesh/lnInclude \
|
||||
@ -13,12 +17,16 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/fvOptions/lnInclude
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-ldynamicFvMesh \
|
||||
-ldynamicMesh \
|
||||
-lfvOptions \
|
||||
-l$(CFDEM_LIB_NAME)
|
||||
-l$(CFDEM_LIB_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
|
||||
|
||||
@ -39,7 +39,8 @@ Contributions
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pisoControl.H"
|
||||
|
||||
#include "cfdemCloudIB.H"
|
||||
#include "implicitCouple.H"
|
||||
@ -52,11 +53,6 @@ Contributions
|
||||
|
||||
#include "cellSet.H"
|
||||
|
||||
#if defined(version22)
|
||||
#include "meshToMeshNew.H"
|
||||
#include "fvIOoptionList.H"
|
||||
#endif
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
@ -67,14 +63,14 @@ int main(int argc, char *argv[])
|
||||
|
||||
#include "createDynamicFvMesh.H"
|
||||
|
||||
#include "createControl.H"
|
||||
|
||||
#include "createTimeControls.H"
|
||||
|
||||
#include "createFields.H"
|
||||
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
#if defined(version22)
|
||||
#include "createFvOptions.H"
|
||||
#endif
|
||||
|
||||
// create cfdemCloud
|
||||
#include "readGravitationalAcceleration.H"
|
||||
cfdemCloudIB particleCloud(mesh);
|
||||
@ -91,8 +87,9 @@ int main(int argc, char *argv[])
|
||||
interFace = mag(mesh.lookupObject<volScalarField>("voidfractionNext"));
|
||||
mesh.update(); //dyM
|
||||
|
||||
#include "readPISOControls.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
// do particle stuff
|
||||
Info << "- evolve()" << endl;
|
||||
@ -107,43 +104,29 @@ int main(int argc, char *argv[])
|
||||
fvm::ddt(voidfraction,U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
#if defined(version22)
|
||||
==
|
||||
fvOptions(U)
|
||||
#endif
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
#if defined(version22)
|
||||
fvOptions.constrain(UEqn);
|
||||
#endif
|
||||
|
||||
if (momentumPredictor)
|
||||
if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p));
|
||||
}
|
||||
|
||||
// --- PISO loop
|
||||
for (int corr=0; corr<nCorr; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
surfaceScalarField rUAf(fvc::interpolate(rUA));
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
#ifdef version23
|
||||
phi = (fvc::interpolate(U) & mesh.Sf()); // there is a new version in 23x
|
||||
#else
|
||||
|
||||
phi = (fvc::interpolate(U) & mesh.Sf())
|
||||
+ fvc::ddtPhiCorr(rUA, U, phi);
|
||||
#endif
|
||||
+ rUAf*fvc::ddtCorr(U, phi);
|
||||
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
#if defined(version22)
|
||||
fvOptions.relativeFlux(phi);
|
||||
#endif
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
|
||||
@ -154,20 +137,9 @@ int main(int argc, char *argv[])
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
if
|
||||
(
|
||||
corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
@ -186,10 +158,6 @@ int main(int argc, char *argv[])
|
||||
volScalarField voidfractionNext=mesh.lookupObject<volScalarField>("voidfractionNext");
|
||||
particleCloud.calcVelocityCorrection(p,U,phiIB,voidfractionNext);
|
||||
|
||||
#if defined(version22)
|
||||
fvOptions.correct(U);
|
||||
#endif
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
|
||||
@ -1,15 +1,23 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-l$(CFDEM_LIB_NAME)
|
||||
-lmeshTools \
|
||||
-l$(CFDEM_LIB_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
|
||||
23
applications/solvers/cfdemSolverPiso/UEqn.H
Normal file
23
applications/solvers/cfdemSolverPiso/UEqn.H
Normal file
@ -0,0 +1,23 @@
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,U) - fvm::Sp(fvc::ddt(voidfraction),U)
|
||||
+ fvm::div(phi,U) - fvm::Sp(fvc::div(phi),U)
|
||||
+ particleCloud.divVoidfractionTau(U, voidfraction)
|
||||
==
|
||||
- fvm::Sp(Ksl/rho,U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (piso.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
|
||||
{
|
||||
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
else if (piso.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
|
||||
fvOptions.correct(U);
|
||||
}
|
||||
@ -36,12 +36,15 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pisoControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "cfdemCloud.H"
|
||||
#include "implicitCouple.H"
|
||||
#include "clockModel.H"
|
||||
#include "smoothingModel.H"
|
||||
#include "forceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -50,7 +53,9 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// create cfdemCloud
|
||||
@ -59,26 +64,35 @@ int main(int argc, char *argv[])
|
||||
#include "checkModelType.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readPISOControls.H"
|
||||
#include "CourantNo.H"
|
||||
|
||||
// do particle stuff
|
||||
particleCloud.clockM().start(2,"Coupling");
|
||||
particleCloud.evolve(voidfraction,Us,U);
|
||||
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
|
||||
|
||||
if(hasEvolved)
|
||||
{
|
||||
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
|
||||
}
|
||||
|
||||
Info << "update Ksl.internalField()" << endl;
|
||||
Ksl = particleCloud.momCoupleM(0).impMomSource();
|
||||
particleCloud.smoothingM().smoothen(Ksl);
|
||||
Ksl.correctBoundaryConditions();
|
||||
|
||||
//Force Checks
|
||||
vector fTotal(0,0,0);
|
||||
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
|
||||
reduce(fImpTotal, sumOp<vector>());
|
||||
Info << "TotalForceExp: " << fTotal << endl;
|
||||
Info << "TotalForceImp: " << fImpTotal << endl;
|
||||
|
||||
#include "solverDebugInfo.H"
|
||||
particleCloud.clockM().stop("Coupling");
|
||||
|
||||
@ -89,92 +103,19 @@ int main(int argc, char *argv[])
|
||||
// Pressure-velocity PISO corrector
|
||||
{
|
||||
// Momentum predictor
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,U) + fvm::Sp(fvc::ddt(voidfraction),U)
|
||||
+ fvm::div(phi,U) + fvm::Sp(fvc::div(phi),U)
|
||||
// + turbulence->divDevReff(U)
|
||||
+ particleCloud.divVoidfractionTau(U, voidfraction)
|
||||
==
|
||||
- fvm::Sp(Ksl/rho,U)
|
||||
);
|
||||
|
||||
if (modelType=="B")
|
||||
UEqn == - fvc::grad(p) + Ksl/rho*Us;
|
||||
else
|
||||
UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us;
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
solve(UEqn);
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
//for (int corr=0; corr<nCorr; corr++)
|
||||
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
|
||||
|
||||
for (int corr=0; corr<nCorrSoph; corr++)
|
||||
while (piso.correct())
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
|
||||
surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
|
||||
volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction);
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
phi = (fvc::interpolate(U*voidfraction) & mesh.Sf() );
|
||||
//+ fvc::ddtPhiCorr(rUAvoidfraction, U, phi);
|
||||
surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf());
|
||||
surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS);
|
||||
|
||||
if (modelType=="A")
|
||||
rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
|
||||
);
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
if
|
||||
(
|
||||
corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phiGes -= pEqn.flux();
|
||||
}
|
||||
|
||||
} // end non-orthogonal corrector loop
|
||||
|
||||
#include "continuityErrorPhiPU.H"
|
||||
|
||||
if (modelType=="B")
|
||||
U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
else
|
||||
U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
} // end piso loop
|
||||
#include "pEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
laminarTransport.correct();
|
||||
turbulence->correct();
|
||||
}// end solveFlow
|
||||
}
|
||||
else
|
||||
{
|
||||
Info << "skipping flow solution." << endl;
|
||||
@ -191,7 +132,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -122,3 +122,5 @@ surfaceScalarField phi
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
58
applications/solvers/cfdemSolverPiso/pEqn.H
Normal file
58
applications/solvers/cfdemSolverPiso/pEqn.H
Normal file
@ -0,0 +1,58 @@
|
||||
volScalarField rAU = 1.0/UEqn.A();
|
||||
|
||||
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
|
||||
|
||||
volScalarField rAUvoidfraction("(voidfraction2|A(U))",rAU*voidfraction);
|
||||
|
||||
if (modelType=="A")
|
||||
rAUvoidfraction *= voidfraction;
|
||||
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
|
||||
surfaceScalarField phiHbyA("phiHbyA", fvc::interpolate(voidfraction)*fvc::flux(HbyA) );
|
||||
|
||||
volVectorField Uvoidfraction("(Uvoidfraction)", U * voidfraction);
|
||||
|
||||
surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf());
|
||||
|
||||
phi = phiHbyA + rAUf*(fvc::interpolate(Ksl/rho) * phiS);
|
||||
|
||||
// rotating frames of references not tested yet
|
||||
MRF.makeRelative(phi);
|
||||
|
||||
// adjustment of phi (only in cases w.o. p boundary conditions) not tested yet
|
||||
adjustPhi(phi, U, p);
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, Uvoidfraction, phiHbyA, rAUvoidfraction, MRF);
|
||||
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
while (piso.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rAUvoidfraction, p) == fvc::div(phi) + particleCloud.ddtVoidfraction()
|
||||
);
|
||||
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(piso.finalInnerIter())));
|
||||
|
||||
if (piso.finalNonOrthogonalIter())
|
||||
{
|
||||
phi -= pEqn.flux();
|
||||
}
|
||||
}
|
||||
|
||||
#include "continuityErrorPhiPU.H"
|
||||
|
||||
if (modelType=="B" || modelType=="Bfull")
|
||||
U = HbyA - rAU*fvc::grad(p) + Ksl/rho*Us*rAU;
|
||||
else
|
||||
U = HbyA - voidfraction*rAU*fvc::grad(p) + Ksl/rho*Us*rAU;
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
@ -1,16 +1,24 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
EXE_INC = \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
|
||||
-I ../cfdemSolverPiso \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I../cfdemSolverPiso \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-l$(CFDEM_LIB_NAME)
|
||||
-lmeshTools \
|
||||
-l$(CFDEM_LIB_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
|
||||
@ -25,23 +25,26 @@ License
|
||||
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Application
|
||||
cfdemSolverPisoMS
|
||||
cfdemSolverPiso
|
||||
|
||||
Description
|
||||
Transient solver for incompressible flow.
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
|
||||
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
|
||||
where additional functionality for CFD-DEM coupling is added.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pisoControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "cfdemCloudMS.H"
|
||||
#include "implicitCouple.H"
|
||||
#include "clockModel.H"
|
||||
#include "smoothingModel.H"
|
||||
#include "forceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
@ -50,7 +53,9 @@ int main(int argc, char *argv[])
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// create cfdemCloud
|
||||
@ -59,118 +64,62 @@ int main(int argc, char *argv[])
|
||||
#include "checkModelType.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
while (runTime.loop())
|
||||
{
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readPISOControls.H"
|
||||
#include "CourantNo.H"
|
||||
|
||||
// do particle stuff
|
||||
particleCloud.clockM().start(2,"Coupling");
|
||||
particleCloud.evolve(voidfraction,Us,U);
|
||||
|
||||
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
|
||||
|
||||
if(hasEvolved)
|
||||
{
|
||||
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
|
||||
}
|
||||
|
||||
Info << "update Ksl.internalField()" << endl;
|
||||
Ksl = particleCloud.momCoupleM(0).impMomSource();
|
||||
particleCloud.smoothingM().smoothen(Ksl);
|
||||
Ksl.correctBoundaryConditions();
|
||||
|
||||
//Force Checks
|
||||
vector fTotal(0,0,0);
|
||||
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
|
||||
reduce(fImpTotal, sumOp<vector>());
|
||||
Info << "TotalForceExp: " << fTotal << endl;
|
||||
Info << "TotalForceImp: " << fImpTotal << endl;
|
||||
|
||||
#include "solverDebugInfo.H"
|
||||
particleCloud.clockM().stop("Coupling");
|
||||
|
||||
particleCloud.clockM().start(26,"Flow");
|
||||
// Pressure-velocity PISO corrector
|
||||
|
||||
if(particleCloud.solveFlow())
|
||||
{
|
||||
// Momentum predictor
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,U) //particleCloud.ddtVoidfractionU(U,voidfraction) //
|
||||
+ fvm::div(phi, U)
|
||||
// + turbulence->divDevReff(U)
|
||||
+ particleCloud.divVoidfractionTau(U, voidfraction)
|
||||
==
|
||||
- fvm::Sp(Ksl/rho,U)
|
||||
);
|
||||
|
||||
if (modelType=="B")
|
||||
UEqn == - fvc::grad(p) + Ksl/rho*Us;
|
||||
else
|
||||
UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us;
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
solve(UEqn);
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
//for (int corr=0; corr<nCorr; corr++)
|
||||
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
|
||||
|
||||
for (int corr=0; corr<nCorrSoph; corr++)
|
||||
// Pressure-velocity PISO corrector
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
// Momentum predictor
|
||||
#include "UEqn.H"
|
||||
|
||||
surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
|
||||
volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction);
|
||||
// --- PISO loop
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
phi = (fvc::interpolate(U*voidfraction) & mesh.Sf() );
|
||||
//+ fvc::ddtPhiCorr(rUAvoidfraction, U, phi);
|
||||
surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf());
|
||||
surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS);
|
||||
|
||||
if (modelType=="A")
|
||||
rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
while (piso.correct())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
|
||||
);
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
#include "pEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
if
|
||||
(
|
||||
corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phiGes -= pEqn.flux();
|
||||
}
|
||||
|
||||
} // end non-orthogonal corrector loop
|
||||
|
||||
#include "continuityErrorPhiPU.H"
|
||||
|
||||
if (modelType=="B")
|
||||
U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
else
|
||||
U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
} // end piso loop
|
||||
laminarTransport.correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info << "skipping flow solution." << endl;
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
@ -183,7 +132,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -1,15 +1,24 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I../cfdemSolverPiso \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-l$(CFDEM_LIB_NAME)
|
||||
-lmeshTools \
|
||||
-l$(CFDEM_LIB_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
|
||||
15
applications/solvers/cfdemSolverPisoScalar/TEqn.H
Normal file
15
applications/solvers/cfdemSolverPisoScalar/TEqn.H
Normal file
@ -0,0 +1,15 @@
|
||||
// get scalar source from DEM
|
||||
particleCloud.forceM(1).manipulateScalarField(Tsource);
|
||||
Tsource.correctBoundaryConditions();
|
||||
|
||||
// solve scalar transport equation
|
||||
fvScalarMatrix TEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,T) - fvm::Sp(fvc::ddt(voidfraction),T)
|
||||
+ fvm::div(phi, T) - fvm::Sp(fvc::div(phi),T)
|
||||
- fvm::laplacian(DT*voidfraction, T)
|
||||
==
|
||||
Tsource
|
||||
);
|
||||
TEqn.relax();
|
||||
TEqn.solve();
|
||||
@ -30,169 +30,107 @@ Application
|
||||
Description
|
||||
Transient solver for incompressible flow.
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
|
||||
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
|
||||
where additional functionality for CFD-DEM coupling is added.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
#include "pisoControl.H"
|
||||
#include "fvOptions.H"
|
||||
|
||||
#include "cfdemCloud.H"
|
||||
#include "implicitCouple.H"
|
||||
#include "forceModel.H"
|
||||
#include "clockModel.H"
|
||||
#include "smoothingModel.H"
|
||||
#include "forceModel.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "setRootCase.H"
|
||||
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createFields.H"
|
||||
|
||||
#include "createFvOptions.H"
|
||||
#include "initContinuityErrs.H"
|
||||
|
||||
// create cfdemCloud
|
||||
#include "readGravitationalAcceleration.H"
|
||||
cfdemCloud particleCloud(mesh);
|
||||
|
||||
#include "checkModelType.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.loop())
|
||||
{
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
#include "readPISOControls.H"
|
||||
#include "CourantNo.H"
|
||||
|
||||
// do particle stuff
|
||||
Info << "- evolve()" << endl;
|
||||
particleCloud.evolve(voidfraction,Us,U);
|
||||
particleCloud.clockM().start(2,"Coupling");
|
||||
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
|
||||
|
||||
Ksl.internalField() = particleCloud.momCoupleM(0).impMomSource();
|
||||
particleCloud.smoothingM().smoothen(Ksl);
|
||||
if(hasEvolved)
|
||||
{
|
||||
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
|
||||
}
|
||||
|
||||
Info << "update Ksl.internalField()" << endl;
|
||||
Ksl = particleCloud.momCoupleM(0).impMomSource();
|
||||
Ksl.correctBoundaryConditions();
|
||||
|
||||
//Force Checks
|
||||
vector fTotal(0,0,0);
|
||||
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField())).value();
|
||||
reduce(fImpTotal, sumOp<vector>());
|
||||
Info << "TotalForceExp: " << fTotal << endl;
|
||||
Info << "TotalForceImp: " << fImpTotal << endl;
|
||||
|
||||
#include "solverDebugInfo.H"
|
||||
particleCloud.clockM().stop("Coupling");
|
||||
|
||||
// get scalar source from DEM
|
||||
particleCloud.forceM(1).manipulateScalarField(Tsource);
|
||||
Tsource.correctBoundaryConditions();
|
||||
particleCloud.clockM().start(26,"Flow");
|
||||
|
||||
#include "TEqn.H"
|
||||
|
||||
// solve scalar transport equation
|
||||
phi = fvc::interpolate(U*voidfraction) & mesh.Sf();
|
||||
|
||||
solve
|
||||
(
|
||||
fvm::ddt(voidfraction,T)
|
||||
+ fvm::div(phi, T)
|
||||
- fvm::laplacian(DT*voidfraction, T)
|
||||
==
|
||||
Tsource
|
||||
);
|
||||
|
||||
// Pressure-velocity PISO corrector
|
||||
if(particleCloud.solveFlow())
|
||||
{
|
||||
// Momentum predictor
|
||||
fvVectorMatrix UEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,U)
|
||||
+ fvm::div(phi, U)
|
||||
+ turbulence->divDevReff(U)
|
||||
==
|
||||
- fvm::Sp(Ksl/rho,U)
|
||||
);
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
if (momentumPredictor)
|
||||
// Pressure-velocity PISO corrector
|
||||
{
|
||||
//solve UEqn
|
||||
if (modelType=="B")
|
||||
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
|
||||
else
|
||||
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
|
||||
// Momentum predictor
|
||||
#include "UEqn.H"
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
while (piso.correct())
|
||||
{
|
||||
#include "pEqn.H"
|
||||
}
|
||||
}
|
||||
|
||||
// --- PISO loop
|
||||
|
||||
//for (int corr=0; corr<nCorr; corr++)
|
||||
int nCorrSoph = nCorr + 5 * pow((1-particleCloud.dataExchangeM().timeStepFraction()),1);
|
||||
for (int corr=0; corr<nCorrSoph; corr++)
|
||||
{
|
||||
volScalarField rUA = 1.0/UEqn.A();
|
||||
surfaceScalarField rUAf("(1|A(U))", fvc::interpolate(rUA));
|
||||
volScalarField rUAvoidfraction("(voidfraction2|A(U))",rUA*voidfraction);
|
||||
|
||||
U = rUA*UEqn.H();
|
||||
|
||||
#ifdef version23
|
||||
phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() );
|
||||
#else
|
||||
phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() )
|
||||
+ fvc::ddtPhiCorr(rUAvoidfraction, U, phi);
|
||||
#endif
|
||||
surfaceScalarField phiS(fvc::interpolate(Us*voidfraction) & mesh.Sf());
|
||||
surfaceScalarField phiGes = phi + rUAf*(fvc::interpolate(Ksl/rho) * phiS);
|
||||
if (modelType=="A")
|
||||
rUAvoidfraction = volScalarField("(voidfraction2|A(U))",rUA*voidfraction*voidfraction);
|
||||
|
||||
// Non-orthogonal pressure corrector loop
|
||||
for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
|
||||
);
|
||||
pEqn.setReference(pRefCell, pRefValue);
|
||||
|
||||
if
|
||||
(
|
||||
corr == nCorr-1
|
||||
&& nonOrth == nNonOrthCorr
|
||||
)
|
||||
{
|
||||
pEqn.solve(mesh.solver("pFinal"));
|
||||
}
|
||||
else
|
||||
{
|
||||
pEqn.solve();
|
||||
}
|
||||
|
||||
if (nonOrth == nNonOrthCorr)
|
||||
{
|
||||
phiGes -= pEqn.flux();
|
||||
}
|
||||
|
||||
} // end non-orthogonal corrector loop
|
||||
|
||||
#include "continuityErrorPhiPU.H"
|
||||
|
||||
if (modelType=="B")
|
||||
U -= rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
else
|
||||
U -= voidfraction*rUA*fvc::grad(p) - Ksl/rho*Us*rUA;
|
||||
|
||||
U.correctBoundaryConditions();
|
||||
|
||||
} // end piso loop
|
||||
laminarTransport.correct();
|
||||
turbulence->correct();
|
||||
}
|
||||
else
|
||||
{
|
||||
Info << "skipping flow solution." << endl;
|
||||
}
|
||||
|
||||
turbulence->correct();
|
||||
|
||||
runTime.write();
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
particleCloud.clockM().stop("Flow");
|
||||
particleCloud.clockM().stop("Global");
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -1,36 +1,36 @@
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading physical velocity field U" << endl;
|
||||
Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
//========================
|
||||
// drag law modelling
|
||||
//========================
|
||||
|
||||
Info<< "Reading field p\n" << endl;
|
||||
volScalarField p
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"p",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "Reading physical velocity field U" << endl;
|
||||
Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
//========================
|
||||
// drag law modelling
|
||||
//========================
|
||||
|
||||
Info<< "\nReading momentum exchange field Ksl\n" << endl;
|
||||
volScalarField Ksl
|
||||
(
|
||||
@ -44,8 +44,8 @@
|
||||
),
|
||||
mesh
|
||||
//dimensionedScalar("0", dimensionSet(0, 0, -1, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
|
||||
volScalarField voidfraction
|
||||
(
|
||||
@ -58,8 +58,8 @@
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
Info<< "\nCreating density field rho\n" << endl;
|
||||
volScalarField rho
|
||||
(
|
||||
@ -71,27 +71,27 @@
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
mesh,
|
||||
dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
Info<< "Reading particle velocity field Us\n" << endl;
|
||||
volVectorField Us
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Us",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
//========================
|
||||
// scalar field modelling
|
||||
//========================
|
||||
);
|
||||
|
||||
Info<< "Reading particle velocity field Us\n" << endl;
|
||||
volVectorField Us
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Us",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
//========================
|
||||
// scalar field modelling
|
||||
//========================
|
||||
Info<< "\nCreating dummy density field rho = 1\n" << endl;
|
||||
volScalarField T
|
||||
(
|
||||
@ -103,10 +103,10 @@
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh//,
|
||||
mesh//,
|
||||
//dimensionedScalar("0", dimensionSet(0, 0, -1, 1, 0), 273.15)
|
||||
);
|
||||
|
||||
);
|
||||
|
||||
Info<< "\nCreating fluid-particle heat flux field\n" << endl;
|
||||
volScalarField Tsource
|
||||
(
|
||||
@ -118,57 +118,59 @@
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh//,
|
||||
mesh//,
|
||||
//dimensionedScalar("0", dimensionSet(0, 0, -1, 1, 0), 0.0)
|
||||
);
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
);
|
||||
|
||||
//========================
|
||||
|
||||
//# include "createPhi.H"
|
||||
#ifndef createPhi_H
|
||||
#define createPhi_H
|
||||
Info<< "Reading/calculating face flux field phi\n" << endl;
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(U*voidfraction) & mesh.Sf()
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
);
|
||||
|
||||
IOdictionary transportProperties
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"transportProperties",
|
||||
runTime.constant(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::NO_WRITE
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar DT
|
||||
(
|
||||
transportProperties.lookup("DT")
|
||||
);
|
||||
|
||||
//========================
|
||||
|
||||
//# include "createPhi.H"
|
||||
#ifndef createPhi_H
|
||||
#define createPhi_H
|
||||
Info<< "Reading/calculating face flux field phi\n" << endl;
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(U*voidfraction) & mesh.Sf()
|
||||
);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
label pRefCell = 0;
|
||||
scalar pRefValue = 0.0;
|
||||
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue);
|
||||
|
||||
|
||||
singlePhaseTransportModel laminarTransport(U, phi);
|
||||
|
||||
autoPtr<incompressible::turbulenceModel> turbulence
|
||||
(
|
||||
incompressible::turbulenceModel::New(U, phi, laminarTransport)
|
||||
);
|
||||
|
||||
#include "createMRF.H"
|
||||
59
applications/solvers/cfdemSolverRhoPimple/EEqn.H
Normal file
59
applications/solvers/cfdemSolverRhoPimple/EEqn.H
Normal file
@ -0,0 +1,59 @@
|
||||
// contributions to internal energy equation can be found in
|
||||
// Crowe et al.: "Multiphase flows with droplets and particles", CRC Press 1998
|
||||
{
|
||||
// dim he = J / kg
|
||||
volScalarField& he = thermo.he();
|
||||
particleCloud.energyContributions(Qsource);
|
||||
particleCloud.energyCoefficients(QCoeff);
|
||||
|
||||
//thDiff=particleCloud.thermCondM().thermDiff();
|
||||
thCond=particleCloud.thermCondM().thermCond();
|
||||
|
||||
addSource = fvc::ddt(rhoeps, K) + fvc::div(phi, K)
|
||||
+ (
|
||||
he.name() == "e"
|
||||
? fvc::div
|
||||
(
|
||||
fvc::absolute(phi/fvc::interpolate(rho), voidfraction*U),
|
||||
p,
|
||||
"div(phiv,p)"
|
||||
)
|
||||
: -dpdt
|
||||
);
|
||||
|
||||
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
|
||||
|
||||
|
||||
fvScalarMatrix EEqn
|
||||
(
|
||||
fvm::ddt(rhoeps, he) + fvm::div(phi, he)
|
||||
+ addSource
|
||||
// net heat transfer from particles to fluid
|
||||
- Qsource
|
||||
- fvm::Sp(QCoeff/Cpv, he)
|
||||
// thermal conduction of the fluid with effective conductivity
|
||||
// - fvm::laplacian(rhoeps*thDiff,he)
|
||||
- fvm::laplacian(voidfraction*thCond/Cpv,he)
|
||||
// + particle-fluid energy transfer due to work
|
||||
// + fluid energy dissipation due to shearing
|
||||
==
|
||||
fvOptions(rho, he)
|
||||
);
|
||||
|
||||
|
||||
EEqn.relax();
|
||||
|
||||
fvOptions.constrain(EEqn);
|
||||
|
||||
EEqn.solve();
|
||||
|
||||
fvOptions.correct(he);
|
||||
|
||||
thermo.correct();
|
||||
|
||||
Info<< "T max/min : " << max(T).value() << " " << min(T).value() << endl;
|
||||
|
||||
particleCloud.clockM().start(31,"postFlow");
|
||||
particleCloud.postFlow();
|
||||
particleCloud.clockM().stop("postFlow");
|
||||
}
|
||||
3
applications/solvers/cfdemSolverRhoPimple/Make/files
Normal file
3
applications/solvers/cfdemSolverRhoPimple/Make/files
Normal file
@ -0,0 +1,3 @@
|
||||
cfdemSolverRhoPimple.C
|
||||
|
||||
EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoPimple
|
||||
32
applications/solvers/cfdemSolverRhoPimple/Make/options
Normal file
32
applications/solvers/cfdemSolverRhoPimple/Make/options
Normal file
@ -0,0 +1,32 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
PFLAGS+= -Dcompre
|
||||
|
||||
EXE_INC = \
|
||||
$(PFLAGS) \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
|
||||
-I$(LIB_SRC)/finiteVolume/cfdTools \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude \
|
||||
-I$(LIB_SRC)/sampling/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
|
||||
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lcompressibleTransportModels \
|
||||
-lfluidThermophysicalModels \
|
||||
-lspecie \
|
||||
-lturbulenceModels \
|
||||
-lcompressibleTurbulenceModels \
|
||||
-lfiniteVolume \
|
||||
-lmeshTools \
|
||||
-lsampling \
|
||||
-lfvOptions \
|
||||
-l$(CFDEM_LIB_COMP_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
33
applications/solvers/cfdemSolverRhoPimple/UEqn.H
Normal file
33
applications/solvers/cfdemSolverRhoPimple/UEqn.H
Normal file
@ -0,0 +1,33 @@
|
||||
// Solve the Momentum equation
|
||||
particleCloud.otherForces(fOther);
|
||||
|
||||
tmp<fvVectorMatrix> tUEqn
|
||||
(
|
||||
fvm::ddt(rhoeps, U)
|
||||
+ fvm::div(phi, U)
|
||||
+ particleCloud.divVoidfractionTau(U, voidfraction)
|
||||
+ fvm::Sp(Ksl,U)
|
||||
- fOther
|
||||
==
|
||||
fvOptions(rho, U)
|
||||
);
|
||||
fvVectorMatrix& UEqn = tUEqn.ref();
|
||||
|
||||
UEqn.relax();
|
||||
|
||||
fvOptions.constrain(UEqn);
|
||||
|
||||
if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
|
||||
{
|
||||
solve(UEqn == -fvc::grad(p)+ Ksl*Us);
|
||||
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
else if (pimple.momentumPredictor())
|
||||
{
|
||||
solve(UEqn == -voidfraction*fvc::grad(p)+ Ksl*Us);
|
||||
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
}
|
||||
159
applications/solvers/cfdemSolverRhoPimple/cfdemSolverRhoPimple.C
Normal file
159
applications/solvers/cfdemSolverRhoPimple/cfdemSolverRhoPimple.C
Normal file
@ -0,0 +1,159 @@
|
||||
/*---------------------------------------------------------------------------*\
|
||||
License
|
||||
|
||||
This is free software: you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this code. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Copyright (C) 2015- Thomas Lichtenegger, JKU Linz, Austria
|
||||
|
||||
Application
|
||||
cfdemSolverRhoPimple
|
||||
|
||||
Description
|
||||
Transient solver for compressible flow using the flexible PIMPLE (PISO-SIMPLE)
|
||||
algorithm.
|
||||
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
|
||||
The code is an evolution of the solver rhoPimpleFoam in OpenFOAM(R) 4.x,
|
||||
where additional functionality for CFD-DEM coupling is added.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "psiThermo.H"
|
||||
#include "turbulentFluidThermoModel.H"
|
||||
#include "bound.H"
|
||||
#include "pimpleControl.H"
|
||||
#include "fvOptions.H"
|
||||
#include "localEulerDdtScheme.H"
|
||||
#include "fvcSmooth.H"
|
||||
|
||||
|
||||
#include "cfdemCloudEnergy.H"
|
||||
#include "implicitCouple.H"
|
||||
#include "clockModel.H"
|
||||
#include "smoothingModel.H"
|
||||
#include "forceModel.H"
|
||||
#include "thermCondModel.H"
|
||||
#include "energyModel.H"
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#include "postProcess.H"
|
||||
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
#include "createMesh.H"
|
||||
#include "createControl.H"
|
||||
#include "createTimeControls.H"
|
||||
#include "createRDeltaT.H"
|
||||
#include "initContinuityErrs.H"
|
||||
#include "createFields.H"
|
||||
#include "createFieldRefs.H"
|
||||
#include "createFvOptions.H"
|
||||
|
||||
// create cfdemCloud
|
||||
#include "readGravitationalAcceleration.H"
|
||||
cfdemCloudEnergy particleCloud(mesh);
|
||||
#include "checkModelType.H"
|
||||
|
||||
turbulence->validate();
|
||||
// #include "compressibleCourantNo.H"
|
||||
// #include "setInitialDeltaT.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
Info<< "\nStarting time loop\n" << endl;
|
||||
|
||||
while (runTime.run())
|
||||
{
|
||||
#include "readTimeControls.H"
|
||||
#include "compressibleCourantNo.H"
|
||||
#include "setDeltaT.H"
|
||||
|
||||
runTime++;
|
||||
|
||||
particleCloud.clockM().start(1,"Global");
|
||||
|
||||
Info<< "Time = " << runTime.timeName() << nl << endl;
|
||||
|
||||
// do particle stuff
|
||||
particleCloud.clockM().start(2,"Coupling");
|
||||
bool hasEvolved = particleCloud.evolve(voidfraction,Us,U);
|
||||
|
||||
if(hasEvolved)
|
||||
{
|
||||
particleCloud.smoothingM().smoothen(particleCloud.forceM(0).impParticleForces());
|
||||
}
|
||||
|
||||
Info << "update Ksl.internalField()" << endl;
|
||||
Ksl = particleCloud.momCoupleM(0).impMomSource();
|
||||
Ksl.correctBoundaryConditions();
|
||||
|
||||
//Force Checks
|
||||
vector fTotal(0,0,0);
|
||||
vector fImpTotal = sum(mesh.V()*Ksl.primitiveFieldRef()*(Us.primitiveFieldRef()-U.primitiveFieldRef()));
|
||||
reduce(fImpTotal, sumOp<vector>());
|
||||
Info << "TotalForceExp: " << fTotal << endl;
|
||||
Info << "TotalForceImp: " << fImpTotal << endl;
|
||||
|
||||
#include "solverDebugInfo.H"
|
||||
particleCloud.clockM().stop("Coupling");
|
||||
|
||||
particleCloud.clockM().start(26,"Flow");
|
||||
|
||||
if (pimple.nCorrPIMPLE() <= 1)
|
||||
{
|
||||
#include "rhoEqn.H"
|
||||
}
|
||||
|
||||
volScalarField rhoeps("rhoeps",rho*voidfraction);
|
||||
// --- Pressure-velocity PIMPLE corrector loop
|
||||
while (pimple.loop())
|
||||
{
|
||||
#include "UEqn.H"
|
||||
#include "EEqn.H"
|
||||
|
||||
// --- Pressure corrector loop
|
||||
while (pimple.correct())
|
||||
{
|
||||
// besides this pEqn, OF offers a "pimple consistent"-option
|
||||
#include "pEqn.H"
|
||||
rhoeps=rho*voidfraction;
|
||||
}
|
||||
|
||||
if (pimple.turbCorr())
|
||||
{
|
||||
turbulence->correct();
|
||||
}
|
||||
}
|
||||
|
||||
runTime.write();
|
||||
|
||||
|
||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
||||
<< nl << endl;
|
||||
|
||||
particleCloud.clockM().stop("Flow");
|
||||
particleCloud.clockM().stop("Global");
|
||||
}
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -0,0 +1,2 @@
|
||||
const volScalarField& T = thermo.T();
|
||||
const volScalarField& psi = thermo.psi();
|
||||
253
applications/solvers/cfdemSolverRhoPimple/createFields.H
Normal file
253
applications/solvers/cfdemSolverRhoPimple/createFields.H
Normal file
@ -0,0 +1,253 @@
|
||||
Info<< "Reading thermophysical properties\n" << endl;
|
||||
|
||||
autoPtr<psiThermo> pThermo
|
||||
(
|
||||
psiThermo::New(mesh)
|
||||
);
|
||||
psiThermo& thermo = pThermo();
|
||||
thermo.validate(args.executable(), "h", "e");
|
||||
volScalarField& p = thermo.p();
|
||||
|
||||
Info<< "Reading field rho\n" << endl;
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
thermo.rho()
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading field U\n" << endl;
|
||||
volVectorField U
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"U",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
|
||||
volScalarField voidfraction
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"voidfraction",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
volScalarField addSource
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"addSource",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
Info<< "\nCreating fluid-particle heat flux field\n" << endl;
|
||||
volScalarField Qsource
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Qsource",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimensionSet(1,-1,-3,0,0,0,0), 0.0)
|
||||
);
|
||||
|
||||
Info<< "\nCreating fluid-particle heat flux coefficient field\n" << endl;
|
||||
volScalarField QCoeff
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"QCoeff",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimensionSet(1,-1,-3,-1,0,0,0), 0.0)
|
||||
);
|
||||
|
||||
/* Info<< "\nCreating thermal diffusivity field\n" << endl;
|
||||
volScalarField thDiff
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thDiff",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
|
||||
);
|
||||
*/
|
||||
Info<< "\nCreating thermal conductivity field\n" << endl;
|
||||
volScalarField thCond
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"thCond",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0)
|
||||
);
|
||||
|
||||
Info<< "\nCreating heat capacity field\n" << endl;
|
||||
volScalarField Cpv
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Cpv",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("zero", dimensionSet(0,2,-2,-1,0,0,0), 0.0)
|
||||
);
|
||||
|
||||
Info<< "\nCreating body force field\n" << endl;
|
||||
volVectorField fOther
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"fOther",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector("zero", dimensionSet(1,-2,-2,0,0,0,0), vector::zero)
|
||||
);
|
||||
|
||||
Info<< "Reading/calculating face flux field phi\n" << endl;
|
||||
surfaceScalarField phi
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"phi",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::READ_IF_PRESENT,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
linearInterpolate(rho*U*voidfraction) & mesh.Sf()
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMax
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMax",
|
||||
pimple.dict(),
|
||||
dimDensity,
|
||||
GREAT
|
||||
)
|
||||
);
|
||||
|
||||
dimensionedScalar rhoMin
|
||||
(
|
||||
dimensionedScalar::lookupOrDefault
|
||||
(
|
||||
"rhoMin",
|
||||
pimple.dict(),
|
||||
dimDensity,
|
||||
0
|
||||
)
|
||||
);
|
||||
|
||||
Info<< "Creating turbulence model\n" << endl;
|
||||
autoPtr<compressible::turbulenceModel> turbulence
|
||||
(
|
||||
compressible::turbulenceModel::New
|
||||
(
|
||||
rho,
|
||||
U,
|
||||
phi,
|
||||
thermo
|
||||
)
|
||||
);
|
||||
|
||||
mesh.setFluxRequired(p.name());
|
||||
|
||||
Info<< "Creating field dpdt\n" << endl;
|
||||
volScalarField dpdt
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"dpdt",
|
||||
runTime.timeName(),
|
||||
mesh
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("dpdt", p.dimensions()/dimTime, 0)
|
||||
);
|
||||
|
||||
Info<< "Creating field kinetic energy K\n" << endl;
|
||||
volScalarField K("K", 0.5*magSqr(U));
|
||||
|
||||
Info<< "\nReading momentum exchange field Ksl\n" << endl;
|
||||
volScalarField Ksl
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Ksl",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
//dimensionedScalar("0", dimensionSet(1, -3, -1, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
|
||||
Info<< "Reading particle velocity field Us\n" << endl;
|
||||
volVectorField Us
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"Us",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::MUST_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh
|
||||
);
|
||||
|
||||
//===============================
|
||||
92
applications/solvers/cfdemSolverRhoPimple/pEqn.H
Normal file
92
applications/solvers/cfdemSolverRhoPimple/pEqn.H
Normal file
@ -0,0 +1,92 @@
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
|
||||
volScalarField rAU(1.0/UEqn.A());
|
||||
surfaceScalarField rhorAUf("rhorAUf", fvc::interpolate(rhoeps*rAU));
|
||||
if (modelType=="A")
|
||||
{
|
||||
rhorAUf *= fvc::interpolate(voidfraction);
|
||||
}
|
||||
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p));
|
||||
|
||||
surfaceScalarField phiUs("phiUs", fvc::interpolate(rhoeps*rAU*Ksl*Us)& mesh.Sf());
|
||||
|
||||
if (pimple.nCorrPISO() <= 1)
|
||||
{
|
||||
tUEqn.clear();
|
||||
}
|
||||
|
||||
if (pimple.transonic())
|
||||
{
|
||||
// transonic version not implemented yet
|
||||
}
|
||||
else
|
||||
{
|
||||
surfaceScalarField phiHbyA
|
||||
(
|
||||
"phiHbyA",
|
||||
(
|
||||
fvc::flux(rhoeps*HbyA)
|
||||
// + rhorAUf*fvc::ddtCorr(rho, U, phi)
|
||||
)
|
||||
);
|
||||
|
||||
// flux without pressure gradient contribution
|
||||
phi = phiHbyA + phiUs;
|
||||
|
||||
// Update the pressure BCs to ensure flux consistency
|
||||
constrainPressure(p, rhoeps, U, phi, rhorAUf);
|
||||
|
||||
while (pimple.correctNonOrthogonal())
|
||||
{
|
||||
// Pressure corrector
|
||||
fvScalarMatrix pEqn
|
||||
(
|
||||
fvm::ddt(psi*voidfraction, p)
|
||||
+ fvc::div(phi)
|
||||
- fvm::laplacian(rhorAUf, p)
|
||||
==
|
||||
fvOptions(psi, p, rho.name())
|
||||
);
|
||||
|
||||
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
|
||||
|
||||
if (pimple.finalNonOrthogonalIter())
|
||||
{
|
||||
phi += pEqn.flux();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "rhoEqn.H"
|
||||
#include "compressibleContinuityErrsPU.H"
|
||||
|
||||
// Explicitly relax pressure for momentum corrector
|
||||
p.relax();
|
||||
|
||||
// Recalculate density from the relaxed pressure
|
||||
rho = thermo.rho();
|
||||
rho = max(rho, rhoMin);
|
||||
rho = min(rho, rhoMax);
|
||||
rho.relax();
|
||||
Info<< "rho max/min : " << max(rho).value()
|
||||
<< " " << min(rho).value() << endl;
|
||||
|
||||
if (modelType=="A")
|
||||
{
|
||||
U = HbyA - rAU*(voidfraction*fvc::grad(p)-Ksl*Us);
|
||||
}
|
||||
else
|
||||
{
|
||||
U = HbyA - rAU*(fvc::grad(p)-Ksl*Us);
|
||||
}
|
||||
U.correctBoundaryConditions();
|
||||
fvOptions.correct(U);
|
||||
K = 0.5*magSqr(U);
|
||||
|
||||
if (thermo.dpdt())
|
||||
{
|
||||
dpdt = fvc::ddt(voidfraction,p);
|
||||
}
|
||||
17
applications/solvers/cfdemSolverRhoPimple/rhoEqn.H
Normal file
17
applications/solvers/cfdemSolverRhoPimple/rhoEqn.H
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
fvScalarMatrix rhoEqn
|
||||
(
|
||||
fvm::ddt(voidfraction,rho)
|
||||
+ fvc::div(phi)
|
||||
==
|
||||
fvOptions(rho)
|
||||
);
|
||||
|
||||
fvOptions.constrain(rhoEqn);
|
||||
|
||||
rhoEqn.solve();
|
||||
|
||||
fvOptions.correct(rho);
|
||||
}
|
||||
|
||||
// ************************************************************************* //
|
||||
@ -1,5 +1,9 @@
|
||||
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
|
||||
|
||||
EXE_INC = \
|
||||
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
|
||||
-I$(CFDEM_OFVERSION_DIR) \
|
||||
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
|
||||
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
|
||||
-I$(LIB_SRC)/transportModels \
|
||||
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
@ -8,10 +12,12 @@ EXE_INC = \
|
||||
|
||||
|
||||
EXE_LIBS = \
|
||||
-L$(FOAM_USER_LIBBIN)\
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
-L$(CFDEM_LIB_DIR)\
|
||||
-lturbulenceModels \
|
||||
-lincompressibleTurbulenceModels \
|
||||
-lincompressibleTransportModels \
|
||||
-lfiniteVolume \
|
||||
-l$(CFDEM_LIB_NAME) \
|
||||
$(CFDEM_ADD_LIB_PATHS) \
|
||||
$(CFDEM_ADD_LIBS)
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ Description
|
||||
|
||||
#include "fvCFD.H"
|
||||
#include "singlePhaseTransportModel.H"
|
||||
#include "turbulenceModel.H"
|
||||
#include "turbulentTransportModel.H"
|
||||
|
||||
#include "cfdemCloud.H"
|
||||
#include "dataExchangeModel.H"
|
||||
@ -71,8 +71,9 @@ int main(int argc, char *argv[])
|
||||
double **voidfractions_;
|
||||
double **particleWeights_;
|
||||
double **particleVolumes_;
|
||||
double **cellIDs_;
|
||||
|
||||
double **particleV_;
|
||||
int **cellIDs_;
|
||||
|
||||
particleCloud.dataExchangeM().allocateArray(positions_,0.,3);
|
||||
particleCloud.dataExchangeM().allocateArray(velocities_,0.,3);
|
||||
particleCloud.get_radii(radii_); // get ref to radii
|
||||
@ -80,6 +81,7 @@ int main(int argc, char *argv[])
|
||||
particleCloud.dataExchangeM().allocateArray(voidfractions_,0.,1);
|
||||
particleCloud.dataExchangeM().allocateArray(particleWeights_,0.,1);
|
||||
particleCloud.dataExchangeM().allocateArray(particleVolumes_,0.,1);
|
||||
particleCloud.dataExchangeM().allocateArray(particleV_,0.,1);
|
||||
particleCloud.get_cellIDs(cellIDs_); // get ref to cellIDs
|
||||
//particleCloud.dataExchangeM().allocateArray(cellIDs_,0.,1);
|
||||
|
||||
@ -96,7 +98,7 @@ int main(int argc, char *argv[])
|
||||
particleCloud.averagingM().resetWeightFields();
|
||||
particleCloud.momCoupleM(0).resetMomSourceField();
|
||||
|
||||
particleCloud.dataExchangeM().couple();
|
||||
particleCloud.dataExchangeM().couple(0);
|
||||
|
||||
particleCloud.dataExchangeM().getData("x","vector-atom",positions_,count);
|
||||
particleCloud.dataExchangeM().getData("v","vector-atom",velocities_,count);
|
||||
@ -105,9 +107,9 @@ int main(int argc, char *argv[])
|
||||
particleCloud.locateM().findCell(NULL,positions_,cellIDs_,particleCloud.numberOfParticles());
|
||||
particleCloud.setPos(positions_);
|
||||
|
||||
particleCloud.voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_);
|
||||
particleCloud.voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
|
||||
|
||||
voidfraction.internalField() = particleCloud.voidFractionM().voidFractionInterp();
|
||||
voidfraction.ref() = particleCloud.voidFractionM().voidFractionInterp();
|
||||
voidfraction.correctBoundaryConditions();
|
||||
|
||||
particleCloud.averagingM().setVectorAverage
|
||||
@ -135,6 +137,7 @@ int main(int argc, char *argv[])
|
||||
particleCloud.dataExchangeM().destroy(voidfractions_,1);
|
||||
particleCloud.dataExchangeM().destroy(particleWeights_,1);
|
||||
particleCloud.dataExchangeM().destroy(particleVolumes_,1);
|
||||
particleCloud.dataExchangeM().destroy(particleV_,1);
|
||||
//particleCloud.dataExchangeM().destroy(cellIDs_); // destroyed in cloud
|
||||
|
||||
Info<< "End\n" << endl;
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("0", dimensionSet(0, 2, -2, 0, 0), 1.0)
|
||||
dimensionedScalar("1", dimensionSet(0, 2, -2, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
Info<< "Reading physical velocity field U" << endl;
|
||||
@ -26,15 +26,29 @@
|
||||
IOobject::NO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector("0", dimensionSet(0, 1, -1, 0, 0), vector::zero)
|
||||
dimensionedVector("0", dimensionSet(0, 1, -1, 0, 0), Foam::vector::zero)
|
||||
);
|
||||
|
||||
//========================
|
||||
// drag law modelling
|
||||
//========================
|
||||
|
||||
Info<< "Creating dummy density field rho\n" << endl;
|
||||
volScalarField rho
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
"rho",
|
||||
runTime.timeName(),
|
||||
mesh,
|
||||
IOobject::NO_READ,
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("1", dimensionSet(1, -3, 0, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
|
||||
Info<< "Reading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
|
||||
volScalarField voidfraction
|
||||
(
|
||||
IOobject
|
||||
@ -46,7 +60,7 @@
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedScalar("0", dimensionSet(0, 0, 0, 0, 0), 1.)
|
||||
dimensionedScalar("1", dimensionSet(0, 0, 0, 0, 0), 1.0)
|
||||
);
|
||||
|
||||
|
||||
@ -62,7 +76,7 @@
|
||||
IOobject::AUTO_WRITE
|
||||
),
|
||||
mesh,
|
||||
dimensionedVector("0", dimensionSet(0, 1, -1, 0, 0), vector::zero)
|
||||
dimensionedVector("0", dimensionSet(0, 1, -1, 0, 0), Foam::vector::zero)
|
||||
);
|
||||
|
||||
//========================
|
||||
|
||||
7
doc/.gitignore
vendored
Normal file
7
doc/.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
*.o
|
||||
*.d
|
||||
*.a
|
||||
*.dep
|
||||
log_*
|
||||
log.*
|
||||
*~
|
||||
@ -164,7 +164,7 @@ In order to get the latest code version, please use the git repository at http:/
|
||||
</P>
|
||||
<PRE>modelType
|
||||
</PRE>
|
||||
<P>"modelType" refers to the formulation of the equations to be solved. Choose "A" or "B", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes".
|
||||
<P>"modelType" refers to the formulation of the equations to be solved. Choose "A", "B" or "Bfull", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes". "Bfull" refers to model type I.
|
||||
</P>
|
||||
<PRE>couplingInterval
|
||||
</PRE>
|
||||
@ -212,30 +212,31 @@ listing below of styles within certain commands.
|
||||
<TR ALIGN="center"><TD ><A HREF = "clockModel_noClock.html">clockModel_noClock</A></TD><TD ><A HREF = "clockModel_standardClock.html">clockModel_standardClock</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "dataExchangeModel.html">dataExchangeModel</A></TD><TD ><A HREF = "dataExchangeModel_noDataExchange.html">dataExchangeModel_noDataExchange</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "dataExchangeModel_oneWayVTK.html">dataExchangeModel_oneWayVTK</A></TD><TD ><A HREF = "dataExchangeModel_twoWayFiles.html">dataExchangeModel_twoWayFiles</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "dataExchangeModel_twoWayM2M.html">dataExchangeModel_twoWayM2M</A></TD><TD ><A HREF = "dataExchangeModel_twoWayMPI.html">dataExchangeModel_twoWayMPI</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "dataExchangeModel_twoWayMPI.html">dataExchangeModel_twoWayMPI</A></TD><TD ><A HREF = "dataExchangeModel_twoWayMany2Many.html">dataExchangeModel_twoWayMany2Many</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel.html">forceModel</A></TD><TD ><A HREF = "forceModel_Archimedes.html">forceModel_Archimedes</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_ArchimedesIB.html">forceModel_ArchimedesIB</A></TD><TD ><A HREF = "forceModel_DiFeliceDrag.html">forceModel_DiFeliceDrag</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_GidaspowDrag.html">forceModel_GidaspowDrag</A></TD><TD ><A HREF = "forceModel_KochHillDrag.html">forceModel_KochHillDrag</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_LaEuScalarTemp.html">forceModel_LaEuScalarTemp</A></TD><TD ><A HREF = "forceModel_MeiLift.html">forceModel_MeiLift</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_SchillerNaumannDrag.html">forceModel_SchillerNaumannDrag</A></TD><TD ><A HREF = "forceModel_ShirgaonkarIB.html">forceModel_ShirgaonkarIB</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_gradPForce.html">forceModel_gradPForce</A></TD><TD ><A HREF = "forceModel_noDrag.html">forceModel_noDrag</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_particleCellVolume.html">forceModel_particleCellVolume</A></TD><TD ><A HREF = "forceModel_virtualMassForce.html">forceModel_virtualMassForce</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_viscForce.html">forceModel_viscForce</A></TD><TD ><A HREF = "liggghtsCommandModel.html">liggghtsCommandModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_fieldStore.html">forceModel_fieldStore</A></TD><TD ><A HREF = "forceModel_gradPForce.html">forceModel_gradPForce</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_noDrag.html">forceModel_noDrag</A></TD><TD ><A HREF = "forceModel_particleCellVolume.html">forceModel_particleCellVolume</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceModel_virtualMassForce.html">forceModel_virtualMassForce</A></TD><TD ><A HREF = "forceModel_viscForce.html">forceModel_viscForce</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceSubModel.html">forceSubModel</A></TD><TD ><A HREF = "forceSubModel_ImEx.html">forceSubModel_ImEx</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "forceSubModel_ImExCorr.html">forceSubModel_ImExCorr</A></TD><TD ><A HREF = "liggghtsCommandModel.html">liggghtsCommandModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_execute.html">liggghtsCommandModel_execute</A></TD><TD ><A HREF = "liggghtsCommandModel_readLiggghtsData.html">liggghtsCommandModel_readLiggghtsData</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_runLiggghts.html">liggghtsCommandModel_runLiggghts</A></TD><TD ><A HREF = "liggghtsCommandModel_writeLiggghts.html">liggghtsCommandModel_writeLiggghts</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "locateModel.html">locateModel</A></TD><TD ><A HREF = "locateModel_engineSearch.html">locateModel_engineSearch</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "locateModel_engineSearchIB.html">locateModel_engineSearchIB</A></TD><TD ><A HREF = "locateModel_standardSearch.html">locateModel_standardSearch</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "locateModel_turboEngineSearchM2M.html">locateModel_turboEngineM2MSearch</A></TD><TD ><A HREF = "locateModel_turboEngineSearch.html">locateModel_turboEngineSearch</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "meshMotionModel.html">meshMotionModel</A></TD><TD ><A HREF = "meshMotionModel_noMeshMotion.html">meshMotionModel_noMeshMotion</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel.html">momCoupleModel</A></TD><TD ><A HREF = "momCoupleModel_explicitCouple.html">momCoupleModel_explicitCouple</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_implicitCouple.html">momCoupleModel_implicitCouple</A></TD><TD ><A HREF = "momCoupleModel_noCouple.html">momCoupleModel_noCouple</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "probeModel.html">probeModel</A></TD><TD ><A HREF = "probeModel_noProbe.html">probeModel_noProbe</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "regionModel.html">regionModel</A></TD><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A>
|
||||
<TR ALIGN="center"><TD ><A HREF = "locateModel_turboEngineSearch.html">locateModel_turboEngineSearch</A></TD><TD ><A HREF = "meshMotionModel.html">meshMotionModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "meshMotionModel_noMeshMotion.html">meshMotionModel_noMeshMotion</A></TD><TD ><A HREF = "momCoupleModel.html">momCoupleModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_explicitCouple.html">momCoupleModel_explicitCouple</A></TD><TD ><A HREF = "momCoupleModel_implicitCouple.html">momCoupleModel_implicitCouple</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_noCouple.html">momCoupleModel_noCouple</A></TD><TD ><A HREF = "probeModel.html">probeModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "probeModel_noProbe.html">probeModel_noProbe</A></TD><TD ><A HREF = "regionModel.html">regionModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD></TR>
|
||||
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A>
|
||||
</TD></TR></TABLE></DIV>
|
||||
|
||||
</HTML>
|
||||
|
||||
Binary file not shown.
@ -133,7 +133,7 @@ Reasonable example settings for the "couplingProperties" dictionary are given in
|
||||
|
||||
modelType :pre
|
||||
|
||||
"modelType" refers to the formulation of the equations to be solved. Choose "A" or "B", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes".
|
||||
"modelType" refers to the formulation of the equations to be solved. Choose "A", "B" or "Bfull", according to Zhou et al. (2010): "Discrete particle simulation of particle-fluid flow: model formulations and their applicability", JFM. "A" requires the use of the force models gradPForce and viscForce, whereas "B" requires the force model "Archimedes". "Bfull" refers to model type I.
|
||||
|
||||
couplingInterval :pre
|
||||
|
||||
@ -221,6 +221,10 @@ Reasonable example settings for the "liggghtsCommands" dictionary are given in t
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -250,8 +254,8 @@ listing below of styles within certain commands.
|
||||
"dataExchangeModel_noDataExchange"_dataExchangeModel_noDataExchange.html,
|
||||
"dataExchangeModel_oneWayVTK"_dataExchangeModel_oneWayVTK.html,
|
||||
"dataExchangeModel_twoWayFiles"_dataExchangeModel_twoWayFiles.html,
|
||||
"dataExchangeModel_twoWayM2M"_dataExchangeModel_twoWayM2M.html,
|
||||
"dataExchangeModel_twoWayMPI"_dataExchangeModel_twoWayMPI.html,
|
||||
"dataExchangeModel_twoWayMany2Many"_dataExchangeModel_twoWayMany2Many.html,
|
||||
"forceModel"_forceModel.html,
|
||||
"forceModel_Archimedes"_forceModel_Archimedes.html,
|
||||
"forceModel_ArchimedesIB"_forceModel_ArchimedesIB.html,
|
||||
@ -262,11 +266,15 @@ listing below of styles within certain commands.
|
||||
"forceModel_MeiLift"_forceModel_MeiLift.html,
|
||||
"forceModel_SchillerNaumannDrag"_forceModel_SchillerNaumannDrag.html,
|
||||
"forceModel_ShirgaonkarIB"_forceModel_ShirgaonkarIB.html,
|
||||
"forceModel_fieldStore"_forceModel_fieldStore.html,
|
||||
"forceModel_gradPForce"_forceModel_gradPForce.html,
|
||||
"forceModel_noDrag"_forceModel_noDrag.html,
|
||||
"forceModel_particleCellVolume"_forceModel_particleCellVolume.html,
|
||||
"forceModel_virtualMassForce"_forceModel_virtualMassForce.html,
|
||||
"forceModel_viscForce"_forceModel_viscForce.html,
|
||||
"forceSubModel"_forceSubModel.html,
|
||||
"forceSubModel_ImEx"_forceSubModel_ImEx.html,
|
||||
"forceSubModel_ImExCorr"_forceSubModel_ImExCorr.html,
|
||||
"liggghtsCommandModel"_liggghtsCommandModel.html,
|
||||
"liggghtsCommandModel_execute"_liggghtsCommandModel_execute.html,
|
||||
"liggghtsCommandModel_readLiggghtsData"_liggghtsCommandModel_readLiggghtsData.html,
|
||||
@ -276,7 +284,6 @@ listing below of styles within certain commands.
|
||||
"locateModel_engineSearch"_locateModel_engineSearch.html,
|
||||
"locateModel_engineSearchIB"_locateModel_engineSearchIB.html,
|
||||
"locateModel_standardSearch"_locateModel_standardSearch.html,
|
||||
"locateModel_turboEngineM2MSearch"_locateModel_turboEngineSearchM2M.html,
|
||||
"locateModel_turboEngineSearch"_locateModel_turboEngineSearch.html,
|
||||
"meshMotionModel"_meshMotionModel.html,
|
||||
"meshMotionModel_noMeshMotion"_meshMotionModel_noMeshMotion.html,
|
||||
|
||||
@ -11,12 +11,14 @@
|
||||
</H3>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>"cfdemSolverPisoScalar" is a coupled CFD-DEM solver using CFDEMcoupling, an open source parallel coupled CFD-DEM framework. Based on pisoFoam(R)(*), a finite volume based solver for turbulent Navier-Stokes equations applying PISO algorithm, "cfdemSolverPisoScalar" has additional functionality for a coupling to the DEM code "LIGGGHTS" as well as a scalar transport equation. The volume averaged Navier-Stokes Equations are solved accounting for momentum exchange and volume displacement of discrete particles whose trajectories are calculated in the DEM code LIGGGHTS. The scalar transport equation is coupled to scalar properties of the particle phase, thus convective heat transfer in a fluid granular system can be modeled with "cfdemSolverPisoScalar".
|
||||
<P>"cfdemSolverPisoScalar" is a coupled CFD-DEM solver using CFDEMcoupling, an open source parallel coupled CFD-DEM framework. Based on pisoFoam(R)(*), a finite volume based solver for turbulent Navier-Stokes equations applying PISO algorithm, "cfdemSolverPisoScalar" has additional functionality for a coupling to the DEM code "LIGGGHTS" as well as a scalar transport equation. The volume averaged Navier-Stokes Equations are solved accounting for momentum exchange and volume displacement of discrete particles, whose trajectories are calculated in the DEM code LIGGGHTS. The scalar transport equation is coupled to scalar properties of the particle phase, thus convective heat transfer in a fluid granular system can be modeled with "cfdemSolverPisoScalar".
|
||||
</P>
|
||||
<P>see:
|
||||
</P>
|
||||
<P>GONIVA, C., KLOSS, C., HAGER,A. and PIRKER, S. (2010): "An Open Source CFD-DEM Perspective", Proc. of OpenFOAM Workshop, Göteborg, June 22.-24.
|
||||
</P>
|
||||
<P>The heat transfer equation is implemented according to Nield & Bejan (2013), Convection in Porous Media, DOI 10.1007/978-1-4614-5541-7_2, Springer
|
||||
</P>
|
||||
<HR>
|
||||
|
||||
<P>(*) This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. OPENFOAM® is a registered trade mark of OpenCFD Limited, a wholly owned subsidiary of the ESI Group.
|
||||
|
||||
@ -9,12 +9,15 @@ cfdemSolverPisoScalar command :h3
|
||||
|
||||
[Description:]
|
||||
|
||||
"cfdemSolverPisoScalar" is a coupled CFD-DEM solver using CFDEMcoupling, an open source parallel coupled CFD-DEM framework. Based on pisoFoam(R)(*), a finite volume based solver for turbulent Navier-Stokes equations applying PISO algorithm, "cfdemSolverPisoScalar" has additional functionality for a coupling to the DEM code "LIGGGHTS" as well as a scalar transport equation. The volume averaged Navier-Stokes Equations are solved accounting for momentum exchange and volume displacement of discrete particles whose trajectories are calculated in the DEM code LIGGGHTS. The scalar transport equation is coupled to scalar properties of the particle phase, thus convective heat transfer in a fluid granular system can be modeled with "cfdemSolverPisoScalar".
|
||||
"cfdemSolverPisoScalar" is a coupled CFD-DEM solver using CFDEMcoupling, an open source parallel coupled CFD-DEM framework. Based on pisoFoam(R)(*), a finite volume based solver for turbulent Navier-Stokes equations applying PISO algorithm, "cfdemSolverPisoScalar" has additional functionality for a coupling to the DEM code "LIGGGHTS" as well as a scalar transport equation. The volume averaged Navier-Stokes Equations are solved accounting for momentum exchange and volume displacement of discrete particles, whose trajectories are calculated in the DEM code LIGGGHTS. The scalar transport equation is coupled to scalar properties of the particle phase, thus convective heat transfer in a fluid granular system can be modeled with "cfdemSolverPisoScalar".
|
||||
|
||||
see:
|
||||
|
||||
GONIVA, C., KLOSS, C., HAGER,A. and PIRKER, S. (2010): "An Open Source CFD-DEM Perspective", Proc. of OpenFOAM Workshop, Göteborg, June 22.-24.
|
||||
|
||||
The heat transfer equation is implemented according to Nield & Bejan (2013), Convection in Porous Media, DOI 10.1007/978-1-4614-5541-7_2, Springer
|
||||
|
||||
|
||||
|
||||
:line
|
||||
(*) This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM® and OpenCFD® trade marks. OPENFOAM® is a registered trade mark of OpenCFD Limited, a wholly owned subsidiary of the ESI Group.
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
</P>
|
||||
<P>The "standardClock" model is a basic clockModel model which measures the run time between every ".start(int arrayPos,string name)" and ".stop(string name)" statement placed in the code. If a ".start(name)" is called more than once (e.g. in a loop) the accumulated times are calculated. After the simulation has finished, the data is stored in $caseDir/CFD/clockData/$startTime/*.txt .
|
||||
Since the measurements are stored in an array, it is necessary to put a variable <I>arrayPos</I> (type integer) at the start command. Those do not need to be in ascending order and positions may be omitted. The standard size of this array is 30 and can be changed at the initialization of the standardClock class. If <I>arrayPos</I> is out of bounds, the array size will be doubled. The stop command does not need <I>arrayPos</I>, since the class remembers the positions. The string name is intended for easier evaluation afterwards an may be omitted like ".start(int arrayPos)" and ".stop()". The command ".stop(string name)" is a safety feature, because if the name is not equal to the started name, output will be produced for information.
|
||||
After the case ran you may use the matPlot.py script located in $CFDEM_UT_DIR/vizClock/ to produce a graphical output of your measurements. The usage is like 'python < matPlot.py' and you have to be in the directory of the desired time step, where there is a file called "timeEvalFull.txt", which contains averaged and maximum data with respect to the number of processes.
|
||||
After the case ran you may use the matPlot.py script located in $CFDEM_UT_DIR/vizClock/ to produce a graphical output of your measurements. The usage is like 'python < matPlot.py' and you have to be in the directory of the desired time step, where there is a file called "timeEvalFull.txt", which contains averaged and maximum data with respect to the number of processes. There is an alias called "vizClock" to run this python routine for visualizing the data.
|
||||
</P>
|
||||
<P><B>Restrictions:</B> none.
|
||||
</P>
|
||||
|
||||
@ -21,7 +21,7 @@ clockModel standardClock; :pre
|
||||
|
||||
The "standardClock" model is a basic clockModel model which measures the run time between every ".start(int arrayPos,string name)" and ".stop(string name)" statement placed in the code. If a ".start(name)" is called more than once (e.g. in a loop) the accumulated times are calculated. After the simulation has finished, the data is stored in $caseDir/CFD/clockData/$startTime/*.txt .
|
||||
Since the measurements are stored in an array, it is necessary to put a variable {arrayPos} (type integer) at the start command. Those do not need to be in ascending order and positions may be omitted. The standard size of this array is 30 and can be changed at the initialization of the standardClock class. If {arrayPos} is out of bounds, the array size will be doubled. The stop command does not need {arrayPos}, since the class remembers the positions. The string name is intended for easier evaluation afterwards an may be omitted like ".start(int arrayPos)" and ".stop()". The command ".stop(string name)" is a safety feature, because if the name is not equal to the started name, output will be produced for information.
|
||||
After the case ran you may use the matPlot.py script located in $CFDEM_UT_DIR/vizClock/ to produce a graphical output of your measurements. The usage is like 'python < matPlot.py' and you have to be in the directory of the desired time step, where there is a file called "timeEvalFull.txt", which contains averaged and maximum data with respect to the number of processes.
|
||||
After the case ran you may use the matPlot.py script located in $CFDEM_UT_DIR/vizClock/ to produce a graphical output of your measurements. The usage is like 'python < matPlot.py' and you have to be in the directory of the desired time step, where there is a file called "timeEvalFull.txt", which contains averaged and maximum data with respect to the number of processes. There is an alias called "vizClock" to run this python routine for visualizing the data.
|
||||
|
||||
[Restrictions:] none.
|
||||
|
||||
|
||||
@ -1,42 +0,0 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
dataExchangeModel_twoWayM2M command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties dictionary.
|
||||
|
||||
dataExchangeModel twoWayM2M;
|
||||
twoWayM2MProps
|
||||
\{
|
||||
liggghtsPath "path";
|
||||
\}; :pre
|
||||
|
||||
{path} = path to the DEM simulation input file :ulb,l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
dataExchangeModel twoWayM2M;
|
||||
twoWayM2MProps
|
||||
\{
|
||||
liggghtsPath "../DEM/in.liggghts_init";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayM2M model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using the many to many mapping scheme. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
Should be used in combination with the turboEngineSearchM2M locate model to achieve best performance!
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dataExchangeModel"_dataExchangeModel.html
|
||||
|
||||
@ -7,14 +7,14 @@
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>dataExchangeModel_twoWayM2M command
|
||||
<H3>dataExchangeModel_twoWayMany2Many command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties dictionary.
|
||||
</P>
|
||||
<PRE>dataExchangeModel twoWayM2M;
|
||||
twoWayM2MProps
|
||||
<PRE>dataExchangeModel twoWayMany2Many;
|
||||
twoWayMany2ManyProps
|
||||
{
|
||||
liggghtsPath "path";
|
||||
};
|
||||
@ -25,19 +25,19 @@ twoWayM2MProps
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>dataExchangeModel twoWayM2M;
|
||||
twoWayM2MProps
|
||||
<PRE>dataExchangeModel twoWayMany2Many;
|
||||
twoWayMany2ManyProps
|
||||
{
|
||||
liggghtsPath "../DEM/in.liggghts_init";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayM2M model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using the many to many mapping scheme. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
|
||||
<P>The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayMany2Many model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using the many to many mapping scheme. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>Should be used in combination with the turboEngineSearchM2M locate model to achieve best performance!
|
||||
<P>Must be used in combination with the engineSearchMany2Many locate model!
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
42
doc/dataExchangeModel_twoWayMany2Many.txt
Normal file
42
doc/dataExchangeModel_twoWayMany2Many.txt
Normal file
@ -0,0 +1,42 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
dataExchangeModel_twoWayMany2Many command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties dictionary.
|
||||
|
||||
dataExchangeModel twoWayMany2Many;
|
||||
twoWayMany2ManyProps
|
||||
\{
|
||||
liggghtsPath "path";
|
||||
\}; :pre
|
||||
|
||||
{path} = path to the DEM simulation input file :ulb,l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
dataExchangeModel twoWayMany2Many;
|
||||
twoWayMany2ManyProps
|
||||
\{
|
||||
liggghtsPath "../DEM/in.liggghts_init";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The data exchange model performs the data exchange between the DEM code and the CFD code. The twoWayMany2Many model is a model that can exchange particle properties from DEM to CFD and from CFD to DEM. Data is exchanged via MPI technique using the many to many mapping scheme. The DEM run is executed by the coupling model, via a liggghtsCommandModel object.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
Must be used in combination with the engineSearchMany2Many locate model!
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"dataExchangeModel"_dataExchangeModel.html
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed.
|
||||
<P>The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed. If the fluid density field is needed, by default a field named "rho" will be used. Via the forceSubModel an alternative field can be chosen.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
|
||||
@ -31,7 +31,7 @@ Note: This examples list might not be complete - please look for other models (f
|
||||
|
||||
[Description:]
|
||||
|
||||
The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed.
|
||||
The force model performs the calculation of forces (e.g. fluid-particle interaction forces) acting on each DEM particle. All force models selected are executed sequentially and the forces on the particles are superposed. If the fluid density field is needed, by default a field named "rho" will be used. Via the forceSubModel an alternative field can be chosen.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
|
||||
@ -19,13 +19,10 @@
|
||||
);
|
||||
ArchimedesProps
|
||||
{
|
||||
densityFieldName "density";
|
||||
gravityFieldName "gravity";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>density</I> = name of the finite volume density field
|
||||
|
||||
<LI><I>gravity</I> = name of the finite volume gravity field
|
||||
<UL><LI><I>gravity</I> = name of the finite volume gravity field
|
||||
|
||||
|
||||
</UL>
|
||||
@ -37,7 +34,6 @@ ArchimedesProps
|
||||
);
|
||||
ArchimedesProps
|
||||
{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
}
|
||||
</PRE>
|
||||
|
||||
@ -17,12 +17,10 @@ forceModels
|
||||
);
|
||||
ArchimedesProps
|
||||
\{
|
||||
densityFieldName "density";
|
||||
gravityFieldName "gravity";
|
||||
\}; :pre
|
||||
|
||||
{density} = name of the finite volume density field :ulb,l
|
||||
{gravity} = name of the finite volume gravity field :l
|
||||
{gravity} = name of the finite volume gravity field :ulb,l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -33,7 +31,6 @@ forceModels
|
||||
);
|
||||
ArchimedesProps
|
||||
\{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
\} :pre
|
||||
|
||||
|
||||
@ -19,14 +19,11 @@
|
||||
);
|
||||
ArchimedesIBProps
|
||||
{
|
||||
densityFieldName "density";
|
||||
gravityFieldName "gravity";
|
||||
voidfractionFieldName "voidfraction";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>density</I> = name of the finite volume density field
|
||||
|
||||
<LI><I>gravity</I> = name of the finite volume gravity field
|
||||
<UL><LI><I>gravity</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
|
||||
|
||||
@ -40,7 +37,6 @@ ArchimedesIBProps
|
||||
);
|
||||
ArchimedesIBProps
|
||||
{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
voidfractionFieldName "voidfractionNext";
|
||||
}
|
||||
|
||||
@ -17,13 +17,11 @@ forceModels
|
||||
);
|
||||
ArchimedesIBProps
|
||||
\{
|
||||
densityFieldName "density";
|
||||
gravityFieldName "gravity";
|
||||
voidfractionFieldName "voidfraction";
|
||||
\}; :pre
|
||||
|
||||
{density} = name of the finite volume density field :ulb,l
|
||||
{gravity} = name of the finite volume gravity field :l
|
||||
{gravity} = name of the finite volume gravity field :ulb,l
|
||||
{voidfraction} = name of the finite volume voidfraction field :l
|
||||
:ule
|
||||
|
||||
@ -35,7 +33,6 @@ forceModels
|
||||
);
|
||||
ArchimedesIBProps
|
||||
\{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
voidfractionFieldName "voidfractionNext";
|
||||
\} :pre
|
||||
|
||||
@ -20,15 +20,12 @@
|
||||
DiFeliceDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
interpolation switch1;
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>interpolation</I> = flag to use interpolated voidfraction and velocity values (normally off)
|
||||
<LI><I>switch1</I> = flag to use interpolated voidfraction and velocity values (normally off)
|
||||
|
||||
|
||||
</UL>
|
||||
@ -41,8 +38,7 @@ DiFeliceDragProps
|
||||
DiFeliceDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
interpolation;
|
||||
interpolation true;
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,13 +18,11 @@ forceModels
|
||||
DiFeliceDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
interpolation switch1;
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
{interpolation} = flag to use interpolated voidfraction and velocity values (normally off) :l
|
||||
{switch1} = flag to use interpolated voidfraction and velocity values (normally off) :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -36,8 +34,7 @@ forceModels
|
||||
DiFeliceDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
interpolation;
|
||||
interpolation true;
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,24 +20,24 @@
|
||||
GidaspowDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
voidfractionFieldName "voidfraction";
|
||||
granVelFieldName "Us";
|
||||
phi "scalar";
|
||||
interpolation;
|
||||
implDEM;
|
||||
interpolation switch1;
|
||||
implForceDEM switch2;
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
|
||||
|
||||
<LI><I>Us</I> = name of the finite volume cell averaged particle velocity field
|
||||
|
||||
<LI><I>phi</I> = drag correction factor (in doubt 1)
|
||||
|
||||
<LI><I>interpolation</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
|
||||
<I>implDEM</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
<I>switch2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
@ -49,8 +49,8 @@ GidaspowDragProps
|
||||
GidaspowDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
granVelFieldName "Us";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,19 +18,19 @@ forceModels
|
||||
GidaspowDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
voidfractionFieldName "voidfraction";
|
||||
granVelFieldName "Us";
|
||||
phi "scalar";
|
||||
interpolation;
|
||||
implDEM;
|
||||
interpolation switch1;
|
||||
implForceDEM switch2;
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
{voidfraction} = name of the finite volume voidfraction field :l
|
||||
{Us} = name of the finite volume cell averaged particle velocity field :l
|
||||
{phi} = drag correction factor (in doubt 1) :l
|
||||
{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{implDEM} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
{switch1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{switch2} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -42,8 +42,8 @@ forceModels
|
||||
GidaspowDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
granVelFieldName "Us";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,21 +20,18 @@
|
||||
KochHillDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
voidfractionFieldName "voidfraction";
|
||||
interpolation;
|
||||
implDEM;
|
||||
interpolation "bool1";
|
||||
implForceDEM "bool2";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
|
||||
|
||||
<LI><I>interpolation</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
<LI><I>bool1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
|
||||
<I>implDEM</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
<I>bool2</I> = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
@ -46,7 +43,6 @@ KochHillDragProps
|
||||
KochHillDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
}
|
||||
</PRE>
|
||||
|
||||
@ -18,17 +18,15 @@ forceModels
|
||||
KochHillDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
voidfractionFieldName "voidfraction";
|
||||
interpolation;
|
||||
implDEM;
|
||||
interpolation "bool1";
|
||||
implForceDEM "bool2";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
{voidfraction} = name of the finite volume voidfraction field :l
|
||||
{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{implDEM} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
{bool1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{bool2} = (optional, normally off) flag to use implicit formulation of drag on DEM side:l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -40,7 +38,6 @@ forceModels
|
||||
KochHillDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
\} :pre
|
||||
|
||||
|
||||
@ -21,23 +21,19 @@ LaEuScalarTempProps
|
||||
{
|
||||
velFieldName "U";
|
||||
tempFieldName "T";
|
||||
tempSourceFieldName "Tsource";
|
||||
voidfractionFieldName "voidfraction";
|
||||
partTempName "Temp";
|
||||
partHeatFluxName "convectiveHeatFlux";
|
||||
lambda value;
|
||||
Cp value1;
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation "switch1";
|
||||
verbose "switch2";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>T</I> = name of the finite volume scalar temperature field
|
||||
|
||||
<LI><I>Tsource</I> = name of the finite volume scalar temperature source field
|
||||
|
||||
<LI><I>voidfraction</I> = name of the finite volume voidfraction field
|
||||
|
||||
<LI><I>Temp</I> = name of the DEM data representing the particles temperature
|
||||
@ -48,11 +44,9 @@ LaEuScalarTempProps
|
||||
|
||||
<LI><I>value1</I> = fluid specific heat capacity [W*s/(kg*K)]
|
||||
|
||||
<LI><I>density</I> = name of the finite volume fluid density field
|
||||
<LI><I>switch1</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
|
||||
<LI><I>interpolation</I> = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values
|
||||
|
||||
<LI><I>verbose</I> = (normally off) for verbose run
|
||||
<LI><I>switch2</I> = (normally off) for verbose run
|
||||
|
||||
|
||||
</UL>
|
||||
@ -66,13 +60,11 @@ LaEuScalarTempProps
|
||||
{
|
||||
velFieldName "U";
|
||||
tempFieldName "T";
|
||||
tempSourceFieldName "Tsource";
|
||||
voidfractionFieldName "voidfraction";
|
||||
partTempName "Temp";
|
||||
partHeatFluxName "convectiveHeatFlux";
|
||||
lambda 0.0256;
|
||||
Cp 1007;
|
||||
densityFieldName "rho";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
@ -81,7 +73,7 @@ LaEuScalarTempProps
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>Goes only with cfdemSolverScalar.
|
||||
<P>Goes only with cfdemSolverScalar. The force model has to be the second (!!!) model in the forces list.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
|
||||
@ -19,28 +19,24 @@ LaEuScalarTempProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
tempFieldName "T";
|
||||
tempSourceFieldName "Tsource";
|
||||
voidfractionFieldName "voidfraction";
|
||||
partTempName "Temp";
|
||||
partHeatFluxName "convectiveHeatFlux";
|
||||
lambda value;
|
||||
Cp value1;
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation "switch1";
|
||||
verbose "switch2";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{T} = name of the finite volume scalar temperature field :l
|
||||
{Tsource} = name of the finite volume scalar temperature source field :l
|
||||
{voidfraction} = name of the finite volume voidfraction field :l
|
||||
{Temp} = name of the DEM data representing the particles temperature :l
|
||||
{convectiveHeatFlux} = name of the DEM data representing the particle-fluid convective heat flux :l
|
||||
{value} = fluid thermal conductivity \[W/(m*K)\] :l
|
||||
{value1} = fluid specific heat capacity \[W*s/(kg*K)\] :l
|
||||
{density} = name of the finite volume fluid density field :l
|
||||
{interpolation} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{verbose} = (normally off) for verbose run :l
|
||||
{switch1} = (optional, normally off) flag to use interpolated voidfraction and fluid velocity values :l
|
||||
{switch2} = (normally off) for verbose run :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -53,13 +49,11 @@ LaEuScalarTempProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
tempFieldName "T";
|
||||
tempSourceFieldName "Tsource";
|
||||
voidfractionFieldName "voidfraction";
|
||||
partTempName "Temp";
|
||||
partHeatFluxName "convectiveHeatFlux";
|
||||
lambda 0.0256;
|
||||
Cp 1007;
|
||||
densityFieldName "rho";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
@ -68,7 +62,7 @@ This "forceModel" does not influence the particles or the fluid flow! Using the
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
Goes only with cfdemSolverScalar.
|
||||
Goes only with cfdemSolverScalar. The force model has to be the second (!!!) model in the forces list.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
|
||||
@ -20,21 +20,18 @@
|
||||
MeiLiftProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
useSecondOrderTerms;
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation "switch1";
|
||||
verbose "switch2";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume fluid density field
|
||||
|
||||
<LI><I>useSecondOrderTerms</I> = switch to activate second order terms in the lift force model
|
||||
|
||||
<LI><I>interpolation</I> = switch to activate tri-linear interpolation of the flow quantities at the particle position
|
||||
<LI><I>switch1</I> = switch to activate tri-linear interpolation of the flow quantities at the particle position
|
||||
|
||||
<LI><I>verbose</I> = switch to activate the report of per-particle quantities to the screen
|
||||
<LI><I>switch2</I> = switch to activate the report of per-particle quantities to the screen
|
||||
|
||||
|
||||
</UL>
|
||||
@ -47,10 +44,9 @@ MeiLiftProps
|
||||
MeiLiftProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
useSecondOrderTerms;
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation true;
|
||||
verbose true;
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,17 +18,15 @@ forceModels
|
||||
MeiLiftProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
useSecondOrderTerms;
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation "switch1";
|
||||
verbose "switch2";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume fluid density field :l
|
||||
{useSecondOrderTerms} = switch to activate second order terms in the lift force model :l
|
||||
{interpolation} = switch to activate tri-linear interpolation of the flow quantities at the particle position :l
|
||||
{verbose} = switch to activate the report of per-particle quantities to the screen :l
|
||||
{switch1} = switch to activate tri-linear interpolation of the flow quantities at the particle position :l
|
||||
{switch2} = switch to activate the report of per-particle quantities to the screen :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -40,10 +38,9 @@ forceModels
|
||||
MeiLiftProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
useSecondOrderTerms;
|
||||
interpolation;
|
||||
verbose;
|
||||
interpolation true;
|
||||
verbose true;
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,13 +20,10 @@
|
||||
SchillerNaumannDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
@ -38,7 +35,6 @@ SchillerNaumannDragProps
|
||||
SchillerNaumannDragProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,11 +18,9 @@ forceModels
|
||||
SchillerNaumannDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -34,7 +32,6 @@ forceModels
|
||||
SchillerNaumannDragProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,14 +20,11 @@
|
||||
ShirgaonkarIBProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
pressureFieldName "pressure";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume density field
|
||||
|
||||
<LI><I>pressure</I> = name of the finite volume pressure field
|
||||
|
||||
|
||||
@ -41,7 +38,6 @@ ShirgaonkarIBProps
|
||||
ShirgaonkarIBProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
pressureFieldName "p";
|
||||
}
|
||||
</PRE>
|
||||
|
||||
@ -18,12 +18,10 @@ forceModels
|
||||
ShirgaonkarIBProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
pressureFieldName "pressure";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume density field :l
|
||||
{pressure} = name of the finite volume pressure field :l
|
||||
:ule
|
||||
|
||||
@ -36,7 +34,6 @@ forceModels
|
||||
ShirgaonkarIBProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
pressureFieldName "p";
|
||||
\} :pre
|
||||
|
||||
|
||||
68
doc/forceModel_fieldStore.html
Normal file
68
doc/forceModel_fieldStore.html
Normal file
@ -0,0 +1,68 @@
|
||||
<HTML>
|
||||
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>forceModel_fieldStore command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties dictionary.
|
||||
</P>
|
||||
<PRE>forceModels
|
||||
(
|
||||
fieldStore
|
||||
);
|
||||
fieldStoreProps
|
||||
{
|
||||
scalarFieldNames
|
||||
(
|
||||
"scalarField"
|
||||
);
|
||||
vectorFieldNames
|
||||
(
|
||||
"vectorField"
|
||||
);
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>scalarField</I> = names of the finite volume scalar fields to be stored
|
||||
|
||||
<LI><I>vectorField</I> = names of the finite volume vector fields to be stored
|
||||
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>forceModels
|
||||
(
|
||||
fieldStore
|
||||
);
|
||||
fieldStoreProps
|
||||
{
|
||||
scalarFieldNames
|
||||
(
|
||||
"voidfraction"
|
||||
);
|
||||
vectorFieldNames
|
||||
(
|
||||
"U"
|
||||
);
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>This "forceModel" does not influence the particles or the flow - it is a tool to store a scalar/vector field! This is especially useful if you use a boundary condition which cannot interpreted correctly in your postporcessor (e.g. paraview).
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>none.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "forceModel.html">forceModel</A>
|
||||
</P>
|
||||
</HTML>
|
||||
63
doc/forceModel_fieldStore.txt
Normal file
63
doc/forceModel_fieldStore.txt
Normal file
@ -0,0 +1,63 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
forceModel_fieldStore command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties dictionary.
|
||||
|
||||
forceModels
|
||||
(
|
||||
fieldStore
|
||||
);
|
||||
fieldStoreProps
|
||||
\{
|
||||
scalarFieldNames
|
||||
(
|
||||
"scalarField"
|
||||
);
|
||||
vectorFieldNames
|
||||
(
|
||||
"vectorField"
|
||||
);
|
||||
\}; :pre
|
||||
|
||||
{scalarField} = names of the finite volume scalar fields to be stored :ulb,l
|
||||
{vectorField} = names of the finite volume vector fields to be stored :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
forceModels
|
||||
(
|
||||
fieldStore
|
||||
);
|
||||
fieldStoreProps
|
||||
\{
|
||||
scalarFieldNames
|
||||
(
|
||||
"voidfraction"
|
||||
);
|
||||
vectorFieldNames
|
||||
(
|
||||
"U"
|
||||
);
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
This "forceModel" does not influence the particles or the flow - it is a tool to store a scalar/vector field! This is especially useful if you use a boundary condition which cannot interpreted correctly in your postporcessor (e.g. paraview).
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
none.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"forceModel"_forceModel.html
|
||||
|
||||
@ -20,18 +20,15 @@
|
||||
gradPForceProps
|
||||
{
|
||||
pFieldName "pressure";
|
||||
densityFieldName "density";
|
||||
velocityFieldName "U";
|
||||
interpolation;
|
||||
interpolation switch1;
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>pressure</I> = name of the finite volume fluid pressure field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>interpolation</I> = flag to use interpolated pressure values (normally off)
|
||||
<LI><I>switch1</I> = flag to use interpolated pressure values (normally off)
|
||||
|
||||
|
||||
</UL>
|
||||
@ -44,9 +41,8 @@ gradPForceProps
|
||||
gradPForceProps
|
||||
{
|
||||
pFieldName "p";
|
||||
densityFieldName "rho";
|
||||
velocityFieldName "U";
|
||||
interpolation;
|
||||
interpolation true;
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,15 +18,13 @@ forceModels
|
||||
gradPForceProps
|
||||
\{
|
||||
pFieldName "pressure";
|
||||
densityFieldName "density";
|
||||
velocityFieldName "U";
|
||||
interpolation;
|
||||
interpolation switch1;
|
||||
\}; :pre
|
||||
|
||||
{pressure} = name of the finite volume fluid pressure field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
{U} = name of the finite volume fluid velocity field :l
|
||||
{interpolation} = flag to use interpolated pressure values (normally off) :l
|
||||
{switch1} = flag to use interpolated pressure values (normally off) :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -38,9 +36,8 @@ forceModels
|
||||
gradPForceProps
|
||||
\{
|
||||
pFieldName "p";
|
||||
densityFieldName "rho";
|
||||
velocityFieldName "U";
|
||||
interpolation;
|
||||
interpolation true;
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,13 +20,10 @@
|
||||
virtualMassForceProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume fluid density field
|
||||
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
@ -38,7 +35,6 @@ virtualMassForceProps
|
||||
virtualMassForceProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,11 +18,9 @@ forceModels
|
||||
virtualMassForceProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "density";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume fluid density field :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -34,7 +32,6 @@ forceModels
|
||||
virtualMassForceProps
|
||||
\{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
@ -20,15 +20,12 @@
|
||||
viscForceProps
|
||||
{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
interpolation "switch";
|
||||
};
|
||||
</PRE>
|
||||
<UL><LI><I>U</I> = name of the finite volume fluid velocity field
|
||||
|
||||
<LI><I>density</I> = name of the finite volume gravity field
|
||||
|
||||
<LI><I>interpolation</I> = flag to use interpolated stress values (normally off)
|
||||
<LI><I>switch</I> = flag to use interpolated stress values (normally off)
|
||||
|
||||
|
||||
</UL>
|
||||
@ -41,7 +38,6 @@ viscForceProps
|
||||
viscForceProps
|
||||
{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "density";
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
|
||||
@ -18,13 +18,11 @@ forceModels
|
||||
viscForceProps
|
||||
\{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "density";
|
||||
interpolation;
|
||||
interpolation "switch";
|
||||
\}; :pre
|
||||
|
||||
{U} = name of the finite volume fluid velocity field :ulb,l
|
||||
{density} = name of the finite volume gravity field :l
|
||||
{interpolation} = flag to use interpolated stress values (normally off) :l
|
||||
{switch} = flag to use interpolated stress values (normally off) :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
@ -36,7 +34,6 @@ forceModels
|
||||
viscForceProps
|
||||
\{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "density";
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
49
doc/forceSubModel.html
Normal file
49
doc/forceSubModel.html
Normal file
@ -0,0 +1,49 @@
|
||||
<HTML>
|
||||
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>forceSubModel command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties sub-dictionary of the force model in use. If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded.
|
||||
</P>
|
||||
<PRE>forceSubModels
|
||||
(
|
||||
model_x
|
||||
model_y
|
||||
);
|
||||
</PRE>
|
||||
<UL><LI>model = name of force sub-model to be applied
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>forceSubModels
|
||||
(
|
||||
ImEx
|
||||
);
|
||||
</PRE>
|
||||
<P>Note: This examples list might not be complete - please look for other models (forceSubModel_XY) in this documentation.
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>The force sub model is designed to hold the settings a force model can have. For now it handles the treatExplicit, treatDEM and implDEM option.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>None.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "forceSubModel_ImEx.html">ImEx</A>
|
||||
</P>
|
||||
<P>Note: This examples list may be incomplete - please look for other models (forceSubModel_XY) in this documentation.
|
||||
</P>
|
||||
<P><B>Default:</B> none.
|
||||
</P>
|
||||
</HTML>
|
||||
45
doc/forceSubModel.txt
Normal file
45
doc/forceSubModel.txt
Normal file
@ -0,0 +1,45 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
forceSubModel command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties sub-dictionary of the force model in use. If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded.
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
model_x
|
||||
model_y
|
||||
); :pre
|
||||
|
||||
model = name of force sub-model to be applied :ul
|
||||
|
||||
[Examples:]
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
ImEx
|
||||
); :pre
|
||||
|
||||
Note: This examples list might not be complete - please look for other models (forceSubModel_XY) in this documentation.
|
||||
|
||||
[Description:]
|
||||
|
||||
The force sub model is designed to hold the settings a force model can have. For now it handles the treatExplicit, treatDEM and implDEM option.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
None.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"ImEx"_forceSubModel_ImEx.html
|
||||
|
||||
Note: This examples list may be incomplete - please look for other models (forceSubModel_XY) in this documentation.
|
||||
|
||||
[Default:] none.
|
||||
45
doc/forceSubModel_ImEx.html
Normal file
45
doc/forceSubModel_ImEx.html
Normal file
@ -0,0 +1,45 @@
|
||||
<HTML>
|
||||
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>forceSubModel_ImEx command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties sub-dictionary of the force model in use.
|
||||
</P>
|
||||
<P>forceSubModels
|
||||
(
|
||||
ImEx;
|
||||
);
|
||||
</P>
|
||||
<P>treatExplicit true; // optional for some force models.
|
||||
treatDEM true; // optional for some force models.
|
||||
implDEM true; // optional for some force models.
|
||||
</P>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<P>forceSubModels
|
||||
(
|
||||
ImEx;
|
||||
);
|
||||
treatExplicit true; // optional for some force models.
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P> If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded. Depending on the force model different keywords are read and can therefrore be set (see the log file). If the keyword is provided, its value is used.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>none.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "forceSubModel.html">forceSubModel</A>
|
||||
</P>
|
||||
</HTML>
|
||||
42
doc/forceSubModel_ImEx.txt
Normal file
42
doc/forceSubModel_ImEx.txt
Normal file
@ -0,0 +1,42 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
forceSubModel_ImEx command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties sub-dictionary of the force model in use.
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
ImEx;
|
||||
);
|
||||
|
||||
treatExplicit true; // optional for some force models.
|
||||
treatDEM true; // optional for some force models.
|
||||
implDEM true; // optional for some force models.
|
||||
|
||||
[Examples:]
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
ImEx;
|
||||
);
|
||||
treatExplicit true; // optional for some force models.
|
||||
|
||||
[Description:]
|
||||
|
||||
If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded. Depending on the force model different keywords are read and can therefrore be set (see the log file). If the keyword is provided, its value is used.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
none.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"forceSubModel"_forceSubModel.html
|
||||
|
||||
46
doc/forceSubModel_ImExCorr.html
Normal file
46
doc/forceSubModel_ImExCorr.html
Normal file
@ -0,0 +1,46 @@
|
||||
<HTML>
|
||||
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>forceSubModel_ImExCorr command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties sub-dictionary of the force model in use.
|
||||
</P>
|
||||
<P>forceSubModels
|
||||
(
|
||||
ImExCorr;
|
||||
);
|
||||
</P>
|
||||
<P>treatExplicit true; // optional for some force models.
|
||||
treatDEM true; // optional for some force models.
|
||||
implDEM true; // optional for some force models.
|
||||
explicitInterpCorr true; // optional for some force models.
|
||||
</P>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<P>forceSubModels
|
||||
(
|
||||
ImExCorr;
|
||||
);
|
||||
treatExplicit true; // optional for some force models.
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P> Same as ImEx, but it additionally reads "explicitInterpCorr" to correct the error steming from interpolation of Ufluid and averaging of Uparticles.
|
||||
</P>
|
||||
<P><B>Restrictions:</B>
|
||||
</P>
|
||||
<P>none.
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "forceSubModel.html">forceSubModel</A>
|
||||
</P>
|
||||
</HTML>
|
||||
43
doc/forceSubModel_ImExCorr.txt
Normal file
43
doc/forceSubModel_ImExCorr.txt
Normal file
@ -0,0 +1,43 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
forceSubModel_ImExCorr command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties sub-dictionary of the force model in use.
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
ImExCorr;
|
||||
);
|
||||
|
||||
treatExplicit true; // optional for some force models.
|
||||
treatDEM true; // optional for some force models.
|
||||
implDEM true; // optional for some force models.
|
||||
explicitInterpCorr true; // optional for some force models.
|
||||
|
||||
[Examples:]
|
||||
|
||||
forceSubModels
|
||||
(
|
||||
ImExCorr;
|
||||
);
|
||||
treatExplicit true; // optional for some force models.
|
||||
|
||||
[Description:]
|
||||
|
||||
Same as ImEx, but it additionally reads "explicitInterpCorr" to correct the error steming from interpolation of Ufluid and averaging of Uparticles.
|
||||
|
||||
[Restrictions:]
|
||||
|
||||
none.
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"forceSubModel"_forceSubModel.html
|
||||
|
||||
Binary file not shown.
@ -26,13 +26,12 @@ writeLiggghtsProps
|
||||
verbose;
|
||||
}
|
||||
</PRE>
|
||||
<UL><LI><I>switch1</I> = switch (choose on/off) to select if only last step is stored or every write step.
|
||||
<UL><LI><I>switch1</I> = switch (choose on/off) to select if only last step is stored or every write step (default on).
|
||||
|
||||
<LI><I>name</I> = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM"
|
||||
<LI><I>name</I> = name of the restart file to be written in /$caseDir/DEM/ default (default "liggghts.restartCFDEM")
|
||||
|
||||
<LI><I>switch2</I> = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written
|
||||
|
||||
<LI><I>verbose</I> = (normally off) for verbose run
|
||||
<LI><I>switch2</I> = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written (default off):l
|
||||
<I>verbose</I> = (default off) for verbose run
|
||||
|
||||
|
||||
</UL>
|
||||
|
||||
@ -24,10 +24,10 @@ writeLiggghtsProps
|
||||
verbose;
|
||||
\} :pre
|
||||
|
||||
{switch1} = switch (choose on/off) to select if only last step is stored or every write step. :ulb,l
|
||||
{name} = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM" :l
|
||||
{switch2} = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written :l
|
||||
{verbose} = (normally off) for verbose run :l
|
||||
{switch1} = switch (choose on/off) to select if only last step is stored or every write step (default on). :ulb,l
|
||||
{name} = name of the restart file to be written in /$caseDir/DEM/ default (default "liggghts.restartCFDEM") :l
|
||||
{switch2} = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written (default off):l
|
||||
{verbose} = (default off) for verbose run :l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
@ -1,58 +0,0 @@
|
||||
<HTML>
|
||||
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
|
||||
</CENTER>
|
||||
|
||||
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<H3>locateModel_turboEngineM2MSearch command
|
||||
</H3>
|
||||
<P><B>Syntax:</B>
|
||||
</P>
|
||||
<P>Defined in couplingProperties dictionary.
|
||||
</P>
|
||||
<PRE>locateModel turboEngineM2M;
|
||||
turboEngineM2MProps
|
||||
{
|
||||
turboEngineProps
|
||||
{
|
||||
treeSearch switch1;
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
<UL><LI><I>switch1</I> = switch to use tree search algorithm
|
||||
|
||||
|
||||
</UL>
|
||||
<P><B>Examples:</B>
|
||||
</P>
|
||||
<PRE>locateModel turboEngineM2M;
|
||||
turboEngineM2MProps
|
||||
{
|
||||
turboEngineProps
|
||||
{
|
||||
treeSearch true;
|
||||
}
|
||||
}
|
||||
</PRE>
|
||||
<P><B>Description:</B>
|
||||
</P>
|
||||
<P>The locateModel "turboEngineM2M" locates the CFD cell and cellID corresponding to a given position. The algorithm is improved compared to engine search to show better parallel performance.
|
||||
</P>
|
||||
<P>The turboEngineM2MSearch locate Model can be used with different settings to use different algorithms:
|
||||
</P>
|
||||
<UL><LI>faceDecomp false; treeSearch false; will execute some geometric (linear) search using the last known cellID (recommended)
|
||||
|
||||
<LI>faceDecomp false; treeSearch true; will use a recursive tree structure to find the cell.
|
||||
|
||||
|
||||
</UL>
|
||||
<P><B>Restrictions:</B> This model can only be used with many to many data exchange model!
|
||||
</P>
|
||||
<P><B>Related commands:</B>
|
||||
</P>
|
||||
<P><A HREF = "locateModel.html">locateModel</A>
|
||||
</P>
|
||||
</HTML>
|
||||
@ -1,52 +0,0 @@
|
||||
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
|
||||
|
||||
:link(lws,http://www.cfdem.com)
|
||||
:link(lc,CFDEMcoupling_Manual.html#comm)
|
||||
|
||||
:line
|
||||
|
||||
locateModel_turboEngineM2MSearch command :h3
|
||||
|
||||
[Syntax:]
|
||||
|
||||
Defined in couplingProperties dictionary.
|
||||
|
||||
locateModel turboEngineM2M;
|
||||
turboEngineM2MProps
|
||||
\{
|
||||
turboEngineProps
|
||||
\{
|
||||
treeSearch switch1;
|
||||
\}
|
||||
\} :pre
|
||||
|
||||
{switch1} = switch to use tree search algorithm :ulb,l
|
||||
:ule
|
||||
|
||||
[Examples:]
|
||||
|
||||
locateModel turboEngineM2M;
|
||||
turboEngineM2MProps
|
||||
\{
|
||||
turboEngineProps
|
||||
\{
|
||||
treeSearch true;
|
||||
\}
|
||||
\} :pre
|
||||
|
||||
[Description:]
|
||||
|
||||
The locateModel "turboEngineM2M" locates the CFD cell and cellID corresponding to a given position. The algorithm is improved compared to engine search to show better parallel performance.
|
||||
|
||||
The turboEngineM2MSearch locate Model can be used with different settings to use different algorithms:
|
||||
|
||||
faceDecomp false; treeSearch false; will execute some geometric (linear) search using the last known cellID (recommended) :ulb,l
|
||||
faceDecomp false; treeSearch true; will use a recursive tree structure to find the cell. :l
|
||||
:ule
|
||||
|
||||
[Restrictions:] This model can only be used with many to many data exchange model!
|
||||
|
||||
[Related commands:]
|
||||
|
||||
"locateModel"_locateModel.html
|
||||
|
||||
@ -33,7 +33,8 @@
|
||||
</P>
|
||||
<P>Note that the variable "imExSplitFactor" can be set in the couplingProperties in order to treat implicitly defined forces (in the implementation of the force model) as explicit ones. "imExSplitFactor 1.0;" is set by default, meaning that all implicit forces will be considered implicitly, whereas "imExSplitFactor 0.0;" would mean that implicitly defined forces will be treated in an explicit fashion.
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
<P>Note that the switch "treatVoidCellsAsExplicitForce true;" can be set in the couplingProperties in order to change the treatment of cells which are void of particles. This is only relevant if (i) smoothing is used, and (ii) implicit force coupling is performed. By default, the particle veloctiy field (Us) will be smoothed to obtain a meaningful reference quantity for the implicit force coupling. In case "treatVoidCellsAsExplicitForce true;" is set, however, Us will not be smoothed and implicit forces (after the smoothing has been performed) in cells void of particles be treated as explicit ones. This avoids the problem of defining Us in cells that are void of particles, but for which an implicit coupling force is obtained in the smoothing process.
|
||||
<B>Description:</B>
|
||||
</P>
|
||||
<P>The momCoupleModel is the base class for momentum exchange between DEM and CFD simulation.
|
||||
</P>
|
||||
|
||||
@ -31,6 +31,7 @@ Forces can be coupled in an implicit way to the fluid solver (i.e., when solving
|
||||
|
||||
Note that the variable "imExSplitFactor" can be set in the couplingProperties in order to treat implicitly defined forces (in the implementation of the force model) as explicit ones. "imExSplitFactor 1.0;" is set by default, meaning that all implicit forces will be considered implicitly, whereas "imExSplitFactor 0.0;" would mean that implicitly defined forces will be treated in an explicit fashion.
|
||||
|
||||
Note that the switch "treatVoidCellsAsExplicitForce true;" can be set in the couplingProperties in order to change the treatment of cells which are void of particles. This is only relevant if (i) smoothing is used, and (ii) implicit force coupling is performed. By default, the particle veloctiy field (Us) will be smoothed to obtain a meaningful reference quantity for the implicit force coupling. In case "treatVoidCellsAsExplicitForce true;" is set, however, Us will not be smoothed and implicit forces (after the smoothing has been performed) in cells void of particles be treated as explicit ones. This avoids the problem of defining Us in cells that are void of particles, but for which an implicit coupling force is obtained in the smoothing process.
|
||||
[Description:]
|
||||
|
||||
The momCoupleModel is the base class for momentum exchange between DEM and CFD simulation.
|
||||
|
||||
2
etc/OFversion/OFversion.H
Normal file
2
etc/OFversion/OFversion.H
Normal file
@ -0,0 +1,2 @@
|
||||
#define version4x
|
||||
|
||||
8
etc/additionalLibs
Normal file
8
etc/additionalLibs
Normal file
@ -0,0 +1,8 @@
|
||||
# paths for additional libraries
|
||||
CFDEM_ADD_LIB_PATHS = \
|
||||
|
||||
# additional libraries to be linked to solvers
|
||||
CFDEM_ADD_LIBS = \
|
||||
|
||||
# additional static libraries to be linked to lagrangian library
|
||||
CFDEM_ADD_STATICLIBS = \
|
||||
259
etc/bashrc
Executable file
259
etc/bashrc
Executable file
@ -0,0 +1,259 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# CFDEMcoupling
|
||||
#
|
||||
# Copyright 2009-2012 JKU Linz
|
||||
# Copyright 2012-2015 DCS Computing GmbH, Linz
|
||||
# Copyright 2015- JKU Linz
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# File
|
||||
# etc/bashrc
|
||||
#
|
||||
# Description
|
||||
# Startup file for CFDEMcoupling
|
||||
# Sourced from ~/.profile or ~/.bashrc
|
||||
#
|
||||
# you can test the correctness using cfdemSystemTest.sh
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
export CFDEM_PROJECT=CFDEM
|
||||
export CFDEM_VERSION=17.08
|
||||
|
||||
################################################################################
|
||||
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
|
||||
#
|
||||
# Please set to the appropriate path if the default is not correct.
|
||||
#
|
||||
# activate compatible OpenFOAM version
|
||||
. $HOME/OpenFOAM/OpenFOAM-4.x/etc/bashrc
|
||||
#
|
||||
# CFDEMcoupling
|
||||
export CFDEM_INST_DIR=$HOME/$CFDEM_PROJECT
|
||||
export CFDEM_PROJECT_DIR=$CFDEM_INST_DIR/CFDEMcoupling
|
||||
export CFDEM_PROJECT_USER_DIR=$CFDEM_INST_DIR/$USER-$WM_PROJECT_VERSION
|
||||
#
|
||||
# LIGGGHTS
|
||||
export CFDEM_LIGGGHTS_INST_DIR=$CFDEM_INST_DIR/LIGGGHTS
|
||||
#
|
||||
# LPP installation path
|
||||
export CFDEM_LPP_INST_DIR=$CFDEM_INST_DIR/LPP
|
||||
#
|
||||
# Path to additional libraries
|
||||
export CFDEM_ADD_LIBS_DIR=
|
||||
#
|
||||
# END OF (NORMAL) USER EDITABLE PART
|
||||
################################################################################
|
||||
|
||||
#- The old dirs to be cleaned from the environment variables
|
||||
cfdemOldDirs="$CFDEM_LIGGGHTS_BIN_DIR $CFDEM_APP_DIR $CFDEM_LIB_DIR"
|
||||
|
||||
export CFDEM_LIGGGHTS_SRC_DIR=$CFDEM_LIGGGHTS_INST_DIR/src
|
||||
export CFDEM_LIGGGHTS_BIN_DIR=$CFDEM_LIGGGHTS_INST_DIR/src-build
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Source initialization functions
|
||||
#------------------------------------------------------------------------------
|
||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Evaluate command-line parameters
|
||||
# these can be used to set/unset values
|
||||
#------------------------------------------------------------------------------
|
||||
_foamEval $@
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
export CFDEM_SRC_DIR=$CFDEM_PROJECT_DIR/src
|
||||
export CFDEM_SOLVER_DIR=$CFDEM_PROJECT_DIR/applications/solvers
|
||||
export CFDEM_UT_DIR=$CFDEM_PROJECT_DIR/applications/utilities
|
||||
export CFDEM_DOC_DIR=$CFDEM_PROJECT_DIR/doc
|
||||
export CFDEM_TUT_DIR=$CFDEM_PROJECT_DIR/tutorials
|
||||
export CFDEM_LPP_DIR=$CFDEM_LPP_INST_DIR/src
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- CFDEM lib name
|
||||
export CFDEM_LIB_NAME=lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- CFDEM compressible lib name
|
||||
export CFDEM_LIB_COMP_NAME=lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- Check if additional libraries should be compiled together with solvers
|
||||
if [[ $CFDEM_ADD_LIBS_DIR == "" ]]; then
|
||||
export CFDEM_ADD_LIBS_DIR=$CFDEM_PROJECT_DIR/etc
|
||||
else
|
||||
echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user."
|
||||
fi
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- LMP Many2Many lib path and makefile
|
||||
export CFDEM_Many2ManyLIB_PATH=$CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library
|
||||
export CFDEM_Many2ManyLIB_MAKEFILENAME=fedora_fpic
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- path to test harness
|
||||
export CFDEM_TEST_HARNESS_PATH=$CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- path to libraries
|
||||
export CFDEM_LIB_DIR=$CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
#- path to apps
|
||||
export CFDEM_APP_DIR=$CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
|
||||
|
||||
#- create directories
|
||||
mkdir -p $CFDEM_LIB_DIR
|
||||
mkdir -p $CFDEM_APP_DIR
|
||||
|
||||
#- path to OF version flag file
|
||||
export CFDEM_OFVERSION_DIR=$CFDEM_PROJECT_DIR/etc/OFversion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Clean standard environment variables (PATH, LD_LIBRARY_PATH)
|
||||
#------------------------------------------------------------------------------
|
||||
foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||
|
||||
#- Clean PATH
|
||||
cleaned=`$foamClean "$PATH" "$cfdemOldDirs"` && PATH="$cleaned"
|
||||
|
||||
#- Clean LD_LIBRARY_PATH
|
||||
cleaned=`$foamClean "$LD_LIBRARY_PATH" "$cfdemOldDirs"` \
|
||||
&& LD_LIBRARY_PATH="$cleaned"
|
||||
|
||||
export PATH LD_LIBRARY_PATH
|
||||
|
||||
#- add binary directories to $PATH
|
||||
_foamAddPath $CFDEM_APP_DIR:$CFDEM_LIGGGHTS_BIN_DIR
|
||||
_foamAddLib $CFDEM_LIB_DIR
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Cleanup environment:
|
||||
#------------------------------------------------------------------------------
|
||||
unset cleaned foamClean cfdemOldDirs
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Unload initialization functions:
|
||||
#------------------------------------------------------------------------------
|
||||
. $WM_PROJECT_DIR/etc/config.sh/functions
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Settings for lpp postproc tool
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- nr of procs for lpp tool
|
||||
export CFDEM_LPP_NPROCS=4
|
||||
|
||||
#- nr of procs for lpp tool
|
||||
export CFDEM_LPP_CHUNKSIZE=1
|
||||
|
||||
#- shortcut to run lpp
|
||||
alias lpp='python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE'
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# aliases for easy navigation (no changes necessary)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- shortcut to cfdem path
|
||||
alias cfdem='cd $CFDEM_PROJECT_DIR'
|
||||
|
||||
#- shortcut to src path
|
||||
alias cfdemSrc='cd $CFDEM_SRC_DIR'
|
||||
|
||||
#- shortcut to tutorial path
|
||||
alias cfdemTut='cd $CFDEM_TUT_DIR'
|
||||
|
||||
#- shortcut to solver path
|
||||
alias cfdemSol='cd $CFDEM_SOLVER_DIR'
|
||||
|
||||
#- shortcut to utilities path
|
||||
alias cfdemUt='cd $CFDEM_UT_DIR'
|
||||
|
||||
#- shortcut to run path
|
||||
alias cfdemRun='cd $CFDEM_PROJECT_USER_DIR/run'
|
||||
|
||||
#- shortcut to user solver path
|
||||
alias cfdemUsrSol='cd $CFDEM_PROJECT_USER_DIR/applications/solvers'
|
||||
|
||||
#- shortcut to documentation path
|
||||
alias cfdemDoc='cd $CFDEM_DOC_DIR'
|
||||
|
||||
#- shortcut to open the doxygen with firefox
|
||||
alias cfdemDox='firefox $CFDEM_DOC_DIR/doxygen/html/index.html'
|
||||
|
||||
#- shortcut to LIGGGHTS path
|
||||
alias cfdemLIG='cd $CFDEM_LIGGGHTS_SRC_DIR'
|
||||
|
||||
#- shortcut to system test
|
||||
alias cfdemSysTest='bash $CFDEM_PROJECT_DIR/etc/cfdemSystemTest.sh'
|
||||
|
||||
#- shortcut to pull LIGGGHTS
|
||||
alias cfdemPullLIG='bash $CFDEM_PROJECT_DIR/etc/pullLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to pull CFDEMcoupling
|
||||
alias cfdemPullCFDEMcoupling='bash $CFDEM_PROJECT_DIR/etc/pullCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to clean CFDEM
|
||||
alias cfdemCleanCFDEM='bash $CFDEM_PROJECT_DIR/etc/cleanCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile LIGGGHTS + sublibraries
|
||||
alias cfdemCompLIG='bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling +LIGGGHTS
|
||||
alias cfdemCompCFDEMall='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_all.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling (src+solvers)
|
||||
alias cfdemCompCFDEM='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling src
|
||||
alias cfdemCompCFDEMsrc='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling solvers
|
||||
alias cfdemCompCFDEMsol='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling utilities
|
||||
alias cfdemCompCFDEMuti='bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh'
|
||||
|
||||
#- shortcut to test basic tutorials
|
||||
alias cfdemTestTUT='bash $CFDEM_PROJECT_DIR/etc/testTutorials.sh'
|
||||
|
||||
#- shortcut to visualize the clock model data
|
||||
alias vizClock='python $CFDEM_UT_DIR/vizClock/matPlot.py'
|
||||
|
||||
#- recursive touch of current directory
|
||||
alias touchRec='find ./* -exec touch {} \;'
|
||||
|
||||
#- shortcut to run liggghts in serial
|
||||
cfdemLiggghts() { $CFDEM_LIGGGHTS_BIN_DIR/liggghts < $1; }
|
||||
export -f cfdemLiggghts
|
||||
|
||||
#- shortcut to run liggghts in parallel
|
||||
cfdemLiggghtsPar() { mpirun -np $2 $CFDEM_LIGGGHTS_BIN_DIR/liggghts < $1; }
|
||||
export -f cfdemLiggghtsPar
|
||||
|
||||
#- shortcut to open files including a pattern
|
||||
cfdemGrep() { grep -rl "$1" ./* | xargs gedit; }
|
||||
export -f cfdemGrep
|
||||
|
||||
#- shortcut lo list files in a directory
|
||||
#cfdemListFiles() { find $1 | sed s:""$1"":: > listOfFiles.txt; } #leave out the dir iteslf in list
|
||||
cfdemListFiles() { find $1 > listOfFiles.txt; } #keep the dir in list
|
||||
export -f cfdemListFiles
|
||||
|
||||
#- check if the user directory exists
|
||||
if [ -d "$CFDEM_PROJECT_USER_DIR" ]; then
|
||||
:
|
||||
else
|
||||
echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)"
|
||||
read YN
|
||||
if [ $YN == "y" ]; then
|
||||
mkdir -p $CFDEM_PROJECT_USER_DIR
|
||||
cd $CFDEM_PROJECT_USER_DIR
|
||||
mkdir run
|
||||
mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
mkdir -p applications/solvers
|
||||
else
|
||||
echo "aborted by user."
|
||||
#exit
|
||||
fi
|
||||
fi
|
||||
@ -1,20 +1,25 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# sytsem settings test routine for cfdem project
|
||||
# sytsem settings test routine for cfdem project
|
||||
# Christoph Goniva - May. 2011, DCS Computing GmbH
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
#- show gcc settings
|
||||
checkGPP="true"
|
||||
|
||||
#- sys check for add on
|
||||
checkAddOn="false"
|
||||
|
||||
#- system settings
|
||||
echo "*******************"
|
||||
echo "system settings:"
|
||||
echo "*******************"
|
||||
printHeader
|
||||
|
||||
echo "*********************************"
|
||||
echo "CFDEM(R)coupling system settings:"
|
||||
echo "*********************************"
|
||||
|
||||
echo "CFDEM_VERSION=$CFDEM_VERSION"
|
||||
echo "couple to OF_VERSION=$WM_PROJECT_VERSION"
|
||||
@ -28,16 +33,17 @@ checkDirComment "$CFDEM_SRC_DIR" '$CFDEM_SRC_DIR' "yes"
|
||||
checkDirComment "$CFDEM_SOLVER_DIR" '$CFDEM_SOLVER_DIR' "yes"
|
||||
checkDirComment "$CFDEM_TUT_DIR" '$CFDEM_TUT_DIR' "yes"
|
||||
checkDirComment "$CFDEM_LIGGGHTS_SRC_DIR" '$CFDEM_LIGGGHTS_SRC_DIR' "yes"
|
||||
checkEnvComment "$CFDEM_LIGGGHTS_BIN_DIR" '$CFDEM_LIGGGHTS_BIN_DIR' "yes"
|
||||
checkDirComment "$CFDEM_LPP_DIR" '$CFDEM_LPP_DIR' "yes"
|
||||
checkDirComment "$CFDEM_PIZZA_DIR" '$CFDEM_PIZZA_DIR' "no"
|
||||
checkDirComment "$CFDEM_ADD_LIBS_DIR" '$CFDEM_ADD_LIBS_DIR' "yes"
|
||||
checkDirComment "$CFDEM_TEST_HARNESS_PATH" '$CFDEM_TEST_HARNESS_PATH' "no"
|
||||
echo ""
|
||||
|
||||
echo "library names"
|
||||
echo '$CFDEM_LIGGGHTS_LIB_NAME = '"$CFDEM_LIGGGHTS_LIB_NAME"
|
||||
echo '$CFDEM_LIB_NAME = '"$CFDEM_LIB_NAME"
|
||||
echo '$LD_LIBRARY_PATH = '"$LD_LIBRARY_PATH"
|
||||
echo '$WM_NCOMPPROCS = '"$WM_NCOMPPROCS"
|
||||
echo '$PATH = '"$PATH"
|
||||
echo '$LD_LIBRARY_PATH = '"$LD_LIBRARY_PATH"
|
||||
echo '$WM_NCOMPPROCS = '"$WM_NCOMPPROCS"
|
||||
|
||||
echo "*******************"
|
||||
|
||||
@ -61,3 +67,16 @@ if [ $checkGPP == "true" ]
|
||||
mpirun --version
|
||||
fi
|
||||
|
||||
if [ $checkAddOn == "true" ]
|
||||
then
|
||||
echo "**********************"
|
||||
echo "additional packages..."
|
||||
|
||||
packageName=c3po
|
||||
filePath=$CFDEM_SRC_DIR/$packageName
|
||||
if [ $(checkDir $filePath) == "true" ]; then
|
||||
source $filePath/etc/$packageName"SystemTest.sh"
|
||||
else
|
||||
echo "$packageName does not exist."
|
||||
fi
|
||||
fi
|
||||
@ -6,7 +6,7 @@
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
#================================================================================#
|
||||
# clean src remove object files
|
||||
@ -6,26 +6,26 @@
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#================================================================================#
|
||||
# compile src
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_src.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh
|
||||
|
||||
#================================================================================#
|
||||
# compile solvers
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_sol.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh
|
||||
|
||||
#================================================================================#
|
||||
# compile utilities
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling_uti.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh
|
||||
@ -7,26 +7,26 @@
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#================================================================================#
|
||||
# compile LIGGGHTS src
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh
|
||||
|
||||
#================================================================================#
|
||||
# compile LIGGGHTS libraries
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS_lib.sh
|
||||
|
||||
#================================================================================#
|
||||
# compile CFDEMcoupling
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileCFDEMcoupling.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh
|
||||
@ -8,9 +8,9 @@
|
||||
whitelist="solver-list.txt"
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
logDir="log"
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#- remove old success/fail logs
|
||||
@ -51,15 +51,16 @@ else
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
|
||||
##number of solvers compiled at a time
|
||||
nsteps=$WM_NCOMPPROCS
|
||||
echo "do compilation on $nsteps procs"
|
||||
nchunk=`echo $njobs/$nsteps+1 | bc`
|
||||
if [[ $WM_NCOMPPROCS == "" ]]; then
|
||||
echo "do compilation in serial"
|
||||
|
||||
if [[ $WM_NCOMPPROCS == "" ]] || [ $WM_NCOMPPROCS -eq 1 ]; then
|
||||
nsteps=1
|
||||
nchunk=1
|
||||
else
|
||||
echo "do compilation on $nsteps procs in $nchunk chunks"
|
||||
let nchunk=$njobs+1 # +1, to wait for the last compilation too
|
||||
echo "do compilation in serial"
|
||||
else
|
||||
nsteps=$WM_NCOMPPROCS
|
||||
nchunk=`echo $njobs/$nsteps+1 | bc`
|
||||
echo "do compilation on $nsteps procs in $nchunk chunks"
|
||||
let nchunk++ # +1, to wait for the last compilation too
|
||||
fi
|
||||
|
||||
counter=0
|
||||
@ -108,6 +109,8 @@ else
|
||||
let counter++
|
||||
fi
|
||||
done
|
||||
|
||||
sleep 1 # wait a second until compilation starts
|
||||
done
|
||||
|
||||
echo "compilation done."
|
||||
67
etc/compileCFDEMcoupling_src.sh
Executable file
67
etc/compileCFDEMcoupling_src.sh
Executable file
@ -0,0 +1,67 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# compile routine for CFDEMcoupling source, part of CFDEMproject
|
||||
# Christoph Goniva - May. 2012, DCS Computing GmbH
|
||||
# update: Stefan Radl (TU Graz, Jan 2014)
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
|
||||
#================================================================================#
|
||||
# compile src
|
||||
#================================================================================#
|
||||
whitelist="$CFDEM_PROJECT_DIR/etc/library-list.txt"
|
||||
echo ""
|
||||
echo "Please provide the libraries to be compiled in the $CWD/$whitelist file."
|
||||
|
||||
if [ ! -f "$CWD/$whitelist" ];then
|
||||
echo "$whitelist does not exist in $CWD. Nothing will be done."
|
||||
NLINES=0
|
||||
COUNT=0
|
||||
else
|
||||
NLINES=`wc -l < $CWD/$whitelist`
|
||||
COUNT=0
|
||||
fi
|
||||
|
||||
while [ $COUNT -lt $NLINES ]
|
||||
do
|
||||
let COUNT++
|
||||
LINE=`head -n $COUNT $CWD/$whitelist | tail -1`
|
||||
|
||||
# white lines
|
||||
if [[ "$LINE" == "" ]]; then
|
||||
echo "compile $LINE"
|
||||
continue
|
||||
# comments
|
||||
elif [[ "$LINE" == \#* ]]; then
|
||||
continue
|
||||
# paths
|
||||
elif [[ "$LINE" == */dir ]]; then
|
||||
echo "will change path..."
|
||||
LINE=$(echo "${LINE%????}")
|
||||
path="$CFDEM_SRC_DIR/$LINE"
|
||||
cd $path
|
||||
#continue
|
||||
fi
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling_"$(basename $LINE)""
|
||||
casePath="$path"
|
||||
headerText="$logfileName""-$NOW"
|
||||
#--------------------------------------------------------------------------------#
|
||||
# remove old log file
|
||||
rm "$logpath/$logfileName"*
|
||||
compileLib $logpath $logfileName $casePath $headerText
|
||||
done
|
||||
|
||||
115
etc/compileCFDEMcoupling_uti.sh
Normal file
115
etc/compileCFDEMcoupling_uti.sh
Normal file
@ -0,0 +1,115 @@
|
||||
#!/bin/bash
|
||||
|
||||
#===================================================================#
|
||||
# compile routine for CFDEMcoupling utilities, part of CFDEMproject
|
||||
# Christoph Goniva - May. 2012, DCS Computing GmbH
|
||||
#===================================================================#
|
||||
|
||||
whitelist="utilities-list.txt"
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
logDir="log"
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
CWD="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
|
||||
echo ""
|
||||
echo "This routine will compile the utilities specified in utilities-list.txt"
|
||||
echo ""
|
||||
#echo "Are the variables CFDEM_UT_DIR=$CFDEM_UT_DIR"
|
||||
#echo "and CFDEM_SRC_DIR=$CFDEM_SRC_DIR/lagrangian/cfdemParticle correct? (y/n)"
|
||||
#read YN
|
||||
#if [ "$YN" != "y" ];then
|
||||
# echo "Aborted by user."
|
||||
# exit 1
|
||||
#fi
|
||||
|
||||
echo ""
|
||||
echo "Please provide the utilities to be compiled in the $CWD/$whitelist file."
|
||||
echo "structure:"
|
||||
echo "path to provide the path relative to CFDEM_UT_DIR"
|
||||
echo ""
|
||||
echo "example:"
|
||||
echo "cfdemPostproc/dir"
|
||||
echo ""
|
||||
|
||||
if [ ! -f "$CWD/$whitelist" ];then
|
||||
echo "$whitelist does not exist in $CWD"
|
||||
else
|
||||
njobs=`wc -l < $CWD/$whitelist`
|
||||
echo ""
|
||||
echo "running compilation in pseudo-parallel mode of $njobs utilities"
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
|
||||
##number of utilities compiled at a time
|
||||
|
||||
if [[ $WM_NCOMPPROCS == "" ]] || [ $WM_NCOMPPROCS -eq 1 ]; then
|
||||
nsteps=1
|
||||
let nchunk=$njobs+1 # +1, to wait for the last compilation too
|
||||
echo "do compilation in serial"
|
||||
else
|
||||
nsteps=$WM_NCOMPPROCS
|
||||
nchunk=`echo $njobs/$nsteps+1 | bc`
|
||||
echo "do compilation on $nsteps procs in $nchunk chunks"
|
||||
let nchunk++ # +1, to wait for the last compilation too
|
||||
fi
|
||||
|
||||
counter=0
|
||||
for i in `seq $nchunk`
|
||||
do
|
||||
|
||||
#wait until prev. compilation is finished
|
||||
echo "waiting..."
|
||||
until [ `ps -C make | wc -l` -eq 1 ];
|
||||
do
|
||||
sleep 2
|
||||
done
|
||||
|
||||
for j in `seq $nsteps`
|
||||
do
|
||||
let solNr=($i-1)*$nsteps+$j
|
||||
LINE=`head -n $solNr $CWD/$whitelist | tail -1`
|
||||
|
||||
# white lines
|
||||
if [[ "$LINE" == "" ]]; then
|
||||
continue
|
||||
# comments
|
||||
elif [[ "$LINE" == \#* ]]; then
|
||||
continue
|
||||
# paths
|
||||
elif [[ "$LINE" == */dir ]]; then
|
||||
#echo "change path"
|
||||
LINE=$(echo "${LINE%????}")
|
||||
path="$CFDEM_UT_DIR/$LINE"
|
||||
#cd $path
|
||||
let solNr++
|
||||
fi
|
||||
|
||||
if [[ "$counter" -lt "$njobs" ]]; then
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
#logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compileCFDEMcoupling""_$LINE"
|
||||
casePath="$CFDEM_UT_DIR/$LINE"
|
||||
headerText="$logfileName""_$LINE""-$NOW"
|
||||
parallel="true"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#echo "compiling $LINE"
|
||||
compileSolver $logpath $logfileName $casePath $headerText $parallel
|
||||
let counter++
|
||||
fi
|
||||
done
|
||||
|
||||
sleep 1 # wait a second until compilation starts
|
||||
done
|
||||
|
||||
echo "compilation done."
|
||||
fi
|
||||
|
||||
|
||||
@ -6,14 +6,20 @@
|
||||
#===================================================================
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#================================================================================#
|
||||
# copy LIGGGHTS patch files if available
|
||||
#================================================================================#
|
||||
echo "copying patch files for LIGGGHTS if available"
|
||||
cp $CFDEM_SRC_DIR/LIGGGHTSpatch/* $CFDEM_LIGGGHTS_SRC_DIR
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
@ -32,4 +38,4 @@ compileLIGGGHTS $logpath $logfileName $headerText
|
||||
#================================================================================#
|
||||
# compile LIGGGHTS libraries
|
||||
#================================================================================#
|
||||
bash $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/compileLIGGGHTS_lib.sh
|
||||
bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS_lib.sh
|
||||
@ -6,19 +6,19 @@
|
||||
#===================================================================#
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#================================================================================#
|
||||
# compile src
|
||||
#================================================================================#
|
||||
whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/library-liggghts-list.txt"
|
||||
whitelist="$CFDEM_PROJECT_DIR/etc/library-liggghts-list.txt"
|
||||
echo ""
|
||||
echo "Compiling sub-libraries of LIGGGHTS now..."
|
||||
echo "Please provide the libraries to be compiled in the $CWD/$whitelist file."
|
||||
@ -33,6 +33,8 @@ mkdir -p $logDir
|
||||
COUNT=0
|
||||
fi
|
||||
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
|
||||
while [ $COUNT -lt $NLINES ]
|
||||
do
|
||||
let COUNT++
|
||||
@ -57,7 +59,7 @@ mkdir -p $logDir
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
#logpath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")/$logDir"
|
||||
logfileName="log_compile$LINE""lib"
|
||||
headerText="$logfileName""-$NOW"
|
||||
libVarMakefileName="CFDEM_$LINE""LIB_MAKEFILENAME"
|
||||
289
etc/cshrc
Executable file
289
etc/cshrc
Executable file
@ -0,0 +1,289 @@
|
||||
#----------------------------------*-sh-*--------------------------------------
|
||||
# CFDEMcoupling
|
||||
#
|
||||
# Copyright 2009-2012 JKU Linz
|
||||
# Copyright 2012-2015 DCS Computing GmbH, Linz
|
||||
# Copyright 2015- JKU Linz
|
||||
#------------------------------------------------------------------------------
|
||||
#
|
||||
# File
|
||||
# etc/cshrc
|
||||
#
|
||||
# Description
|
||||
# Startup file for CFDEMcoupling
|
||||
# Sourced from ~/.cshrc
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
setenv CFDEM_PROJECT CFDEM
|
||||
setenv CFDEM_VERSION 17.08
|
||||
|
||||
################################################################################
|
||||
# USER EDITABLE PART: Changes made here may be lost with the next upgrade
|
||||
#
|
||||
# Please set to the appropriate path if the default is not correct.
|
||||
#
|
||||
# activate compatible OpenFOAM version
|
||||
. $HOME/OpenFOAM/OpenFOAM-4.x/etc/cshrc
|
||||
#
|
||||
# CFDEMcoupling
|
||||
setenv CFDEM_INST_DIR $HOME/$CFDEM_PROJECT
|
||||
setenv CFDEM_PROJECT_DIR $CFDEM_INST_DIR/CFDEMcoupling
|
||||
setenv CFDEM_PROJECT_USER_DIR $CFDEM_INST_DIR/$USER-$WM_PROJECT_VERSION
|
||||
#
|
||||
# LIGGGHTS
|
||||
setenv CFDEM_LIGGGHTS_INST_DIR $CFDEM_INST_DIR/LIGGGHTS
|
||||
#
|
||||
# LPP installation path
|
||||
setenv CFDEM_LPP_INST_DIR $CFDEM_INST_DIR/LPP
|
||||
#
|
||||
# Path to additional libraries
|
||||
setenv CFDEM_ADD_LIBS_DIR
|
||||
#
|
||||
# END OF (NORMAL) USER EDITABLE PART
|
||||
################################################################################
|
||||
|
||||
#- The old dirs to be cleaned from the environment variables
|
||||
set cfdemOldDirs=
|
||||
if ( $?CFDEM_LIGGGHTS_BIN_DIR ) then
|
||||
set cfdemOldDirs="$cfdemOldDirs $CFDEM_LIGGGHTS_BIN_DIR"
|
||||
endif
|
||||
if ( $?CFDEM_APP_DIR ) then
|
||||
set cfdemOldDirs="$cfdemOldDirs $CFDEM_APP_DIR"
|
||||
endif
|
||||
if ( $?CFDEM_LIB_DIR ) then
|
||||
set cfdemOldDirs="$cfdemOldDirs $CFDEM_LIB_DIR"
|
||||
endif
|
||||
|
||||
setenv CFDEM_LIGGGHTS_SRC_DIR $CFDEM_LIGGGHTS_INST_DIR/src
|
||||
setenv CFDEM_LIGGGHTS_BIN_DIR $CFDEM_LIGGGHTS_INST_DIR/src-build
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Source files, possibly with some verbosity
|
||||
#------------------------------------------------------------------------------
|
||||
alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; if (\!* != "") source \!*'
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Evaluate command-line parameters
|
||||
# these can be used to set/unset values
|
||||
#------------------------------------------------------------------------------
|
||||
while ( $#argv > 0 )
|
||||
switch ($argv[1])
|
||||
case -*:
|
||||
# stray option (not meant for us here) -> get out
|
||||
break
|
||||
breaksw
|
||||
case *=:
|
||||
# name= -> unsetenv name
|
||||
if ($?FOAM_VERBOSE && $?prompt) echo "unsetenv $argv[1]:s/=//"
|
||||
eval "unsetenv $argv[1]:s/=//"
|
||||
breaksw
|
||||
case *=*:
|
||||
# name=value -> setenv name value
|
||||
if ($?FOAM_VERBOSE && $?prompt) echo "setenv $argv[1]:s/=/ /"
|
||||
eval "setenv $argv[1]:s/=/ /"
|
||||
breaksw
|
||||
default:
|
||||
# filename: source it
|
||||
if ( -f "$1" ) then
|
||||
_foamSource "$1"
|
||||
else
|
||||
_foamSource `$WM_PROJECT_DIR/bin/foamEtcFile -silent "$1"`
|
||||
endif
|
||||
breaksw
|
||||
endsw
|
||||
shift
|
||||
end
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
setenv CFDEM_SRC_DIR $CFDEM_PROJECT_DIR/src
|
||||
setenv CFDEM_SOLVER_DIR $CFDEM_PROJECT_DIR/applications/solvers
|
||||
setenv CFDEM_UT_DIR $CFDEM_PROJECT_DIR/applications/utilities
|
||||
setenv CFDEM_DOC_DIR $CFDEM_PROJECT_DIR/doc
|
||||
setenv CFDEM_TUT_DIR $CFDEM_PROJECT_DIR/tutorials
|
||||
setenv CFDEM_LPP_DIR $CFDEM_LPP_INST_DIR/src
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- CFDEM lib name
|
||||
setenv CFDEM_LIB_NAME lagrangianCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- CFDEM compressible lib name
|
||||
setenv CFDEM_LIB_COMP_NAME lagrangianCFDEMcomp-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- Check if additional libraries should be compiled together with solvers
|
||||
if ( ! ($?CFDEM_ADD_LIBS_DIR) ) then
|
||||
setenv CFDEM_ADD_LIBS_DIR $CFDEM_PROJECT_DIR/etc
|
||||
else
|
||||
echo "using CFDEM_ADD_LIBS_DIR=$CFDEM_ADD_LIBS_DIR defined by user."
|
||||
endif
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- LMP Many2Many lib path and makefile
|
||||
setenv CFDEM_Many2ManyLIB_PATH $CFDEM_SRC_DIR/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMany2Many/library
|
||||
setenv CFDEM_Many2ManyLIB_MAKEFILENAME fedora_fpic
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- path to test harness
|
||||
setenv CFDEM_TEST_HARNESS_PATH $CFDEM_PROJECT_USER_DIR/log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
|
||||
#- path to libraries
|
||||
setenv CFDEM_LIB_DIR $CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/lib
|
||||
|
||||
#- path to apps
|
||||
setenv CFDEM_APP_DIR $CFDEM_PROJECT_DIR/platforms/$WM_OPTIONS/bin
|
||||
|
||||
#- create directories
|
||||
mkdir -p $CFDEM_LIB_DIR
|
||||
mkdir -p $CFDEM_APP_DIR
|
||||
|
||||
#- path to OF version flag file
|
||||
setenv CFDEM_OFVERSION_DIR $CFDEM_PROJECT_DIR/etc/OFversion
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Clean standard environment variables (PATH, LD_LIBRARY_PATH)
|
||||
#------------------------------------------------------------------------------
|
||||
set foamClean=$WM_PROJECT_DIR/bin/foamCleanPath
|
||||
|
||||
#- prevent local variables from shadowing setenv variables
|
||||
unset PATH LD_LIBRARY_PATH
|
||||
|
||||
if (! $?LD_LIBRARY_PATH ) setenv LD_LIBRARY_PATH ''
|
||||
|
||||
#- Clean PATH
|
||||
set cleaned=`$foamClean "$PATH" "$cfdemOldDirs"`
|
||||
if ( $status == 0 ) setenv PATH $cleaned
|
||||
|
||||
#- Clean LD_LIBRARY_PATH
|
||||
set cleaned=`$foamClean "$LD_LIBRARY_PATH" "$cfdemOldDirs"`
|
||||
if ( $status == 0 ) setenv LD_LIBRARY_PATH $cleaned
|
||||
|
||||
#- add binary directories to $PATH
|
||||
_foamAddPath $CFDEM_APP_DIR:$CFDEM_LIGGGHTS_BIN_DIR
|
||||
_foamAddLib $CFDEM_LIB_DIR
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# Cleanup environment:
|
||||
#------------------------------------------------------------------------------
|
||||
unset cleaned foamClean cfdemOldDirs
|
||||
unalias _foamSource
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
#- settings for lpp postproc tool
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- nr of procs for lpp tool
|
||||
setenv CFDEM_LPP_NPROCS 4
|
||||
|
||||
#- nr of procs for lpp tool
|
||||
setenv CFDEM_LPP_CHUNKSIZE 1
|
||||
|
||||
#- shortcut to run lpp
|
||||
alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py --cpunum $CFDEM_LPP_NPROCS --chunksize $CFDEM_LPP_CHUNKSIZE \!:1'
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# aliases for easy navigation (no changes necessary)
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
#- shortcut to cfdem path
|
||||
alias cfdem 'cd $CFDEM_PROJECT_DIR'
|
||||
|
||||
#- shortcut to src path
|
||||
alias cfdemSrc 'cd $CFDEM_SRC_DIR'
|
||||
|
||||
#- shortcut to tutorial path
|
||||
alias cfdemTut 'cd $CFDEM_TUT_DIR'
|
||||
|
||||
#- shortcut to solver path
|
||||
alias cfdemSol 'cd $CFDEM_SOLVER_DIR'
|
||||
|
||||
#- shortcut to utilities path
|
||||
alias cfdemUt 'cd $CFDEM_UT_DIR'
|
||||
|
||||
#- shortcut to run path
|
||||
alias cfdemRun 'cd $CFDEM_PROJECT_USER_DIR/run'
|
||||
|
||||
#- shortcut to user solver path
|
||||
alias cfdemUsrSol 'cd $CFDEM_PROJECT_USER_DIR/applications/solvers'
|
||||
|
||||
#- shortcut to documentation path
|
||||
alias cfdemDoc 'cd $CFDEM_DOC_DIR'
|
||||
|
||||
#- shortcut to open the doxygen with firefox
|
||||
alias cfdemDox 'firefox $CFDEM_DOC_DIR/doxygen/html/index.html'
|
||||
|
||||
#- shortcut to LIGGGHTS path
|
||||
alias cfdemLIG 'cd $CFDEM_LIGGGHTS_SRC_DIR'
|
||||
|
||||
#- shortcut to system test
|
||||
alias cfdemSysTest 'bash $CFDEM_PROJECT_DIR/etc/cfdemSystemTest.sh'
|
||||
|
||||
#- shortcut to pull LIGGGHTS
|
||||
alias cfdemPullLIG 'bash $CFDEM_PROJECT_DIR/etc/pullLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to pull CFDEMcoupling
|
||||
alias cfdemPullCFDEMcoupling 'bash $CFDEM_PROJECT_DIR/etc/pullCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to clean CFDEM
|
||||
alias cfdemCleanCFDEM 'bash $CFDEM_PROJECT_DIR/etc/cleanCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile LIGGGHTS + sublibraries
|
||||
alias cfdemCompLIG 'bash $CFDEM_PROJECT_DIR/etc/compileLIGGGHTS.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling +LIGGGHTS
|
||||
alias cfdemCompCFDEMall 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_all.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling (src+solvers)
|
||||
alias cfdemCompCFDEM 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling src
|
||||
alias cfdemCompCFDEMsrc 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_src.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling solvers
|
||||
alias cfdemCompCFDEMsol 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_sol.sh'
|
||||
|
||||
#- shortcut to compile CFDEMcoupling utilities
|
||||
alias cfdemCompCFDEMuti 'bash $CFDEM_PROJECT_DIR/etc/compileCFDEMcoupling_uti.sh'
|
||||
|
||||
#- shortcut to test basic tutorials
|
||||
alias cfdemTestTUT 'bash $CFDEM_PROJECT_DIR/etc/testTutorials.sh'
|
||||
|
||||
#- shortcut to visualize the clock model data
|
||||
alias vizClock 'python $CFDEM_UT_DIR/vizClock/matPlot.py'
|
||||
|
||||
#- shortcut to run liggghts in serial
|
||||
alias cfdemLiggghts '$CFDEM_LIGGGHTS_BIN_DIR/liggghts'
|
||||
|
||||
#- shortcut to run liggghts in parallel (no fcts in csh...)
|
||||
alias cfdemLiggghtsPar 'echo "mpirun -np xx -machinefile mynodes $CFDEM_LIGGGHTS_BIN_DIR/liggghts < in.liggghts_init"'
|
||||
|
||||
#- shortcut to run liggghts in parallel
|
||||
# unfortunately no functions available in csh
|
||||
|
||||
#- shortcut to run lpp
|
||||
alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py \!:1'
|
||||
|
||||
#- check if the user directory exists
|
||||
if ( -d "$CFDEM_PROJECT_USER_DIR" ) then
|
||||
:
|
||||
else
|
||||
if ( -d "$CFDEM_PROJECT_DIR" ) then
|
||||
echo "make new dirs $CFDEM_PROJECT_USER_DIR ? (y/n)"
|
||||
set YN=$<
|
||||
if ( $YN == "y" ) then
|
||||
mkdir -p $CFDEM_PROJECT_USER_DIR
|
||||
cd $CFDEM_PROJECT_USER_DIR
|
||||
mkdir run
|
||||
mkdir -p log/logFilesCFDEM-$CFDEM_VERSION-$WM_PROJECT_VERSION
|
||||
mkdir -p applications/solvers
|
||||
else
|
||||
echo "aborted by user."
|
||||
exit
|
||||
endif
|
||||
else
|
||||
echo "error in CFDEMcoupling's cshrc."
|
||||
exit
|
||||
endif
|
||||
endif
|
||||
@ -71,7 +71,22 @@ compileLib()
|
||||
|
||||
#- wclean and wmake
|
||||
#if [ $doClean != "noClean" ]; then
|
||||
rmdepall 2>&1 | tee -a $logpath/$logfileName
|
||||
# check library to compile is compressible
|
||||
str=$casePath
|
||||
i=$((${#str}-4))
|
||||
ending=${str:$i:4}
|
||||
if [[ $ending == "Comp" ]]; then
|
||||
echo "Compiling a compressible library - so doing a wrmdep -a of incompressible library first."
|
||||
echo "Please make sure to have the incompressible libraries first in the library-list.txt!"
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle
|
||||
echo "changing to $PWD"
|
||||
wrmdep -a 2>&1 | tee -a $logpath/$logfileName
|
||||
cd $casePath
|
||||
echo "changing to $PWD"
|
||||
else
|
||||
echo "Compiling an incompressible library."
|
||||
fi
|
||||
wrmdep -a 2>&1 | tee -a $logpath/$logfileName
|
||||
wclean 2>&1 | tee -a $logpath/$logfileName
|
||||
#fi
|
||||
wmake libso 2>&1 | tee -a $logpath/$logfileName
|
||||
@ -113,7 +128,7 @@ compileSolver()
|
||||
|
||||
#- wclean and wmake
|
||||
#if [ $doClean != "noClean" ]; then
|
||||
rmdepall 2>&1 | tee -a $logpath/$logfileName
|
||||
wrmdep -a 2>&1 | tee -a $logpath/$logfileName
|
||||
wclean 2>&1 | tee -a $logpath/$logfileName
|
||||
#fi
|
||||
|
||||
@ -139,13 +154,15 @@ compileLIGGGHTS()
|
||||
logpath="$1"
|
||||
logfileName="$2"
|
||||
headerText="$3"
|
||||
clean="$4"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- clean up old log file
|
||||
rm $logpath/$logfileName
|
||||
|
||||
#- change path
|
||||
cd $CFDEM_LIGGGHTS_SRC_DIR
|
||||
mkdir -p $CFDEM_LIGGGHTS_BIN_DIR
|
||||
cd $CFDEM_LIGGGHTS_BIN_DIR
|
||||
|
||||
#- header
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
@ -157,18 +174,21 @@ compileLIGGGHTS()
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- wclean and wmake
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lmp_"$CFDEM_LIGGGHTS_MAKEFILE_NAME
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lib"$CFDEM_LIGGGHTS_LIB_NAME".a"
|
||||
make clean-all 2>&1 | tee -a $logpath/$logfileName
|
||||
if [[ $clean == "false" ]]; then
|
||||
echo "not cleaning LIGGGHTS"
|
||||
else
|
||||
make clean 2>&1 | tee -a $logpath/$logfileName
|
||||
rm CMakeCache.txt 2>&1 | tee -a $logpath/$logfileName
|
||||
echo "cleaning LIGGGHTS"
|
||||
fi
|
||||
cmake $CFDEM_LIGGGHTS_SRC_DIR
|
||||
if [[ $WM_NCOMPPROCS == "" ]]; then
|
||||
echo "compiling LIGGGHTS on one CPU"
|
||||
make $CFDEM_LIGGGHTS_MAKEFILE_NAME 2>&1 | tee -a $logpath/$logfileName
|
||||
make 2>&1 | tee -a $logpath/$logfileName
|
||||
else
|
||||
echo "compiling LIGGGHTS on $WM_NCOMPPROCS CPUs"
|
||||
make $CFDEM_LIGGGHTS_MAKEFILE_NAME -j $WM_NCOMPPROCS 2>&1 | tee -a $logpath/$logfileName
|
||||
make -j $WM_NCOMPPROCS 2>&1 | tee -a $logpath/$logfileName
|
||||
fi
|
||||
make makelib 2>&1 | tee -a $logpath/$logfileName
|
||||
make -f Makefile.lib $CFDEM_LIGGGHTS_MAKEFILE_NAME 2>&1 | tee -a $logpath/$logfileName
|
||||
}
|
||||
|
||||
#==================================#
|
||||
@ -189,7 +209,13 @@ compileLMPlib()
|
||||
rm $logpath/$logfileName
|
||||
|
||||
#- change path
|
||||
cd $libraryPath
|
||||
if [ -d "$libraryPath" ]; then
|
||||
cd $libraryPath
|
||||
else
|
||||
echo ""
|
||||
echo "lib path $libraryPath does not exist - check settings in .../etc/bashrc."
|
||||
read
|
||||
fi
|
||||
|
||||
#- header
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
@ -223,7 +249,7 @@ cleanCFDEM()
|
||||
|
||||
#**********************************************
|
||||
#cleaning libraries
|
||||
whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/library-list.txt"
|
||||
whitelist="$CFDEM_PROJECT_DIR/etc/library-list.txt"
|
||||
echo ""
|
||||
echo "Please provide the libraries to be cleaned in the $CWD/$whitelist file."
|
||||
|
||||
@ -258,7 +284,7 @@ cleanCFDEM()
|
||||
|
||||
cd $path
|
||||
echo "cleaning library $PWD"
|
||||
rmdepall
|
||||
wrmdep -a
|
||||
wclean
|
||||
rm -r ./Make/linux*
|
||||
rm -r ./lnInclude
|
||||
@ -277,7 +303,7 @@ cleanCFDEM()
|
||||
|
||||
#**********************************************
|
||||
#cleaning solvers
|
||||
whitelist="$CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/solver-list.txt"
|
||||
whitelist="$CFDEM_PROJECT_DIR/etc/solver-list.txt"
|
||||
echo ""
|
||||
echo "Please provide the solvers to be cleaned in the $CWD/$whitelist file."
|
||||
|
||||
@ -312,7 +338,7 @@ cleanCFDEM()
|
||||
|
||||
cd $path
|
||||
echo "cleaning solver $PWD"
|
||||
rmdepall
|
||||
wrmdep -a
|
||||
wclean
|
||||
done
|
||||
}
|
||||
@ -378,7 +404,7 @@ DEMrun()
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- run applictaion
|
||||
$debugMode $CFDEM_LIGGGHTS_SRC_DIR/$CFDEM_LIGGGHTS_LIB_NAME < $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
$debugMode $CFDEM_LIGGGHTS_BIN_DIR/liggghts -in $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
#read
|
||||
@ -428,9 +454,9 @@ parDEMrun()
|
||||
|
||||
#- run applictaion
|
||||
if [ $machineFileName == "none" ]; then
|
||||
mpirun -np $nrProcs $debugMode $CFDEM_LIGGGHTS_SRC_DIR/$CFDEM_LIGGGHTS_LIB_NAME < $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
mpirun -np $nrProcs $debugMode $CFDEM_LIGGGHTS_BIN_DIR/liggghts -in $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
else
|
||||
mpirun -machinefile $machineFileName -np $nrProcs $debugMode $CFDEM_LIGGGHTS_SRC_DIR/$CFDEM_LIGGGHTS_LIB_NAME < $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
mpirun -machinefile $machineFileName -np $nrProcs $debugMode $CFDEM_LIGGGHTS_BIN_DIR/liggghts -in $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
fi
|
||||
|
||||
#- keep terminal open (if started in new terminal)
|
||||
@ -524,7 +550,7 @@ parCFDrun()
|
||||
|
||||
#- run applictaion
|
||||
if [ $machineFileName == "none" ]; then
|
||||
mpirun -np $nrProcs $solverName 2>&1 | tee -a $logpath/$logfileName
|
||||
mpirun -np $nrProcs $solverName -parallel 2>&1 | tee -a $logpath/$logfileName
|
||||
else
|
||||
mpirun -machinefile $machineFileName -np $nrProcs $debugMode $solverName -parallel 2>&1 | tee -a $logpath/$logfileName
|
||||
fi
|
||||
@ -550,6 +576,7 @@ parCFDDEMrun()
|
||||
machineFileName="$7"
|
||||
debugMode="$8"
|
||||
reconstuctCase="$9"
|
||||
cleanCase="$10"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
if [ $debugMode == "on" ]; then
|
||||
@ -903,6 +930,52 @@ checkDirComment()
|
||||
fi
|
||||
}
|
||||
|
||||
#========================================#
|
||||
#- function to check if a variable exits
|
||||
checkEnv()
|
||||
{
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
var="$1"
|
||||
#--------------------------------------------------------------------------------#
|
||||
if [[ $var == "" ]]; then
|
||||
echo "false"
|
||||
else
|
||||
echo "true"
|
||||
fi
|
||||
}
|
||||
|
||||
#========================================#
|
||||
#- function to check if a variable exits
|
||||
checkEnvComment()
|
||||
{
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
var="$1"
|
||||
varName="$2"
|
||||
critical="$3"
|
||||
#--------------------------------------------------------------------------------#
|
||||
if [ $(checkEnv $var) == "true" ]; then
|
||||
echo "valid:yes critical:$critical - $varName = $var"
|
||||
else
|
||||
echo "valid:NO critical:$critical - $varName = $var variable not set!"
|
||||
fi
|
||||
}
|
||||
|
||||
#========================================#
|
||||
#- function to print a header to terminal
|
||||
printHeader()
|
||||
{
|
||||
echo ""
|
||||
echo "*********************************************"
|
||||
echo "* C F D E M (R) c o u p l i n g *"
|
||||
echo "* *"
|
||||
echo "* by DCS Computing GmbH *"
|
||||
echo "* www.dcs-computing.com *"
|
||||
echo "*********************************************"
|
||||
echo ""
|
||||
}
|
||||
|
||||
#========================================#
|
||||
#- track memory usage
|
||||
trackMem()
|
||||
@ -1,4 +1,4 @@
|
||||
#syntax: makefileName/dir
|
||||
#note: dir is not a path, just a keyword here
|
||||
###############################################
|
||||
M2M/dir
|
||||
Many2Many/dir
|
||||
3
etc/library-list.txt
Normal file
3
etc/library-list.txt
Normal file
@ -0,0 +1,3 @@
|
||||
lagrangian/cfdemParticle/dir
|
||||
lagrangian/cfdemParticleComp/dir
|
||||
finiteVolume/dir
|
||||
@ -6,12 +6,12 @@
|
||||
#===================================================================
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
source $CFDEM_PROJECT_DIR/etc/functions.sh
|
||||
|
||||
NOW="$(date +"%Y-%m-%d-%H:%M")"
|
||||
logDir="log"
|
||||
|
||||
cd $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc
|
||||
cd $CFDEM_PROJECT_DIR/etc
|
||||
mkdir -p $logDir
|
||||
|
||||
#--------------------------------------------------------------------------------#
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user