429 Commits
2.6.4 ... 17.02

Author SHA1 Message Date
b764943f04 Merge pull request #15 from ParticulateFlow/release
Release 17.02
2017-03-08 16:22:48 +01:00
95e35ef0e6 add post folder to DEM part 2017-03-08 15:47:06 +01:00
60e1f0c067 proper naming of output files
plotting z-positions and z-velocities, so name the output files say
'pos_z<something>' and 'vel_z<something>'
2017-03-08 15:41:28 +01:00
b6d0bbf31a update run.config 2017-03-07 18:01:56 +01:00
f932c15b2a update comment sign in output 2017-03-07 17:50:13 +01:00
7b05d10fbc add poition and velocity plots to run.config of twoSphereGlowinskiMPI 2017-03-07 17:40:37 +01:00
84c4b2945e restore original inlet settings 2017-03-07 16:16:31 +01:00
c3fa5607c6 restore uniformFixedValueVoidfractionFvPatchField 2017-03-07 16:15:59 +01:00
6fd271c377 ignore build folder 2017-03-06 09:33:58 +01:00
98cd5ce09f adjust run.config 2017-03-03 14:29:36 +01:00
97fd42e376 explicitly set liggghts log file 2017-03-02 18:42:30 +01:00
8efa366ded correct solver in testharness run config 2017-03-02 18:06:52 +01:00
307588ccc7 remove extra semicolons in controlDict files 2017-03-02 15:51:42 +01:00
a628c856f9 minor clean-up of README 2017-03-02 12:59:48 +01:00
12f942a4b9 disable check for additional packages
we don't provide any additional packages ...
2017-03-02 12:58:45 +01:00
f2085bd900 bump version & clean up version strings 2017-03-02 12:57:05 +01:00
80aaf69748 use the default 7 hexadecimal digits as the abbreviated object name 2017-03-02 12:55:21 +01:00
2bee441cea fix compile message 2017-02-21 11:00:15 +01:00
4bfb965da8 Merge pull request #9 from ParticulateFlow/fix_up_make_options
Fix up make options
2017-02-21 10:38:55 +01:00
0b58fbae71 Merge pull request #6 from ParticulateFlow/feature/fines
Feature/fines pull request accepted under reserve:
Documentation is an essential component of any pull request.
2017-02-21 10:29:32 +01:00
6439975233 clean up whitespaces
nowadays editors could do this automatically ...
2017-02-21 10:21:43 +01:00
678bb3b2cf Added functionality to limit particle-fluid interaction on particles and monitor current maximum value. 2017-02-20 15:53:53 +01:00
27811fc5b6 Merge branch 'feature/fines' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2017-02-10 07:48:00 +01:00
ef509dcb72 Changed voidfraction limiting values. 2017-02-10 07:47:14 +01:00
956a3a3236 Allow negative voidfractions in dividedVoidFraction. Useful in combination with smoothing models at processor or periodic boundaries. 2017-02-09 17:28:11 +01:00
9e478e23a6 enable/disable some warnings
disable warnings about old-style casts, unused results and literal
suffix, since they are of little interest and mostly caused by external
libraries (mpi, c/c++ standard libraries);
enable 'uninitialized' warning for many2many lib since that one is
indeed important;
2017-01-25 12:57:32 +01:00
6eeb0a4f19 make dependency builder happy
remove whitespaces in include options so wdep will find header files
2017-01-25 12:39:06 +01:00
72dda78652 make dependency builder happy
The compiler seems to have no problem with the space in the include option, however the dependency builder doesn't find the files.
2017-01-24 19:33:08 +01:00
4f17c33b4d avoid warnings about unused variables from postProcess.H
move
volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();
to createFieldRefs.H (and make T const)
2017-01-24 13:30:57 +01:00
a285248abd clean up whitespaces 2017-01-24 11:54:05 +01:00
849cede6fa fix Wreorder warning 2017-01-23 17:45:57 +01:00
c40c4ad6fb fix Wignored-qualifiers warnings 2017-01-23 17:22:43 +01:00
adcb9031ad fix OpenFOAM 4 issue in reactionHeat.C 2017-01-23 16:32:24 +01:00
afe55da77e remove cfdemSolverRhoPimpleChem from solver list 2017-01-23 16:29:13 +01:00
9ce3eb5d24 Added mesh generation for tutorial FinesColumn. 2017-01-23 09:36:43 +01:00
cccb78b4d3 Added missing file for cfdemSolverRhoPimple tutorial ErgunTestMPI. 2017-01-23 08:10:54 +01:00
912580a5c6 Deleted files related to cfdemSolverRhoPimpleChem. 2017-01-23 08:09:40 +01:00
4975656a94 added reactionHeat 2017-01-20 13:51:02 +01:00
59149ac886 Merge branch 'develop' into feature/fines 2017-01-20 08:34:44 +01:00
872f297dfb Some cleaning up. 2017-01-20 08:07:08 +01:00
0808a61cc2 Merge pull request #5 from ParticulateFlow/feature/OF4x
OpenFOAM 4.x
2017-01-19 12:47:15 +01:00
8862308d82 rename dimensionedScalar entries to refelct their value 2017-01-19 10:54:16 +01:00
3030f04be0 Merge branch 'feature/fines' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2017-01-17 11:25:38 +01:00
9ca32ce5f6 Tutorial case for fines transport and deposition. 2017-01-17 11:25:00 +01:00
aff47d3588 restore previous testcase settings
to make regression testing easier
2017-01-09 17:34:20 +01:00
a13960131c fix fillCylinder case for OpenFOAM 4.0 2016-12-14 09:39:47 +01:00
5b560c726b add dummy density field rho in cfdemPostproc
ported from CFDEMcoupling-PUBLIC
2016-12-14 09:35:38 +01:00
d59b7a7cff fix packedBedTemp case for OpenFOAM 4.0
fix turbulence properties
2016-12-13 17:37:10 +01:00
43f78101a2 fix twoSpheresGlowinskiMPI case for OpneFOAM 4.0 2016-12-13 17:02:57 +01:00
15b3f7016d fix cfdemSolverIB for OpenFOAM 4.0
see CFDEMcoupling-PUBLIC for reference
2016-12-13 16:59:23 +01:00
6e71533e60 fix post-processing of ErgunTest cases for OpenFOAM 4.0
fix number of headerlines expected in probe files for ErgunTestCG,
ErgunTestMPI_cgs and ErgunTestMPI_restart
2016-12-13 16:44:35 +01:00
e17e68abcb fix compilation of cfdemPostproc for OpenFOAM 4.0
update to OpenFOAM 4.0 turbulence model
2016-12-13 14:56:06 +01:00
e3799108fd Allow implicit heat transfer in energy equation. 2016-11-28 12:12:27 +01:00
e752445880 Some minor corrections for heat transfer. 2016-11-28 12:11:57 +01:00
5ba7f10a29 Fixed a logical error regarding averages with distributed particle weights. 2016-11-28 12:10:17 +01:00
246f6f08db Merge branch 'feature/fines' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2016-11-28 08:56:21 +01:00
a800b6c426 Fix Cp vs Cv issue in energy equation. 2016-11-28 08:55:30 +01:00
201cbe16fc Compute granular kinetic energy per cell. 2016-11-28 08:54:59 +01:00
1ff6217ae3 fixed error in scaling force submodel; output of average particle temperature 2016-11-16 13:40:59 +01:00
09d546cafd Merge branch 'feature/fines' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2016-11-15 08:21:30 +01:00
be4429f995 New force submodel to reduce force close to a plane, e.g. a boundary wall. 2016-11-15 08:20:57 +01:00
49c0bc63d7 Fix treatment of Sauter mean diameter. 2016-11-08 10:48:57 +01:00
0d6ed36cf3 Make sure voidfraction has meaningful values. 2016-11-02 16:10:23 +01:00
f1a448883a Put verbose part at right place. 2016-10-31 08:05:35 +01:00
4fc0edcfca Introduced own term addSource for additional sources in energy equation. 2016-10-18 15:34:45 +02:00
018d4a2eda Calculate and store Re and Nu. 2016-10-18 15:33:07 +02:00
00b5f4633d Allow for coarse graining and changes due to modified size distributions. 2016-10-18 15:31:17 +02:00
01c1d60822 Update boundary conditions of wallQFactor. 2016-09-14 11:01:25 +02:00
5b7f59548c Removed old OF syntax. 2016-08-31 10:53:37 +02:00
591f5445ba Added debugging options for deposition mechanism. 2016-08-31 10:20:40 +02:00
e1db699f40 Calculate uDyn also at boundaries. 2016-08-29 10:52:15 +02:00
27cf909571 Parallel output for debugging. 2016-08-29 09:47:55 +02:00
ac6a1aac43 Fixed dimension problem. 2016-08-29 08:11:47 +02:00
f307a18f12 Changed mass flux field of fines. 2016-08-26 13:02:14 +02:00
356c1853cd Reformulation of forces and voidfraction calculation. 2016-08-24 16:40:26 +02:00
91858c93aa Diffusion of dyn hold up. 2016-08-04 14:40:57 +02:00
49dbfaf33a Do not remove complete dyn hold up from cell. 2016-08-04 14:11:23 +02:00
490c0e6efb Add smoothing of dyn hold up. 2016-08-04 14:03:22 +02:00
ebcc951df3 Check on errors due to boundedness of fields. 2016-08-04 12:13:10 +02:00
1b7b190746 Move voidfraction update into own function. 2016-08-03 10:33:14 +02:00
011281d449 Merge branch 'feature/OF4x' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2016-08-02 14:35:50 +02:00
d5b2422bab Existence of required files increases likelihood of successful compilation drastically. 2016-08-02 14:29:35 +02:00
2c885c84d1 Change pressure boundary condition. 2016-08-02 13:16:40 +02:00
ff8db6374f Tutorial for cfdemSolverRhoPimple. 2016-08-02 13:00:33 +02:00
684eb53001 Updated to OF 4.x. 2016-08-02 12:59:26 +02:00
cf0d864c96 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/fines 2016-08-02 08:08:51 +02:00
cd614bf299 Updated tutorials. 2016-08-01 15:55:45 +02:00
308cdf27c4 Updated tutorials. 2016-08-01 15:51:59 +02:00
ec60bf8eee Updated Piso/ErgunTestMPI_cgs tutorial. 2016-08-01 15:48:27 +02:00
4ce5838238 Updated Piso/ErgunTestCG tutorial. 2016-08-01 15:43:33 +02:00
4c7b7c7f4e Delete output.mp4 2016-07-27 15:11:49 +02:00
61f633e3b2 shrink vid 2016-07-27 14:38:53 +02:00
b49a013474 shrinking tutorial case 2016-07-27 14:38:17 +02:00
30a057a87c changed modified spec names 2016-07-27 14:31:17 +02:00
09d567e963 Implicit heat transfer. Introduction of postFlow() to perform coupling operations after solution of fluid eqns. 2016-07-26 12:55:15 +02:00
5062acea1f Changes in pore size calculations. 2016-07-22 10:45:54 +02:00
d30f828fe5 Updating solvers to OF 4.x. 2016-07-21 12:16:55 +02:00
0a2f1c793a Cleaning up cfdemSolverPiso tutorial ErgunMPI. 2016-07-21 12:16:09 +02:00
5f05e074d1 fixes in tutorial-case 2016-07-20 17:16:52 +02:00
85b7e448c9 fixed names for data transfer with DEM 2016-07-20 17:15:28 +02:00
37c653945a added the execution of chem reactions to solver 2016-07-20 17:14:42 +02:00
8bb99ae9ce Adapted source code to OF 4.x. 2016-07-20 14:57:05 +02:00
1265463275 Update files and options lists. 2016-07-20 14:56:41 +02:00
3ad42f2326 New OF version. Not needed by code. 2016-07-20 14:55:55 +02:00
44d9b77f07 rmdepall changed to wrmdep -a. 2016-07-20 14:55:01 +02:00
9b3ed8eda6 CfdemSolverPiso tutorial adapted to OF 4.x. 2016-07-20 14:53:48 +02:00
4b31e2f36f Adapt solvers to OF 4.x. 2016-07-20 14:51:11 +02:00
cdc38e7323 latest semi-working tutorial case 2016-07-19 17:08:43 +02:00
618992c2cb error check 2016-07-19 15:15:26 +02:00
ea88de9808 seperated pisoTemp solver & changed cloud energy 2016-07-19 14:35:16 +02:00
270475cd17 Limit hold-ups. 2016-07-19 08:27:51 +02:00
403a79d1ac Added switch for reconstruction of U from Phi. 2016-07-19 08:27:27 +02:00
02e80d4406 Limit absolute value of explicit momentum exchange term. 2016-07-15 10:46:45 +02:00
a8796c85da Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-07-14 17:19:39 +02:00
da9dd28ee9 debug checks in cfdem 2016-07-14 17:19:07 +02:00
6a09f6ce9a Delete CFDEM.includes 2016-07-14 15:33:34 +02:00
41191dff77 Delete CFDEM.files 2016-07-14 15:33:24 +02:00
a8dc59cd7a Delete CFDEM.creator 2016-07-14 15:33:16 +02:00
50885dba56 Delete CFDEM.config 2016-07-14 15:33:09 +02:00
57b8abfbda execute species added to cfdem cloud energy & small changes 2016-07-14 15:30:07 +02:00
34a4282a1e New pressure boundary treatment. 2016-07-14 14:59:03 +02:00
45e11369df Correct limit for uDyn, boundary conditions. 2016-07-14 14:58:09 +02:00
0ca7b3a75c seperated RhoPimpleChem solver from RhoPimple 2016-07-14 10:47:22 +02:00
57e19765e0 Testing new boundary condition for pressure gradient. 2016-07-13 18:47:18 +02:00
32870ea73f Added testing functions. Will be removed again. 2016-07-13 18:06:02 +02:00
3ba3e19563 tutorial case for chem/shrink 2016-07-13 13:08:21 +02:00
4f7c2cbbab Use explicit momentum couple models only. 2016-07-13 08:34:44 +02:00
5b8749336f Explicit momentum couple model holds its own fields now. 2016-07-13 08:34:07 +02:00
cc8d3d7272 Clean up. 2016-07-13 08:33:19 +02:00
527d140b00 Moved fOther into UEqn. 2016-07-13 08:32:46 +02:00
3a80605540 Correct definition of Froude number. 2016-07-12 14:02:21 +02:00
b552c888ba Update drag coefficient. 2016-07-12 11:39:02 +02:00
740d366e59 Allow for additional body forces. 2016-07-07 15:43:44 +02:00
9fc8e046df Merge cfdemSolverRhoPimple into fines. 2016-07-07 13:45:44 +02:00
7abdad8394 Minor changes. 2016-07-07 13:38:18 +02:00
b94f0f4d28 Make sure boundary fields are updated. 2016-07-07 13:37:44 +02:00
bd8ec597f6 Minor changes. 2016-07-07 13:37:02 +02:00
d99019ee73 Update file lists. 2016-07-07 13:35:50 +02:00
0a6fc10fbc Not necessary anymore. gradPForce can take scaling field via new forceSubmodel. 2016-07-07 13:35:18 +02:00
29ec96de52 New forceSubModel to scale force with user-defined field. 2016-07-06 17:20:24 +02:00
561bdbc029 Made function virtual. 2016-07-06 17:19:54 +02:00
dada2f98fb Added relative contribution of static hold-up to solid fraction field. 2016-07-06 17:19:27 +02:00
39342e4631 Update file lists. 2016-07-06 17:18:55 +02:00
d9441091f5 FinesFields need no runtime selection mechanism for now. 2016-07-06 16:24:10 +02:00
9f45e97632 Removed non-existing member function from class declaration. 2016-07-06 16:23:09 +02:00
9a98108b02 OtherForces optional, need not be specified. 2016-07-06 16:21:30 +02:00
7b846237ec Cleaning up. 2016-07-05 15:36:28 +02:00
585dc68ff5 Fix sign error: Force on particles = - Force on fluid. 2016-07-05 14:59:31 +02:00
76fd1f1e02 Force models other than those for implicit particle-fluid interaction. 2016-07-05 14:53:37 +02:00
18c2a950a3 Cleaning up. 2016-07-05 14:52:11 +02:00
c4fc6d9229 Allow for other types of forces like external ones or explicit particle-fluid interaction. 2016-07-05 14:51:38 +02:00
fcd57a17f5 Update file list. 2016-07-05 14:50:23 +02:00
2da9631f20 Some cleaning up of fines models. 2016-07-05 10:27:41 +02:00
1be85551c1 Update file lists. 2016-07-05 10:26:03 +02:00
057b94ae89 Minor modifications. 2016-07-04 16:43:12 +02:00
4608b8f228 Added export functions for Froude number etc. 2016-07-01 17:26:20 +02:00
a70c21a77d Minor modifications. 2016-07-01 15:04:19 +02:00
c44bb87ea4 Calculation of Sauter mean diameter. 2016-07-01 09:08:47 +02:00
ca1263b6a6 Force model for dynamic hold-up. 2016-07-01 09:08:11 +02:00
8d495580ed Update file list. 2016-07-01 09:07:12 +02:00
686cc4122c Heat flux through walls can now be controlled via boundary field. 2016-06-09 12:23:28 +02:00
fc01f7a409 Allow for wall-film effects. 2016-06-08 20:38:42 +02:00
a6a2c0bd41 fixed tutorial case for chemistry coupling 2016-06-07 10:52:33 +02:00
4dd26fa5af Basic functionality for implicit heat transfer. 2016-06-03 13:52:44 +02:00
c9c0e49a0f changed tutorial case for test 2016-06-03 12:38:23 +02:00
9aba825507 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-06-03 10:38:23 +02:00
f814cece09 Calculate BCs for thermDiff instead of specifying them separately. 2016-06-03 10:37:44 +02:00
59eb7962f4 Removed comments for testing purposes. 2016-06-03 10:33:38 +02:00
7ef2dc93a3 fixed tutorial case 2016-05-31 13:47:23 +02:00
884d99fbb4 Make energy eqn. dimension-consistent. 2016-05-30 12:06:27 +02:00
3791e818f9 Update list of source files for compressible case. 2016-05-30 11:49:00 +02:00
a986592e0a Resolving merge issues 2016-05-17 09:37:20 +02:00
a731d14e72 Change of averaging procedure. 2016-05-17 08:21:27 +02:00
d4ccd008ba Fix dimensions problem. 2016-05-14 16:59:57 +02:00
d321fb5a2f Change weight argument in averaging and sum functions to const. 2016-05-14 16:59:23 +02:00
712b5b9617 Fix change of write options for IOObjects. 2016-05-13 19:19:48 +02:00
bdd8244e82 Hopefully fixing merge problems. 2016-05-13 19:01:59 +02:00
001225b5e4 Make tutorial case work. Needs thDiff initial condition. 2016-05-13 18:58:17 +02:00
8eb000e27b Towards particle temp. field. 2016-05-13 18:55:48 +02:00
8cbaa515e4 Add functionality to average particle temperatures. 2016-05-13 13:59:18 +02:00
6777c7b7dd dim change 2016-05-13 10:51:45 +02:00
920d6468d8 thermal diffusivity was missing 2016-05-13 10:50:38 +02:00
8b7e48ac36 fixed noThermCond model 2016-05-13 10:49:04 +02:00
d8689ee78d Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-05-12 17:24:09 +02:00
32331ab366 partial working test case 2016-05-12 16:52:35 +02:00
5458e4b7d5 minor changes 2016-05-12 16:51:59 +02:00
0530e6eed8 Some cleaning up. Material produced from reactions summed up and scaled by cell size. 2016-05-12 14:38:40 +02:00
9e9ca2f0a4 Little changes. 2016-05-12 14:24:32 +02:00
ac29491c96 Switch to Syamlal model. 2016-05-12 14:24:10 +02:00
b149954ec5 Needed to include div scheme. 2016-05-12 14:23:37 +02:00
11b8b27bae kf and Cp need to have dimensions. Cp != 0. 2016-05-12 14:03:28 +02:00
3071b8a26e Move thermal diff. function call outside laplacian. 2016-05-12 13:53:26 +02:00
f2974ddc0c Dimensional problem. 2016-05-12 13:52:21 +02:00
7391e297c6 Changes in species model. 2016-05-12 13:51:15 +02:00
3314125aab Update files to compile also for compressible case. 2016-05-12 13:18:28 +02:00
81550e5d46 Fix dimension problem. 2016-05-12 13:16:19 +02:00
574ffd3932 Tutorial case for cfdemSolverRhoPimpleChem 2016-05-11 18:47:28 +02:00
949fe61957 give and get data from Liggghts 2016-05-11 18:39:21 +02:00
e2ab9fb68d thermCondModel off is added 2016-05-11 18:38:22 +02:00
90cc4d789f created member functions 2016-05-04 14:53:43 +02:00
4c5ec2e420 Changed voidfraction,rho to rhoeps 2016-05-04 14:52:58 +02:00
e9783bb370 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-04-28 16:11:29 +02:00
41584c876d read from file 2016-04-28 16:11:00 +02:00
bb3f463352 Particle temperature field. 2016-04-28 12:15:15 +02:00
a86e7ee06d Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-04-28 12:00:38 +02:00
d28ecb867d Particle temperature field. 2016-04-28 11:59:58 +02:00
1000e08080 advances in species.c 2016-04-27 10:48:23 +02:00
3c166d62ea changes to species submodel 2016-04-22 14:51:23 +02:00
12043fdc30 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2016-04-20 12:01:59 +02:00
44ee6fd38d Changes to species 2016-04-20 12:01:16 +02:00
9fc0c932d9 Minor changes. 2016-04-14 16:18:14 +02:00
1447d847cf Rearrange T eqn. 2016-04-11 15:14:44 +02:00
0b120395d3 Minor changes. 2016-03-31 10:35:53 +02:00
cc4dcedd4c Changes of class structures, additional models. 2016-03-30 16:48:50 +02:00
7e6aefc052 Minor changes. 2016-03-30 16:46:19 +02:00
8bfe2901b8 New solver, explicitly handling chemistry. 2016-03-30 16:45:39 +02:00
fff5d45e4c Minor changes. 2016-03-30 16:44:28 +02:00
4cb96a17c4 Classes to exchange species concentrations. 2016-03-04 14:59:46 +01:00
43f0574a72 Minor changes. 2016-03-01 13:24:35 +01:00
221cc19233 Piso with passive temperature equation. 2016-02-29 17:21:29 +01:00
7242c84635 Minor modifications. 2016-02-29 17:18:59 +01:00
0a818fa98c Merge branch 'develop' into feature/cfdemSolverRhoPimple
Make new drag law available.
2016-02-29 09:35:36 +01:00
c0daf66680 Merge pull request #3 from ParticulateFlow/feature/BeetstraDrag
Feature/beetstra drag
2016-02-29 09:28:06 +01:00
e2a2cdc6ac Make Beetstra drag fit for coarse graining. 2016-02-29 09:27:10 +01:00
6675ec3868 Minor changes. 2016-02-28 19:41:27 +01:00
e6f51210c4 Minor changes. 2016-02-27 13:20:27 +01:00
46111bb4cb Energy models. 2016-02-27 13:20:09 +01:00
9a596eb4d2 Beetstra drag law, added citation. 2016-02-26 11:03:11 +01:00
434e3983f6 Basics for compressible, reacting flows. 2016-02-25 15:39:17 +01:00
9fc7dcf4f2 Moved heat transfer from force to energy models. 2015-08-24 10:15:59 +02:00
8a97305e85 Added energyModel to handle heat transfer etc. 2015-08-22 11:53:12 +02:00
2ec3a3efe7 Included heat transfer between particles and fluid, thermal conductivity of fluid; 2015-08-21 12:49:30 +02:00
993af3bea9 Removed some unnecessary files. 2015-08-04 14:28:58 +02:00
892afa5105 Compressible CFD-DEM solver based on rhoPimpleFoam. No energy transfer between gas and particle phase yet. 2015-08-04 14:15:43 +02:00
7e900b2bbc Fixed missing sign in drag coefficient. 2015-07-27 08:37:55 +02:00
c41e2966d5 Added Beetstra drag law (monodisperse case) 2015-07-21 14:41:54 +02:00
bd4a11de47 fix generation of satellite points on sphere surface
integer division caused irregular gap; off-by-one error caused first set
of xySplit points to be at the same position
2015-04-13 10:40:56 +02:00
eaa75ad0b3 dataExchangeModel: fix potential memory leaks 2015-04-02 13:25:17 +02:00
0c66e15979 fix my own stupidity 2015-04-02 10:58:50 +02:00
6c07ee75c0 re-allocation: revert to original behaviour
The problem with allocateArray is that the base class dataExchangeModel
actually allocates new memory disregarding already allocated (and
populated) memory while derived classes like twoWayMPI and
twoWayMany2Many ultimately use realloc
2015-04-02 09:41:22 +02:00
47772ea9d4 use correct data type 2015-04-01 16:44:39 +02:00
e255c3c28e width of this array has nothing to do with maxCellsPerParticle_
This is effectively a 1D array, but there's no method to automatically
create a 1D array with the length of nParticles as there is for the 2D
case ...
2015-04-01 16:35:16 +02:00
4c5d63e966 remove unused calls of MPI_Comm_rank 2015-04-01 15:35:15 +02:00
46ca306ada re-allocation of memory part 2
first destroy already allocated memory, then allocate new memory
2015-04-01 15:24:09 +02:00
077e0ff8aa clean up namespace 2015-04-01 11:45:24 +02:00
fd3a6362bf re-allocation of memory
first destroy already allocated memory, then allocate new memory
2015-04-01 10:53:01 +02:00
7161d6f15f use correct data type
converting back and forth between double and integer may cause issues
2015-03-31 17:18:05 +02:00
e2343661bb reflect what OpenFOAM expects 2015-03-31 16:35:05 +02:00
d387a2117f use const word& instead of word in parameter list
oops .. here as well
2015-03-31 16:31:36 +02:00
ededde9190 MPI: (rank < size) is always true 2015-03-31 15:48:16 +02:00
851deae90b use const word& instead of word in parameter list 2015-03-31 15:34:56 +02:00
6ad466dcea remove extra semicolons 2015-03-31 15:08:50 +02:00
f5c277b1c7 formatting 2015-03-31 15:02:51 +02:00
87536c03fd reduce divisions 2015-03-31 14:57:07 +02:00
5246a1ec66 integer division 2015-03-31 14:52:32 +02:00
e5dfd4b4eb Simplified twoWayMPI
The code seems to be derived from the LAMMPS COUPLE library. The original COUPLE code
allowed using a subset of the global processors for the coupled code. Some fractions
of that code remained, but on their own don't make sense anymore. Since no additional
colors are assigned to processors, MPI_Comm_split effectively just duplicates the
global communicator, which can be easily done using MPI_Comm_dup.

The second simplification is that the code tried to limit IO to MPI rank 0. The filename
of the input script was read in by one MPI rank and then broadcasted to all other ranks.
While from the outside this seems to make sense from an MPI programmer standpoint, it does
not take the OpenFOAM implementation into account. IODictionary is already multi-processor
aware. Reading operations are done only on the master processor. This means the dictionary
is already in memory for each MPI processor at this point in time and lookup() is an
in-memory operation.
2015-03-31 11:36:31 +02:00
1f0efcae7f make the value that is set useable ... 2015-03-30 15:46:18 +02:00
78918f8831 using predefined constant 2015-03-30 15:31:18 +02:00
11632e0539 improve readability 2015-03-30 14:20:26 +02:00
3ee0bf41de remove temp variables / simplify 2015-03-30 14:17:35 +02:00
3ca84c7dea accidentially removed parenthesis 2015-03-27 14:47:16 +01:00
d697c7afe0 white space clean up 2015-03-27 13:11:34 +01:00
981a8390c6 be generous with comment characters 2015-03-27 13:11:04 +01:00
d786f9680f use constants from math.h 2015-03-27 10:17:52 +01:00
3c1e7ca6a5 fun with OpenFOAM data types
OpenFOAM Switches default to false ...
2015-03-26 17:56:06 +01:00
142d87252b usage of OpenFoam::List 2015-03-26 17:30:20 +01:00
81b8c9cdad you've got to slow down, yeah, yeah, yeah, slow down
pow() used at its best
2015-03-26 16:52:31 +01:00
d3a0036acf don't use pow() for squaring 2015-03-26 16:25:49 +01:00
29cc6d9d74 inheritance is cool, pointers to local objects not so much 2015-03-26 16:09:44 +01:00
343d1cba5b use const std::string& instead of std::string as parameter 2015-03-26 15:06:05 +01:00
8566c7eaa4 convert tabs to spaces 2015-03-26 14:49:18 +01:00
acf0673e38 simplify string operations & initialization 2015-03-26 14:48:21 +01:00
c60bf9bf80 clean up twoWayMPI allocate/destroy functions
just the way LIGGGHTS is doing it ...
2015-03-25 17:42:04 +01:00
f4501938ff just mpi gather no need to sum up 2015-03-25 16:29:23 +01:00
69d18478fd remove extra semicolons 2015-03-25 14:24:14 +01:00
a1d8c61241 merge with CFDEMcoupling-PUBLIC 2.9.0 2015-03-25 14:23:49 +01:00
0f0ca849f6 remove extra semicolons 2015-03-25 11:01:56 +01:00
4c2d7531d4 zeroize pointers after freeing memory 2015-03-25 09:24:31 +01:00
3fbfa12318 no need to construct doubles from doubles ... 2015-03-24 14:09:23 +01:00
3bb89106cd the magic of const correctness 2015-03-24 13:20:38 +01:00
8b2292482f bad idea to return reference to local variable ... 2015-03-24 13:12:41 +01:00
c5e4f287dd just cleaning up whitespaces 2015-03-24 13:08:34 +01:00
84aa47ff72 OpenFoam lists have no such constructor... 2015-03-24 13:03:40 +01:00
99ea452db5 return sth. according to function declaration 2015-03-24 13:00:36 +01:00
667e806224 use static_cast instead of old-style casts 2015-03-24 12:58:33 +01:00
1307a0ef22 bug fixing by const correctness
also use static_cast instead of old-style casts!
2015-03-24 12:54:54 +01:00
0a8baeeeb3 zeroize pointers after destruction 2015-03-24 12:42:50 +01:00
54f00c6e53 integer division 2015-03-24 12:30:19 +01:00
5fcf7a7091 remove unused variables 2015-03-24 11:51:18 +01:00
2e72cfa774 remove extra semicolons 2015-03-24 11:47:10 +01:00
3d1bd01bc4 Merge remote-tracking branch 'origin/cmake_support' into bugfixing 2015-03-23 12:08:25 +01:00
ea0d7b0351 Changed to CMake compilation of LIGGGHTS
The cfdemCompLIG utility has been updated to use of CMake to compile LIGGGHTS.
This will generate a liggghts binary and libliggghts.so shared library which
can be used by CFDEMcoupling.

Users need to add the new environment variable CFDEM_LIGGGHTS_BIN_DIR into
their bashrc file, e.g.:

export CFDEM_LIGGGHTS_SRC_DIR=$PFM_DIR/LIGGGHTS/src
export CFDEM_LIGGGHTS_BIN_DIR=$PFM_DIR/LIGGGHTS/src-build

Other bash utilities in etc/functions.sh have also been updated, including
parDEMrun and parCFDEMrun.
2015-03-01 21:41:43 +01:00
59adfbe6ac Changes system header includes from "" to <> syntax
This avoids irritating warnings of wmake about it not finding certain headers
(e.g. system headers). Similar things were necessary in some headers of the
LIGGGHTS code. While these did not cause compilation errors, they messed up
the compilation output with hundrets of false alarms. Not very helpful if
you're trying to find out what went wrong.

One special case is the change from RASModel.H to turbulenceModel.H in
cfdemCloud.H. Between major OpenFOAM versions there was a change of how
turbulence models were implemented. While the CFDEMcoupling code uses
preprocessors to allow compatibility, the wmkdepend utility is too simple
to understand this. It does not evaluate #ifdef constructs and just looks
for #include lines. Therefore it tries to access RASModel.H in newer
versions of OpenFOAM, which no longer exists.

To circumvent this issue, both includes were changed from "" to <> syntax.
This suppresses the warning and compiles, since the OpenFOAM header is in
the include path anyway.
2015-03-01 20:25:17 +01:00
ee44d40c0e update utilities-list.txt 2015-01-05 13:56:45 +01:00
57d121a073 add finiteVolume/Make/files 2015-01-05 13:56:45 +01:00
fd44270f96 update Make/files 2015-01-05 13:56:45 +01:00
88743b79fd release on 2015-01-05_13-56-45 2015-01-05 13:56:45 +01:00
7fa304d58b Removed the '../DEM' reference from the liggghts init file 2014-12-12 10:34:35 +01:00
b4949ebd52 Solved merge conflict 2014-12-11 18:35:06 +01:00
fb3e8011d1 Cleanup + update for TH files 2014-12-11 18:33:49 +01:00
6d8e15561a update library-list.txt 2014-11-10 08:39:14 +01:00
30ad85f165 update solver-list.txt 2014-11-10 08:39:14 +01:00
8f38e3323c update tutorial-list.txt 2014-11-10 08:39:14 +01:00
5472fe1365 update Make/files 2014-11-10 08:39:14 +01:00
add7ade558 release on 2014-11-10_08-39-14 2014-11-10 08:39:14 +01:00
e1f10f705f Merge branch 'master' of github.com:CFDEMproject/CFDEMcoupling-PFM 2014-11-10 08:38:33 +01:00
270d1a9c51 update library-liggghts-list.txt 2014-11-10 08:33:26 +01:00
6b9b8c123e update library-list.txt 2014-11-10 08:33:26 +01:00
610cf500d3 update solver-list.txt 2014-11-10 08:33:26 +01:00
ded954c64b update tutorial-list.txt 2014-11-10 08:33:26 +01:00
c1f45f8477 update Make/files 2014-11-10 08:33:26 +01:00
ddb19070c5 release on 2014-11-10_08-33-26 2014-11-10 08:33:26 +01:00
f3e1d1428b update library-list.txt 2014-11-10 08:32:06 +01:00
aaaec21646 update solver-list.txt 2014-11-10 08:32:06 +01:00
dfea70fa96 update tutorial-list.txt 2014-11-10 08:32:06 +01:00
81282bbbc6 update Make/files 2014-11-10 08:32:06 +01:00
4426ba4085 release on 2014-11-10_08-32-06 2014-11-10 08:32:06 +01:00
c490123018 update library-liggghts-list.txt 2014-11-10 08:22:06 +01:00
7d43b2a63e update library-list.txt 2014-11-10 08:22:06 +01:00
87c12986cd update solver-list.txt 2014-11-10 08:22:06 +01:00
cabf5a36f9 update tutorial-list.txt 2014-11-10 08:22:06 +01:00
48f4f7508b update Make/files 2014-11-10 08:22:06 +01:00
c562f96f4a release on 2014-11-10_08-22-06 2014-11-10 08:22:06 +01:00
011ab2d3e2 update library-list.txt 2014-11-10 07:57:16 +01:00
fe05da2f16 update solver-list.txt 2014-11-10 07:57:16 +01:00
1c3d9b093c update tutorial-list.txt 2014-11-10 07:57:16 +01:00
a349923c3a update Make/files 2014-11-10 07:57:16 +01:00
409283acc3 release on 2014-11-10_07-57-15 2014-11-10 07:57:15 +01:00
eb6d45dd7b Fixes Compilation
Added missing object files back to lagrangian library. Otherwise solvers
won't compile. If this removal was intentional, it was not complete.
Reverting the change for now.
2014-11-09 18:53:26 +01:00
a8c8955d53 update library-liggghts-list.txt 2014-07-25 13:42:42 +02:00
43f460dc93 update library-list.txt 2014-07-25 13:42:42 +02:00
b4de650ed5 update solver-list.txt 2014-07-25 13:42:42 +02:00
8fb60fd045 update tutorial-list.txt 2014-07-25 13:42:41 +02:00
80030014a2 update Make/files 2014-07-25 13:42:41 +02:00
791bf252aa release on 2014-07-25_13-42-41 2014-07-25 13:42:41 +02:00
b16fb689e1 update library-list.txt 2014-07-17 16:27:28 +02:00
9e5a37168b update solver-list.txt 2014-07-17 16:27:28 +02:00
a2202729bc update tutorial-list.txt 2014-07-17 16:27:28 +02:00
bfafc1ec3b update Make/files 2014-07-17 16:27:28 +02:00
527be9e524 release on 2014-07-17_16-27-27 2014-07-17 16:27:28 +02:00
affb9e9720 update library-liggghts-list.txt 2014-07-17 15:58:49 +02:00
ff02919c99 update library-list.txt 2014-07-17 15:58:49 +02:00
83f8c89120 update solver-list.txt 2014-07-17 15:58:49 +02:00
e746c83f7d update tutorial-list.txt 2014-07-17 15:58:49 +02:00
70e274eb6c update Make/files 2014-07-17 15:58:49 +02:00
bcf54bf223 release on 2014-07-17_15-58-48 2014-07-17 15:58:49 +02:00
f035592c8e update library-list.txt 2014-07-17 11:24:53 +02:00
275bbed043 update solver-list.txt 2014-07-17 11:24:53 +02:00
6bb5e40c45 update tutorial-list.txt 2014-07-17 11:24:53 +02:00
5546d49a3f update Make/files 2014-07-17 11:24:53 +02:00
b0c9a14b8d release on 2014-07-17_11-24-52 2014-07-17 11:24:53 +02:00
8409a90179 update library-liggghts-list.txt 2014-07-17 10:14:56 +02:00
11fb74ce69 update library-list.txt 2014-07-17 10:14:56 +02:00
857f4499ca update solver-list.txt 2014-07-17 10:14:56 +02:00
db33ebfef4 update tutorial-list.txt 2014-07-17 10:14:56 +02:00
b20ea25fd4 update Make/files 2014-07-17 10:14:56 +02:00
cd4b4be8a2 release on 2014-07-17_10-14-56 2014-07-17 10:14:56 +02:00
32d614e017 update 2014-07-17 10:14:11 +02:00
867a60c965 update library-list.txt 2014-07-17 10:09:13 +02:00
9e5549b609 update solver-list.txt 2014-07-17 10:09:13 +02:00
3a1f1c1d9b update tutorial-list.txt 2014-07-17 10:09:13 +02:00
3fa5a83898 update Make/files 2014-07-17 10:09:13 +02:00
b969132b10 release on 2014-07-17_10-09-13 2014-07-17 10:09:13 +02:00
892ba4fef1 update library-liggghts-list.txt 2014-07-17 09:51:23 +02:00
dbec0a7a2c update library-list.txt 2014-07-17 09:51:23 +02:00
3bba346156 update solver-list.txt 2014-07-17 09:51:23 +02:00
b9bc51fca2 update tutorial-list.txt 2014-07-17 09:51:23 +02:00
cd1657e412 update Make/files 2014-07-17 09:51:23 +02:00
1d04b8c164 release on 2014-07-17_09-51-22 2014-07-17 09:51:22 +02:00
3b2dedf0fd update library-list.txt 2014-07-04 12:02:15 +02:00
a36d316891 update solver-list.txt 2014-07-04 12:02:15 +02:00
32ff1d83af update tutorial-list.txt 2014-07-04 12:02:15 +02:00
b378a79102 update Make/files 2014-07-04 12:02:15 +02:00
444b6f763e release on 2014-07-04_12-02-15 2014-07-04 12:02:15 +02:00
6888d13c52 update library-liggghts-list.txt 2014-07-04 11:58:55 +02:00
9ad186dabc update library-list.txt 2014-07-04 11:58:55 +02:00
6e48baf6bc update solver-list.txt 2014-07-04 11:58:55 +02:00
21fbdc17fc update tutorial-list.txt 2014-07-04 11:58:54 +02:00
92dbaab2c4 update Make/files 2014-07-04 11:58:54 +02:00
a26009c9b7 release on 2014-07-04_11-58-54 2014-07-04 11:58:54 +02:00
910adb37d0 update library-list.txt 2014-07-04 09:56:56 +02:00
cf56709426 update solver-list.txt 2014-07-04 09:56:56 +02:00
02ad97b3ed update tutorial-list.txt 2014-07-04 09:56:56 +02:00
27fbdf50f3 update Make/files 2014-07-04 09:56:56 +02:00
e3e93ccfd4 release on 2014-07-04_09-56-56 2014-07-04 09:56:56 +02:00
0460c28694 update library-liggghts-list.txt 2014-07-04 09:53:14 +02:00
db5984d24a update library-list.txt 2014-07-04 09:53:14 +02:00
d794e8cac0 update solver-list.txt 2014-07-04 09:53:14 +02:00
6bae5b44d6 update tutorial-list.txt 2014-07-04 09:53:14 +02:00
6d9b556231 update Make/files 2014-07-04 09:53:14 +02:00
e8514b10bc release on 2014-07-04_09-53-14 2014-07-04 09:53:14 +02:00
ef9d5ebff9 update library-list.txt 2014-07-04 09:43:11 +02:00
628368e97b update solver-list.txt 2014-07-04 09:43:11 +02:00
d3af4fd13a update tutorial-list.txt 2014-07-04 09:43:11 +02:00
2df88af289 update Make/files 2014-07-04 09:43:11 +02:00
b20860e826 release on 2014-07-04_09-43-11 2014-07-04 09:43:11 +02:00
09aa5c1efc update library-liggghts-list.txt 2014-07-04 09:37:38 +02:00
e9e45a2815 update library-list.txt 2014-07-04 09:37:38 +02:00
65b9902d8f update solver-list.txt 2014-07-04 09:37:38 +02:00
d23a5d4972 update tutorial-list.txt 2014-07-04 09:37:38 +02:00
b6550307f4 update Make/files 2014-07-04 09:37:38 +02:00
f891594815 release on 2014-07-04_09-37-38 2014-07-04 09:37:38 +02:00
2950eeed6f update library-list.txt 2014-07-04 08:57:39 +02:00
f20357eff5 update solver-list.txt 2014-07-04 08:57:39 +02:00
c09782151b update tutorial-list.txt 2014-07-04 08:57:39 +02:00
e1862dbbde update Make/files 2014-07-04 08:57:39 +02:00
89fa69ab8d release on 2014-07-04_08-57-37 2014-07-04 08:57:38 +02:00
46601ef6be update library-liggghts-list.txt 2014-06-12 21:37:57 +02:00
22e1d9d1cc update library-list.txt 2014-06-12 21:37:57 +02:00
286b03e644 update solver-list.txt 2014-06-12 21:37:57 +02:00
779dc76694 update tutorial-list.txt 2014-06-12 21:37:57 +02:00
806e505ae3 update Make/files 2014-06-12 21:37:57 +02:00
2eb3439691 release on 2014-06-12_21-37-56 2014-06-12 21:37:57 +02:00
eafb8c413f update library-list.txt 2014-06-02 18:53:40 +02:00
2558225dc1 update solver-list.txt 2014-06-02 18:53:40 +02:00
ff6189d1ad update tutorial-list.txt 2014-06-02 18:53:40 +02:00
9f07eafcda update Make/files 2014-06-02 18:53:40 +02:00
2a4845872c release on 2014-06-02_18-53-39 2014-06-02 18:53:40 +02:00
586cbb4b88 update library-liggghts-list.txt 2014-06-02 18:34:53 +02:00
fa70af51b5 update library-list.txt 2014-06-02 18:34:53 +02:00
ee26baa5bb update solver-list.txt 2014-06-02 18:34:53 +02:00
099d914425 update tutorial-list.txt 2014-06-02 18:34:53 +02:00
ee7034701b update Make/files 2014-06-02 18:34:53 +02:00
9c78ca97f7 release on 2014-06-02_18-34-52 2014-06-02 18:34:53 +02:00
c3bfe130c6 added gitignore file 2014-05-26 19:21:56 +02:00
5c9178ce4d update library-list.txt 2014-05-13 08:58:59 +02:00
64019057ee update solver-list.txt 2014-05-13 08:58:59 +02:00
fe57fac365 update tutorial-list.txt 2014-05-13 08:58:59 +02:00
bc7361faf4 update Make/files 2014-05-13 08:58:59 +02:00
560 changed files with 67012 additions and 6135 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
*.o
*.d
*.a
*.dep
log_*
log.*
*~
**/linux64GccDPInt32Opt

33
README
View File

@ -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
View File

@ -0,0 +1,7 @@
*.o
*.d
*.a
*.dep
log_*
log.*
*~

View File

@ -1,10 +1,13 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-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 +16,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)

View File

@ -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"

View File

@ -1,15 +1,22 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-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)

View 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);
}

View File

@ -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;
}

View File

@ -122,3 +122,5 @@ surfaceScalarField phi
(
incompressible::turbulenceModel::New(U, phi, laminarTransport)
);
#include "createMRF.H"

View 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);

View File

@ -1,16 +1,23 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-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)

View File

@ -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;
}

View File

@ -1,15 +1,23 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-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)

View 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();

View File

@ -25,174 +25,112 @@ License
along with CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
Application
cfdemSolverPisoScalar
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 "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;

View File

@ -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"

View 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");
}

View File

@ -0,0 +1,3 @@
cfdemSolverRhoPimple.C
EXE=$(CFDEM_APP_DIR)/cfdemSolverRhoPimple

View File

@ -0,0 +1,31 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
PFLAGS+= -Dcompre
EXE_INC = \
$(PFLAGS) \
-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)

View 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);
}

View 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;
}
// ************************************************************************* //

View File

@ -0,0 +1,2 @@
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi();

View 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
);
//===============================

View 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);
}

View File

@ -0,0 +1,17 @@
{
fvScalarMatrix rhoEqn
(
fvm::ddt(voidfraction,rho)
+ fvc::div(phi)
==
fvOptions(rho)
);
fvOptions.constrain(rhoEqn);
rhoEqn.solve();
fvOptions.correct(rho);
}
// ************************************************************************* //

View File

@ -1,5 +1,8 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-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 +11,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)

View File

@ -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;

View File

@ -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
View File

@ -0,0 +1,7 @@
*.o
*.d
*.a
*.dep
log_*
log.*
*~

View File

@ -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.

View File

@ -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,

View File

@ -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.

View File

@ -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.

View File

@ -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>

View File

@ -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.

View File

@ -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

View File

@ -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>

View 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

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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

View File

@ -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";
}

View File

@ -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

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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

View 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>

View 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

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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
View 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
View 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.

View 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>

View 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

View 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>

View 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.

View File

@ -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>

View File

@ -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:]

View File

@ -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>

View File

@ -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

View File

@ -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>

View File

@ -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.

7
src/.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
*.o
*.d
*.a
*.dep
log_*
log.*
*~

View File

@ -1,5 +1,8 @@
fvPatchFields = fields/fvPatchFields
derivedFvPatchFields = $(fvPatchFields)/derived
general = cfdTools/general
$(derivedFvPatchFields)/uniformFixedValueVoidfraction/uniformFixedValueVoidfractionFvPatchFields.C
$(derivedFvPatchFields)/uniformFixedValueTube/uniformFixedValueTubeFvPatchFields.C

View File

@ -2,6 +2,9 @@ EXE_INC = \
-I$(LIB_SRC)/triSurface/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-Wno-old-style-cast \
-Wno-unused-result \
-Wno-literal-suffix
LIB_LIBS = \
-lOpenFOAM \

View File

@ -88,7 +88,7 @@ uniformFixedValueTubeFvPatchField<Type>::uniformFixedValueTubeFvPatchField
)
:
fixedValueFvPatchField<Type>(p, iF),
uniformValue_(DataEntry<Type>::New("uniformValue", dict)),
uniformValue_(Function1<Type>::New("uniformValue", dict)),
pName_("p"), //JOKER
phiName_("phi"), //JOKER
velocityFieldName_("U"),

View File

@ -40,7 +40,7 @@ SourceFiles
#include "Random.H"
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -58,7 +58,7 @@ class uniformFixedValueTubeFvPatchField
{
// Private data
autoPtr<DataEntry<Type> > uniformValue_;
autoPtr<Function1<Type> > uniformValue_;
word pName_; //JOKER pressure

View File

@ -41,7 +41,6 @@ uniformFixedValueVoidfractionFvPatchField<Type>::uniformFixedValueVoidfractionFv
:
fixedValueFvPatchField<Type>(p, iF),
uniformValue_(),
//voidfractionFieldName_(dict.lookupOrDefault<word>("voidfraction", "voidfraction"))
voidfractionFieldName_("voidfraction")
{}
@ -56,7 +55,7 @@ uniformFixedValueVoidfractionFvPatchField<Type>::uniformFixedValueVoidfractionFv
)
:
fixedValueFvPatchField<Type>(p, iF),
uniformValue_(ptf.uniformValue_().clone().ptr()),
uniformValue_(ptf.uniformValue_, false),
voidfractionFieldName_("voidfraction")
{
const scalar t = this->db().time().timeOutputValue();
@ -73,7 +72,7 @@ uniformFixedValueVoidfractionFvPatchField<Type>::uniformFixedValueVoidfractionFv
)
:
fixedValueFvPatchField<Type>(p, iF),
uniformValue_(DataEntry<Type>::New("uniformValue", dict)),
uniformValue_(Function1<Type>::New("uniformValue", dict)),
voidfractionFieldName_("voidfraction")
{
const scalar t = this->db().time().timeOutputValue();
@ -88,7 +87,7 @@ uniformFixedValueVoidfractionFvPatchField<Type>::uniformFixedValueVoidfractionFv
)
:
fixedValueFvPatchField<Type>(ptf),
uniformValue_(ptf.uniformValue_().clone().ptr()),
uniformValue_(ptf.uniformValue_, false),
voidfractionFieldName_("voidfraction")
{
const scalar t = this->db().time().timeOutputValue();
@ -104,7 +103,7 @@ uniformFixedValueVoidfractionFvPatchField<Type>::uniformFixedValueVoidfractionFv
)
:
fixedValueFvPatchField<Type>(ptf, iF),
uniformValue_(ptf.uniformValue_().clone().ptr()),
uniformValue_(ptf.uniformValue_, false),
voidfractionFieldName_("voidfraction")
{
const scalar t = this->db().time().timeOutputValue();

View File

@ -40,7 +40,7 @@ SourceFiles
#include "Random.H"
#include "fixedValueFvPatchFields.H"
#include "DataEntry.H"
#include "Function1.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -58,7 +58,7 @@ class uniformFixedValueVoidfractionFvPatchField
{
// Private data
autoPtr<DataEntry<Type> > uniformValue_;
autoPtr<Function1<Type> > uniformValue_;
word voidfractionFieldName_;

View File

@ -0,0 +1 @@
lnInclude

View File

@ -1,81 +1,105 @@
cfdemCloud = cfdemCloud
cfdTools = cfdTools
energyModels = subModels/energyModel
forceModels = subModels/forceModel
forceSubModels = subModels/forceModel/forceSubModels
forceModelsMS = subModels/forceModelMS
thermCondModels = subModels/thermCondModel
chemistryModels = subModels/chemistryModel
IOModels = subModels/IOModel
voidFractionModels = subModels/voidFractionModel
locateModels = subModels/locateModel
meshMotionModels = subModels/meshMotionModel
momCoupleModels = subModels/momCoupleModel
regionModels = subModels/regionModel
dataExchangeModels = subModels/dataExchangeModel
averagingModels = subModels/averagingModel
clockModels = subModels/clockModel
liggghtsCommandModels = subModels/liggghtsCommandModel
smoothingModels = subModels/smoothingModel
probeModels = subModels/probeModel
otherForceModels = subModels/otherForceModel
$(cfdemCloud)/cfdemCloud.C
derived/cfdemCloudBiDisperse/cfdemCloudBiDisperse.C
$(cfdemCloud)/cfdemCloudIO.C
derived/cfdemCloudIB/cfdemCloudIB.C
derived/cfdemCloudMS/cfdemCloudMS.C
derived/cfdemCloudEnergy/cfdemCloudEnergy.C
$(cfdTools)/global.C
$(cfdTools)/newGlobal.C
$(energyModels)/energyModel/energyModel.C
$(energyModels)/energyModel/newEnergyModel.C
$(energyModels)/heatTransferGunn/heatTransferGunn.C
$(energyModels)/heatTransferGunnImplicit/heatTransferGunnImplicit.C
$(energyModels)/reactionHeat/reactionHeat.C
$(thermCondModels)/thermCondModel/thermCondModel.C
$(thermCondModels)/thermCondModel/newThermCondModel.C
$(thermCondModels)/SyamlalThermCond/SyamlalThermCond.C
$(thermCondModels)/noTherm/noThermCond.C
$(forceModels)/forceModel/forceModel.C
$(forceModels)/forceModel/newForceModel.C
$(forceModels)/noDrag/noDrag.C
$(forceModels)/checkCouplingInterval/checkCouplingInterval.C
$(forceModels)/DiFeliceDrag/DiFeliceDrag.C
$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C
$(forceModels)/fieldStore/fieldStore.C
$(forceModels)/GidaspowDrag/GidaspowDrag.C
$(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C
$(forceModels)/Archimedes/Archimedes.C
$(forceModels)/ArchimedesIB/ArchimedesIB.C
$(forceModels)/interface/interface.C
$(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C
$(forceModels)/interfaceParticleProbe/interfaceParticleProbe.C
$(forceModels)/fieldStore/fieldStore.C
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
$(forceModels)/fieldBound/fieldBound.C
$(forceModels)/volWeightedAverage/volWeightedAverage.C
$(forceModels)/totalMomentumExchange/totalMomentumExchange.C
$(forceModels)/KochHillDrag/KochHillDrag.C
$(forceModels)/KochHillRWDrag/KochHillRWDrag.C
$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C
$(forceModels)/BeetstraDrag/BeetstraDrag.C
$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
$(forceModels)/LaEuScalarDust/LaEuScalarDust.C
$(forceModels)/virtualMassForce/virtualMassForce.C
$(forceModels)/gradPForce/gradPForce.C
$(forceModels)/gradULiftForce/gradULiftForce.C
$(forceModels)/HollowayDrag/HollowayDrag.C
$(forceModels)/viscForce/viscForce.C
$(forceModels)/MeiLift/MeiLift.C
$(forceModels)/melting/melting.C
$(forceModels)/KochHillDragNLift/KochHillDragNLift.C
$(forceModels)/stokesSpheroidDrag/stokesSpheroidDrag.C
$(forceModels)/solidsPressureForce/solidsPressureForce.C
$(forceModels)/periodicPressure/periodicPressure.C
$(forceModels)/periodicPressureControl/periodicPressureControl.C
$(forceModels)/averageSlipVel/averageSlipVel.C
$(forceModels)/particleCellVolume/particleCellVolume.C
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
$(forceModels)/volWeightedAverage/volWeightedAverage.C
$(forceModels)/BeetstraDrag/BeetstraDrag.C
$(forceModels)/dSauter/dSauter.C
$(forceModels)/Fines/Fines.C
$(forceModels)/Fines/FinesFields.C
$(forceModels)/Fines/FanningDynFines.C
$(forceModels)/Fines/ErgunStatFines.C
$(forceModels)/granKineticEnergy/granKineticEnergy.C
$(forceModelsMS)/forceModelMS/forceModelMS.C
$(forceModelsMS)/forceModelMS/newForceModelMS.C
$(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C
$(forceModelsMS)/GidaspowDragMS/GidaspowDragMS.C
$(forceModelsMS)/noDragMS/noDragMS.C
$(forceSubModels)/forceSubModel/newForceSubModel.C
$(forceSubModels)/forceSubModel/forceSubModel.C
$(forceSubModels)/ImEx/ImEx.C
$(forceSubModels)/ScaleForce/ScaleForce.C
$(forceSubModels)/scaleForceBoundary/scaleForceBoundary.C
$(otherForceModels)/otherForceModel/otherForceModel.C
$(otherForceModels)/otherForceModel/newOtherForceModel.C
$(otherForceModels)/gravity/gravity.C
$(otherForceModels)/weightSecondaryPhase/weightSecondaryPhase.C
$(otherForceModels)/expParticleForces/expParticleForces.C
$(chemistryModels)/chemistryModel/chemistryModel.C
$(chemistryModels)/chemistryModel/newChemistryModel.C
$(chemistryModels)/species/species.C
$(chemistryModels)/noChemistry/noChemistry.C
$(probeModels)/probeModel/probeModel.C
$(probeModels)/probeModel/newProbeModel.C
$(probeModels)/noProbe/noProbe.C
$(probeModels)/particleProbe/particleProbe.C
/*$(probeModels)/interfaceParticleProbe/interfaceParticleProbe.C*/
$(IOModels)/IOModel/IOModel.C
$(IOModels)/IOModel/newIOModel.C
$(IOModels)/noIO/noIO.C
$(IOModels)/basicIO/basicIO.C
$(IOModels)/tempIO/tempIO.C
$(IOModels)/colorIO/colorIO.C
$(IOModels)/trackIO/trackIO.C
$(IOModels)/sophIO/sophIO.C
@ -83,50 +107,44 @@ $(voidFractionModels)/voidFractionModel/voidFractionModel.C
$(voidFractionModels)/voidFractionModel/newVoidFractionModel.C
$(voidFractionModels)/centreVoidFraction/centreVoidFraction.C
$(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C
$(voidFractionModels)/dividedVoidFractionBiDi/dividedVoidFractionBiDi.C
$(voidFractionModels)/dividedVoidFractionMS/dividedVoidFractionMS.C
$(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C
$(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C
$(voidFractionModels)/IBVoidFraction/IBVoidFraction.C
$(voidFractionModels)/weightedNeigbhorsVoidFraction/weightedNeigbhorsVoidFraction.C
$(locateModels)/locateModel/locateModel.C
$(locateModels)/locateModel/newLocateModel.C
$(locateModels)/standardSearch/standardSearch.C
$(locateModels)/engineSearch/engineSearch.C
$(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C
$(locateModels)/turboEngineSearch/turboEngineSearch.C
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
$(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C
$(locateModels)/engineSearchIB/engineSearchIB.C
$(locateModels)/hyperEngineSearch/hyperEngineSearch.C
$(locateModels)/ijkSearch/ijkSearch.C
$(meshMotionModels)/meshMotionModel/meshMotionModel.C
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
$(meshMotionModels)/noMeshMotion/noMeshMotion.C
$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C
$(momCoupleModels)/momCoupleModel/momCoupleModel.C
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
$(momCoupleModels)/explicitCouple/explicitCouple.C
$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C
$(momCoupleModels)/implicitCouple/implicitCouple.C
$(momCoupleModels)/noCouple/noCouple.C
$(regionModels)/regionModel/regionModel.C
$(regionModels)/regionModel/newRegionModel.C
$(regionModels)/allRegion/allRegion.C
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
$(dataExchangeModels)/twoWayFiles/twoWayFiles.C
$(dataExchangeModels)/noDataExchange/noDataExchange.C
$(dataExchangeModels)/twoWayMPI/twoWayMPI.C
$(dataExchangeModels)/twoWayM2M/twoWayM2M.C
$(dataExchangeModels)/twoWayMany2Many/twoWayMany2Many.C
$(averagingModels)/averagingModel/averagingModel.C
$(averagingModels)/averagingModel/newAveragingModel.C
$(averagingModels)/dilute/dilute.C
$(averagingModels)/dense/dense.C
$(averagingModels)/denseBiDi/denseBiDi.C
$(clockModels)/clockModel/clockModel.C
$(clockModels)/clockModel/newClockModel.C
@ -135,7 +153,6 @@ $(clockModels)/noClock/noClock.C
$(liggghtsCommandModels)/liggghtsCommandModel/liggghtsCommandModel.C
$(liggghtsCommandModels)/liggghtsCommandModel/newLiggghtsCommandModel.C
$(liggghtsCommandModels)/colorParticles/colorParticles.C
$(liggghtsCommandModels)/execute/execute.C
$(liggghtsCommandModels)/runLiggghts/runLiggghts.C
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
@ -145,6 +162,5 @@ $(smoothingModels)/smoothingModel/smoothingModel.C
$(smoothingModels)/smoothingModel/newSmoothingModel.C
$(smoothingModels)/noSmoothing/noSmoothing.C
$(smoothingModels)/constDiffSmoothing/constDiffSmoothing.C
$(smoothingModels)/localPSizeDiffSmoothing/localPSizeDiffSmoothing.C
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)

View File

@ -1,38 +1,38 @@
sinclude $(GENERAL_RULES)/mplib$(WM_MPLIB)
sinclude $(RULES)/mplib$(WM_MPLIB)
GIT_VERSION := $(shell git describe --dirty --always --tags)
PFLAGS+= -DGITVERSION=\"$(GIT_VERSION)\"
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
$(PFLAGS) \
$(PINC) \
-I ./cfdemParticle \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/turbulenceModel \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \
-I$(CFDEM_LIGGGHTS_SRC_DIR) \
-I$(CFDEM_M2MLIB_PATH) \
-I$(CFDEM_Many2ManyLIB_PATH) \
-I$(CFDEM_SRC_DIR)/cfdTools \
-Wno-old-style-cast \
-Wno-unused-result \
-Wno-literal-suffix
LIB_LIBS = \
$(PLIBS) \
-L$(FOAM_USER_LIBBIN) \
-L$(CFDEM_LIB_DIR) \
-lfiniteVolume \
-lincompressibleRASModels \
-lincompressibleLESModels \
-lincompressibleTurbulenceModels \
-lmeshTools \
-llagrangian \
-lmpi_cxx \
-L$(CFDEM_LIGGGHTS_SRC_DIR) \
-l$(CFDEM_LIGGGHTS_LIB_NAME) \
-L$(CFDEM_M2MLIB_PATH) \
-lcouple \
-Wl,-rpath,$(CFDEM_LIGGGHTS_BIN_DIR) \
-L$(CFDEM_LIGGGHTS_BIN_DIR) \
-lliggghts \
-L$(CFDEM_Many2ManyLIB_PATH) \
-lcoupleMany2Many \
/* add -I$(CFDEM_POEMSLIB_PATH) \ to EXE_INC */
/* -L$(CFDEM_POEMSLIB_PATH) \ */
/* -lpoems */
-lcoupleMany2Many

View File

@ -4,8 +4,7 @@
word modelType = particleCloud.modelType();
//Warning << "model type not being checked" << endl;
if (modelType=="B"){
if (modelType=="Bfull"){
Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
// check if Archimedes is used
@ -18,6 +17,41 @@
if(!found)
FatalError <<"Archimedes model not found!\n" << abort(FatalError);
// check if gradPForce is used
found=false;
forAll(particleCloud.forceModels(),i)
{
if(particleCloud.forceModels()[i]=="gradPForce")
found=true;
}
if(!found)
FatalError <<"gradPForce model not found!\n" << abort(FatalError);
// check if viscForce is used
found=false;
forAll(particleCloud.forceModels(),i)
{
if(particleCloud.forceModels()[i]=="viscForce")
found=true;
}
if(!found)
FatalError <<"viscForce model not found!\n" << abort(FatalError);
}else if(modelType=="B"){
Info << "solving volume averaged Navier Stokes equations of type B\n"<< endl;
// check if Archimedes is used
bool found=false;
forAll(particleCloud.forceModels(),i)
{
if(particleCloud.forceModels()[i]=="Archimedes")
found=true;
}
if(!found)
FatalError <<"Archimedes model not found!\n" << abort(FatalError);
// check if gradP and viscForce are used
found=false;
forAll(particleCloud.forceModels(),i)

View File

@ -0,0 +1,53 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright (C) 1991-2009 OpenCFD Ltd.
Copyright (C) 2009-2012 JKU, Linz
Copyright (C) 2012- DCS Computing GmbH,Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling. If not, see <http://www.gnu.org/licenses/>.
Global
continuityErrs
Description
Calculates and prints the continuity errors.
The code is an evolution of compressibleContinuityErrs.H in OpenFOAM(R) 2.3.x,
where additional functionality for CFD-DEM coupling is added.
\*---------------------------------------------------------------------------*/
{
dimensionedScalar totalMass = fvc::domainIntegrate(rho*voidfraction);
scalar sumLocalContErr =
(fvc::domainIntegrate(mag(rho - thermo.rho())*voidfraction)/totalMass).value();
scalar globalContErr =
(fvc::domainIntegrate((rho - thermo.rho())*voidfraction)/totalMass).value();
cumulativeContErr += globalContErr;
Info<< "time step continuity errors : sum local = " << sumLocalContErr
<< ", global = " << globalContErr
<< ", cumulative = " << cumulativeContErr
<< endl;
}
// ************************************************************************* //

View File

@ -34,7 +34,7 @@ Description
\*---------------------------------------------------------------------------*/
{
volScalarField contErr( fvc::div(phiGes) + fvc::ddt(voidfraction) );
volScalarField contErr( fvc::div(phi) + fvc::ddt(voidfraction) );
scalar sumLocalContErr = runTime.deltaTValue()*
mag(contErr)().weightedAverage(mesh.V()).value();

View File

@ -23,8 +23,8 @@
meanUs_array[i] += velocities_[index][i];
}
meanR_array += radii_[index][0];
particleVolume_radius += radii_[index][0]*radii_[index][0]*radii_[index][0]*4./3.*3.1415;
particleVolume_radius += radii_[index][0]*radii_[index][0]*radii_[index][0]*(4./3.)*M_PI;
// loop subCells
for(int subCell=0;subCell<voidFractionM().cellsPerParticle()[index][0];subCell++)
{
@ -63,17 +63,17 @@
if(countCell>0)
{
meanAlpha_field /= countCell;
meanU_field /= countCell;
meanU_field /= countCell;
meanUs_field /= countCell;
}
else
{
meanAlpha_field = 0;
meanU_field = vector(0,0,0);
meanU_field = vector(0,0,0);
meanUs_field = vector(0,0,0);
}
meanUs_array /= numberOfParticles()+SMALL;
meanR_array /= numberOfParticles()+SMALL;
meanUs_array /= numberOfParticles()+SMALL;
meanR_array /= numberOfParticles()+SMALL;
Info <<"=============================================================================" << endl;
Info << "Debug Info, only serial and not tested!" << endl;

View File

@ -0,0 +1,80 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "global.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(global, 0);
defineRunTimeSelectionTable(global, dictionary);
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void global::info()
{
Info << "\nYou are currently using:" << endl;
Info << "OpenFOAM version: " << FOAMversion << endl;
Info << "OpenFOAM build: " << FOAMbuild << endl;
Info << "CFDEM build: " << CFDEMversion << "\n" << endl;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
global::global
(
const dictionary& dict,
cfdemCloud& sm
)
:
dict_(dict),
particleCloud_(sm),
CFDEMversion(GITVERSION)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
global::~global()
{}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,128 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
Class
global
SourceFiles
global.Cver
\*---------------------------------------------------------------------------*/
#ifndef global_H
#define global_H
#include "fvCFD.H"
#include "cfdemCloud.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class global Declaration
\*---------------------------------------------------------------------------*/
class global
{
protected:
// Protected data
const dictionary& dict_;
cfdemCloud& particleCloud_;
const char* const CFDEMversion;
// Protected member functions
public:
//- Runtime type information
TypeName("global");
// Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
global,
dictionary,
(
const dictionary& dict,
cfdemCloud& sm
),
(dict,sm)
);
// Constructors
//- Construct from components
global
(
const dictionary& dict,
cfdemCloud& sm
);
// Destructor
virtual ~global();
// Selector
static autoPtr<global> New
(
const dictionary& dict,
cfdemCloud& sm
);
// Member Function
void info();
// Access
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,255 @@
/* ----------------------------------------------------------------------
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
Copyright of this contribution:
Copyright 2014- TU Graz, IPPT
------------------------------------------------------------------------- */
#ifndef CFDEM_MATH_EXTRA_H
#define CFDEM_MATH_EXTRA_H
#include <vector>
//#include "math.h"
#include <stdio.h>
#include <string.h>
#include <error.h>
#include <ctype.h>
#define TOLERANCE_ORTHO 1e-10
namespace MathExtra
{
// inline void outerProduct(double *vec1, double *vec2, double **m);
// inline double spheroidGeometry(int index, double bi, double ai);
//--------------------------------------------------------------------
// Outer Product of two vectors
inline void outerProduct(double *vec1, double *vec2, double **m)
{
int i, j;
//debug output
// for( i = 0; i < 3; ++i )
// printf("OUTER PRODUCT: Input: vec1 element %d = %g", i, vec1[i]);
// for( i = 0; i < 3; ++i )
// printf("OUTER PRODUCT: Input: vec2 element %d=%g", i, vec2[i]);
//calculation
for( i = 0; i < 3; ++i )
for( j = 0; j < 3; ++j )
{
m[i][j] = vec1[i] * vec2[j];
printf("OUTER PRODUCT: Result: m[%d][%d]=%g", i, j, m[i][j]);
}
}
//--------------------------------------------------------------------
// Compute the major, minor axis and eccentricity parameters of a prolate spheroid
inline bool spheroidGeometry(double radius, double aspectRatio, //inputs
double& ai, double& bi, //outputs
double& ei, double& Le //outputs
)
{
//INPUT
// radius ...volume-equivalent radius of the spheroid
// aspectRatio ...major/minor aspect ratio
//OUTPUT
// ai ...
// bi ...
// ei ...
// Le ...
if(radius<=0.0) //avoid troubles in case radius is 0 or negative
return false;
ai = radius * std::pow(aspectRatio*aspectRatio,0.33333333333333333333333);
bi = ai / aspectRatio;
ei = std::sqrt( 1.0 - 1.0 / (aspectRatio*aspectRatio) );
Le = std::log( (1.0+ei) / (1.0-ei) );
return true;
}
//--------------------------------------------------------------------
// Compute the major, minor axis and eccentricity parameters of a prolate spheroid
inline double Pi()
{
return 3.1415926535897932384626433832795;
}
//--------------------------------------------------------------------
// Compute the major, minor axis and eccentricity parameters of a prolate spheroid
inline bool spheroidGeometry2(double radius, double aspectRatio, //inputs
double& ai, double& bi, //outputs
double& XAe, double& YAe, //outputs
double& XCe, double& YCe, //outputs
double& YHe
)
{
//INPUT
// radius ...volume-equivalent radius of the spheroid
// aspectRatio ...major/minor aspect ratio
//OUTPUT
// XAe ...Eccentricity dependet parameter
// YAe ...Eccentricity dependet parameter
// XCe ...Eccentricity dependet parameter
// XCe ...Eccentricity dependet parameter
// YCe ...Eccentricity dependet parameter
// YHe ...Eccentricity dependet parameter
double ei(0.0), Le(0.0);
bool result = spheroidGeometry(radius, aspectRatio, //inputs
ai, bi, //outputs
ei, Le //outputs
);
if(!result)
return false;
XAe= 2.6666666666666666666666667
*ei*ei*ei
/(-2.0*ei+(1.0+ei*ei)*Le);
YAe= 5.333333333333333333333333333
*ei*ei*ei
/(2.0*ei+(3.0*ei*ei-1.0)*Le);
XCe= 1.333333333333333333333333333
*ei*ei*ei
*(1.0-ei*ei)
/(2.0*ei-(1.0-ei*ei)*Le);
YCe= 1.3333333333333333333333
*ei*ei*ei
*(2.0-ei*ei)
/(-2.0*ei+(1.0+ei*ei)*Le);
YHe= 1.3333333333333333333333
*ei*ei*ei*ei*ei
/(-2.0*ei+(1.0+ei*ei)*Le);
return true;
}
//--------------------------------------------------------------------
// zeroize a 3x3x3 tensor
inline void zeroize333(double tensor[3][3][3] )
{
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
for(int iZ=0; iZ<3; iZ++)
tensor[iX][iY][iZ] = 0.0;
}
//--------------------------------------------------------------------
// zeroize a 3x3 tensor
inline void zeroize33(double tensor[3][3] )
{
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
tensor[iX][iY] = 0.0;
}
//--------------------------------------------------------------------
// multiply a 3x3x3 tensor with a scalar
inline void multiply333(double scalar, double tensor[3][3][3] )
{
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
for(int iZ=0; iZ<3; iZ++)
tensor[iX][iY][iZ] *= scalar;
}
//--------------------------------------------------------------------
// Compute a dot and dyadic product of with a vector
inline void permutationTensor(double tensor[3][3][3] )
{
zeroize333(tensor);
tensor[0][1][2] = 1.0;
tensor[1][2][0] = 1.0;
tensor[2][0][1] = 1.0;
tensor[0][2][1] =-1.0;
tensor[2][1][0] =-1.0;
tensor[1][0][2] =-1.0;
}
//--------------------------------------------------------------------
// Compute a dot product of the permutation tensor and
// then a dyadic product of with a vector
inline bool permutationDotDyadic(
double vector[3],
double tensor[3][3][3]
)
{
//Generate permutation tensor
double permutationT[3][3][3];
permutationTensor(permutationT);
//Step 1: compute dot prodcut of permutation tensor
double permutationDotProd[3][3];
zeroize33(permutationDotProd);
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
for(int iZ=0; iZ<3; iZ++)
permutationDotProd[iX][iY] += permutationT[iX][iY][iZ]
* vector[iZ];
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
for(int iZ=0; iZ<3; iZ++)
tensor[iX][iY][iZ] = permutationDotProd[iX][iY]
* vector[iZ];
return true;
}
//--------------------------------------------------------------------
// Compute a dot and dyadic product of with a vector
inline bool doubleDotTensor333Tensor33(double tensor333[3][3][3],
double tensor33[3][3],
double result[3]
)
{
result[0]=0.0;result[1]=0.0;result[2]=0.0;
for(int iX=0; iX<3; iX++)
for(int iY=0; iY<3; iY++)
for(int iZ=0; iZ<3; iZ++)
result[iX] += tensor333[iX][iY][iZ] * tensor33[iY][iZ];
return true;
}
} //end of namespace
#endif

View File

@ -0,0 +1,84 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "global.H"
#include "dilute.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<global> global::New
(
const dictionary& dict,
cfdemCloud& sm
)
{
word globalType
(
dict.lookup("global")
);
Info<< "Selecting global "
<< globalType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(globalType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "global::New(const dictionary&, const spray&) : "
<< endl
<< " unknown globalType type "
<< globalType
<< ", constructor not in hash table" << endl << endl
<< " Valid global types are :"
<< endl;
Info<< dictionaryConstructorTablePtr_->toc()
<< abort(FatalError);
}
return autoPtr<global>(cstrIter()(dict,sm));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -1,9 +1,45 @@
word CFDEMversion="cfdem-2.6.4";
word compatibleLIGGGHTSversion="3.0.1";
word OFversion="2.2.x-commit-61b850bc107bdd60bbf1bf9a6417b9faf701d128";
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
Info << "\nCFDEMcoupling version: " << CFDEMversion << "\n" << endl;
Info << "\n, compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << "\n" << endl;
Info << "\n, compatible to OF version: " << OFversion << "\n" << endl;
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012-2015 DCS Computing GmbH, Linz
Copyright 2015- JKU Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling 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.
CFDEMcoupling 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 CFDEMcoupling; if not, write to the Free Software Foundation,
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(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#ifndef versionInfo_H
#define versionInfo_H
word CFDEMversion="PFM 17.02";
word compatibleLIGGGHTSversion="PFM 17.02";
word OFversion="4.x";
Info << "\nCFDEMcoupling version: " << CFDEMversion << endl;
Info << ", compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << endl;
Info << ", compatible to OpenFOAM version: " << OFversion << endl;
#endif

View File

@ -31,6 +31,7 @@ Description
#include "fileName.H"
#include "cfdemCloud.H"
#include "global.H"
#include "forceModel.H"
#include "locateModel.H"
#include "momCoupleModel.H"
@ -43,9 +44,13 @@ Description
#include "clockModel.H"
#include "smoothingModel.H"
#include "liggghtsCommandModel.H"
#include "otherForceModel.H"
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::cfdemCloud::cfdemCloud
cfdemCloud::cfdemCloud
(
const fvMesh& mesh
)
@ -76,10 +81,12 @@ Foam::cfdemCloud::cfdemCloud
solveFlow_(true),
verbose_(false),
ignore_(false),
limitDEMForces_(false),
modelType_(couplingProperties_.lookup("modelType")),
positions_(NULL),
velocities_(NULL),
fluidVel_(NULL),
fAcc_(NULL),
impForces_(NULL),
expForces_(NULL),
DEMForces_(NULL),
@ -89,20 +96,25 @@ Foam::cfdemCloud::cfdemCloud
cellIDs_(NULL),
particleWeights_(NULL),
particleVolumes_(NULL),
particleV_(NULL),
numberOfParticles_(0),
d32_(-1),
numberOfParticlesChanged_(false),
arraysReallocated_(false),
forceModels_(couplingProperties_.lookup("forceModels")),
momCoupleModels_(couplingProperties_.lookup("momCoupleModels")),
liggghtsCommandModelList_(liggghtsCommandDict_.lookup("liggghtsCommandModels")),
otherForceModels_(couplingProperties_.lookupOrDefault<wordList>("otherForceModels",wordList(0))),
turbulenceModelType_(couplingProperties_.lookup("turbulenceModelType")),
cg_(1.),
cgOK_(true),
impDEMdrag_(false),
impDEMdragAcc_(false),
imExSplitFactor_(1.0),
treatVoidCellsAsExplicitForce_(false),
useDDTvoidfraction_(false),
ddtVoidfraction_
(
(
IOobject
(
"ddtVoidfraction",
@ -116,15 +128,7 @@ Foam::cfdemCloud::cfdemCloud
),
turbulence_
(
#if defined(version21) || defined(version16ext)
#ifdef comp
mesh.lookupObject<compressible::turbulenceModel>
#else
mesh.lookupObject<incompressible::turbulenceModel>
#endif
#elif defined(version15)
mesh.lookupObject<incompressible::RASModel>
#endif
mesh.lookupObject<turbulenceModel>
(
turbulenceModelType_
)
@ -213,20 +217,29 @@ Foam::cfdemCloud::cfdemCloud
)
{
#include "versionInfo.H"
global buildInfo(couplingProperties_,*this);
buildInfo.info();
Info << "If BC are important, please provide volScalarFields -imp/expParticleForces-" << endl;
if (couplingProperties_.found("solveFlow"))
solveFlow_=Switch(couplingProperties_.lookup("solveFlow"));
if (couplingProperties_.found("imExSplitFactor"))
imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor"));
if (couplingProperties_.found("treatVoidCellsAsExplicitForce"))
treatVoidCellsAsExplicitForce_ = readBool(couplingProperties_.lookup("treatVoidCellsAsExplicitForce"));
if (couplingProperties_.found("verbose")) verbose_=true;
if (couplingProperties_.found("ignore")) ignore_=true;
if (couplingProperties_.found("limitDEMForces"))
{
limitDEMForces_=true;
maxDEMForce_ = readScalar(couplingProperties_.lookup("limitDEMForces"));
}
if (turbulenceModelType_=="LESProperties")
Info << "WARNING - LES functionality not yet tested!" << endl;
if (couplingProperties_.found("useDDTvoidfraction"))
useDDTvoidfraction_=true;
else
else
Info << "ignoring ddt(voidfraction)" << endl;
forceModel_ = new autoPtr<forceModel>[nrForceModels()];
@ -264,18 +277,30 @@ Foam::cfdemCloud::cfdemCloud
);
}
otherForceModel_ = new autoPtr<otherForceModel>[otherForceModels_.size()];
for (int i=0;i<otherForceModels_.size();i++)
{
otherForceModel_[i] = otherForceModel::New
(
couplingProperties_,
*this,
otherForceModels_[i]
);
}
dataExchangeM().setCG();
if (!cgOK_ && cg_ > 1) FatalError<< "at least one of your models is not fit for cg !!!"<< abort(FatalError);
if (!cgOK_ && cg_ > 1) FatalError<< "at least one of your models is not fit for cg !!!"<< abort(FatalError);
}
// * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * //
Foam::cfdemCloud::~cfdemCloud()
cfdemCloud::~cfdemCloud()
{
clockM().evalPar();
clockM().normHist();
dataExchangeM().destroy(positions_,3);
dataExchangeM().destroy(velocities_,3);
dataExchangeM().destroy(fluidVel_,3);
dataExchangeM().destroy(fAcc_,3);
dataExchangeM().destroy(impForces_,3);
dataExchangeM().destroy(expForces_,3);
dataExchangeM().destroy(DEMForces_,3);
@ -285,16 +310,21 @@ Foam::cfdemCloud::~cfdemCloud()
dataExchangeM().destroy(cellIDs_,1);
dataExchangeM().destroy(particleWeights_,1);
dataExchangeM().destroy(particleVolumes_,1);
dataExchangeM().destroy(particleV_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
void Foam::cfdemCloud::getDEMdata()
void cfdemCloud::getDEMdata()
{
dataExchangeM().getData("radius","scalar-atom",radii_);
dataExchangeM().getData("x","vector-atom",positions_);
dataExchangeM().getData("v","vector-atom",velocities_);
if(impDEMdragAcc_)
dataExchangeM().getData("dragAcc","vector-atom",fAcc_); // array is used twice - might be necessary to clean it first
}
void Foam::cfdemCloud::giveDEMdata()
void cfdemCloud::giveDEMdata()
{
if(forceM(0).coupleForce())
{
@ -302,6 +332,7 @@ void Foam::cfdemCloud::giveDEMdata()
if(impDEMdrag_)
{
if(verbose_) Info << "sending Ksl and uf" << endl;
dataExchangeM().giveData("Ksl","scalar-atom",Cds_);
dataExchangeM().giveData("uf","vector-atom",fluidVel_);
}
@ -313,7 +344,7 @@ void Foam::cfdemCloud::giveDEMdata()
// * * * * * * * * * * * * * * * protected Member Functions * * * * * * * * * * * * * //
void Foam::cfdemCloud::setNumberOfParticles(int nP)
void cfdemCloud::setNumberOfParticles(int nP)
{
if(nP != numberOfParticles())
{
@ -322,12 +353,12 @@ void Foam::cfdemCloud::setNumberOfParticles(int nP)
}
}
void Foam::cfdemCloud::findCells()
void cfdemCloud::findCells()
{
locateM().findCell(NULL,positions_,cellIDs_,numberOfParticles());
}
void Foam::cfdemCloud::setForces()
void cfdemCloud::setForces()
{
resetArray(fluidVel_,numberOfParticles(),3);
resetArray(impForces_,numberOfParticles(),3);
@ -335,9 +366,22 @@ void Foam::cfdemCloud::setForces()
resetArray(DEMForces_,numberOfParticles(),3);
resetArray(Cds_,numberOfParticles(),1);
for (int i=0;i<cfdemCloud::nrForceModels();i++) cfdemCloud::forceM(i).setForce();
if (limitDEMForces_)
{
scalar maxF = 0.0;
for (int index = 0;index < numberOfParticles(); ++index)
{
scalar F = mag(expForce(index));
if (F > maxF) maxF = F;
if (F > maxDEMForce_)
for(int i=0;i<3;i++) DEMForces_[index][i] *= maxDEMForce_/F;
}
Info << "largest particle-fluid interaction on particle: " << maxF << endl;
}
}
void Foam::cfdemCloud::setParticleForceField()
void cfdemCloud::setParticleForceField()
{
averagingM().setVectorSum
(
@ -355,7 +399,7 @@ void Foam::cfdemCloud::setParticleForceField()
);
}
void Foam::cfdemCloud::setVectorAverages()
void cfdemCloud::setVectorAverages()
{
if(verbose_) Info << "- setVectorAverage(Us,velocities_,weights_)" << endl;
averagingM().setVectorAverage
@ -369,12 +413,12 @@ void Foam::cfdemCloud::setVectorAverages()
if(verbose_) Info << "setVectorAverage done." << endl;
}
// * * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
void Foam::cfdemCloud::checkCG(bool ok)
void cfdemCloud::checkCG(bool ok)
{
if(!cgOK_) return;
if(!ok) cgOK_ = ok;
}
void Foam::cfdemCloud::setPos(double**& pos)
void cfdemCloud::setPos(double**& pos)
{
for(int index = 0;index < numberOfParticles(); ++index)
{
@ -385,60 +429,61 @@ void Foam::cfdemCloud::setPos(double**& pos)
}
// * * * * * * * * * * * * * * * ACCESS * * * * * * * * * * * * * //
label Foam::cfdemCloud::particleCell(int index)
label cfdemCloud::particleCell(int index)
{
label cellI = cellIDs()[index][0];
return cellI;
}
double Foam::cfdemCloud::d(int index)
{
return 2*radii()[index][0];
}
vector Foam::cfdemCloud::position(int index)
vector cfdemCloud::position(int index)
{
vector pos;
for(int i=0;i<3;i++) pos[i] = positions()[index][i];
return pos;
}
vector Foam::cfdemCloud::velocity(int index)
vector cfdemCloud::velocity(int index)
{
vector vel;
for(int i=0;i<3;i++) vel[i] = velocities()[index][i];
return vel;
}
vector Foam::cfdemCloud::fluidVel(int index)
vector cfdemCloud::expForce(int index)
{
vector force;
for(int i=0;i<3;i++) force[i] = DEMForces()[index][i];
return force;
}
vector cfdemCloud::fluidVel(int index)
{
vector vel;
for(int i=0;i<3;i++) vel[i] = fluidVels()[index][i];
return vel;
}
const forceModel& Foam::cfdemCloud::forceM(int i)
const forceModel& cfdemCloud::forceM(int i)
{
return forceModel_[i];
}
int Foam::cfdemCloud::nrForceModels()
int cfdemCloud::nrForceModels()
{
return forceModels_.size();
}
scalar Foam::cfdemCloud::radius(int index)
int cfdemCloud::nrMomCoupleModels()
{
scalar r = radii()[index][0];
return r;
return momCoupleModels_.size();
}
scalar Foam::cfdemCloud::voidfraction(int index)
scalar cfdemCloud::voidfraction(int index)
{
return voidfractions()[index][0];
}
label Foam::cfdemCloud::liggghtsCommandModelIndex(word name)
label cfdemCloud::liggghtsCommandModelIndex(word name)
{
int index=-1;
forAll(liggghtsCommandModelList_,i)
@ -452,11 +497,21 @@ label Foam::cfdemCloud::liggghtsCommandModelIndex(word name)
return index;
}
std::vector< std::vector<double*> >* cfdemCloud::getVprobe()
{
return probeModel_->getVprobe();
}
std::vector< std::vector<double> >* cfdemCloud::getSprobe()
{
return probeModel_->getSprobe();
}
// * * * * * * * * * * * * * * * WRITE * * * * * * * * * * * * * //
// * * * write cfdemCloud internal data * * * //
bool Foam::cfdemCloud::evolve
bool cfdemCloud::evolve
(
volScalarField& alpha,
volVectorField& Us,
@ -469,16 +524,17 @@ bool Foam::cfdemCloud::evolve
if(!ignore())
{
if (dataExchangeM().couple())
if (dataExchangeM().doCoupleNow())
{
Info << "\n Coupling..." << endl;
dataExchangeM().couple(0);
doCouple=true;
// reset vol Fields
clockM().start(16,"resetVolFields");
if(verbose_)
{
Info << "couplingStep:" << dataExchangeM().couplingStep()
Info << "couplingStep:" << dataExchangeM().couplingStep()
<< "\n- resetVolFields()" << endl;
}
averagingM().resetVectorAverage(averagingM().UsPrev(),averagingM().UsNext(),false);
@ -507,7 +563,7 @@ bool Foam::cfdemCloud::evolve
// set void fraction field
clockM().start(19,"setvoidFraction");
if(verbose_) Info << "- setvoidFraction()" << endl;
voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_);
voidFractionM().setvoidFraction(NULL,voidfractions_,particleWeights_,particleVolumes_,particleV_);
if(verbose_) Info << "setvoidFraction done." << endl;
clockM().stop("setvoidFraction");
@ -516,16 +572,21 @@ bool Foam::cfdemCloud::evolve
setVectorAverages();
//Smoothen "next" fields
//Smoothen "next" fields
smoothingM().dSmoothing();
smoothingM().smoothen(voidFractionM().voidFractionNext());
smoothingM().smoothenReferenceField(averagingM().UsNext());
//only smoothen if we use implicit force coupling in cells void of particles
//because we need unsmoothened Us field to detect cells for explicit
//force coupling
if(!treatVoidCellsAsExplicitForce())
smoothingM().smoothenReferenceField(averagingM().UsNext());
clockM().stop("setVectorAverage");
}
//============================================
//CHECK JUST TIME-INTERPOATE ALREADY SMOOTHENED VOIDFRACTIONNEXT AND UsNEXT FIELD
//CHECK JUST TIME-INTERPOATE ALREADY SMOOTHENED VOIDFRACTIONNEXT AND UsNEXT FIELD
// IMPLICIT FORCE CONTRIBUTION AND SOLVER USE EXACTLY THE SAME AVERAGED
// QUANTITIES AT THE GRID!
Info << "\n timeStepFraction() = " << dataExchangeM().timeStepFraction() << endl;
@ -571,6 +632,8 @@ bool Foam::cfdemCloud::evolve
clockM().start(23,"giveDEMdata");
giveDEMdata();
clockM().stop("giveDEMdata");
dataExchangeM().couple(1);
}//end dataExchangeM().couple()
@ -587,7 +650,7 @@ bool Foam::cfdemCloud::evolve
return doCouple;
}
bool Foam::cfdemCloud::reAllocArrays() const
bool cfdemCloud::reAllocArrays()
{
if(numberOfParticlesChanged_ && !arraysReallocated_)
{
@ -595,15 +658,40 @@ bool Foam::cfdemCloud::reAllocArrays() const
dataExchangeM().allocateArray(positions_,0.,3);
dataExchangeM().allocateArray(velocities_,0.,3);
dataExchangeM().allocateArray(fluidVel_,0.,3);
dataExchangeM().allocateArray(fAcc_,0.,3);
dataExchangeM().allocateArray(impForces_,0.,3);
dataExchangeM().allocateArray(expForces_,0.,3);
dataExchangeM().allocateArray(DEMForces_,0.,3);
dataExchangeM().allocateArray(Cds_,0.,1);
dataExchangeM().allocateArray(radii_,0.,1);
dataExchangeM().allocateArray(voidfractions_,1.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(cellIDs_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(cellIDs_,-1,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle());
dataExchangeM().allocateArray(particleV_,0.,1);
arraysReallocated_ = true;
return true;
}
return false;
}
bool cfdemCloud::reAllocArrays(int nP, bool forceRealloc)
{
if( (numberOfParticlesChanged_ && !arraysReallocated_) || forceRealloc)
{
// get arrays of new length
dataExchangeM().allocateArray(positions_,0.,3,nP);
dataExchangeM().allocateArray(velocities_,0.,3,nP);
dataExchangeM().allocateArray(fluidVel_,0.,3,nP);
dataExchangeM().allocateArray(impForces_,0.,3,nP);
dataExchangeM().allocateArray(expForces_,0.,3,nP);
dataExchangeM().allocateArray(DEMForces_,0.,3,nP);
dataExchangeM().allocateArray(Cds_,0.,1,nP);
dataExchangeM().allocateArray(radii_,0.,1,nP);
dataExchangeM().allocateArray(voidfractions_,1.,voidFractionM().maxCellsPerParticle(),nP);
dataExchangeM().allocateArray(cellIDs_,-1,voidFractionM().maxCellsPerParticle(),nP);
dataExchangeM().allocateArray(particleWeights_,0.,voidFractionM().maxCellsPerParticle(),nP);
dataExchangeM().allocateArray(particleVolumes_,0.,voidFractionM().maxCellsPerParticle(),nP);
arraysReallocated_ = true;
return true;
}
@ -615,7 +703,7 @@ tmp<fvVectorMatrix> cfdemCloud::divVoidfractionTau(volVectorField& U,volScalarFi
return
(
- fvm::laplacian(voidfractionNuEff(voidfraction), U)
- fvc::div(voidfractionNuEff(voidfraction)*dev(fvc::grad(U)().T()))
- fvc::div(voidfractionNuEff(voidfraction)*dev2(fvc::grad(U)().T()))
);
}
@ -642,17 +730,17 @@ void cfdemCloud::calcDdtVoidfraction(volScalarField& voidfraction) const
/*tmp<fvVectorMatrix> cfdemCloud::ddtVoidfractionU(volVectorField& U,volScalarField& voidfraction) const
{
if (dataExchangeM().couplingStep() <= 2) return fvm::ddt(U);
return fvm::ddt(voidfraction,U);
}*/
tmp<volScalarField> cfdemCloud::voidfractionNuEff(volScalarField& voidfraction) const
{
if (modelType_=="B")
if (modelType_=="B" || modelType_=="Bfull")
{
return tmp<volScalarField>
(
#ifdef comp
#ifdef compre
new volScalarField("viscousTerm", (turbulence_.mut() + turbulence_.mu()))
#else
new volScalarField("viscousTerm", (turbulence_.nut() + turbulence_.nu()))
@ -663,7 +751,7 @@ tmp<volScalarField> cfdemCloud::voidfractionNuEff(volScalarField& voidfraction)
{
return tmp<volScalarField>
(
#ifdef comp
#ifdef compre
new volScalarField("viscousTerm", voidfraction*(turbulence_.mut() + turbulence_.mu()))
#else
new volScalarField("viscousTerm", voidfraction*(turbulence_.nut() + turbulence_.nu()))
@ -680,8 +768,17 @@ void cfdemCloud::resetArray(double**& array,int length,int width,double resetVal
}
}
}
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
#include "cfdemCloudIO.C"
void cfdemCloud::otherForces(volVectorField& forcefield)
{
forcefield.primitiveFieldRef() = vector::zero;
forcefield.boundaryFieldRef() = vector::zero;
for (int i=0;i<otherForceModels_.size();i++)
forcefield += otherForceModel_[i]().exportForceField();
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

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