1894 Commits
2.8.2 ... 24.01

Author SHA1 Message Date
71aceddcaa Merge pull request #154 from ParticulateFlow/release
Release 24.01
2024-01-23 16:35:12 +01:00
31d49b468b add probes also to default controlDict of case 2024-01-23 15:20:48 +01:00
efb28c84b7 adjust case for testharness run 2024-01-23 13:17:32 +01:00
b58815a7da fix up formatting 2024-01-23 12:17:55 +01:00
803a604841 decrease test case runtime for faster evaluation 2024-01-23 11:08:45 +01:00
7b70c424ef increase test case runtime for better evaluation 2024-01-22 17:52:59 +01:00
ea0be9c54f fix -Wmaybe-uninitialized warning 2024-01-22 10:21:39 +01:00
4cc54f283e [DOC] minor updates 2024-01-19 15:56:33 +01:00
714ba31e7a bump version number to 24.01 2024-01-19 14:13:11 +01:00
8712e73a68 remove obsolete OFversion.H file
if required, OF version is extracted from environment variable
WM_PROJECT_VERSION instead
2024-01-19 14:11:11 +01:00
0654d060ba add -Wno-deprecated-copy to options of displacementField utility
suppress warning
2024-01-19 13:17:10 +01:00
829d9b85b6 fix filename in run.config 2024-01-18 10:42:52 +01:00
d07b28576e add more plots in ISO4695 run.config
additional info to check proper behaviour of tutorial case in
testharness
2024-01-18 10:30:09 +01:00
8cd5301c63 add pMinFactor to fvSolution of compressible cases
for OF>4 we are using pressure control instead of density control in
cfdemSolverRhoPimple and cfdemSolverRhoPimpleChem which require
pMin/pMax or pMinFactor/pMaxFactor instead of rhoMin/rhoMax;

also corrected rhoMin in single particle chemistry tutorials for
expected rho
2024-01-17 11:42:07 +01:00
7445d4486f fix typo in error message [ci skip] 2023-11-28 12:23:41 +01:00
cf902b0932 Merge pull request #152 from ParticulateFlow/feature/cfdemSolverRhoPimpleChem
Increase stability of cfdemSolverRhoPimpleChem
2023-11-07 12:28:41 +01:00
ab2a7b8570 clearer output messages from trilinear voidfraction model
model calculates cells based on cell volume and local bounding box size
this assumption is only valid for cubic cells and flat partition
boundaries
close to processor and simulation domain boundaries, cells may
potentially be selected incorrectly
2023-11-06 17:39:30 +01:00
adf3a78bb3 don't read rho in createFields.H of cfdemSolverRhoPimpleChem
revert change made in commit 2f555ed13f
(too enthusiastic c&p from rhoPimple solver)
rho actually gets calculated from other properties
2023-11-06 13:34:25 +01:00
2f555ed13f increase stability of cfdemSolverRhoPimpleChem
analogous to changes in cfdemSolverRhoPimple cf. commits
from
a271fd0aa0
to
e010b9f966
2023-10-23 13:50:24 +02:00
b29c2c5bb7 added getParticleDensities switch 2023-10-16 17:13:14 +02:00
93b30af769 Delete particle density from dictionary 2023-10-16 16:43:34 +02:00
cccd62e450 getting the particle density from particle cloud 2023-10-16 15:40:21 +02:00
05084cdc82 activating explicit and implicit forcing in couplingProperties 2023-09-17 11:25:15 +02:00
8f338378da update chemistry pore_diameter properties
property has been changed from scalar to vector for per-layer pore
diameters
2023-08-25 16:26:03 +02:00
fcb396dd2e initialize pointers to NULL 2023-08-23 12:47:22 +02:00
1153cf1544 fix initial size of allocated arrays in cfdemPostproc 2023-08-23 10:46:49 +02:00
8f178ea96c Merge pull request #151 from ParticulateFlow/feature/periodicBox
Adding periodic box tutorial and force models
2023-08-22 16:18:01 +02:00
d36b799c3e [DOC] fix typos in otherForceModel_gravityEff.txt 2023-08-22 16:04:00 +02:00
671f0515a6 correct decomposeParDict 2023-08-22 15:43:19 +02:00
3f99d26a7c [DOC] fix up formatting, add links 2023-08-22 15:20:04 +02:00
b328c53c52 documentation for staticPressure 2023-08-22 15:03:42 +02:00
329b47066b docmumentation for gracityEff 2023-08-22 15:03:12 +02:00
d864d428da cleaning the additional include 2023-08-22 14:55:58 +02:00
78ed109835 add .gitignore file to preserve post/restart folder 2023-08-22 13:07:03 +02:00
d464002bc6 clean up whitespaces and fix headers in tutorial files 2023-08-22 13:05:35 +02:00
62077cba88 fix up header comments 2023-08-22 13:03:15 +02:00
21e6d64d52 clean up whitespaces in src files 2023-08-22 13:02:05 +02:00
ba069ab7b6 Merge branch 'develop' into feature/periodicBox 2023-08-22 11:47:36 +02:00
e71f6620c6 Merge pull request #150 from ParticulateFlow/feature/cfdemSolverPimple
Update cfdemSolverPimple solver to handle periodic box simulations
2023-08-22 11:22:23 +02:00
8a8c6d2bc2 periodic box simulation tutorial 2023-08-22 11:09:04 +02:00
93d5a842a4 gravityEff source term for periodic box simulations 2023-08-22 11:08:22 +02:00
bed9a5ea00 staticPressure force model for periodic box simualtions 2023-08-22 11:07:39 +02:00
d6d05827f5 added the new files 2023-08-22 11:07:02 +02:00
88a68808d0 clean up comment 2023-08-22 10:34:32 +02:00
29accea94d fix up indentation 2023-08-22 10:31:28 +02:00
b8c3ef058b clean up whitespaces 2023-08-22 10:29:47 +02:00
1306bf35f1 reading gravity field from dictionary 2023-08-22 09:52:40 +02:00
dfccc38a3e update cfdemSolverPimple for periodic box simulations 2023-08-21 12:52:24 +02:00
9dea927b6e Merge pull request #149 from ParticulateFlow/feature/testCases
Feature/test cases
2023-07-06 07:54:52 +02:00
81e437f5d3 formatting 2023-07-05 17:54:29 +02:00
b4a5c34249 remove characteristicVelocity property/global
characteristicVelocity is only needed for hooke models
2023-07-05 17:54:29 +02:00
676b5c9ad3 Update and rename README to README.md 2023-07-05 17:26:46 +02:00
a0f3cc4043 Update and rename README to README.md 2023-07-05 17:23:44 +02:00
34020607b6 Update README.md
adjust markdown formatting
2023-07-05 17:20:26 +02:00
72a165c28e Update README.md
add title and format ordered list
2023-07-05 17:18:18 +02:00
4ec4c9b344 convert README files into markdown 2023-07-05 17:10:27 +02:00
47cd4a810b delete liggghts restart file
restart file gets written by running in.liggghts_init
2023-07-05 16:56:58 +02:00
c92cd30338 clean up rcfdemSolverRhoSteadyPimpleChem/reductionTest tutorial 2023-07-04 16:57:43 +02:00
fee08f3e08 clean up rcfdmSolverRhoPimpleChem/3D_hot_reacting 2023-07-04 16:08:02 +02:00
b0e4905ffd clean up cfdemSolverRhoPimple/FinesColumnStickyMonodisperse tutorial 2023-07-03 17:51:50 +02:00
ce39bff194 clean up cfdemSolverRhoPimple/FinesColumnStickyBidisperse tutorial 2023-07-03 17:27:35 +02:00
06f4649afb clean up cfdemSolverRhoPimple/FinesColumnKinetic tutorial 2023-07-03 16:56:51 +02:00
47555c0fb2 Minor changes in fines transport case settings. 2023-06-30 12:42:33 +02:00
cacef9a0a1 Output mass loss in reduction test. 2023-06-30 11:32:30 +02:00
7f09365ed2 Corrected reduction degree. 2023-06-28 17:32:02 +02:00
a9029f1325 Setup for reduction case. 2023-06-28 17:22:43 +02:00
1f4c4efb52 Fixed bug for Nu scaling. 2023-06-28 17:21:41 +02:00
ae8cc453d1 Added missing database to reductionTest. 2023-06-28 16:42:40 +02:00
73fa126a41 Reduction test case. 2023-06-28 16:35:35 +02:00
8711b1eeb1 3D BF case. 2023-06-26 10:07:35 +02:00
106d30addc FinesColumn with moving, bidisperse bed. 2023-06-23 08:30:54 +02:00
17be440f72 Tutorial case for sticky fines in monodisperse bed. 2023-06-22 07:54:04 +02:00
390a903eb4 Renamed FinesColumn tutorial to FinesColumnKinetic to avoid confusion with other tutorials. 2023-06-22 07:53:29 +02:00
41d49e98d3 Option to restrict Nu number scaling to predefined cell set. 2023-06-22 07:52:13 +02:00
cd1ddfa16a make sure restart file is written if end time changes
if the OF end time gets modified at runtime, we need to update the time
setting for invoking the write_restart command if we only want to write
at the end of the simulation;
otherwise we will either write the file too soon or - probably even
worse - not at all
2023-06-20 15:26:59 +02:00
bc73bd7506 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2023-06-16 11:59:14 +02:00
066b69efc0 Minor changes in rcfdemSolverRhoSteadyPimpleChem wrt to implicit source treatment and in energyModel/reactionHeat to allow smoothing. 2023-06-16 11:58:42 +02:00
f255726716 [ci skip] fix circleci status badge in README.md 2023-05-24 16:37:01 +02:00
4a07819464 Output formation enthalpies of the various species. 2023-05-19 09:03:44 +02:00
0ebd4e0962 Added clarifying comment regarding the definition of effective thermal conductivities due to contacts and to radiation. 2023-04-27 13:51:39 +02:00
3e3de6295b adding the viscous force to the UEqn.H 2023-04-26 13:39:33 +02:00
e4de205ef5 convert tabs to spaces 2023-04-07 14:25:59 +02:00
57f672e0e0 Merge pull request #148 from ParticulateFlow/feature/cfdemSolverPimple
add cfdemSolverPimple based on PIMPLE algortihm of DPMFoam
2023-04-07 13:59:54 +02:00
ca47917abe rename variables and readme files 2023-04-07 13:54:48 +02:00
d61aec2dee fix up comment 2023-04-07 12:45:37 +02:00
3c68adcb4b add .gitignore files to preserve post/restart folders for DEM 2023-04-07 12:43:13 +02:00
785dbb053a remove unneeded files 2023-04-07 12:41:30 +02:00
f3ce94686d clean up tutorial files
whitespaces and header comments
2023-04-07 12:40:52 +02:00
84efaafeef add pimple solver to solver-list.txt 2023-04-07 12:39:48 +02:00
0629aa5883 fix up copyright information 2023-04-07 12:39:18 +02:00
3542643f32 cleanup whitespaces and formatting 2023-04-07 12:38:51 +02:00
cb5e684752 added documentation for cfdemSolverPimple 2023-03-20 11:29:23 +01:00
f3f4c779ce added bubbling fluidized bed tutorials 2023-03-20 11:15:02 +01:00
07fe87e207 Update files 2023-03-17 17:52:01 +01:00
930dcdaa39 cfdemSolverPimple for incompressible flows 2023-03-16 17:16:50 +01:00
d676bcbf6e Merge pull request #147 from ParticulateFlow/master
Updates from release 23.02
2023-03-06 15:36:32 +01:00
86753f2823 Merge pull request #146 from ParticulateFlow/release
Release 23.02
2023-02-15 12:26:45 +01:00
13e5989216 shorter simulation times on test harness for redBloodCell cases
with the original simulation time the case gets to long/large for
reasonable testing ...
2023-02-15 10:19:24 +01:00
01117a7a87 fix comments in input script
test harness does not like the degree sign
2023-02-15 10:19:24 +01:00
6c3290f75c fix output of kinetic energy in settling test
in case of a single particle, we need to specify the option 'extra 0';
since we just create one particle at the start of the simulation, we can
also set 'dynamic' to 'no';
2023-02-14 14:05:39 +01:00
9bc6333c1e reduce info output
remove some info output of mediocre use
2023-02-14 11:11:05 +01:00
66015ee916 bump version number to 23.02 [ci skip] 2023-02-13 09:56:55 +01:00
a3dcb037b4 Merge pull request #145 from ParticulateFlow/feature/fluidized_bed_chemistry_cases
Add fluidized bed chemistry cases
2023-02-13 09:48:11 +01:00
61e746470f add .gitignore file in FeO->Fe reduction case
preserve DEM/post/restart folder
2023-02-10 11:20:39 +01:00
4e65f19d5f add FeO->Fe reduction case
based on R1 case described by Spreitzer 2016 / Kinaci 2020
2023-02-10 11:12:17 +01:00
78852efc7a add Fe2O3->Fe3O4 reduction case
based on R3 case described by Spreitzer 2016 / Kinaci 2020, but with the
reaction point shifted from 0.434 to 0.516 to avoid any Fe formation via
CO reaction
2023-02-09 15:50:44 +01:00
561092cc46 adjust plotting of chemistry data [ci skip]
adjust step size for data selection; add plot of experimental data
2023-02-09 15:05:55 +01:00
65dde56334 change computation from sum to average of molar fractions
average makes more sense than sum here
2023-02-09 14:53:52 +01:00
d227090570 adjust particle properties in R2_FB case 2023-02-09 14:51:57 +01:00
69234a1451 Merge branch 'develop' into feature/fluidized_bed_chemistry_cases
tutorials/cfdemSolverRhoPimpleChem/PolydisperseFluidizedBed/R2_FB/DEM/in.liggghts_run
2023-02-03 12:37:51 +01:00
7ef990e025 turn fix property/atom into fix property/global for k0 and Ea [ci skip]
as of
6e96c2ccab
these properties should be defined via fix property/global
2023-01-13 13:36:44 +01:00
3d0ac6d079 skip postFlow() method if we ignore particle interaction
resolve #129
2023-01-10 17:22:53 +01:00
3becf58e3c remove cfdemCloudEnergy::solve() method
none of the current energy or mass transfer models implements the
solve() method, so remove it
2023-01-10 17:14:37 +01:00
5d272decba add run.config file for redBloodCellShearFlow case for testharness [ci skip] 2023-01-10 14:49:43 +01:00
ed20344d03 add run.config file for redBloodCellPoiseuilleFlow case for testharness [ci skip] 2023-01-10 14:26:24 +01:00
e0917bdc38 fix typo [ci skip] 2023-01-10 14:24:51 +01:00
d350ae01d6 add run.config file for falling_sphere_two_way_coupling case for test harness 2023-01-10 12:24:19 +01:00
4283ff09e7 change data plotting of falling_sphere_two_way_coupling case
simply plot particle's omega-z and pos-y of actual case instead of
comparing omega-z of actual case to a case without torque coupling
(requiring a 2nd simulation with modified setup)
2023-01-10 12:23:29 +01:00
29410326d1 avoid library interface change
let LIGGGHTS allocate the memory, delete it in CFDEMcoupling if no
longer needed;
2023-01-09 17:17:38 +01:00
2d061dc1c1 Merge pull request #142 from tmjnijssen/feature/fixOne2One
fix deadlock and memory leaks in one2one
2023-01-09 17:11:38 +01:00
7b8e4eab3a make constDiffAndTemporalSmoothing work without refField again
revert constDiffAndTemporalSmoothing to previous behavior if no refField
is specified; this is required e.g. in ParmarBassetForce where Urel_ and
ddtUrel_ get smoothed using the same smoothing model;
2023-01-09 13:46:50 +01:00
ff42a04be1 Merge branch 'develop' of github.com:ParticulateFlow/CFDEMcoupling into develop 2023-01-03 09:31:37 +01:00
68318ab863 Fixed settings in tutorial cfdemSolverRhoPimple/FinesColumn. 2023-01-03 09:31:25 +01:00
c05732bb45 add -Wno-deprecated-copy to options files
to silence warnings stemming from OpenFOAM in g++ 9
2022-12-22 17:53:49 +01:00
b343711954 Merge pull request #136 from tmjnijssen/feature/updateParmarBassetForce
Feature/update parmar basset force
2022-12-22 17:10:00 +01:00
cbabd0aa50 Merge branch 'develop' of github.com:ParticulateFlow/CFDEMcoupling into develop 2022-12-06 08:16:09 +01:00
6af30fe0e5 Allow displacement field computation for polydisperse systems. 2022-12-06 08:15:50 +01:00
9a4bf92207 fix memleak 2022-12-05 13:38:37 +01:00
60983f8e96 fix memory leak 2022-12-02 14:52:16 +01:00
6ce64cf663 update debug output 2022-11-30 11:49:59 +01:00
a00d3fdec1 use nonblocking sends 2022-11-30 11:49:59 +01:00
e7db2ab2f0 use unique tags 2022-11-30 11:49:58 +01:00
c1bff32b4f Merge pull request #141 from tmjnijssen/multiphaseMixture_bugfix
rename cfdemSolverMultiphaseScalar/multiphaseMixture to cfdemSolverMu…
2022-11-21 12:54:27 +01:00
153d1e353b rename cfdemSolverMultiphaseScalar/multiphaseMixture to cfdemSolverMultiphaseScalar/multiphaseMixtureScalar 2022-11-17 14:38:54 +01:00
25115b0e33 Merge pull request #137 from tmjnijssen/feature/lubrication
Feature/lubrication
2022-11-09 11:41:06 +01:00
41b516c1e8 Check out fields manually checked into registry. 2022-11-08 17:41:17 +01:00
8505c69b94 Merge pull request #135 from tmjnijssen/patch-3
[doc] constDiffSmoothing doc update
2022-11-02 16:37:51 +01:00
3b7724003a Update smoothingModel_constDiffSmoothing.txt 2022-11-02 16:32:00 +01:00
15f111fb11 Merge pull request #138 from tmjnijssen/fix/probe
probe bugfixes
2022-11-02 10:57:09 +01:00
8ba87ddedb probe bugfixes 2022-10-26 16:34:05 +02:00
57c8c1c762 add doc 2022-10-24 14:46:01 +02:00
d6dab59bfd add interpolation 2022-10-24 14:46:01 +02:00
4ddf691936 add transfer of fluid properties to LIGGGHTS 2022-10-24 14:46:01 +02:00
20e75cf64f eliminate pow() for performance 2022-10-24 14:34:05 +02:00
2aa5c7880b rework input 2022-10-24 14:34:05 +02:00
0fdb464d73 remove unneeded component of rHist to save memory 2022-10-24 14:34:05 +02:00
ab73bf86ac reorder ddtUrelHist and rHist to save memory 2022-10-24 14:34:05 +02:00
dc2be65fe3 reorder FHist to save memory 2022-10-24 14:34:05 +02:00
a10c773e31 [DOC] added verbose mode for ParmarBassetForce 2022-10-24 14:34:05 +02:00
19e780f93b added verbose mode for ParmarBassetForce 2022-10-24 14:34:05 +02:00
7ce49bf21c minor cleanup 2022-10-24 14:34:05 +02:00
c3f609b0e9 allocate uRelOld only when needed, save memory 2022-10-24 14:34:05 +02:00
f2306d2037 use particleProperty + cleanup 2022-10-24 14:34:05 +02:00
d35249aa3c clean up ParmarBassetForce 2022-10-24 14:34:05 +02:00
e95e1ec6ad clean up ParmarBassetForce 2022-10-24 14:34:05 +02:00
fb798eb92f Update rCFD fluidized bed case to improve stability. 2022-08-02 11:30:51 +02:00
056b121f21 Minor modifications for rcfdemSolverCoupledHeattransfer to improve stability. 2022-08-02 09:52:51 +02:00
3107a9ce10 Update smoothingModel_constDiffSmoothing.txt 2022-07-29 13:57:58 +02:00
389b44d0e5 [doc] constDiffSmoothing doc update 2022-07-29 13:46:33 +02:00
507f24145e dSauter is constructed by submodel dSauter. If another one is constructed by the solver, force models looking up dSauter may get confused. 2022-07-06 12:14:32 +02:00
9e54b3f94f Merge pull request #134 from ParticulateFlow/fix/gradPForceSmooth
Make sure gradPForceSmooth  can be used with any smoothing model.
2022-06-30 15:29:29 +02:00
d7fb907a8a Instead of throwing an error if gradPForceSmooth uses any smoothing model other than a temporal one, make it optional. If spatial smoothing is used, updated pSmooth in every time step. 2022-06-30 15:26:40 +02:00
3bd3fb1e00 Make sure gradPForceSmooth only uses certain smoothing models. Also fixed some inconsistencies in constDiffAndTemporalSmoothing. 2022-06-30 10:04:32 +02:00
08bb2b41ff add experimental data for comparison
data extracted from reduction test MWS16 performed by Spreitzer
2016-03-15
2022-04-22 15:38:57 +02:00
5a1c957ba5 move blockMeshDict to system folder
and remove m4 file
2022-04-22 15:32:41 +02:00
c7532c919c fix up path to data files [ci skip] 2022-03-28 10:37:45 +02:00
9ef314c961 revert dump custom/vtk to dump custom
in case user has not compiled  LIGGGHTS with VTK library
2022-03-25 15:20:32 +01:00
2b69485204 move post-processing scripts to usual CFD/octave folder
move scripts and invoke plotData after CFD-DEM run
2022-03-25 15:19:31 +01:00
f0454797af add post-processing scripts for DEM data in R2_FB 2022-03-25 15:02:17 +01:00
06b0585ab1 clean up DEM scripts in R2_FB
clean up, slightly rearrange commands
2022-03-25 14:55:54 +01:00
6834013deb move additional DEM data processing to separate file in R2_FB
move data averaging and output to separate file for better readability;
perform averaging for each size group and use mass-based (vs. number-
based) averages for global properties such as overall reduction,
resistance terms etc.
2022-03-25 14:48:13 +01:00
d3a01f0872 fix initial layer radii in R2_FB
R2 means reduction from magnetite to wüstite and like in Kinaci et al.
(2020) we should assume that reduction from hematite to magnetite is
already completed to avoid mixing the reaction processes;
hence, start the simulation with a negligible hematite layer
2022-03-25 14:17:23 +01:00
7d70846fa3 remove artificial temperature limiter in R2_FB
enforcing a temperature range should not be necessary in a stable
simulation
2022-03-25 13:18:24 +01:00
ccbbdba41f clean up R2_FB system dicts 2022-03-25 13:15:43 +01:00
5e8a7e9475 clean up R2_FB 0 dicts 2022-03-25 13:10:13 +01:00
7fb38309e1 remove R2_FB unneeded 0 dicts 2022-03-25 13:00:50 +01:00
ea81e6d806 clean up R2_FB constant dicts
remove unneeded entries, update header to indicate actually used OF
version
2022-03-25 12:59:23 +01:00
5245083201 remove remaining traces of 'dummy' files [ci skip]
using .gitignore instead
2022-03-25 09:32:29 +01:00
32e41e2fa6 Merge pull request #130 from ParticulateFlow/feature/immersed_multisphere
close #127
2022-03-25 09:14:06 +01:00
8cb7184a7c only look up fieldname and field if required
only look up solidVolFractionName_ and lambda_ field if calculation of
multisphere drag (in calcForce() method) is requested via the option
'multisphere' - otherwise just set both to null
this way, specifying solidVolFractionName is optional and old case
setups will still work without modifications
2022-03-24 16:56:20 +01:00
937dcc2023 use Pout instead of printf
I suppose the original author's intention was to print out the forces
from all procs, but Info just prints on master proc. Pout is the proper
alternative here.
2022-03-24 16:49:43 +01:00
3e1126a55d make ShirgaonkarIB::calcForce method private
currently not used by other classes
2022-03-24 16:41:24 +01:00
f8ea7e5bc2 clean up couplingProperties file
particle limit option is only used in file-based communication
2022-03-24 15:51:41 +01:00
e1245147fe clean up tutorial run/clean scripts 2022-03-24 15:43:56 +01:00
1f5c8f6492 add a tutorial for cfdemSolverIBContinuousForcing
simulating the deformation of a red blood cell (bonded particles) in
shear flow
2022-03-24 15:39:10 +01:00
38b8d6c8b8 fix up path of python post-processing 2022-03-24 14:35:09 +01:00
cc19fd3a46 clean up Allclean.sh of redBloodCellPoiseuilleFlow case 2022-03-24 11:06:35 +01:00
188bc3e230 adjust plot range to shortened simulation time 2022-03-24 10:48:37 +01:00
ed997ec9a8 add a tutorial for cfdemSolverIBContinuousForcing
simulating a red blood cell (bonded particles) in a Poiseuille flow
2022-03-23 17:59:36 +01:00
28d9dfacac clear Us field to zero each time step
clear particle velocity values from previous time step
2022-03-23 17:26:02 +01:00
7698e20c8f Merge pull request #132 from ParticulateFlow/bugfix/iomodel_deadlock
Fix potential deadlock in IOModel
2022-03-23 13:47:04 +01:00
521b95520d update documentation of IO model
document cartesianOutput option
2022-03-22 17:27:29 +01:00
43cc5a9ecd add option to enforce cartesian coordinates in lagrangian position output
add the option 'cartesianOutput' for the couplingProperties dict to
output particle positions as cartesian coordinates + cell index instead
of barycentric coordinates + cell index + tet face index + tet point
index in  OF > 4
this format does not require parafoam but works fine with paraview, plus
it avoids the temporary creation of OF particles for writing the output
2022-03-22 17:20:30 +01:00
6fdda583c2 fix deadlock in IOModel
force construction of face-diagonal decomposition (called from all procs!) before call of particle constructor (potentially not on all procs!) to avoid blocking sync operation, when it looks for tet face index and tet point index.
fix #131
2022-03-18 13:25:04 +01:00
d47e4d01a7 Changed way to read in large data file. 2022-03-08 16:28:14 +01:00
aa42bb9a28 increase stability of cfdemSolverRhoPimpleChem
analogous to 16560cfe4f
VSMALL is typically DBL_MIN (1e-37 or smaller) which is actually too
small here
2022-03-01 10:13:52 +01:00
c96e0cc6fd Fixed issue in tutorial LIGGGHTS script: Deactivate building of neighbor lists. 2022-02-22 13:54:19 +01:00
461be2f193 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2022-02-21 11:06:17 +01:00
a908ffc979 Added maximum number of search layers to initialize multi-layer shrinking core model. 2022-02-21 11:05:56 +01:00
ede9546e80 merge cfdemCloudIB and cfdemCloudIBContinuousForcing
note that Us field is only use by cfdemSolverIBContinuousForcing but not
by cfdemSolverIB, so it may be better to call
cfdemCloudIB::calcForcingTerm(...) from cfdemSolverIBContinuousForcing
instead of cfdemCloudIB::evolve()
2022-02-16 15:56:15 +01:00
5ebb7e18cb correct BC of Us filed after setting
add a call to correctBoundaryConditions() once we have finished setting
the velocities from the particle data
2022-02-16 14:59:34 +01:00
0820d99e85 move calculation of Us field to separate function in cfdemCloudIB
refactoring, use same name as the function doing Us field calculations
in cfdemCloudIBContinuousForcing;
note that cfdemCloudIB is considering angular velocities of particles
while cfdemCloudIBContinuousForcing does not
2022-02-16 14:58:23 +01:00
d1dad545ae update headers of tutorial case
indicate that this case is intended to be used with OF 6
2022-02-14 15:21:28 +01:00
8437714660 update documentation 2022-02-14 15:05:35 +01:00
4bb95e66a8 merge ShirgaonkarIB and ShirgaonkarIBTorque models
reduce code duplication
2022-02-14 14:15:04 +01:00
3463f5ccc0 update handling of model options in ShirgaonkarIB*
make options const bool if possible and bring in line with rest of code,
i.e. read values from dict already in initializer list
2022-02-14 13:43:05 +01:00
a38dba8cfd add compiler flag
add -Wno-deprecated-copy flag to deactivate respective compiler warning
2022-02-09 17:14:45 +01:00
21b338fb05 Merge branch 'develop' into feature/immersed_multisphere
resolved Conflicts:
- applications/solvers/cfdemSolverIB/Make/options
- etc/solver-list.txt
- src/lagrangian/cfdemParticle/Make/files
- src/lagrangian/cfdemParticle/derived/cfdemCloudIB/cfdemCloudIB.C
resolved Issues:
src/lagrangian/cfdemParticle/subModels/ShirgaonkarIBTorque/ShirgaonkarIBTorque.C
2022-02-09 16:37:40 +01:00
e3ec594f73 rename cfdemSolverIBRO.C to cfdemSolverIBContinuousForcing.C
more appropriate naming:
RO (reduced order) referred to the RO model of red blood cells, but the
key difference in this solver is the momentum forcing term in the UEqn
2022-02-09 16:05:21 +01:00
88f79a57c4 move solver from cfdemSolverIBRO to cfdemSolverIBContinuousForcing
more appropriate naming:
RO (reduced order) referred to the RO model of red blood cells, but the
key difference in this solver is the momentum forcing term in the UEqn
2022-02-09 15:57:05 +01:00
7d2f5067c2 rename cfdemCloudIBmodified.* files to cfdemCloudIBContinuousForcing.*
more appropriate naming
2022-02-09 15:40:58 +01:00
f7e7c1ab06 rename class cfdemCloudIBmodified to cfdemCloudIBContinuousForcing
more appropriate naming
2022-02-09 15:33:24 +01:00
aaf9c17608 Merge branch 'feature/immersed_multisphere' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/immersed_multisphere
resolved Conflicts:
- etc/solver-list.txt
2022-02-09 15:02:34 +01:00
508450007b clean up whitespaces 2022-02-09 14:57:51 +01:00
093c292570 remove outdated Info message
particle rotational velocity is taken into account now
2022-02-09 14:56:28 +01:00
83949a2f06 fix up controlDict
using cfdemSolverIB instead of the removed cfdemSolverIBTorque
2022-02-09 14:38:28 +01:00
8530b6d303 remove inclusion of mpi.h file
there is no need to include mpi.h in these files
2022-02-09 14:37:42 +01:00
50e27e2ac9 use different solver to run tutorial case
use cfdemSolverIB instead of the removed cfdemSolverIBTorque to run the
case
2022-02-09 14:25:31 +01:00
d38be10d99 move tutorial to different folder
move falling_sphere_two_way_coupling from cfdemSolverIBTorque to
cfdemSolverIB folder
2022-02-09 14:23:07 +01:00
5291dfb1bc remove cfdemSolverIBTorque
remove cfdemSolverIBTorque as it is essentially a copy of cfdemSolverIB
2022-02-09 14:13:01 +01:00
127c21e548 update comment sections [ci skip]
fix up copyrights and contributions
2022-02-09 14:09:38 +01:00
7f5e596271 update .gitignore file
also ignore folders generated by compiling with icc
2022-02-08 09:42:38 +01:00
ff2ff4d251 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2022-01-19 09:50:46 +01:00
845cbdd34c Removed unnecessary voidfraction limiter. In this case, even negative values (from massive overpacking) could be tolerated and should be retained to conserve energy. 2022-01-14 09:10:39 +01:00
5f8ac39fad Removed unnecessary and wrong if-clause from FE. Would always return 1.0. Adapted reliable maximum voidfraction for B-B correlation. TODO: Check literature value from original publication. 2022-01-14 09:09:18 +01:00
764e6bd458 remove test solver cfdemSolverPimpleIB
cfdemSolverPimpleIB was a test solver to see the performance using
pimpleFoam; not intended for use in a production environment
2022-01-13 11:31:55 +01:00
257b9e0f02 Merge pull request #128 from ParticulateFlow/master
Updates from release 21.11
2022-01-11 12:40:23 +01:00
16a415a152 Merge pull request #125 from ParticulateFlow/release
Release 21.11
2022-01-11 11:26:26 +01:00
84842df79f fix whitespace 2022-01-11 09:52:58 +01:00
bc1dd9f5e8 fix run.config for vortex shedding test case 2022-01-10 16:26:49 +01:00
6cd16223d1 set log files for test case 2022-01-10 12:31:27 +01:00
c378a73650 explicitly set initial old-time values of rhoeps 2022-01-10 11:35:55 +01:00
62b22d191f bump version number to 21.11 [ci skip] 2021-12-23 17:44:34 +01:00
3c3f1d9651 add run.config file for vortex shedding test case
run configuration for test harness
2021-12-23 17:00:18 +01:00
6147878a1b add vortex shedding test case [ci skip]
add test case based on OpenFOAM tutorial by J. Guerrero to compare p, U,
T, rho from compressible rhoPimpleFoam solver to cfdemSolverRhoPimple
2021-12-23 16:54:55 +01:00
6995a3d7dc add pressure control values to fvSolution files [ci skip]
updated cfdemSolverRhoPimple requires pMin/pMax or pMinFactor/pMaxFactor
for pressure control (OF >= 5) instead of rhoMin/rhoMax (OF 4) for
density control
2021-12-23 16:16:24 +01:00
e010b9f966 bring cfdemSolverRhoPimple more in line with OpenFOAM 6 solver version
use pressure control instead of density control if available (i.e. for
OpenFOAM versions >= 5)
2021-12-23 16:00:46 +01:00
3667af9f56 bring cfdemSolverRhoPimple more in line with OF solver 2021-12-23 15:54:06 +01:00
7213a1d850 remove addSource field
defining the addSource term outside of EEqn for some reason causes
noticeable deviations from the solution produced by the OpenFOAM solver
2021-12-23 15:51:57 +01:00
9750720a5e activate correction in surfaceScalarField phiHbyA
activate correction for large time steps
2021-12-23 15:48:10 +01:00
5b3a148fcf create surfaceScalarField rhorAUf in one go
reduce numerical issues by avoidung multiple interpolations in case of
model 'A'
2021-12-23 15:45:36 +01:00
ae21c7e19a formatting 2021-12-23 15:42:39 +01:00
85e2964d0d just move around creation of rhoMax/rhoMin in createFields.H 2021-12-23 15:39:55 +01:00
3a12684d3b add average value to T ouput 2021-12-23 15:38:01 +01:00
e16e405828 move recalculation of rho in pEqn.H
just move calculation further down
add average value to output of rho
2021-12-23 15:37:12 +01:00
54db2db656 update rhoeps after rhoEqn.H 2021-12-23 15:33:23 +01:00
4bdb5f06d4 move update of rhoeps to pEqn.H 2021-12-23 15:29:31 +01:00
b8ccfb9986 move creation of field phi
to better match order in corresponding OpenFOAM solver and make
comparision easier
2021-12-23 15:26:33 +01:00
a271fd0aa0 create rhoeps field in createFields.H
this was a major issue:
rhoeps must be created outside the run loop and have old time values,
otherwise any time derivative will be zero, leading to incorrect results
2021-12-23 15:22:40 +01:00
30662789fa let parCFDrun() function decompose case for parallel CFD runs [ci skip]
analogous to parCFDDEMrun()
2021-12-21 16:39:27 +01:00
2fb7ca52a3 rename .gitkeep files to .gitignore [ci skip]
for consistency
2021-12-20 17:11:40 +01:00
5ec9393aba use Stefan-Boltzmann constant provided by OpenFOAM
Stefan-Boltzmann constant is already given via
Foam::constant::physicoChemical::sigma
no need to define it again
2021-12-20 16:55:54 +01:00
f72fcf68ba make prefactor in Ranz-Marshall correlation customizable
For a single sphere the data of Ranz suggests
2 + 0.6 * Re^(1/2) * Pr^(1/3)
but for gas flow through a packed bed of particles this may change to
2 + 1.8 * Re^(1/2) * Pr^(1/3)
cf. Kunii and Levenspiel, Fluidization Engineering (1991)
Hence, this commit will make this prefactor configurable in the
couplingProperties dict; if it is not set, use a value of 0.6 to retain
previous behavior;
Also, use the specialized math functions for square root and cube root
instead of the pow function;
2021-12-20 10:50:07 +01:00
ab3f69db66 Added monitoring field for fluid-phase heat conduction. 2021-12-09 06:56:18 +01:00
b5ab312744 Make sure cases without any chemistry models are initialized correctly. 2021-12-09 06:55:14 +01:00
a305383123 The former default value for massTransferModels_ caused a crash if no word list was provided. Works now. 2021-12-07 15:15:58 +01:00
640731e07d Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2021-12-07 12:21:11 +01:00
ac1e4c5396 Minor fixes in MarkovPath. 2021-12-07 12:20:40 +01:00
2b5fba4ece clean up whitespaces [ci skip] 2021-12-06 13:13:12 +01:00
497ddb3120 let exit value of shell script indicate compilation result
if compilation of all solvers succeeded exit 0
else exit with number of failed solver compilations
2021-12-06 11:22:32 +01:00
b23b1aa0d2 fix compilation of solvers
commit 4897e9b759 was incomplete
2021-12-06 09:48:20 +01:00
4897e9b759 refactor createFields.H files to eliminate unused variable warnings
these warnings are mainly caused by postProcesss.H including
createFields.H in a sub-block
2021-12-06 07:59:58 +01:00
dec6d77baa remove unneeded options from solver Make file 2021-12-06 07:51:11 +01:00
fdc183abb4 remove duplicate entry from solver list [ci skip]
revert duplication introduced in commit 28aaa25
2021-12-03 20:36:58 +01:00
1576391e51 clean up test case file [ci skip] 2021-12-02 13:23:07 +01:00
5214948671 fix warning reorder
member initialization is executed in the order the members are defined
in the class, hence the member initializer list in the constructor
should be in the same order
2021-12-02 10:23:49 +01:00
981ff462c9 fix warning old-style-cast
use static_cast instead of old style cast
2021-12-02 10:14:56 +01:00
c39c0da9f4 add test case for particle-fluid convection using Ranz Marshall [ci skip] 2021-12-01 17:59:52 +01:00
6222d3b6bb [DOC] update list of available models 2021-12-01 14:58:33 +01:00
c626fa5c53 allow omission of massTransferModels list in couplingProperties dict
create an empty list if 'massTransferModels' list is not defined in
couplingProperties
2021-12-01 14:57:08 +01:00
a2f9772ce3 allow omission of diffCoeffModel in couplingProperties dict
if 'diffCoeffModel' is not defined in couplingProperties, create an
instance of noDiffCoeff ("off") and also do not try to read 'D' from
transportProperties dict
2021-12-01 14:52:54 +01:00
32283e8ac3 add a pull request template file [ci skip]
when creating a new pull request on GitHub, the pull request template file is used to provide default text for the pull request description;
must be present in the default branch (e.g. master or main) of the repository to take effect;
2021-11-30 10:22:11 +01:00
60df64826a Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2021-11-05 11:16:56 +01:00
3ea46f470e Let rCFD solvers update fields with integer counter instead of scalar elapsed time. 2021-11-05 11:15:29 +01:00
d9ba7d1a7a Allow different time step sizes for different recurrence databases. 2021-11-05 11:05:24 +01:00
ad5a39ceac Merge pull request #123 from tmjnijssen/develop
TUe/SMR developments
2021-11-05 09:07:27 +01:00
b3fd82e81b Let MarkovPath provide more information how much time is spent in which database. Also allow user to specify minimal time spent in one database before switching. 2021-11-03 16:49:16 +01:00
ea5e113d0f [OF6] exit if cfdemSolverMultiphaseScalar is compiled against OF6
similar to cfdemSolverMultiphase, cfdemSolverMultiphaseScalar
malfunctions in combination with OpenFOAM 6.
The root of this erroneous behaviour remains unclear at this point.
2021-11-03 12:49:54 +01:00
1900a7cd28 fix runAllPar.sh script
also runAllPar.sh needs to copy initial restart file to work with same
liggghts run script
2021-11-03 12:24:40 +01:00
64aaa5825b change fvSolution to work with OF 6
OF 6 requires pcorrFinal to be defined
2021-11-03 12:22:57 +01:00
b03c91bfc3 make spelling of logpath variable consistent throughout case scripts 2021-11-03 12:13:18 +01:00
f2bd0ad0aa make spelling of logpath variable consistent throughout case scripts 2021-11-03 12:03:41 +01:00
2f81209804 store size of FHist_ in member variable 2021-10-22 14:06:20 +02:00
28aaa258f0 Extended solver list. 2021-10-21 15:30:32 +02:00
1a28aaf6b4 Limit reactant available for particle reactions. Corrected such that it works with coarse-grained parcels. 2021-10-21 15:30:15 +02:00
bb0ab31d26 change order of nested loops, more cbrt() 2021-10-20 17:07:38 +02:00
ae49113dbb use cbrt() 2021-10-20 16:43:51 +02:00
5a5b743057 fix logic operator 2021-10-20 16:39:53 +02:00
02d1fbadc0 fix deconstructor 2021-10-20 16:38:48 +02:00
36f739d32f formatting/clean-up 2021-10-20 12:53:21 +02:00
cbd0d9c3cb use vector::zero instead of vector(0,0,0) 2021-10-20 12:38:49 +02:00
ca1b581ee5 turn scalar variables into label variables 2021-10-20 12:32:48 +02:00
9df98073b7 make internal methods private; change vector to const vector& parameters
methods that are only used internally by the class should be
private/protected;
avoid construction of temporary objects by passing references to
methods;
2021-10-20 12:08:39 +02:00
2e0ff86b01 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2021-10-20 09:03:03 +02:00
f12fef0f85 Some changes to drag and pressure force in the presence of fines. 2021-10-20 09:02:25 +02:00
f8c410a3d4 fix error check in ParmarBassetForce.C 2021-10-15 15:46:49 +02:00
3338d1ea32 revert pEqn.H of cfdemSolverPiso
revert change made in commit 39f6e7d056
2021-10-15 14:55:45 +02:00
c53dd25f20 clean up file 2021-10-15 14:53:45 +02:00
1e7e6a3b7a clean up gradPForceSmooth 2021-10-15 14:40:44 +02:00
dea1d2e922 revert list of probed fields in BeetstraDrag 2021-10-15 14:35:12 +02:00
39519983ee make sure restart folder exists for simulation 2021-10-15 14:26:17 +02:00
249cbc8e3a use particle property registration in wall heat transfer model
cf. pull request #107
2021-10-15 11:33:03 +02:00
0beb4b5329 use particle property registration in mass transfer model
cf. pull request #107
2021-10-15 10:52:57 +02:00
0791554caf fix usage of cg-scaling transfered from LIGGGHTS
cf. commit a5a811e436
2021-10-15 10:34:44 +02:00
981b1a5957 formatting 2021-10-15 10:32:08 +02:00
24a684dc52 make member variable const 2021-10-15 10:31:31 +02:00
6bc7371b76 clean up whitespaces
tabs -> spaces
2021-10-14 18:05:17 +02:00
caa98441f9 clean up whitespaces 2021-10-14 17:27:58 +02:00
2f9d410800 fix compilation of multiphaseMixture.C with OF 6 2021-10-14 17:08:14 +02:00
8330e3a8ff remove lnInclude folder
generated during compilation
2021-10-14 16:42:40 +02:00
b41b2f8d8d update tutorial readme [ci skip] 2021-10-14 12:52:25 +02:00
524d5a30e0 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2021-10-14 12:45:46 +02:00
73e21bec5d add bubbling fluidized bed test case
based on Khawaja, H.A., J. Comput. Multiph. Flows 7(4), 227-240 (2015)
2021-10-14 12:44:47 +02:00
4dda7cbea2 fix heat transfer for general heat capacities
same as for cfdemSolverRhoPimple in commit
0fa1f023d6
2021-10-12 10:37:36 +02:00
278706f4c9 merge tue/master > tue/develop 2021-10-08 14:16:39 +02:00
c5716b5a04 added liquid FB tutorial 2021-10-07 16:27:21 +02:00
be9b19ff76 merge PFM/master > TUe/master 2021-10-07 09:30:51 +02:00
598bd93085 added small_hearth tutorial case 2021-09-28 12:18:42 +02:00
6a175f3450 added docs 2021-09-02 14:27:47 +02:00
e871612ac7 DisplacementField utility can now take fields as default values. 2021-08-24 08:49:08 +02:00
f8a5b9c9df Merge pull request #120 from ParticulateFlow/feature/recurrence_chemistry
Feature/recurrence chemistry
2021-07-30 11:42:29 +02:00
1fdf400149 clean up whitespaces 2021-07-30 11:38:16 +02:00
9dc995cd38 backwards compatibility with OF4/OF5
since cfdemSolverMultiphase does not work properly with OF6, make sure
code works with OF4/OF5
2021-07-30 11:15:42 +02:00
121ef06f19 Clean up of turbulentDispersion, turbulentVelocityFluctuations and tutorial case oreReducingBlastFurnaceSlot. 2021-07-30 09:57:03 +02:00
71c9e1f795 Cleaned up terminalVelocity. 2021-07-30 09:27:19 +02:00
d9dad12922 Let initMultiLayers register particle-arrays via cfdemCloud. 2021-07-30 08:13:06 +02:00
6deb665164 Merge branch 'feature/recurrence_chemistry' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-07-30 07:44:12 +02:00
db14b2c7c2 Clean up tutorial case for displacementField. 2021-07-30 07:43:42 +02:00
7b4032cbe3 remove unused variables 2021-07-29 16:22:36 +02:00
ee75ce8e67 rename variable
avoid confusion between INTerval and INTeger
2021-07-29 15:29:33 +02:00
7f696cb3f1 remove unused variable 2021-07-29 15:21:12 +02:00
ae2eba53dd fix old-style-cast warning
apply proper type casting
2021-07-29 15:19:43 +02:00
1def0b8516 fix reorder warnings
fix order of constructor initializer list
2021-07-29 15:09:28 +02:00
b27d0fc39b Added function that is pure virtual in mother class and needs to be defined in child class. 2021-07-29 09:45:48 +02:00
f6cf8daa95 Option to create random path in MarkovPath. 2021-07-29 09:44:45 +02:00
67a2a7e90f Removed clockData files. 2021-07-28 14:58:05 +02:00
f1b4baa410 DisplacementField: Allow for default background values. 2021-07-27 07:39:32 +02:00
215125fb2b Changed way to execute calculation every Nth step. 2021-07-27 07:38:33 +02:00
2a83785bcb Added monitoring option to displacementField. 2021-07-13 11:57:05 +02:00
56e8a6257c Minor change to displacementField. Allows for time-averaged treatment now. 2021-07-09 11:39:43 +02:00
e06069d49b Merge with develop. Removed old rBaseMirrorVec which is now part of rBaseMirror. 2021-07-08 11:36:54 +02:00
f8a6c9522a Tutorial case for displacementField utility. 2021-07-08 11:31:52 +02:00
bc1ded2ade Utility displacement field to map finite-time displacements on mesh and optionally fill remaining holes. 2021-07-08 10:55:04 +02:00
571e2ce3c8 Turbulent dispersion model can read precalculated random displacements. 2021-07-08 10:53:50 +02:00
2d0fc46086 Minor changes to make solver more general and allow user to specify names for fields in database. 2021-07-08 10:52:04 +02:00
a5a811e436 fix usage of cg-scaling transfered from LIGGGHTS
fixes https://github.com/ParticulateFlow/CFDEMcoupling-PFM/issues/1
2021-07-01 16:02:53 +02:00
f847ceeefe replace custom myType() method by built-in type() method 2021-06-28 16:47:05 +02:00
8d99122d64 Add missing file. 2021-06-10 13:43:20 +02:00
191881ac05 Minor changes in rcfdemSolverBase to make it up-to-date with recPath generation. 2021-06-09 14:33:55 +02:00
aeef30d615 clean up spacing 2021-06-08 19:18:53 +02:00
9460256fa3 clean up cfdemCloudIBmodified
remove commented code (and methods that are thus no longer needed)
2021-06-08 19:16:26 +02:00
f218d7a23d remove unneeded mutable keywords 2021-06-08 18:43:52 +02:00
3c7160bdbc remove extra whitespace in IBVoidFraction.C
accidentally added in 91dbeb42e4
2021-06-08 18:00:57 +02:00
a20ee5ee34 fix output of kin. energy in cfdemSolverIBTorque test case
set dynamic to 'no' as number of particles does not change;
for a single particle we need to set extra dof to 0 to obtain correct ke
2021-06-08 17:30:15 +02:00
6febaec345 move octave script and adjust paths; disable execution by default
for the octave script to work, the case needs to be run twice (without
cleanup in-between);
(remove the useTorque option of ShirgaonkarIBTorqueProps in the
couplingProperties file and adjust the output filenames of the fix print
commands, i.e. adding "_no_coupling")
2021-06-08 17:23:49 +02:00
064cc9ae3d clean up cfdemSolverIBTorque test case files 2021-06-08 16:54:56 +02:00
c6642c0205 clean up Info messages in creatFields of cfdemSolverIBTorque 2021-06-08 13:12:56 +02:00
5a3f78b5f1 remove output files produced by simulation 2021-06-08 12:37:13 +02:00
998a0cd3d1 fix compilation error in cfdemSolverIBTorque
use proper variant of cfdemCloud
2021-06-08 12:27:31 +02:00
2130d8b698 Replace mirror utilities of scalars and vectors with general one. 2021-06-07 16:20:08 +02:00
6a7a5fc4fd remove duplicate tutorial files
previous move to sub-folder left files in original place (i.e. was a
copy instead of a move operation)
2021-06-07 12:32:18 +02:00
ffb6444fe1 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-05-19 11:56:37 +02:00
377d5dc665 Minor changes. 2021-05-19 11:54:47 +02:00
04ff11b51c included gravitational acceleration in rcfdemSolverBase 2021-05-17 15:18:01 +02:00
f00e8e8442 added k function to turbulent dispersion model 2021-05-06 10:12:51 +02:00
6dedb8112e Turbulent dispersion model can now read nut or k from database. 2021-05-06 07:58:44 +02:00
fc9b7e726b Make recurrence database fields from current virtual time index available in object registry. Hence, they can be looked up via lookupObject. 2021-05-05 14:08:01 +02:00
325f9c2163 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-04-28 08:49:16 +02:00
0fb9ce5478 Make monitoring output in terminalVelocity optional. 2021-04-28 08:48:38 +02:00
26732f29ca Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-04-27 13:46:58 +02:00
977c7b064a Deactivated momentum coupling model extended. 2021-04-27 13:46:28 +02:00
c50bf18767 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-04-27 11:27:25 +02:00
19305850c7 Fixed missing declaration. 2021-04-27 11:25:58 +02:00
5724a6c7da Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-04-27 11:10:27 +02:00
de33220bc1 Allow for general direction of gravity. 2021-04-27 11:09:58 +02:00
9fca80b6bb Preparing code for cleaning up. 2021-04-27 11:09:28 +02:00
430bc1c51f Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrence_chemistry 2021-04-27 10:10:15 +02:00
6cc9bfcdbb Merge to recurrenceLib. 2021-04-27 10:09:51 +02:00
ef294070cd Commented out references to recurrence base in terminalVelocity model. 2021-04-27 10:08:40 +02:00
d75befae08 Option to deactivate model check. 2021-04-27 10:07:36 +02:00
e7851bb005 epsilon can be updated from the dataBase 2021-04-26 18:12:16 +02:00
6d5005bf10 added freeStreaming solver 2021-04-26 17:55:41 +02:00
55de145ab9 define recurrenceBase as objectRegistry 2021-04-26 17:52:11 +02:00
d583e5c4df OtherForceModel providing source term for momentum equation due to buoyancy of secondary phase. 2021-04-26 16:12:02 +02:00
0fc15d8912 Refactored turbulent fluctuations for particle motion. 2021-04-26 16:11:16 +02:00
dc36ae2e66 Option in cfdemCloud to push particle velocities to LIGGGHTS. 2021-04-26 16:10:26 +02:00
3e5be0f42e Added otherForceModels to PISO solver. 2021-04-26 16:09:51 +02:00
1a8a299470 Merge pull request #117 from ParticulateFlow/feature/renameGerhardsRecModel
Feature/rename gerhards rec model
2021-04-09 11:10:00 +02:00
f6b1cde010 adapt test-case for LRU data base management 2021-03-29 09:27:55 +02:00
acd38183fc rename and reinstate gerhardsRecModel
the model is renamed lruRecModel since its management of recurrence-snapshots
is based on the LRU algorithm
2021-03-29 09:23:34 +02:00
30927db30c Merge pull request #116 from ParticulateFlow/master
Updates from release 21.03
2021-03-23 11:13:50 +01:00
6fe6137921 Merge pull request #115 from ParticulateFlow/release
Release 21.03
2021-03-22 17:59:49 +01:00
4ebd073845 add -Wno-deprecated-copy to options
to silence warnings stemming from OpenFOAM in g++ 9
2021-03-12 11:41:25 +01:00
affa8b1aa8 add -Wno-cast-function-type to compiler flags in Makefile
silence -Wcast-function-type warnings (stemming from OpenMPI) enabled by
default in g++8
earlier g++ versions might print a message about unrecognized command
line option '-Wno-cast-function-type' but that is the lesser evil
2021-03-12 10:36:48 +01:00
8c70e97db6 bump version number to 21.03 [ci skip] 2021-03-10 12:41:42 +01:00
4bb49fdd1f Update only those fields specified in 0 folder. 2021-02-04 09:36:29 +01:00
4bae8b0bf8 adding terminal rising velocity model 2021-02-03 14:51:51 +01:00
fbe65effd0 prevent disturbance of pSmooth field during restart 2021-02-02 16:47:35 +01:00
a7ad60eba1 Removed wrong scaling factor. 2020-12-17 15:24:33 +01:00
440232b0fe Make radiative heat transfer implicit. 2020-12-15 14:30:45 +01:00
8c90cbbdd3 Merge pull request #114 from ParticulateFlow/develop
modified MarkovPath random generation
2020-12-11 10:43:26 +01:00
953cf4d4ff modified MarkovPath random generation 2020-12-11 10:36:23 +01:00
f58fba97be Missing files for hot BF tutorial. 2020-12-02 12:55:26 +01:00
61817b3f51 Limit radiative thermal conductivity. 2020-12-02 12:51:14 +01:00
587e2361d3 Tutorial case for ore reducing BF. 2020-12-02 12:50:41 +01:00
ae3da6f6b4 Numerical stabilization for radiative heat transfer. 2020-11-30 10:36:58 +01:00
cd4e6c08bc Scale selected particle forces with a user-defined control field. 2020-11-30 10:36:11 +01:00
5994792de2 New rCFD solver to move tracers according to the forces acting on them. 2020-11-18 12:16:09 +01:00
0fd56c9333 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2020-11-13 10:14:31 +01:00
1a37e99dfd Allow turbulentDispersion model to use kinetic energy either from object registry or calculated from turbulence models. 2020-11-13 10:13:37 +01:00
3d971884c1 Revert "Allow turbulentDispersion model to use kinetic energy either from object registry or calculated from turbulence models."
This reverts commit 6e9ead9fb6.
2020-11-13 10:11:49 +01:00
6e9ead9fb6 Allow turbulentDispersion model to use kinetic energy either from object registry or calculated from turbulence models. 2020-11-13 10:08:18 +01:00
d58ff86621 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2020-11-13 08:52:03 +01:00
d3c10ba24d Merge pull request #113 from ParticulateFlow/feature/particledispersion
Feature/particledispersion
2020-11-06 11:20:49 +01:00
9aa0c94bf9 Avoid turbulent fluctuations through boundary. 2020-11-04 07:33:18 +01:00
57e98b2f0e Some testing on the turbulent dispersion model. 2020-11-03 09:51:28 +01:00
25efaffdd2 Lookup turbulent kinetic energy in execution loop. 2020-11-02 10:27:05 +01:00
7eacdef7eb Turbulent dispersion model. 2020-10-30 12:26:09 +01:00
b1798863cc Merge with develop. Extended bed conductivity model. 2020-10-30 09:21:32 +01:00
bc492823fc Restructuring the solver. 2020-10-20 12:01:25 +02:00
7a6c024af2 Transient energy eqn. 2020-10-20 11:58:03 +02:00
0fa1f023d6 Heat transfer for general heat capacities. 2020-10-20 11:56:59 +02:00
e02edc3569 Minor changes in initMultiLayers. 2020-10-20 11:48:53 +02:00
fde7fb86a7 Corrected treatment of source terms. 2020-10-20 11:46:07 +02:00
c86c3e6de0 Extended particle deformation model. 2020-10-20 11:43:54 +02:00
5b07b7d03c Merge pull request #107 from ParticulateFlow/feature/register_atom_props
Register and supply per-particle data pointers centrally in cfdemCloud
2020-10-02 13:03:04 +02:00
80c8d29114 Merge pull request #112 from ParticulateFlow/master
updates from release 20.09
2020-10-02 12:40:25 +02:00
71a78be4c9 Merge pull request #111 from ParticulateFlow/release
Release 20.09
2020-10-01 12:33:40 +02:00
e2b454b036 fix up voidfractionTest case [ci skip]
add post folder and testharness configuration
2020-10-01 10:30:13 +02:00
a0ae8b90f7 bump version number to 20.09 2020-09-22 16:00:04 +02:00
78620f134f define member variables as const where appropriate
turn 'word' member variables into 'const word' if they are initialized
once (in the constructor) and never changed
2020-09-22 11:26:57 +02:00
b8c987ae94 use const word class member variables to store particle property names
internal variable naming convention for registered particle properties:
* suffix 'RegName_' indicates class-internal particle property usage;
these names use the typeName of the class as prefix for uniqueness
* suffix 'Name_' indicates particle properties also used in
give/getData; these names can potentially cause a conflict if multiple
models try to communicate a property with the same name (some of them
can be customized via the couplingProperties dict to resolve this
situation)
2020-09-22 11:20:12 +02:00
139506a28c fix up function parameters of getData/giveData
use 'const word&' instead of 'word' to avoid duplication of word and
correct constness
2020-09-21 17:54:29 +02:00
d605ea1701 add some comments [ci skip] 2020-09-21 12:36:58 +02:00
c13aece161 update chemistry tutorials [ci skip]
adjust setup to changes made in the fix chem/shrink/core implementation
in LIGGGHTS (cf. commit abe32ee)
2020-09-17 16:58:51 +02:00
d1ce573cc9 Merge pull request #110 from ParticulateFlow/develop
merging develop in recurrenceLib
2020-09-17 11:37:31 +02:00
59d5a1f1fd Merge pull request #109 from ParticulateFlow/feature/drag_schiller_naumann
added coarse graining to SchillerNaumann drag
2020-09-16 11:44:53 +02:00
aa82dad8be Update SchillerNaumannDrag.C
The changes are added.
2020-09-16 10:45:51 +02:00
2f5f10c6a5 added coarse graining to SchillerNaumann drag 2020-09-15 15:38:12 +02:00
40e464ab5e add reset flag for particle properties
use a reset flag to indicate if particle properties should be reset to
the initial value each coupling step (note that the property value is
always reset if re-allocation happens when the number of particles has
changed)
2020-09-08 13:02:16 +02:00
75ffbe02ae reset particle properties only if initVal == 0
else old value may still be required;
potentially, an extra flag in registerParticleProperty to indicate
resetting may be a better approach
2020-09-08 11:12:55 +02:00
b6f44b3338 recurrence solver for modal decomposition of flow fleids 2020-08-17 14:12:26 +02:00
b06bb1f98a test memory allocation of registered properties by cfdemCloud
perform per-particle property allocation in cfdemCloud instead of model
if registered size > 0
if no reallocation is triggered due to a change in particle number,
reset data to initial values (if registered size > 0)
2020-08-14 14:16:44 +02:00
bb4083f570 optional checkTimeStep & reading virtualTimeIndex in the solver 2020-08-13 15:48:12 +02:00
7dcb63f790 reading several recProperties 2020-08-13 15:44:29 +02:00
647c84d323 use particle property registration in force, region and therm. cond. models 2020-08-11 11:32:35 +02:00
214e10e5a3 use particle property registration in chemistry and energy models 2020-08-10 17:56:44 +02:00
b0533b79ab streamline particle property registration 2020-08-10 15:25:50 +02:00
a83d0290c9 retain backward compatibility with OF4 2020-08-06 20:02:56 +02:00
3ea5bf774a test concept for centralized per-particle properties
register any per-particle properties (here: cellsPerParticle_ of
voidFractionModel) in hashtables in cfdemCloud class and in further
consequence handle access to per-particle data pointers centrally
2020-08-05 17:02:09 +02:00
3b29d96c05 [DOC] update particleCellVolume and volWeightedAverage [ci skip]
add new options
2020-08-03 13:26:56 +02:00
71586e1192 add trilinear voidfraction test case [ci skip]
as in CFDEMcoupling-PUBLIC
2020-08-03 13:06:23 +02:00
39d66506a1 add output option and min/max field values to particleCellVolume
as in CFDEMcoupling-PUBLIC
2020-08-03 12:45:11 +02:00
50bd4a6de3 add output option to volWeightedAverage
as in CFDEMcoupling-PUBLIC
2020-08-03 11:24:57 +02:00
4a11ade3b1 mitigate rounding errors
values should be in range [0;1]
2020-07-30 14:28:37 +02:00
3ffc8eef65 fix per-particle voidfraction in trilinear model
all particles incorrectly received the voidfraction of the same 8 cells
closes #106
2020-07-30 13:18:08 +02:00
d4e6ec2e39 add cfdemCompLIGlib shortcut to bashrc [ci skip]
to just compile LIGGGHTS sublibraries but not LIGGGHTS itself
2020-07-29 18:00:59 +02:00
e8766829cd fix incompatible dimensions in volWeightedAverage
ref() gives access to dimensioned field reference
primitiveFieldRef() gives access to primitive type field reference
(both actually return a 'this'-pointer reference)
2020-07-29 17:26:57 +02:00
928aca81d9 Moved code part out of loop to avoid unnecessary repeated execution. 2020-07-23 16:21:33 +02:00
5fa429bfdb Allow to read in switch for inert species. 2020-07-22 10:39:45 +02:00
6162f4e60d Adde particle type checking. 2020-07-20 09:50:10 +02:00
d67ee0d63e add testharness config for one2one coupling test [ci skip] 2020-07-17 11:31:43 +02:00
893a8ddf31 add alternative files for one2one coupling in ErgunTestMPI case
for testing one2one coupling model
2020-07-17 11:23:49 +02:00
f07b8f370f restore twoWayOne2One::getNumberOfParticles() method
twoWayOne2One was calling base class method and crashed;
reverts 51d10d7d0f and parts of
4959ffc79f where this method was
mistakenly removed
closes #105
2020-07-16 20:59:26 +02:00
ad1317b9b1 Model to initialize multilayer radii from dump file with non-matching positions. 2020-07-16 10:09:31 +02:00
16560cfe4f Minor change for stability. 2020-07-16 10:08:35 +02:00
e06d524f62 Yagi: made Re calculation cell-based 2020-07-07 14:31:25 +02:00
0b820906ae Merge pull request #104 from ParticulateFlow/develop
Update branch feature/recurrence_chemistry with develop
2020-07-01 14:32:13 +02:00
a5db37a222 User-specified fields to be read from database. Some minor modifications. 2020-06-29 10:30:00 +02:00
dd5dfb6662 remove outdated rcfdem solver from docs [ci skip] 2020-06-22 09:57:45 +02:00
f3c46fd09f Merge pull request #103 from ParticulateFlow/master
Update from release 20.05
2020-06-22 09:52:21 +02:00
fa584672ab Removed outdated rcfdem solver from compilation list. 2020-06-22 07:56:46 +02:00
aab29ab9bf No fines deposition in too dilute regions. 2020-06-22 07:55:51 +02:00
bba5d13264 Merge pull request #100 from ParticulateFlow/release
Release 20.05
2020-06-17 16:13:42 +02:00
9e38718f7f [DOC] update models list 2020-06-17 15:57:28 +02:00
424c680359 [DOC] update solver list
remove documentation off deleted solver
2020-06-17 15:55:36 +02:00
3b7ba89f7a [DOC] add note about OpenFOAM version required for cfdemSolverMultiphase 2020-06-17 15:29:32 +02:00
68e625defe [DOC] update installation instructions to OpenFOAM 6 2020-06-17 15:07:39 +02:00
ade406ac92 Optional interpolation. 2020-06-17 10:54:43 +02:00
d30f81f3d3 Yet another try for a working commit. 2020-06-17 10:21:09 +02:00
408c8a36dc bump version number to 20.05 2020-06-15 15:52:20 +02:00
671225e0f5 cleanup 2020-06-04 15:41:37 +02:00
14d5c30dac Added tutorial case for coupled heat transfer with rCFD. Removed old solver and tutorial. 2020-06-03 11:52:52 +02:00
8489811677 Added option to phase in particle-fluid interaction at beginning of simulation. 2020-06-03 11:50:47 +02:00
bdb68cc617 bugfix 2020-05-20 15:53:26 +02:00
37bbb436c2 Updated BF tutorial case. 2020-05-13 11:11:59 +02:00
58c9d62f0f Yagi: replaced relative velocity with fluid velocity 2020-05-11 14:38:59 +02:00
e2a5ffbd8f bugfix 2020-05-11 14:24:42 +02:00
e417d0dc40 Added option to specify deposition time. 2020-04-24 14:45:27 +02:00
116fd3b810 Merge pull request #99 from ParticulateFlow/feature/fines
Feature/fines
2020-04-23 16:02:54 +02:00
52bcfc5dd3 Update tutorial case. 2020-04-23 07:23:58 +02:00
63f1f8fb68 Limiter for isotropic fluctuations. 2020-04-22 14:37:44 +02:00
0102b245aa imlicit laplacian for thermal eqn 2020-04-14 10:37:33 +02:00
5f16dce15b Particle deformation in predefined cell set. 2020-04-09 10:57:26 +02:00
915ec1da4f fixed implicit mass transfer 2020-04-07 14:10:29 +02:00
8bae912ad4 moved postFlow to main file 2020-04-07 13:40:01 +02:00
93a426fe2c removed interpolation for saturation concentration 2020-03-31 17:38:21 +02:00
af5675606f added mass transfer coupling to LIGGGHTS 2020-03-26 11:33:22 +01:00
961b04760a added massTransferModel to cfdemSolverMultiphaseScalar 2020-03-25 17:13:14 +01:00
e71ff6792c initial commit for massTransferModel 2020-03-25 17:12:51 +01:00
66efa60bd4 enabled effective diffusion coefficient 2020-03-24 12:24:10 +01:00
ec1c1690ef added diffusion coefficient model (analogous to thermCond) 2020-03-24 12:23:41 +01:00
c2c38223f7 calculate diffusion correction on cell faces 2020-03-18 15:12:34 +01:00
27abff8eb8 convert to implicit scheme 2020-03-17 17:21:17 +01:00
225c3500c1 fixes 2020-03-17 17:21:00 +01:00
2a52f8bd89 initial commit for diffusion correction 2020-03-17 12:17:20 +01:00
dd5407db99 added cfdemSolverMultiphaseScalar/multiphaseMixure to library list 2020-03-16 16:22:12 +01:00
9e8a418576 Coarse-graining factors in BeetstraDrag needs to be mutable. 2020-03-16 11:20:21 +01:00
07828a01f8 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2020-03-16 10:35:53 +01:00
5710166ccd Fixed error message. 2020-03-16 10:35:38 +01:00
ea7f37b3e1 Check for particle type. 2020-03-16 09:56:04 +01:00
1f5dcc5f33 Extend particleDeformation model for multiple types. 2020-03-12 16:24:18 +01:00
6d8e8bb705 initial commit for mass transfer 2020-03-10 16:37:59 +01:00
5b6385216a constructed kf and Cp fields in energyModel and thermCondModel, improves compatibility with multiphaseScalar solver 2020-03-06 16:32:57 +01:00
7175b0e178 added multiphase option to ZehnerSchluender 2020-03-05 10:26:33 +01:00
b93cbd6044 moved multiphase switch to cfdemCloud 2020-03-05 10:26:03 +01:00
9af2cd76a2 fix indentation 2020-03-05 09:57:15 +01:00
8764f151fd combined Yagi and YagiImplicit 2020-03-05 09:33:46 +01:00
2af9d37307 Minor changes to the momentum source and particle velocity 2020-03-04 13:06:56 +01:00
e0925ed36e fix issues arised from merge 2020-03-02 16:49:23 +01:00
eb2e9286b4 merge TU/e changes into PFM master branch 2020-03-02 15:10:36 +01:00
dbcdbb1017 cleanup old files 2020-02-28 13:49:52 +01:00
c35ac408cc harmonic mean for nu 2020-02-28 12:19:18 +01:00
59afe3dc3d fix 2020-02-28 10:32:59 +01:00
fe3fbe58d9 Yagi rename 2020-02-28 10:32:29 +01:00
6075578f1b added voidfractionMax option 2020-02-28 09:59:08 +01:00
73e6b03778 cleanup and fix 2020-02-27 12:16:47 +01:00
bedf3e37c9 created YagiWallHTImplicit 2020-02-26 16:20:24 +01:00
a886e439ec initial commit for YagiWallHTImplicit 2020-02-26 15:58:01 +01:00
ab250deb8d doc update 2020-02-26 15:39:36 +01:00
4996b8b5ef updated literature ref 2020-02-26 15:30:54 +01:00
f056bc66ad fix verbose 2020-02-26 10:58:12 +01:00
74052b2319 Minor change to the particle velocity consideration. 2020-02-25 18:30:50 +01:00
82fbc0dbe2 remove dSauter from createFields.H of rcfdemSolverRhoSteadyPimpleChem 2020-02-25 14:17:38 +01:00
f946fe571d Minor changes to the cfdemSolverIBRO and cfdemCloudIBmodified
Discarded some ideal code lines in cfdemSolverIBRO
Excluded the molecular calculatoins in cfdemCloudIBmodified
2020-02-24 09:48:01 +01:00
25eef6b5e7 major revamp of Yagi model 2020-02-21 09:44:05 +01:00
7711ea5974 debugging 2020-02-17 13:59:59 +01:00
548df2cd3c Merge with develop and some accompanying cleaning up. 2020-02-10 11:05:44 +01:00
a3166f2aca Made tutorial case for dynamic CZ ready for OF 6. 2020-02-10 08:44:31 +01:00
1a85c87851 More options for thermal conduction through walls. 2020-02-10 07:42:35 +01:00
332dc5e057 New tutorial case for BF with dynamic cohesive zone. 2020-02-10 07:41:33 +01:00
26b740e296 fixed missing brackets in liggghtsCommandModel 2019-12-13 15:48:43 +01:00
898f4cb1f0 changed YagiWallHT to use temperature gradient 2019-12-12 14:54:37 +01:00
84c4b34c9c use voidfractionRec instead of voidfraction in YEqn 2019-12-12 13:04:14 +01:00
63b2aa37ea start implementation of recurrence chemistry solver
not quite sure yet what to do with rhoEqn
2019-12-12 12:41:51 +01:00
861ca8698c Merge branch 'feature/OF4x-multiphase' of https://gitlab.tue.nl/SMM/C-code/Euler-Lagrange/CFD-DEM_Tim/CFDEMcoupling into feature/OF4x-multiphase 2019-12-11 16:30:56 +01:00
f4c0a25431 Merge branch 'feature/OF4x-multiphase-scalar' into 'feature/OF4x-multiphase'
Feature/of4x multiphase scalar

See merge request SMM/C-code/Euler-Lagrange/CFD-DEM_Tim/CFDEMcoupling!54
2019-12-11 16:18:38 +01:00
dbdf80ef92 added Yagi wall heat transfer model 2019-12-11 11:35:19 +01:00
9a81b875f1 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2019-11-27 16:15:37 +01:00
bb47fc3583 Initialize particle temperatures within given bounds. 2019-11-27 16:14:26 +01:00
9e64ecc86c update uniformFixedValueTube 2019-11-20 16:59:54 +01:00
a42e6577b5 [OF6] update CircleCI configuration
by default test against OF6 from now on, thus install openfoam6 package
instead of openfoam4
2019-11-14 15:00:10 +01:00
44eabca09b Merge pull request #98 from ParticulateFlow/feature/openfoam6
Update to OpenFOAM 6
2019-11-14 14:15:43 +01:00
86697d0993 minor changes to some case files related to OF4/OF5/OF6
make switching between OpenFOAM versions a bit easier
2019-11-14 14:12:08 +01:00
b089229109 remove unneded mesh files from tutorial case
these files can be generated by a call to blockMesh
2019-11-14 13:26:44 +01:00
9700a366fe [OF6] update cshrc 2019-11-14 11:41:45 +01:00
6c25adaa31 [OF6] adjust particle position IO
OF5 and above write barycentric coordinates of particles and include
tetFace and tetPt in position file
2019-11-14 10:51:23 +01:00
91a4f03dcc [OF6] update versionInfo.h
compatibility information
2019-11-13 16:57:45 +01:00
7a02baff6d Allow to specify additional LIGGGHTS script to be executed directly before end of coupled run, e.g. for specific cleaning-up tasks. 2019-11-13 16:55:57 +01:00
3351b85908 Bug fix: use of pointers instead of autoPtr in BeetstraDragPoly prevents double destruction at the end of run. 2019-11-13 16:54:25 +01:00
d7375f198e Merge branch 'feature/openfoam6' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/openfoam6 2019-11-13 15:54:41 +01:00
34d5e1dc59 [OF6] exit if cfdemSolverMultiphase is compiled against OF6
cfdemSolverMultiphase malfunctions in combination with OpenFOAM 6.
The root of this erroneous behaviour remains unclear at this point.
2019-11-13 15:53:27 +01:00
fe4016eb52 Update of random number generation. Removed deprecated multiIntervalPath model. 2019-11-13 15:53:27 +01:00
8f94dba403 [OF6] adjust chemistry cases to OF6 syntax
OF4 -> OF5:
functionObjects
volRegion/surfaceRegion -> volFieldValue/surfaceFieldValue
fvOptions
limitTemperatureCoeffs: Tmin/Tmax -> min/max

OF5 -> OF6:
combustionProperties: noCombustion<> -> none (template parameters are no
longer required)
2019-11-13 13:42:38 +01:00
1643f8d908 [OF6] fix volScalarField for heat release rate
OF4 -> OF5/OF6:
dimension of dQ() = dimEnergy/dimTime
->
dimension of Qdot() = dimEnergy/dimVolume/dimTime
2019-11-13 13:05:19 +01:00
dc3194c857 introduce OpenFOAM version flag/make code compile with OF4-OF6
extract major openfoam version from WM_PROJECT_VERSION environment
variable in make/options files and use it for a preprocessor flag
(OPENFOAM_VERSION_MAJOR) for conditional compilation

make CFDEMcoupling compile with OF 4.x, 5.x and 6
2019-11-13 09:11:40 +01:00
fe81287d8d [OF6] nCorrPIMPLE() -> nCorrPimple()
adjust to renamed function
2019-11-12 18:04:47 +01:00
f2f6c4bf8c add missing methods in gerhardsRecModel
just copied from standadRecModel, not tested
2019-11-12 18:02:14 +01:00
a31d9f129e re-add include that got lost in auto-merge 2019-11-12 13:16:35 +01:00
ef43147dc8 update libs to OF6: replace calls to osRandomInteger() and integer(...)
osRandomInteger() does no longer exist in OF6; using zero as seed value
for random number generator instead

integer(lower, upper) does no longer exist in OF6, instead using
sampleAB(lower upper); note that there is a slight difference in the
used range: (upper+1-lower) vs (upper-lower)
2019-11-12 12:05:46 +01:00
f8949cf4fe added p0 to uniformFixedValueTube 2019-11-12 11:32:48 +01:00
314bfdc0ac Merge branch 'develop' into feature/openfoam6
Just resolve merge conflicts, does not yet compile with OF6 !

applications/solvers/rcfdemSolverRhoSteadyPimple/rcfdemSolverRhoSteadyPimple.C
2019-11-12 10:06:50 +01:00
73b4879b06 RanzMarshall heat transfer model extended to initialize particle temperatures with a given field. 2019-11-11 11:00:06 +01:00
db693ef7b8 Updated solver list. 2019-11-07 14:12:16 +01:00
6a96ec4f3d Merge pull request #33 from ParticulateFlow/feature/recurrenceLib
Feature/recurrence lib
2019-11-07 13:17:56 +01:00
1fb208082b Obsolete code. Found better solution in steadyDEM. 2019-11-07 12:24:08 +01:00
29cc09a876 Removed double line break. 2019-11-07 12:23:19 +01:00
db465c334a Removed debugging info / moved it into verbose mode. 2019-11-07 12:22:49 +01:00
7f0c4f8efe Slight modification in tutorial case. 2019-11-07 08:15:11 +01:00
33895f0cbd Removed more outdated code. 2019-11-07 08:12:33 +01:00
70a6c634d6 Removed obsolete code. 2019-11-07 07:41:44 +01:00
7399f4b929 Particle deformation model. Option to initialize particle temperatures from field values. 2019-10-31 13:50:28 +01:00
2123c18aa4 Clean up the cfdemSolverIBRO code
Code clean up performed for better understanding.
Added a penalization factor 'lambda' for the momentum equation.
'lambda' is the penalization factor representing particle rigidity.
2019-10-29 12:05:51 +01:00
993593aa83 Merge branch 'develop' into feature/recurrenceLib
# Conflicts:
#	src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.H
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayOne2One/twoWayOne2One.C
2019-10-24 13:18:53 +02:00
9063c7b7d1 Merge pull request #96 from ParticulateFlow/feature/adaptive_resolution_universe
Merge some general mods from feature/adaptive_resolution_universe
2019-10-24 11:58:19 +02:00
31ba2f01fd add -Wno-unused-parameter compilation flag for twoWayMany2Many lib [ci skip]
silence warnings from (older) MPI lib
2019-10-24 10:55:34 +02:00
896f497323 add some comments [ci skip] 2019-10-24 10:51:17 +02:00
4cfce8bc6c Merge branch 'develop' into feature/adaptive_resolution_universe
# Conflicts:
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.H
2019-10-23 20:11:49 +02:00
7854673f21 apply minor change of setCellIDs parameter
change originally made in branch feature/recurrenceLib
2019-10-23 19:47:28 +02:00
cab6b7e88f Merge branch 'develop' into feature/adaptive_resolution_universe
# Conflicts:
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayOne2One/twoWayOne2One.C
2019-10-23 18:03:23 +02:00
7de941746f use LIGGGHTS memory namespace instead of memory class
resolve issue #95
2019-10-23 16:36:02 +02:00
fdb2748fbb clean up header file includes
* include only necessary files
* whenever possible, include headers in .C file not in .H file
2019-10-23 12:53:52 +02:00
4a328144ea fix memory issues in twoWayOne2One
fixes made in branch feature/recurrenceLib
2019-10-23 10:20:06 +02:00
96c621416d Merge branch 'develop' into feature/recurrenceLib
# Conflicts:
#	src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
#	src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.C
2019-10-22 19:44:00 +02:00
88bc5cbee9 Merge tag '19.02' into feature/recurrenceLib
# Conflicts:
#	applications/solvers/rcfdemSolverRhoSteadyPimple/EEqn.H
#	applications/solvers/rcfdemSolverRhoSteadyPimple/rcfdemSolverRhoSteadyPimple.C
#	doc/CFDEMcoupling_Manual.txt
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.H
#	src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayOne2One/twoWayOne2One.H
#	src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.C
#	src/lagrangian/cfdemParticle/subModels/energyModel/heatTransferGunn/heatTransferGunn.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/SyamlalThermCond/SyamlalThermCond.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/ZehnerSchluenderThermCond/ZehnerSchluenderThermCond.C
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/ZehnerSchluenderThermCond/ZehnerSchluenderThermCond.H
#	src/lagrangian/cfdemParticle/subModels/thermCondModel/thermCondModel/thermCondModel.H
2019-10-22 17:24:33 +02:00
439f3c602b Some remodeling of fines models. 2019-10-16 16:43:03 +02:00
713677cd3c improve compatibility with newer OpenFOAM versions
use constructor that explicitly sets the list elements to zero, i.e.
List(const label, const zero);
available in OpenFOAM 4 and newer
2019-10-14 10:26:46 +02:00
69ec630051 Feature for calculation of spatial autocorrelation function. 2019-10-10 16:36:18 +02:00
690dacd96b Changed the computation in cfdemSolverIBRO
Switched back to the older formulation of forcing term.
2019-10-01 16:08:45 +02:00
cef2d3afb1 Merge pull request #94 from ParticulateFlow/master
Update from release 19.09
2019-09-27 08:52:54 +02:00
e3765ec50d Merge pull request #93 from ParticulateFlow/release
Release 19.09
2019-09-26 17:08:15 +02:00
2292493e35 increase runtime of test case 2019-09-26 15:44:30 +02:00
ba35af963a fix probe location 2019-09-26 15:13:28 +02:00
d0445a06ae Included particle rotation in the velocity correction.
Added a particle velocity field to the cfdemSolverIBRO.
Particle velocity considers the particle rotation also.
2019-09-26 13:46:18 +02:00
5bf3402415 write DEM data to DEM/post folder 2019-09-26 13:01:04 +02:00
29afb0e920 fix up probe locations in chemistry tutorials 2019-09-26 12:38:43 +02:00
b24acc76fa fix up thermo_temp settings
- set dynamic to 'no' as number of particles does not change
- for a single particle set 'extra' dof to 0 to obtain correct ke
2019-09-26 09:51:11 +02:00
6d69a6effe [DOC] adjust breadcrumbs.html
link to cfdem website instead of lammps
remove quick-link that only exists in LIGGGHTS/LAMMPS
2019-09-25 17:45:44 +02:00
c79226da68 [DOC] add missing theme files 2019-09-25 09:13:53 +02:00
4c25d64af6 define probes directly in controlDict
test harness is not yet prepared to handle '#include' properly or read
probes from probesDict
2019-09-24 17:50:44 +02:00
f4b62ab0e0 fix typos in liggghts input scripts 2019-09-24 16:04:18 +02:00
fd26c2cb88 update testharness run configurations
remove post_scripts that we currently don't need for testing
2019-09-24 16:03:45 +02:00
7ce1c7d7be bump version number to 19.09 2019-09-20 13:22:45 +02:00
24f7273e75 Merge pull request #79 from ParticulateFlow/feature/cfdemSolverRhoPimple
feature/cfdemRhoPimpleChem
2019-09-19 17:02:04 +02:00
4ac94e82c7 fix up Allclean.sh scripts [ci skip]
note that #!/bin/sh may invoke a different shell than #!/bin/bash
2019-09-19 16:40:07 +02:00
e452aa7929 clean up parCFDDEMrun.sh files
perform clean up via Allclean.sh scripts
2019-09-19 16:38:12 +02:00
75f132450f use different controlDict for test harness runs
original case runtime is too long for test harness execution
2019-09-19 15:48:05 +02:00
838e0851b1 adjust case decomposition 2019-09-19 15:45:44 +02:00
6da1afb450 add execution of DEM init script to Allrun.sh 2019-09-19 15:45:28 +02:00
069aaed120 ignore temporary files from VIM [ci skip] 2019-09-19 13:52:54 +02:00
4cb4132cf0 remove temporary file [ci skip] 2019-09-19 13:47:43 +02:00
ef43a2b5e4 replace $casePath/CFD with $FOAM_CASE [ci skip] 2019-09-19 13:33:34 +02:00
be0fee8938 clean up whitespaces and comments 2019-09-19 13:32:58 +02:00
a31e6b0f86 delete temporary files 2019-09-19 13:30:16 +02:00
04c77886e8 fix test harness run configuration 2019-09-19 13:29:33 +02:00
35bb6ba7eb replace $casePath/CFD with $FOAM_CASE [ci skip] 2019-09-19 12:30:24 +02:00
b4a3c358ff fix test harness run configurations 2019-09-19 12:29:23 +02:00
a854a89116 clean up whitespaces and comments 2019-09-19 12:28:50 +02:00
faba96f750 delete temporary files 2019-09-19 12:24:33 +02:00
d5b12a5e30 delete temporary file and clean up whitespaces 2019-09-19 12:24:02 +02:00
0c1ddfb0cc clean up whitespaces 2019-09-19 12:12:50 +02:00
4b86d32807 Added error message if databases contain less than three times. 2019-09-19 10:29:38 +02:00
211a29bb0e Removed outdated force model from list. 2019-09-19 10:29:14 +02:00
e37d3b4e7e fix test harness run configuration [ci skip] 2019-09-19 09:42:57 +02:00
a26052a8b7 replace $casePath/CFD with $FOAM_CASE 2019-09-19 09:41:06 +02:00
16700acdc1 adjust file permissions and clean up comments [ci skip] 2019-09-19 09:38:01 +02:00
7b00b7efed clean up whitespaces and comments 2019-09-19 09:32:01 +02:00
e06741a47d add required folder structure for DEM dump and restart files 2019-09-19 09:13:52 +02:00
6b1c2d76f1 add .sh file extension to Allclean scripts 2019-09-19 09:09:12 +02:00
ad34ba0efe clean up some tutorial files [ci skip] 2019-09-18 21:15:31 +02:00
5d0ec35256 fix testharness run.config 2019-09-18 21:10:13 +02:00
4531711ed8 clean up whitespaces 2019-09-18 21:06:16 +02:00
7fb0161ca8 Add tutorial case for polydisperse R2 reaction with inert Quartz particles 2019-09-18 17:51:18 +02:00
df71bf5522 Remove obsolete tutorial case 2019-09-18 17:48:19 +02:00
f3135c083e change fix densities to global in the tutorials. 2019-09-18 17:28:38 +02:00
14b64ef281 Move the ISO4695 Case into the SingleParticleCases folder 2019-09-18 16:43:56 +02:00
939429d341 Add Case for GOD0k1 2019-09-18 16:43:11 +02:00
fbea5be83a Add Case for GOD 0k1 33CO3 H2..
..that works with the latest version of LIGGGHTS and CFDEMcoupling
2019-09-18 16:42:14 +02:00
4da9233db2 Modify Case for GOD0k1 30CO6H2
..updated it to the latest version of LIGGGHTS and CFDEMcoupling.
2019-09-18 16:40:03 +02:00
f80785c116 Remove ISO4695 case from tutorials to be added under subfolder
SingleParticleCases
2019-09-18 16:35:24 +02:00
b518d6df84 Hematite Reduction Tutorial for Standardized ISO Conditions ISO4695 2019-09-16 16:25:48 +02:00
ae113af709 Added default boundary condition for force fields. Relevant for smoothing. 2019-09-09 11:47:45 +02:00
4b68e36602 Allow for spatially varying smoothing lengths. 2019-09-09 11:47:07 +02:00
a7f747a4ab Added stickiness to dust model; also some cleaning up. 2019-09-09 11:42:45 +02:00
9fb9e667db Allow to deactivate smoothing of force fields while smoothing voidfraction. 2019-09-09 11:40:27 +02:00
42329ae7b9 Fix typo in README.md [ci skip] 2019-09-02 11:47:57 +02:00
e94964e9bf Extended fines deposition model, fixed tutorial case. 2019-08-22 11:37:41 +02:00
04ecb57c16 update input script due to internal changes [ci skip]
the relevant settings have been moved to internal fixes managed by fix
chem/shrink/core
2019-08-14 17:28:21 +02:00
2cb102fee3 remove outdated fix parameter 2019-08-14 17:05:21 +02:00
2e10933575 clean up some formatting [ci skip] 2019-08-14 16:21:40 +02:00
3ce4d419ca remove superfluous semicolon 2019-08-14 16:09:07 +02:00
acfe33cc50 simplify construction of list 2019-08-14 16:08:22 +02:00
ad3ccf0359 eliminate temporary variables and fix interpolation_ branch
Xfluid_ was uninitialized with interpolation on
there is probably not much to be gained from temporary variables here
2019-08-14 16:07:29 +02:00
110fba695a remove unnecessary temporary variable
MixtureBinaryDiffusion_ is not used for anything else
2019-08-14 15:48:47 +02:00
704ac32a23 clean up some foramtting [ci skip] 2019-08-14 15:15:39 +02:00
c89d46f633 fix setting of molar fractions in species.C
Xfluid ended up uninitialized if interpolation was on (causing
molarFractions_ to receive uninitialzed values) or no particles were
found in partition (output to Info was uninitialzed)
2019-08-14 15:03:52 +02:00
da0c33b2cb remove some fields from probes [ci skip] 2019-08-12 13:40:59 +02:00
b381009d4b add probes name [ci skip]
test harness expects name field
2019-08-12 12:55:34 +02:00
b4e891bdd9 move probe definitions to controlDict
until testharness properly supports #include directives
2019-08-12 12:15:14 +02:00
89c6f87e0c display info only if verbose is true [ci skip] 2019-08-09 16:20:17 +02:00
4f8d2dc676 replace $casePath/CFD with $FOAM_CASE 2019-08-09 16:09:21 +02:00
d5f331c831 testharnes does not yet support #include directives in OF dictionaries 2019-08-09 15:37:07 +02:00
8b74c167be fix test harness run configuration [ci skip] 2019-08-09 15:01:12 +02:00
a58098cc97 adapt settings for test harness [ci skip] 2019-08-09 13:19:10 +02:00
bb65be3c6b make parallel decomposition more flexible 2019-08-09 12:57:59 +02:00
5d402bb4f9 write output into post folder [ci skip] 2019-08-09 12:54:08 +02:00
5d606017dc update deprecated Foam settings [ci skip] 2019-08-09 12:51:22 +02:00
d67d861f6f fix up poperty/atom name in Spreitzer chemistry tutorial [ci skip] 2019-08-08 17:42:32 +02:00
ba3f79095e clean up whitespaces [ci skip] 2019-08-08 17:12:22 +02:00
204363744e fix single particle chemistry tutorial [ci skip] 2019-08-08 17:11:26 +02:00
299a24fe4f fix OpenFOAM init files
at least my installed version of OpenFOAM (tag version-4.0) does not
accept pure double values as type
2019-08-08 14:31:37 +02:00
7c48f9b20c add post and restart folders to chemistry tutorials 2019-08-08 14:13:24 +02:00
26099f72b1 correct solver name and # of processors in run.config [ci skip] 2019-08-08 13:45:08 +02:00
f9a638e291 clean up some tutorial files [ci skip] 2019-08-08 13:43:49 +02:00
6f9af416bb replace misleading comments [ci skip] 2019-08-08 13:26:21 +02:00
e765bc4eb2 remove periodicity info from dumps
boundaries are fixed, thus periodicity does not give any useful
information
2019-08-08 13:19:21 +02:00
cde5d933e7 clean up some tutorial files [ci skip] 2019-08-08 13:10:13 +02:00
b777ae6e9b clean up whitespaces and comments [ci skip] 2019-08-08 12:34:16 +02:00
a35e0dac09 correct solver name in run.config 2019-08-08 11:06:24 +02:00
bb2aa55fdf add .sh file extension to Allclean script 2019-08-08 11:05:50 +02:00
85b116eeb2 remove unneeded creation of temporary string object [ci skip]
can be assigned as is
2019-08-08 10:41:27 +02:00
889f44803d Merge pull request #92 from ParticulateFlow/feature/timestepfraction
Feature/timestepfraction
2019-08-08 10:32:54 +02:00
4a9650c5ff Major changes to the code structure regarding particle data in CFD.
Added the particle velocity as a CFD field variable for cfdemSolverIB.
Added an extra function member in cfdemSolverIBRO to calculate the
particle velocity as a separate field.
2019-07-30 12:38:28 +02:00
db0a544f28 Mei lift sign fix 2019-07-30 11:43:57 +02:00
7bb266bc41 clamp tsf between 0 and 1
the time step fraction should never be outside these bounds since we
don't allow variable time steps; hence any value outside these bounds
must come from numerical rounding/precision issues;
by doing this we no longer need the check in cfdemCloud
2019-07-26 16:59:56 +02:00
d4bb711e9c replace time().deltaT().value() by time().deltaTValue()
avoid creation of temporary dimensionedScalar that is not needed
2019-07-26 16:31:54 +02:00
62489f3165 try to increase precision of tsf calculation
cf. CFDEMcoupling-PUBLIC
2019-07-26 16:29:22 +02:00
efec037d6b fix up comments [ci skip] 2019-07-26 16:17:38 +02:00
d3d7d07cdb increase precision of time step fraction output [ci skip] 2019-07-26 16:11:09 +02:00
b462327d2d apply some formatting changes [ci skip] 2019-07-26 15:59:04 +02:00
39f6e7d056 pressure eqn and bc updates 2019-07-23 09:13:56 +02:00
c28480a802 added square and curly brackets to liggghtsCommandModel 2019-07-22 17:03:57 +02:00
e4a33e4c1d added dollar ($) to ligggtsCommandModel 2019-07-22 16:58:27 +02:00
5096d599c3 Added a volume ratio basde correction factor for continuous forcing term
Considering the influence of the irregularity in the shape of the actual
RBC and the model RBC a new correction factor based on the volume ratio
has been adopted.
2019-05-28 13:20:43 +02:00
a3c4b45408 Finite volume mesh based multisphere force calculation
Changed the force calculation on the multisphere clump based on the
finite volume mesh field datas.
2019-05-20 17:05:53 +02:00
de8c0c0e39 Merge pull request #91 from ParticulateFlow/bugfix/beetstraDrag-cg
Fix beetstra drag for coarse-grained cases
2019-05-20 17:04:49 +02:00
3eb0fdbc8a Corrected the force calculation on the multisphere particle
Corrected the loop determination for calculating the forcfe acting on a
multispehre particle.
2019-05-20 16:10:30 +02:00
a6be6be3cc adjust tankDrainage case to OpenFOAM 6
caseDicts/postProcessing/surfaceRegion in OpenFOAM 4 was renamed to
caseDicts/postProcessing/surfaceFieldValue OpenFOAM 6;
OpenFOAM 6 requires pcorrFinal to be defined;
2019-05-17 15:24:26 +02:00
cab4fdcb2f adjust fvSolution settings for multiphase solver in OpenFOAM6
OF6 requires pcorrFinal to be specified
2019-05-17 15:00:28 +02:00
d0400cdc74 update sourcing of OpenFOAM bashrc to OF6 2019-05-17 14:24:55 +02:00
29b7ae5ff9 make typeCG mutable (b/c setForce is const). 2019-05-16 11:09:03 +02:00
b64dfacc33 fix problem introduced with e9a7a0f15a that causes drag to be severely underestimated when a cg factor directly from liggghts is used. 2019-05-16 10:15:23 +02:00
c6815c9156 Added a reduced-order immersed boundary solver with continuous momentum forcing
cfdemSolverIBRO - Immersed boundary method (continuous focring approach)
solver for particulate flows. Does not provide the rigid body constrain
and provides approximate solutions for the faster simulations.
2019-05-15 12:00:21 +02:00
b4f7303337 Added the cfdemSolverPimpleIB to solver list 2019-05-02 14:27:51 +02:00
4815aca55a PIMPLE algorithm based IB solver
New immersed boundary solver based on the PIMPLE algorithm to handle
large Courant number flows. This solver is around 2 times faster than
the PISO algorithm solver.
2019-05-02 14:27:16 +02:00
302e8df86b Cleaned up Ergun test case for cfdemSolverRhoPimple. 2019-05-02 11:43:19 +02:00
0a1bf03304 Corrections to the velocity correction implementation
Removed the gamma correction factor
Direct derivation of relative velocity from DEM side
Calculaiton of velocity correction improved
2019-04-26 13:35:04 +02:00
31b3aa939e [DOC] fix links in README.md 2019-04-25 13:37:08 +02:00
224b7fc00c Merge pull request #87 from ParticulateFlow/feature/openfoam6-chemistrySolvers
Feature/openfoam6 compressible solvers
2019-04-25 11:16:36 +02:00
ce2646c400 Merge pull request #89 from ParticulateFlow/feature/recurrenceLib_fix_predefinedPath
minor fix in predefinedPath model
2019-04-25 11:06:11 +02:00
1a36f9c428 Added treatment of com based correction at periodic boundaries
Add switching term for particles crossing periodic boundaries.
Included the swicthing term in the velocity correction operation.
Considers rotation in CFD domain and does not consider rotation at
periodic boundaries.
2019-04-24 15:30:43 +02:00
c878281031 minor fix in predefinedPath model
* change the default file name for the pre-defined recurrencePath

  The previous default 'recurrencePath' is used by the recModel class
  to record the recurrence-path of the simulation at run-time.
  Thus, the previous default value conflicts with the hard-coded file name
  of the recModel class.

  By changing the default, we can use this model with its default file name
2019-04-24 15:16:42 +02:00
3d8f32a2a1 Remove reduntant data transfer
Removed the redundant data transfer of angular velocity and DEM torques
Removed the redundant calculations based on sphere angular velocities
2019-04-24 13:38:00 +02:00
2d4fc39eef Added missing files. 2019-04-24 13:25:30 +02:00
99ea82aca3 Changed the definitions of cfdemSolverIB and cfdemSovlerIBTorque
Integrated the two-way coupling into cfdemSolverIB solver.
Changed the functionality of cfdemSovlerIBTorque for the bonded
multisphere solutions.
Added the relative velocity of spheres as a function in
cfdemCloudIBmodified to make it feasible for bonded multisphere clumps.
2019-04-16 13:24:44 +02:00
f87ad1d116 Make default setting for critical voidfraction such that empty regions can be recognized as such. 2019-04-15 14:34:02 +02:00
a9b8718c3f adapt cfdemSolverRhoPimpleChem for OF-6. 2019-04-10 14:36:06 +02:00
2fa735a2d4 adapt cfdemSolverRhoSimple for OF6. 2019-04-10 14:17:18 +02:00
c40d8e8907 adapt cfdemSolverRhoPimple for OF-6. 2019-04-10 14:11:18 +02:00
69b3c903b3 fix misleading argument type
using a reference indicates that the argument gets modified
which is not the case here
2019-04-09 17:26:17 +02:00
a4ba6750b0 remove friends from cfdemCloud
All my data are belong to me.
2019-04-09 16:12:42 +02:00
96508745fb move methods from dataExchangeModel to cfdemCloud
methods operate directly on data owned by cfdemCloud, thus
cfdemCloud should have the control over it
2019-04-09 15:49:36 +02:00
671d59d634 make cfdemCloud::setNumberOfParticles public
and remove dataExchangeModel::setNumberOfParticles as we don't
gain anything but another function call
2019-04-09 15:14:55 +02:00
0dd61addde remove unused method fluidVel from cfdemCloud 2019-04-09 14:48:53 +02:00
e68f20c63d Merge pull request #86 from ParticulateFlow/master
update README.md
2019-04-03 20:56:23 +02:00
d98d72319a update README.md [ci skip] 2019-04-03 19:02:06 +02:00
645481215d Merge pull request #85 from ParticulateFlow/develop
add configuration file for CircleCI
2019-04-03 18:58:03 +02:00
d9c846caab add configuration file for CircleCI
use ubuntu trusty environment
use openfoam4 package provided by openfoam.org
build only master and develop
2019-04-03 18:16:29 +02:00
9061d95e2a Update and rename README to README.md 2019-04-03 18:11:23 +02:00
cc48c0b36c Create LICENSE 2019-04-03 18:08:58 +02:00
71b3ad58d4 virtual mass force: added smoothing model, revised ddtU_rel calculations 2019-04-02 12:52:15 +02:00
60eb20fc3c Parmar Basset force: cleanup, remove history rescaling, fix incomplete history reset 2019-04-02 12:50:26 +02:00
25a619514f specify python version for vizClock alias for python3 compatibility 2019-04-02 11:52:19 +02:00
5ec6492a11 added clock model to individual force models 2019-04-02 11:50:44 +02:00
7b91c8f014 Added RanzMarshall heat transfer model. Fixed issue with thermal conductivity models. 2019-04-02 08:51:16 +02:00
471cb3baae Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2019-04-02 07:28:12 +02:00
68ab82ce69 Cleaning up code. 2019-04-02 07:27:44 +02:00
c7e58306bb Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2019-03-28 15:29:14 +01:00
11e53185e7 Tutorial case for rCFD. Minor bug fixes. Some code cleaning. 2019-03-28 15:28:33 +01:00
1cf1babc8c [OF6] parameters of MULES::limit
MULES and CMULES have been extended so that the limits can be supplied
as fields. These arguments are templated so that zeroField, oneField or
UniformField<scalar> can be used in place of a scalar value with no
additional overhead.
2019-03-27 11:57:44 +01:00
cc4afe5e17 [OF6] class 'Foam::Random' has no member named 'GaussNormal'
'GaussNormal' has been replaced by 'scalarNormal'
2019-03-27 10:55:55 +01:00
8dd994c4a0 Merge pull request #81 from ParticulateFlow/master
Merge changes from release 19.02
2019-02-22 17:19:11 +01:00
8625396bea Merge pull request #80 from ParticulateFlow/release
Release 19.02
2019-02-22 15:57:02 +01:00
74ef6b9207 Merge pull request #65 from ParticulateFlow/feature/recurrenceLibMinorTweaks
Minor tweaks
2019-02-22 09:31:47 +01:00
3d186d3dcd Merge with develop resolve and resolve conflicts 2019-02-21 15:35:30 +01:00
e52b1028a2 add dSauter field read 2019-02-21 15:29:32 +01:00
ec095a490c bump version number to 19.02 2019-02-21 15:05:54 +01:00
c441753ff9 clean up whitespaces
no tabs, no extra whitespaces!
2019-02-21 14:53:31 +01:00
c8eb21bedc clean up whitespaces
no tabs, no extra whitespaces!
2019-02-21 14:45:03 +01:00
77b8d587a1 clean up whitespaces 2019-02-21 14:32:14 +01:00
750dc74ce9 [DOC] fix minor typos 2019-02-21 14:26:56 +01:00
dfac4df0a9 [DOC] clean up 2019-02-21 14:06:04 +01:00
209fc5c78f clean up whitespaces 2019-02-21 14:05:36 +01:00
cd3bc3874a [DOC] update chemistry model documentation 2019-02-21 13:39:23 +01:00
edd77aa751 clean up whitespaces 2019-02-21 13:02:35 +01:00
73015cffde [DOC] add minimal description of solvers
provisional documentation, needs to be extended
2019-02-21 10:57:21 +01:00
3275a87e05 [DOC] fix formatting in documentation of one2one data exchange model 2019-02-21 10:55:09 +01:00
809519f937 [DOC] add link to one2one data exchange model documentation 2019-02-21 10:54:21 +01:00
581fae739b Fix application name and description of cfdemSolverRhoSimple 2019-02-21 10:40:52 +01:00
696d73b10b clean up whitespaces 2019-02-20 15:02:49 +01:00
5665e75005 clean up whitespaces 2019-02-20 14:47:42 +01:00
5bb94b9695 use spaces not tabs 2019-02-20 14:19:42 +01:00
03f715cee4 bugfixes 2019-01-30 14:10:06 +01:00
37a7104849 added second order discretisation to ParmarBassetForce 2019-01-30 09:56:46 +01:00
1b4df09159 added ParmarBassetForce and constDiffAndTemporalSmoothing 2019-01-16 10:06:20 +01:00
36d253303d Therm cond models lookup field and modify it instead of returning it on demand. Furthermore, they do not need specific heat values anymore. 2019-01-11 08:47:17 +01:00
94d7ef5b78 add verbose switch to check reactionHeat per particle 2019-01-10 15:35:51 +01:00
c28b2418b2 add volScalarField dSauter 2019-01-07 17:13:45 +01:00
5b4ec1f67e Merge branch 'develop' into feature/cfdemSolverRhoPimple
Previous merge didn't pull from latest rep, merge again with
origin/develop branch.
Fix conflicts in heatTransferGunn, now using multiType for
coarseGraining, EEqn (using Tref for thermodynamic data)
Update rest without conflicts.
2019-01-07 16:10:50 +01:00
8edf5ac409 Merge remote-tracking branch 'origin/develop' into feature/cfdemSolverRhoPimple 2019-01-07 15:27:36 +01:00
2f0a2854a4 Debug information output 2019-01-07 15:15:41 +01:00
04445e0797 Uncomment mass sources 2019-01-07 15:14:55 +01:00
a285c98082 Info outpute order change 2019-01-07 15:14:29 +01:00
8256dd861b Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2019-01-07 09:45:30 +01:00
0b57c2400c Heat transfer model to describe inter-grain conduction in terms of volume fraction instead of explicit contacts. 2019-01-07 09:44:36 +01:00
3f2afc838d addSource need not be present anymore. 2019-01-04 13:12:48 +01:00
8ec17ce965 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into develop 2019-01-03 14:14:10 +01:00
ebdc5253e6 HeattransferGunn with coarse graining for several types and parcels. 2019-01-03 14:13:27 +01:00
1d07b2745c Corrected the velocity calculation
Inserted a per-molecule com based velocity calculation instead of using
individual particle velocities. Enables consideration of particle
rotation about molecule com.
2018-12-19 10:34:47 +01:00
846c30fccc Additional atom properties and velocity corrections in IBM solver.
Molecule data considered as per-atom properties. Consideration of
relative motion of atoms with respect to molecule centre of mass.
Rotation about the centre of mass.
2018-12-18 16:00:16 +01:00
fa1c3dcae9 Merge pull request #76 from ParticulateFlow/feature/o2o
One-to-one communication (few-to-few?)
2018-12-05 07:55:37 +01:00
c3534493b6 Adapt o2o to untangling of getCG() by @danielque 2018-12-04 15:08:34 +01:00
46e58f4e7d Merge pull request #78 from ParticulateFlow/bugfix/implicit_heattransfer
Bugfix/implicit heattransfer: Respect thermodynamic reference temperature (resolves #77)
2018-12-04 10:02:19 +01:00
b2aa11ffaf Add limiters of p and U in steady-state calculation. 2018-11-29 12:17:05 +01:00
66e0fc59e8 add scale factor for coarse graining 2018-11-27 10:09:07 +01:00
930b2a4158 bugfix: correct explicit part of heat source term for different thermodynamic temperature when using "sophisticated" thermodynamic models like JANAF. 2018-11-26 17:18:12 +01:00
87a730fbe1 Some changes of const / non-const etc. 2018-11-21 09:28:43 +01:00
2ace3db6d1 Add solver to solver-list.txt. 2018-11-20 16:47:30 +01:00
570037e8a5 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-11-20 14:05:53 +01:00
058648ef25 Solver for recurrent or steady particle motion and steady flow fields. 2018-11-20 14:05:00 +01:00
51d10d7d0f remove superfluous method getNumberOfParticles. 2018-11-16 16:04:42 +01:00
e589f3876a remove dependency on duplicated library_cfd_coupling_one2one.* 2018-11-16 15:50:48 +01:00
fb63f86bec improve constness of setters in dataExchangeModel. 2018-11-16 15:21:58 +01:00
487f3f9614 pass label by ref rather than copying it. 2018-11-16 15:18:14 +01:00
4959ffc79f include suggestions by @danielque. 2018-11-16 15:15:31 +01:00
a68a15272b improve constness. 2018-11-16 10:25:34 +01:00
717b95ab0b add warning description to docu for O2O. 2018-11-16 10:21:39 +01:00
191d1b84a0 make merge from develop compile. 2018-11-16 10:21:01 +01:00
1e5b8c9302 Merge with develop. 2018-11-13 15:42:56 +01:00
4b8b50b427 Added solver for pseudo-steady conditions. 2018-11-13 15:23:48 +01:00
5e444722c9 extend documentation. cellIdComm is not mentioned on purpose, since no case with performance gains from it has been found so far. 2018-11-13 10:55:28 +01:00
27708dd9b7 Merge branch 'develop' into feature/o2o 2018-11-13 10:47:50 +01:00
e8fd37e965 Update tutorial case for coupled heat transfer. 2018-11-12 15:04:53 +01:00
085f288b19 Tutorial case for rCFD case of a fluidized bed with transient conditions. 2018-11-12 11:54:04 +01:00
eab214a0c4 No mass source changes for testing purposes 2018-11-08 16:09:04 +01:00
52709a1537 Give out information about Temperature 2018-11-08 16:08:36 +01:00
2c476432c9 remove the need for createFieldRefs 2018-11-08 16:08:02 +01:00
e9a3b544c0 Revert to implicit 2018-11-08 16:07:31 +01:00
bd444010bc Add info output about heat source and specific heat 2018-11-08 16:06:56 +01:00
588c4d12c3 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-10-30 15:53:15 +01:00
c37469e415 use absolute margins instead of scaling factors. 2018-10-30 15:44:29 +01:00
bd03f422dc make cell ids members of the twoWayOne2One class. get rid of leak in the process. 2018-10-30 15:43:41 +01:00
7f7c17f788 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-10-29 07:24:18 +01:00
658cebfcf2 Compile one2one data exchange model. 2018-10-29 07:24:04 +01:00
b60ffb829a fix memory leak. 2018-10-26 13:00:00 +02:00
b56bf6b838 bugfix for the case that liggghts and openfoam bounding boxes match EXACTLY. 2018-10-26 11:38:35 +02:00
3520f0735e use a reference to cell id list instead of copying it. 2018-10-26 11:37:44 +02:00
15c9edf336 Merge pull request #75 from ParticulateFlow/feature/OF4x-multiphase
Feature/of4x multiphase
2018-10-23 09:59:41 +02:00
7648045bc2 add clocking to one2one 2018-10-22 11:28:45 +02:00
fbd2bde594 Merge with o2o. 2018-10-22 10:30:41 +02:00
bd17bf0e49 Update the copyright info in surfaceTensionForce files 2018-10-16 09:19:54 +02:00
0c7396e565 Control communication of fluctuations. 2018-10-15 13:10:18 +02:00
b5d5b56824 [DOC] fix up and add links to new documentation 2018-10-15 10:33:19 +02:00
f2f3230de0 clean up shell script files 2018-10-15 10:02:06 +02:00
1c44a3a09f remove bottleneck in locating particles by using appropriate container for cell ids. 2018-10-13 13:35:35 +02:00
62fe28535c add prerun scripts for testharness runs of cfdemSolverMultiphase 2018-10-12 16:36:09 +02:00
908de24636 add prerun script to damBreak case
prerun script for testharness
2018-10-12 14:39:33 +02:00
953cdb5b8b renaming to avoid same nameing 2018-10-12 12:08:14 +02:00
b841abd46f Remove implicit term,
add information outputs for Qsource/coeff and Cpv
2018-10-12 12:07:16 +02:00
3858931124 Updated documentation 2018-10-12 10:32:06 +02:00
4acd0de949 Added documentation for surfaceTensionForce force model 2018-10-12 10:31:46 +02:00
eaa11b4781 Added option for arbitrary field name in surfaceTensionForce 2018-10-12 10:31:05 +02:00
50af8d451f Remove html files from doc 2018-10-11 16:11:40 +02:00
e2b1a2fa9f Untrack files that should not be tracked 2018-10-11 15:57:45 +02:00
0058f1af36 Update temporalSmoothing documentation 2018-10-11 15:06:49 +02:00
1202f655d7 Removed init of small_scale_hearth_drainage tutorial case 2018-10-11 15:06:23 +02:00
542261bbf8 Change notation in temporal smoothing model 2018-10-11 13:37:29 +02:00
dfd665c15f Update tutorial cases 2018-10-11 13:36:10 +02:00
146e783415 Merge 'develop' into feature/OF4x-multiphase 2018-10-11 13:10:33 +02:00
64512450a7 Merge pull request #74 from ParticulateFlow/master
Update from master
2018-10-09 13:31:39 +02:00
15102ac38d Fixed the fvOptions functionality in the cfdemSolverIB and cfdemSolverIBTorque solvers.
Added the functionality to create and utilise fvOptions for the immersed
boundary solvers. This is useful for considering periodic channel flows
with meanVelocityForce momentumSource.
2018-10-09 13:31:03 +02:00
382c720b5c Merge pull request #73 from ParticulateFlow/release
CFDEMcoupling-PFM 18.10 release
2018-10-09 12:57:56 +02:00
27048a8e72 Included the tutorial for the cfdemSolverIBTorque in the tutorial-list 2018-10-09 11:49:36 +02:00
288ddfaf86 make propsDict of noDrag model optional again
since all entries this propsDict are optional, it is only convenient to
make it optional
2018-10-09 09:59:35 +02:00
e4c26a3004 retain original behaviour 2018-10-09 09:49:11 +02:00
74ed993b1a simplify expression 2018-10-09 09:48:25 +02:00
3e1c09930b fix bug introduced in commit 2230f51421
wrong default value
2018-10-08 18:59:16 +02:00
3e7ddecbbc Corrected the tutorial path for the two way coupled solver. 2018-10-08 17:09:30 +02:00
25b57b978c Tutorial case for the two-way coupled immersed boundary solver.
Consists of a comparison of the angular velocity damping when the two-
way coupling is considered.
2018-10-08 16:57:32 +02:00
91dbeb42e4 Corrected the two-way coupling of the immersed boundary method.
Corrected the torque calculation for the cfdemSolverIBTorque and
modified the ShirgaonkarIBTorque calculations.

Included fvOptions.H in the solvers for activation the usage of
fvOptions.
2018-10-08 16:54:35 +02:00
ba9f28a5ff fix order of construction / destruction
dataExchangeModel is needed by the destructor of several models, thus
should be destroyed last and in further consequence must be constructed
first
2018-10-08 15:40:35 +02:00
4c785b952d [DOC] update chemistryModels docs
dictionary syntax for chemistry models has changed
2018-10-05 16:50:08 +02:00
844234b5e9 fix test cases for cfdemSolverRhoPimple
dictionary syntax for chemistry models has changed
2018-10-05 16:49:28 +02:00
b8ac908ea6 [DOC] fix link 2018-10-05 09:38:15 +02:00
af087b29b5 bump version number to 18.10 2018-10-04 12:29:52 +02:00
73d13652c6 [DOC] update manual 2018-10-04 11:00:05 +02:00
5cb044a62e remove obsolete heatTransferGunnImplicit class
use heatTransferGunn instead which allows for an explicit or an implicit
formulation
closes #71
2018-10-04 10:47:42 +02:00
ffe9014b66 Merge pull request #70 from ParticulateFlow/feature/constness
fix up const/mutable usage
2018-10-04 10:40:40 +02:00
91c22cd1e1 fix up some mutables in momCoupleModels 2018-10-04 10:42:10 +02:00
c7fd297b68 make couple() method of dataExchangeModel non-const
method modifies at least one member that can be observed from outside
(i.e. couplingStep_)
2018-10-03 13:13:22 +02:00
6e59b6bb54 Merge pull request #69 from ParticulateFlow/feature/adaptive_resolution_universe
unravel cfdemCloud and models
2018-10-03 13:00:47 +02:00
7a32a19679 clean up function specifiers in cfdemCloudEnergy 2018-10-03 12:27:24 +02:00
3538d29f53 Merge branch 'develop' into feature/adaptive_resolution_universe
# Resolved Conflicts:
#	src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
2018-10-01 18:04:42 +02:00
2c46466a06 remove mutables from voidFractionModel classes 2018-10-01 17:56:04 +02:00
583e1ff3bb surviving without mutable
use proper function signatures
provide getters for (const and) non-const references
2018-10-01 16:49:07 +02:00
f7716a67a6 make some getter methods of liggghtsCommandModel const 2018-10-01 16:03:06 +02:00
304b7328c4 fix up some more mutable stuff in cfdemCloud and cfdemCloudIB 2018-10-01 16:01:50 +02:00
be2a4ad87b make some getter methods in cfdemCloud const 2018-10-01 15:34:21 +02:00
e25a25f294 remove unneeded mutable keywords in cfdemCloud 2018-10-01 15:33:32 +02:00
2c028ed37b remove unneeded conversion to bool 2018-10-01 15:31:13 +02:00
3ad0fa0ac7 make parameters of IOModel methods const
parameters do not get changed in any of these methods
2018-10-01 15:30:43 +02:00
33c81073a2 Merge pull request #67 from ParticulateFlow/feature/aLittleConstBeauty
Feature/a little const beauty
2018-10-01 14:03:04 +02:00
fea4ee326e mark some more members explicitly read-only 2018-10-01 13:54:44 +02:00
72351fb578 clean up some more const properties 2018-10-01 13:47:08 +02:00
6bcd54f549 Merge branch 'feature/aLittleConstBeauty' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/aLittleConstBeauty 2018-10-01 13:32:05 +02:00
779dca2401 clean up reading of settings some more 2018-10-01 13:31:32 +02:00
b88d8521bf Merge branch 'feature/aLittleConstBeauty' of github.com:ParticulateFlow/CFDEMcoupling into feature/aLittleConstBeauty 2018-10-01 11:13:08 +02:00
059f2356dd noDrag: fix the creation of the properties dictionary 2018-10-01 11:12:53 +02:00
6bcf8e76e4 fix bug introduced with merge of PR #66
forAll was intended replace the original for loop
2018-09-26 15:28:06 +02:00
982dcc07a7 Merge pull request #68 from ParticulateFlow/feature/SphinxDocumentation
Sphinx documentation for CFDEMcoupling
2018-09-26 14:18:54 +02:00
502e115581 Merge pull request #66 from ParticulateFlow/feature/PtrLists
Use PtrList for submodels instead of arrays of autoPtrs.
Resolves #61
2018-09-24 14:32:20 +02:00
1ab91a4dd3 Merge branch 'develop' into feature/aLittleConstBeauty 2018-09-24 13:48:07 +02:00
5d6714d5d2 addressed comments from review 2018-09-24 11:07:42 +02:00
2230f51421 changed back the handling of verbose flag 2018-09-24 10:20:30 +02:00
5c21513b64 Addressed comments brought up in review
Changed back the way the propsDict is read/constructed
Changed back the behaviour of verbose
2018-09-24 09:57:42 +02:00
4bfe6777f9 remove outdated pdf manual 2018-09-21 14:21:08 +02:00
00e260d6ca remove github access info that is not applicable to our version 2018-09-21 14:20:33 +02:00
56a16fee98 Single Particle Hematite Reduction Tutorial Case
incoming gas is 30% CO 4% CO2 6% H2.
2018-09-14 10:34:04 +02:00
8c819e4d1d Tutorial Case Magnetite - Wustite...
iron-oxide reduction in fludized beds, for the reaction magnetite-
wustite. No heat-transfer models active, coarse-grained, Temp is limited
to 2000 Kelvin. Hematite is considered to be completely reacted, minimum
radius size is entered. Works as intended.
2018-09-14 10:28:21 +02:00
ec0f4f29ce Remove limitation for molar fraction 2018-09-14 10:23:52 +02:00
573c51e52f use OF PtrList for submodels and iterators in energyCloud. 2018-09-13 15:58:08 +02:00
88e3bcf2dd use PtrLists for subModels. includes some cleanup for commandModel acessors. 2018-09-13 15:57:42 +02:00
ed242483fc fixed copy&paste error 2018-09-13 11:14:14 +02:00
5579b80401 Minor tweaks
Moved the fields controlling if, and under what name, the recurrence matrix is
written to disk to the parent class recModel to make the behaviour common to all
derived classes.

Fixed some formatting and added some diagnostic output in class gerhardsRecModel
2018-09-13 10:48:47 +02:00
9a3cf6a4c2 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-09-07 09:37:25 +02:00
346334d639 Time dilation factor for databases recorded at "high speed". 2018-09-07 09:36:52 +02:00
7fdc466a76 edit read norm to read the whole recurrence matrix 2018-09-06 12:58:57 +02:00
fd71f367d7 rCFD solver for turbulent single-phase transport 2018-09-06 12:54:35 +02:00
67cd1bf561 Relax time step criterion. 2018-09-05 10:52:33 +02:00
bed9647047 Check if databases exist. 2018-08-30 07:41:20 +02:00
780b99389c Allow calculation of distance matrix for selected subdomain. 2018-08-29 14:43:32 +02:00
02800f51a9 Revert previous fix for mass source term 2018-08-14 12:39:55 +02:00
f523116c41 Change naming of changed species mass fields for better evaluation,
get data in data exchange models was missing an argument. Fixed the mass
source term received from DEM side.
2018-08-14 11:01:46 +02:00
80ddfcd6aa Give info about reactantPerParticle if verbose. 2018-08-14 10:35:08 +02:00
0778651870 Forgot to remove abort 2018-08-13 16:37:09 +02:00
77511e50b9 Forgot to remove abort 2018-08-13 16:36:07 +02:00
65921d48f3 reverted timeStepFraction check to warning 2018-08-13 16:32:34 +02:00
97949216e7 reverted timeStepFraction check to warning 2018-08-13 16:31:18 +02:00
ba9f4964c4 Virtual mass model optimization (minor) 2018-08-13 16:27:41 +02:00
da25c871c5 Solver improvement, made Gunn and Syamlal models compatible with multiphase 2018-08-13 16:25:26 +02:00
7dcb0fee45 virtual mass force optimization (minor) 2018-08-13 16:17:31 +02:00
9dcd9351c5 make fvOptions work in cfdemSolverPiso. 2018-08-07 09:08:42 +02:00
1b4a41a319 make fvOptions work in cfdemSolverPiso. 2018-08-06 15:56:11 +02:00
0aa659196b [DOC] fix conf.py start file settings for other doc formats 2018-07-27 16:33:43 +02:00
c89e0b792b [DOC] add installation instructions 2018-07-27 15:38:04 +02:00
3fb47021be Reallocate the arrays even if particle number doesn't change,
without reallocation, the fields can cause MPI problems.
2018-07-27 10:50:07 +02:00
cdd416ec0a [DOC] fix spelling 2018-07-26 13:04:30 +02:00
46803bf5c7 Remove unnecessary field calculations and interpolations...
rho and molar concentration was used for debugging, they are not being
communicated with DEM and not used within the model thus removed.
2018-07-24 12:05:34 +02:00
d9abd3df0b [DOC] update model options 2018-07-23 15:20:44 +02:00
84d05d7d3b fix error message 2018-07-23 12:26:43 +02:00
5259324950 fix error message 2018-07-23 12:25:15 +02:00
c47584d6de fix error message 2018-07-23 12:14:52 +02:00
9cf940661a fix comment 2018-07-23 10:25:00 +02:00
dbabe3285d [DOC] update force model options 2018-07-23 09:03:40 +02:00
5a50153347 [DOC] fix up special characters 2018-07-19 09:18:41 +02:00
d314aa0ae1 [DOC] clean up conf.py file 2018-07-18 15:48:28 +02:00
77419c4ee0 [DOC] fix up formatting of references 2018-07-18 15:44:02 +02:00
395bc08b6c [DOC] add sphinx setup and theme files 2018-07-18 14:58:15 +02:00
fa1369278b [DOC] add missing documentation 2018-07-18 14:56:31 +02:00
b1f35372e6 [DOC] add to description 2018-07-18 14:55:24 +02:00
ccbc2b9cba [DOC] add some missing documentation (partly from PUBLIC) 2018-07-18 14:54:12 +02:00
4c7fd88b28 [DOC] minor rewording 2018-07-18 14:52:28 +02:00
29278314c2 [DOC] formatting / fix links 2018-07-18 14:51:29 +02:00
df685b67ef [DOC] fix typos 2018-07-18 14:48:51 +02:00
466897a06c [DOC] add external links 2018-07-18 14:47:07 +02:00
8899c495d4 [DOC] fix bullet lists 2018-07-18 14:45:36 +02:00
c31a692499 [DOC] formatting: limit line length 2018-07-18 14:43:45 +02:00
b61db3f4a9 [DOC] homogenize formatting 2018-07-18 14:33:41 +02:00
61d7a88793 [DOC]fix up formatting for (IMPORTANT) NOTEs 2018-07-18 14:25:12 +02:00
b56390e3de [DOC] fix up typos and formatting of model syntax/example 2018-07-18 14:17:27 +02:00
26d30e122d [DOC] add cross-linking 2018-07-18 14:08:26 +02:00
2def3b2f97 [DOC] fix up model names 2018-07-18 13:50:07 +02:00
51d1af906a [DOC] fix top links for old html docs format 2018-07-18 13:43:11 +02:00
b6784afb1a [DOC] fix up OpenFOAM disclaimer 2018-07-18 13:36:48 +02:00
6b7c6eaa3b [DOC] fix actual model names 2018-07-18 13:25:19 +02:00
50eb58eb4e [DOC] fix links 2018-07-17 14:03:00 +02:00
eb32f2741d [DOC] remove superfluous lines 2018-07-17 14:01:20 +02:00
cf0f5b3e17 [DOC] split up main page 2018-07-17 13:59:11 +02:00
20b3102d1f [DOC] update gitignore file 2018-07-17 09:23:56 +02:00
a1e1fa8f16 [DOC] delete old html files 2018-07-17 09:23:22 +02:00
9dbf342629 Get diffusant fields directly from volScalarFields..
instead of equalizing it to species fields. Change indexing for
continuity, and cleanup of old code.
2018-07-16 14:01:44 +02:00
93b2c11874 fixed no chemistry model 2018-07-11 14:44:48 +02:00
ea9ccabeee Merge pull request #60 from ParticulateFlow/feature/cfdemSolverRhoPimple
Feature/cfdem solver rho pimple
2018-07-10 13:16:32 +02:00
1a8b4aa5c2 clean up whitespaces
remove extra spaces, convert tabs to spaces
2018-07-05 16:25:40 +02:00
b5b04c0fb0 Fix functions according to comments
- fixed noChemistry model accordingly
- changed description in some files
2018-07-05 15:33:58 +02:00
963f1aa4bf Fix double& 2018-07-05 13:33:03 +02:00
a8e5493837 Fix according to comments 2018-07-05 13:29:35 +02:00
901e7fcede Rewrite in proper Englisch
- remove duplication
2018-07-05 13:29:20 +02:00
ace28b1674 Don't limit the molarfraction 2018-07-05 13:23:06 +02:00
3c33ef17bc Correct pressure relation 2018-07-05 13:22:14 +02:00
5ee4efcb24 remove linux64GccDPInt32Opt
from pull request comments
2018-07-05 13:19:14 +02:00
2c6312325b mixing rules 2018-07-02 11:07:09 +02:00
8d0661d83e Merge branch 'develop' into feature/o2o 2018-07-02 10:44:40 +02:00
9adbbac0eb Delete old tutorial cases
- New cases will be added shortly
2018-06-29 15:44:34 +02:00
7914dffb52 Documentation for chemistryModels 2018-06-29 15:14:19 +02:00
7f11ed31dd Merge branch 'develop' into feature/cfdemSolverRhoPimple 2018-06-29 14:42:50 +02:00
e67eb542b1 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2018-06-29 14:39:20 +02:00
bbb46df35c Check total negative molar fractions 2018-06-29 14:34:10 +02:00
24d05d696c Fix comments 2018-06-29 13:06:35 +02:00
972ee8eeb0 Check max and min h(e) 2018-06-29 12:32:42 +02:00
44ade76820 Solver development 2018-06-26 11:24:39 +02:00
693e9fd404 Extension of cfdemSolverMultiphase with scalar transport 2018-06-25 10:10:45 +02:00
54b88ed873 Loosened timeStepFraction constraint, preventing unnecessary crashes 2018-06-25 10:04:07 +02:00
a1e4182f71 Merge branch 'feature/o2o' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-06-21 16:58:39 +02:00
2929a1d2a7 New communication scheme. 2018-06-21 16:58:25 +02:00
3f98108ab8 correctly destroy prev_cell_ids as suggested by @danielque. 2018-06-20 09:53:33 +02:00
a7bd3191a2 fix memory leak. 2018-06-19 15:39:42 +02:00
070fcbe15c communicate particle cell ids to liggghts and back.
this allows for use of a turboEngine-like locate section
with an initial guess for the cell.

to use this, add a
`fix             prev_cell_ids all property/atom prev_cell_ids scalar no
no no -1`
to the liggghts run script and set `useCellIdComm yes` in the
twoWayOne2OneProps section of the couplingProperties.

a check whether the particle is contained in the bounding box
of the domain is added regardless of the setting.
2018-06-19 12:45:46 +02:00
32098fb977 Fixed possible problem for MarkovPath by introducing correlation steps. 2018-06-19 09:22:57 +02:00
9b1fb4474e Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-06-18 13:16:06 +02:00
4ded7ce4ac Merge with feature/o2o. 2018-06-18 13:15:25 +02:00
b759fc05e0 Merge pull request #55 from ParticulateFlow/feature/recurrenceLib_recurrenceTurbulence
Feature/recurrence lib recurrence turbulence
2018-06-12 17:13:55 +02:00
b2f5221076 Added check for adjustable timestep. 2018-06-06 11:25:39 +02:00
a15986216a Small fixes addressing comments.
* correcting species transport equation
* making check for laminar turbulence compatible with OF-4.0 and OF-5.0
2018-06-05 16:32:33 +02:00
839c66a283 Merge with develop. 2018-06-05 09:57:53 +02:00
653237a641 [DOC] for forceModel pdCorrelation. 2018-06-04 16:30:25 +02:00
ec62d94d8f add description in header. 2018-06-04 16:30:25 +02:00
87c54c0fba [DOC] forceModel dSauter. 2018-06-04 16:30:25 +02:00
e08e63c38b also write pField. 2018-06-04 16:30:25 +02:00
2151dbf0f8 bugfix + switch to run on write time only. 2018-06-04 16:30:25 +02:00
8cd9ca56b9 bugfixing and simplification. 2018-06-04 16:30:25 +02:00
3361956058 build new model. 2018-06-04 16:30:25 +02:00
19f27d279d add postprocessing model for momentum-diameter correlation. 2018-06-04 16:30:25 +02:00
d29b467397 Look for static hold up only if fines are present. 2018-06-04 15:28:11 +02:00
09baa0d6d5 Merged with develop to get polydisp Beetstra etc. 2018-06-04 15:26:35 +02:00
f34c00d5dd Fix compilation issue with missing method exportAveragedVolVectorField()
This method has been made abstract in recModel.H
This method is implemented by the class gerhardRecModel

Now, the utility rSmoother compiles without error
2018-05-25 10:22:31 +02:00
fc93012268 Added diffNorm. 2018-05-25 10:08:57 +02:00
40c23ffb42 Added Euclidean norm model, cleaned up recNorms based on differences of fields. 2018-05-24 11:01:27 +02:00
9fabb5851e Merge pull request #57 from ParticulateFlow/feature/recurrenceLib_predefinedPathAndMat
minor refactoring + support for following predefined path
2018-05-24 07:23:28 +02:00
3132d9bf4e * readNorm: refactor recurrence matrix reading into its own recNorm -> less duplication
* predefinedPath: backport ability to follow prescribed recurrence path
2018-05-23 14:21:30 +02:00
ca29eaff3a Corrected reading of bool. 2018-05-23 12:29:55 +02:00
c25aa8ed46 Allow to use precalculated recurrence matrix. 2018-05-23 12:16:31 +02:00
4a030f15e2 Merge pull request #56 from ParticulateFlow/feature/cfdemSolverRhoSimple
Feature/cfdem solver rho simple
2018-05-22 15:26:32 +02:00
06633e9e4d Reset array where necessary. 2018-05-22 15:24:36 +02:00
0d7916746a Added return NULL to silence compiler. 2018-05-22 15:23:35 +02:00
c1cb77f08c Replaced hardcoded temperature limits with user-defined ones. 2018-05-22 09:42:24 +02:00
f79a21bb88 Correction based on Beetra's erratum 2018-05-18 14:33:20 +02:00
554577d0ba Some more improvements. 2018-05-18 14:30:42 +02:00
05fb204dc3 Some improvements based on helpful comments. 2018-05-18 14:10:35 +02:00
19dd9c9646 Beetstra drag model. For polydisp case, BeetstraDragPoly overrides functions for diameter. Effect of fines phase in terms of static hold-up field is included in BeetstraDragPoly. 2018-05-18 12:08:56 +02:00
e0530dcf5b Cleaned up solver, removed testing code. 2018-05-18 12:04:57 +02:00
324094bb0b conditionally communicate particle density and angular velocity 2018-05-18 11:40:43 +02:00
41faf88df7 Mergning cfdemCloud from feature/cfdemSolverRhoSimple 2018-05-18 10:03:41 +02:00
8b62c22312 fixes based on comments 2018-05-18 09:30:03 +02:00
137a4e8670 Recurrence-based turbulence: test case
The test case consists of an initialisation part to build a small
dataBase and a recurrence run.

In the init case the kEpsilon turbulence model is used for the
liquid phase. In the recurrence run the corresponding recurrence-based
kEpsilon model "recurrenceKEpsilon" is used.
2018-05-17 15:47:46 +02:00
82a80e1215 Recurrence-based turbulence: model and test-app
A base class for recurrence-based turbulence models was created. This class
holds a reference to the recurrenceModel in use.
Thus, turbulent fields can be updated from the data base.

The recurrence-based turbulence models are essentially re-implementations
of the respective standard turbulence models. In addition to being derived
from their respective base class, as mandated by OpenFOAM, each recurrence-based
turbulence model is derived from the class recurrenceTurbulenceModel.
This allows for making use of polymorphism on the recurrence-part of the
turbulence model, as after construction, the solver needs to pass the reference
to the recurrenceModel to the recurrence-based turbulence model.
2018-05-17 15:32:30 +02:00
5615b27130 Recurrence-based turbulence: initial commit
extend recModel to return the names of the recurrence-fields
2018-05-17 15:30:01 +02:00
5feb16c659 Merge pull request #53 from ParticulateFlow/feature/recurrenceLib_simplifyRecPath
reduce code duplication in recPath models.
2018-05-17 14:42:17 +02:00
7b59ed2ffa Fix sequence of arguments in function calculating drag. 2018-05-17 14:13:13 +02:00
5ad063f848 make getRecPath() virtual following suggestion by @danielque. 2018-05-17 13:53:58 +02:00
917cd345cb reduce code duplication in recPath models. 2018-05-17 12:45:34 +02:00
9051bb7a70 Extended Beestra drag model to polydisperse particles, correction in the superficial velocity (voidfraction*Uf-Us instead uf voidfraction(Uf-Us)) 2018-05-17 10:40:31 +02:00
dd611fc7a0 Major correction to the Mei lift force model 2018-05-16 13:58:38 +02:00
0e17be2620 Added extended virtualMassForce model 2018-05-14 13:17:00 +02:00
500db10717 Forgot to set bool getParticleEffVolFactors. 2018-04-30 15:04:21 +02:00
e9a7a0f15a Beetstra drag mono can take multiple cg factors, added Beetstra drag poly for polydisp systems, including polydisp parcels and effect of fines phase. 2018-04-26 13:26:40 +02:00
948a909da8 Adapted Sauter mean diameter and void fraction models for eff. particle volume factor in case of polydisp. parcels. 2018-04-25 15:28:03 +02:00
beadd7fe18 modified rBaseMirror to read fields from dataBase directory 2018-04-25 14:14:54 +02:00
29bf7f59ce ignore vscode project dirs. 2018-04-25 10:09:32 +02:00
bdfdb23cdd Some debugging (initialization of arrays etc.). 2018-04-23 14:15:34 +02:00
b7bc6cd1b7 Added absolut norm to recurrence norms. 2018-04-20 10:28:54 +02:00
d8682c6a79 Some experiments to get more stability. 2018-04-19 15:07:24 +02:00
06d589a2f0 Added maximum norm. 2018-04-19 15:06:09 +02:00
24c5c25f7c Specific heat and thermal conductivities for various species. 2018-04-16 11:44:48 +02:00
76ea1af1ab CFDEMcloud can now hold particle types and densities. Heat transfer model needs to know heat capacities to solve T eqn. 2018-04-13 11:19:08 +02:00
771dd7e6d0 Initial commit for cfdemSolverRhoSimple. New heat transfer model to treat granular temperature as field to be solved on a grid. 2018-04-12 11:06:46 +02:00
391a50e6dc Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2018-04-11 16:10:41 +02:00
d8a343181c check addition of molar fractions 2018-04-11 15:37:48 +02:00
7a6df294c6 Avoid string comparison, set bool instead. 2018-04-10 14:56:56 +02:00
e4d3281a27 Some cleaning up. Isotropic fluctuations can take a spatially varying diffusion parameter and ignore cellsets. New model evaluateFluctuations checks if random steps improve state and avoid within-cell mixing. 2018-04-10 13:37:50 +02:00
2b07600de2 modified mapField script for dataBase 2018-04-09 12:50:46 +02:00
09dba5d5d5 Additional options for treatment of Y fields. 2018-04-09 12:30:31 +02:00
9591c2e4e1 use primary tokens for logical operators instead of alternative tokens
don't start mixing tokens within a project
2018-04-06 13:58:56 +02:00
c764c6c184 clean up whitespaces
get rid of tabs and extra spaces, fix indentation
2018-04-06 13:58:45 +02:00
2df36bd22a use c++ style casts 2018-04-06 12:47:05 +02:00
5050ae1b5f change position of debug output. 2018-04-05 16:15:50 +02:00
278087b021 copy on-proc info rather than sending it via MPI. 2018-04-05 15:07:25 +02:00
072e11134a use safer way of offsetting in arrays. 2018-04-05 14:42:57 +02:00
d5d37233ef update .gitignore file for tutorials
* ignore any files in any DEM/post/ folder
* ignore any processor directories in CFD folders
* ignore all time directories except '0' in CFD folders
2018-04-04 17:30:35 +02:00
68a683e053 Merge pull request #52 from ParticulateFlow/master
update develop with release commits
2018-04-04 16:39:54 +02:00
ca5a69d8ad Merge pull request #51 from ParticulateFlow/release
CFDEMcoupling-PFM Release 18.03
version passed all regression tests
2018-04-04 16:37:20 +02:00
e66de2bbc9 bump version number to 18.03 2018-04-04 14:54:00 +02:00
0411ae0d80 clean up whitespaces 2018-04-04 14:46:53 +02:00
36a1d4a309 IsotropicFluctuations can take two different diffusion coefficients now. 2018-04-04 14:22:40 +02:00
8a1a1375d7 Removed code used for debugging. 2018-04-04 13:46:39 +02:00
401a6b087d ForceSubmodels specifically for recurrence CFD have become obsolet. 2018-04-04 13:23:13 +02:00
1722034452 cfdemCloud now holds convective and fluctuation velocities of particles for use of LIGGGHTS to move tracers. Multiple models to compute these velocities can be used simultanously. 2018-04-04 13:21:43 +02:00
459d87c47a recModel now contains latest time when a jump has been performed. 2018-04-04 13:19:05 +02:00
e7a3e8de8f clean up whitespaces 2018-04-04 12:48:53 +02:00
52aa18997d Refactoring recurrence path models, databases etc. 2018-03-30 10:56:28 +02:00
3b61dcf530 New relaxation models. 2018-03-30 10:55:41 +02:00
d4c393a623 Corrected times when rec field switches. 2018-03-30 10:53:59 +02:00
b056e89969 Density can easily be calculated from T and p. 2018-03-30 10:53:18 +02:00
a9526b7f08 rCFD solver for coupled heat transfer now takes db weights via function objects. 2018-03-30 10:52:33 +02:00
f4ae35eb88 send only when there is data to be sent. receive only when there is data to be received and only wait when you actually have something to receive. 2018-03-29 19:05:06 +02:00
0aa38589a3 add more verbosity. 2018-03-29 18:59:55 +02:00
ec8220c63b Remove more unnecessary output 2018-03-29 16:11:51 +02:00
3bd79f999b Set modeltype also when #include modeltype is executed in if statement. Create additionalChecks file for solver specific checks prior to simulation. 2018-03-29 15:16:01 +02:00
a2e3ad76ab cleanup comments 2018-03-29 14:10:59 +02:00
7ee394fb4c Fix memory leak_continuation
- didnt stage
2018-03-29 13:42:05 +02:00
c5622f9090 Fix memory leak
- remove double pointer pointer formatting
2018-03-29 13:40:33 +02:00
a1cfbdb958 Remove unnecessary output 2018-03-29 10:22:22 +02:00
afe1257367 Remove accidental random letter 2018-03-28 16:25:25 +02:00
7161b23c7f Free memory correctly 2018-03-28 14:30:58 +02:00
5a1dcb4048 Added option to skip checkModelType, can be useful to in some cases use Archimedes instead of gradPForce for stability reasons, which would generate an error otherwise 2018-03-28 14:27:27 +02:00
bc4f7254da Remove call to particleCloud for viscous term, dimension issue with modelType B because of the use of incompressible turbulence models 2018-03-28 14:09:45 +02:00
31b2e8d161 Missing comma added 2018-03-28 13:41:19 +02:00
f16ff451e8 Update license part of the files 2018-03-28 13:38:25 +02:00
5baa91df81 use shell script variable to indicate meaning of parameter 2018-03-27 17:55:51 +02:00
05907081c0 fix spelling of shell script variable 2018-03-27 17:54:14 +02:00
4063a2a103 fix reconstruction of twoSpheresGlowinskiMPI
fixes #42
2018-03-27 17:52:49 +02:00
67ef631a6c add -f option to rm in clean target of make files
avoid make error in clean installations
2018-03-27 15:26:39 +02:00
8754ca5952 replace vector(0,0,0) with vector::zero 2018-03-27 15:25:30 +02:00
148990499d clean up whitespaces
use spaces, not tabs
2018-03-27 14:43:04 +02:00
d1c115896f Add documentation for cfdemSolverMultiphase 2018-03-27 12:49:41 +02:00
9ad296a5e1 Add documentation for gradPForceSmooth 2018-03-27 12:49:20 +02:00
ee5150bb8a Added documentation for temporalSmoothing smoothing model 2018-03-27 10:28:05 +02:00
b540ddcde4 Throw error if temporalSmoothing is selected in couplingProperties 2018-03-27 10:27:10 +02:00
67b7607a79 Update variable names to be consistent with paper + cleanup 2018-03-27 10:26:20 +02:00
e20fe0ab91 Remove MRF from createFields 2018-03-26 13:10:17 +02:00
9d036344a6 Cleanup pEqn 2018-03-26 12:48:58 +02:00
b825513094 Added support for modelType B and Bfull 2018-03-26 12:37:37 +02:00
2ac9f5ab14 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-03-23 11:06:34 +01:00
b1a81a5fb9 Isotropic fluctuations can be switched off locally. Current implementation for separation with plane. 2018-03-23 11:06:00 +01:00
27bf29ec64 a script for mapFielding the dataBase for another mesh 2018-03-22 16:20:01 +01:00
b80fb7a9c7 Removed maxAlphaCo because it's only used in adjustable time step 2018-03-22 14:18:59 +01:00
e38cc7e2ab Reinstate checkModelType and allow gradPForceSmooth to be used instead of gradPForce 2018-03-22 13:44:19 +01:00
0c7a77c582 Add warning if ddt(voidfraction) is ignored 2018-03-22 12:37:02 +01:00
9230212797 Reinstate ddt(voidfraction) from particle cloud and reformulate phiS 2018-03-22 12:36:23 +01:00
0b365aa6a5 Minor change, move rhoPhi and cleanup 2018-03-22 10:39:41 +01:00
9953a3af76 Added support for fvOptions and removed unsupported MRF stuff 2018-03-22 10:30:17 +01:00
83609e3073 Isotropic fluctuations can now print out the current recurrence error if desired. 2018-03-21 15:43:24 +01:00
665ff426b5 Merge branch 'develop' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-03-20 13:24:02 +01:00
7fc3caf245 Basics of new rCFD solver for varying conditions. 2018-03-20 13:23:26 +01:00
dcc289ac71 added documentation for engineSearchMany2Many (#50), resolves #38. 2018-03-20 08:48:57 +01:00
b9d843a11f Set boundary field type of particle temperature field etc. explicitly to zeroGradient. 2018-03-19 14:06:53 +01:00
e5bc651a5d added docu for one2one. 2018-03-15 14:47:36 +01:00
5ac5c3275c Give info only if verbose active 2018-03-15 14:09:26 +01:00
674853d616 Print out info only if verbose active 2018-03-15 14:07:10 +01:00
ae268bf137 added documentation for engineSearchMany2Many. 2018-03-14 16:40:52 +01:00
6e5bdc2bbd option for using a static processor map added. 2018-03-14 16:13:24 +01:00
fb448affa3 scatter located particle ids among receiving procs. 2018-03-14 13:15:27 +01:00
318469aa26 use total number of particles instead of maxtag. 2018-03-14 13:14:15 +01:00
e2f74d2892 do not free the comm on destruction. 2018-03-14 11:04:36 +01:00
327c64933d heatTransferModels can now export current mean particle temperature. 2018-03-14 07:30:10 +01:00
47f38514a6 Changes in initialization of scalar list 2018-03-13 17:18:23 +01:00
e53753bfc8 Add coarse graining factor 2018-03-13 17:17:29 +01:00
77a7d78282 Yet another bugfix. Interval sizes need to be defined before they are used... 2018-03-13 16:24:46 +01:00
237e85a191 Fixed error with wrong dimension sets. 2018-03-13 16:02:20 +01:00
e3a521ced4 New path model MarkovPath is going to replace multiIntervalPath. Allows for multiple databases, extension of path and adaption of weights during runtime. 2018-03-13 11:12:22 +01:00
22fd652019 Clean-up of treatment of time-averaged fields per database. 2018-03-13 08:20:45 +01:00
0211f3cc74 Option to store time-averaged fields for each database. 2018-03-12 18:00:26 +01:00
27b67395f9 Cleaned up code of multiIntervalPath. Intervals need now to be given in separated databases. 2018-03-12 17:19:08 +01:00
c311c4000c Allow for multiple databases. 2018-03-12 16:57:43 +01:00
e1472f5ed3 moved procmap creation temporarily moved to couple(). debug output added. 2018-03-10 17:48:25 +01:00
528750b8b5 Merge with model for large, incomplete databases. 2018-03-09 07:28:53 +01:00
48c2ac22c0 recurrence model: testing large, incomplete data bases
This is a small, simple tutorial for testing the implementation of
large, incomplete data bases.
In this tutorial case, rStatAnalysis is used as post-processor and
it uses a data base in memory, which is smaller than the number of
snapshots on disk.
2018-03-08 16:49:34 +11:00
4403f4e191 recurrence model: large, incomplete data bases
The standardRecModel class reads all fields of the data base at once. This
might create a problem in cases with a large number of snapshots and/or
a large mesh, as the machine's memory (RAM) would become a bottleneck.

Thus, the class gerhardsRecModel implements an incomplete data base, with
a user-defined number of slots M. In cases with a larger number of
snapshots on disk N, with N > M, the class will manage its data base
in a fashion similar to an operating system managing memory pages.

The class gerhardsRecModel implements a least-recently used (LRU)
algorithm, which vacates the least-used of the dataBase's M slots.
An integer list is used to track the slots' usage, each access to a
slot is logged, thus the least-used slot can be easily determined.

In order to fully utilize the LRU algorithm, the computation of the
recurrence matrix in sqrDiffNorm.C had to modified such, that three
nested for-loops are used, instead of two nested loops. Thus, a certain
number of additional, essentially no-op, loop iterations are expended
in order to accomodate the LRU algorithm. Keeping the two nested loops
would have reaped only part of LRU's potential gains.

In order to accomodate data base management in the classes derived
from the class recModel, some const specifiers had to be removed.
For informational purposes, a method has been added to the class.

The class gerhardsRecModel first checks the existence of all N
to-be-read fields, and then fills the data base with the first M
fields.

Further features included in this commit:

All elements of the recurrence model are initialized with the value of -1.0
Thus, some form of error checking is introduced, as negative values should not
remain within the matrix after computation has finished.

Skipping the 0 directory of the data base. This, might be useful when
using rStatAnalysis as post-processing tool.

The class multiIntervalPath was adapted to use OpenFOAM's
methods for parallel communication.

Reference:

  Modern Operating Systems
  Andrew S. Tannenbaum,
  Prentice Hall, 1992
2018-03-08 16:31:01 +11:00
35a37d5a7b Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2018-03-05 10:09:55 +01:00
e6fed5eaf7 Added short description for the tutorial 2018-03-01 16:43:25 +01:00
ae6b1a7209 Cleanup 2018-03-01 16:42:07 +01:00
1a75b56f89 Fix run case 2018-03-01 16:27:27 +01:00
9e30c8934d Copy restart files to run case 2018-03-01 15:53:54 +01:00
25aede1f13 Fix init case 2018-03-01 15:45:05 +01:00
14ab34e1af Update to OF-4.x syntax for init case 2018-03-01 15:29:13 +01:00
86b31017e7 Copied tutorial from outdated feature/cfdemSolverMultiphase branch and started restructuring 2018-03-01 14:58:14 +01:00
9c95cfe2e1 Cleanup 2018-03-01 14:17:43 +01:00
b5304f26de Delete Qt creator project files (#48)
* Delete CFDEM.config

* Delete CFDEM.creator

* Delete CFDEM.files

* Delete CFDEM.includes
2018-02-28 14:53:09 +01:00
c3c8bc002b Added the two-way torque coupling for the immersed boundary solver to impart the influence of fluid viscosity on particle rotation. 2018-02-28 10:18:07 +01:00
a00c423da2 replace direct calls to MPI routines by calls to OpenFOAM routines 2018-02-28 14:39:05 +11:00
e29e3732bc edited recSteps calculation
recSteps was calculated twice in the computeRecPath().
2018-02-27 16:01:44 +01:00
a951310886 Print out information to log file only...
... if verbose is activated.
2018-02-26 14:01:20 +01:00
bc5ef31657 clean unnecessary comments 2018-02-26 14:00:17 +01:00
2fe1f88084 Merge pull request #37 from ParticulateFlow/feature/cleanUp
Feature/clean up
2018-02-26 09:02:33 +01:00
ca81a8f14f Merge pull request #47 from ParticulateFlow/feature/recurrenceDemo
recurrence tutorial: laminar vortex shedding
2018-02-26 08:59:36 +01:00
9fd4f62f21 recurrence tutorial: laminar vortex shedding
This 2D case of vortex shedding in laminar cross-flow demonstrates the
concept of recurrence.

This is a bit work-in-progress: please check whether this tutorial runs with
the recurrence model and tools of CFDEMcoupling, namely rStatAnalysis.

The simulation roughly goes through three stages:
  * The initial solution computed by potentialFoam
  * A period of symmetric, steady-state flow
  * Finally, periodic vortex shedding

These three stages are clearly visible in the recurrence plot.

  * We see how not one of the later velocity fields is similar to the initial one
  * We see the intermediate stage with a symmetric flow field
  * We see the periodic vortex shedding
2018-02-26 17:44:16 +11:00
9304e403b1 Initial commit. Works, but validation pending. 2018-02-23 12:55:17 +01:00
708e4c465c fix output message 2018-02-22 12:14:09 +11:00
d2edf97b05 standardRecModel: skip zero time
Add an optional boolean switch to standardRecModel class to allow
ignoring the 0 directory when building the recurrence data base.

This is useful when using rStatAnalysis as a post-processing tool
on a case where OpenFOAM's purgeWrite feature was used.
If purgeWrite is set to 0, then all time steps will be written to disk.
If purgeWrite is set to N, then only the last N time steps will be stored.
As a new time step is written to disk, the oldest one will be discarded.
However, the 0 directory is excluded from removal.

If purgeWrite is set to 5, and we run a simulation with deltaT=1 und endTime=10,
then the time steps on disk will be: 0, 6, 7, 8, 9, 10.
Running rStatAnalysis on this case, will end in fatal error, as the time step
within the data base will be found to be non-uniform.

The quick and dirty fix, would be to remove or rename the 0 directory, so that
it does not get read. However, telling the recurrence model whether to include
0 or not seems the more elegant solution.
2018-02-22 11:57:54 +11:00
145e5a97cc Cleanup tutorials from run time folders 2018-02-20 11:48:25 +01:00
c4157638c6 Unreacted Shrinking Core Cases from the experimental work of Hanel 2014 2018-02-20 10:54:20 +01:00
6a6b55d2a2 Remove old tutorial cases 2018-02-20 10:46:03 +01:00
8bdb0cefe5 Required Pressure is in Pascal 2018-02-09 14:10:16 +01:00
34897bad97 communicate pressure with DEM 2018-02-08 17:42:37 +01:00
84f54340f6 New recurrence path model for database from multiple, independent intervals (e.g. obtained from symmetrizing operations). 2018-02-08 09:44:41 +01:00
4a3db017f4 Test case for tracers on stationary field. 2018-02-01 07:49:06 +01:00
033c30ba27 Update function arguments. 2018-01-31 14:39:13 +01:00
fe68694a26 Allow for single-snapshot database. 2018-01-31 14:36:40 +01:00
13fe14abf7 Merge pull request #45 from ParticulateFlow/postProc
Post proc
2018-01-30 08:38:43 +01:00
5231566793 Minor cleaning up of cfdemPostproc. 2018-01-30 08:20:45 +01:00
424f21e734 Data exchange model oneWayVTK can now take files from dump custom/vtk and from LPP. 2018-01-30 08:07:24 +01:00
3b8db2aa53 Species order does not change mixture diffusion total
- Fixed initialization error
- Fixed species molar fractions for diffusant and diffuser gases
- Order of species does not have any effect anymore!
2018-01-29 15:34:01 +01:00
e447ca82db Allow to specify DEM dump interval to be read in from couplingProperties. 2018-01-29 15:08:16 +01:00
167ae77c3b Fix H2O molar weight 2018-01-29 09:51:05 +01:00
305b047377 Merge pull request #44 from ParticulateFlow/feature/recurrenceLib_rStat
Feature/recurrence lib r stat
2018-01-17 13:09:44 +01:00
1fea5461c9 Demo case for using rStatAnalysis as post-processing tool.
This case is a simple bubble column, which is run by reactingTwoPhaseEulerFoam.
Upon completion, rStatAnalysis can be run to compute the recurrence statistics
of the bubble column.

This demo case must be run in parallel, as rStatAnalysis apparently does not run
as a single, serial process.
2018-01-16 10:41:52 +11:00
334e2f224e Allow for optional, alternative name/path of the dataBase
This changes nothing from the previous behaviour, however, this allows
to use rStatAnalysis as a post-processing tool. A demo case will follow
to demonstrate this.

By default, the data base is located in $CASE_DICT/dataBase. By specifying
the case dict as the path to the data base, rStatAnalysis can now act on
the case's actual time steps, thus post-processing data computed by another
solver.
2018-01-16 10:30:10 +11:00
c8176256cf Added new utilities to list. 2017-12-20 09:23:40 +01:00
cc4c9a9071 Changed way average field is calculated. 2017-12-20 09:18:46 +01:00
199924cee7 Class noPath to skip calculation of recurrence path. 2017-12-20 07:36:08 +01:00
d9411b56bb Minor bugs fixed. 2017-12-19 16:27:30 +01:00
54f04e6604 Some debugging for rSmoother. 2017-12-18 15:31:32 +01:00
bf2940df57 Moved some member from mother to child class of recModel. 2017-12-18 13:10:41 +01:00
c9a6908aec Utility to perform averaging over similar fields. 2017-12-18 12:25:46 +01:00
589f193b11 Utility to add mirrored fields to time series. 2017-12-18 12:25:07 +01:00
63fdfd9026 Tutorial case for rCFD simulation of heat transfer in a fluidized bed. 2017-12-18 11:42:21 +01:00
056f7e6b56 Started to add functionality to superpose similar fields. 2017-12-07 19:41:50 +01:00
237df644d4 reduce use of sqrt 2017-12-05 12:21:08 +01:00
69e994a532 Delete allocated arrays 2017-11-20 17:09:15 +01:00
3918e451fc Change pressure units to bar
- Get rid of the pow function in equations.
2017-11-20 11:48:51 +01:00
6a7acd7d08 Tutorial case bubbleColumn for rCFD model A. 2017-11-13 07:43:51 +01:00
de33b56c91 Renamed fields in solver. 2017-11-08 17:03:06 +01:00
9cf0e275b7 Add void averaging model. 2017-11-08 17:01:35 +01:00
8a4be85856 Merge remote-tracking branch 'refs/remotes/origin/feature/cfdemSolverRhoPimple' into feature/cfdemSolverRhoPimple 2017-11-08 16:28:34 +01:00
6106fc8710 Latest tutorial case, based on Diss. Hanel Experiments
- ISO 4695 Conditions
- CO + N2 inflow
- Checking single particle unreacted core model
2017-11-08 16:27:52 +01:00
bb94f760c0 remove unnecessary firend deffinition 2017-11-08 16:24:54 +01:00
5730ea3822 Added fvOptions for rCFD solvers. 2017-11-08 15:05:57 +01:00
b9bb7fd8f8 Tutorial case to create a recurrence matrix. 2017-11-08 10:37:46 +01:00
b8f07097ce clean-up of tutorials
* removed all references to non-existent turboEngineM2M locateModel
* proper formatting of turboEngineProps dictionaries
2017-11-08 10:35:27 +01:00
2cad403f20 Added setScalarSumCentre which always uses particle-center-based cells. 2017-10-31 13:33:43 +01:00
be5b056d70 Added functionality to communicate available gas volume per particle. 2017-10-31 13:32:42 +01:00
210e047e15 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-10-30 10:55:51 +01:00
f59b266279 fixed reading of optional parameters; some formatting 2017-10-23 18:08:57 +02:00
963b717811 clean-up and pretty formatting of liggghtsCommandModel and its derived classes
removed an unused member "int stdInterval_" of the class runLiggghts
2017-10-23 17:39:18 +02:00
e329da4227 increase ignorance 2017-10-23 17:05:17 +02:00
7d8d3e115e code clean-up of liggghtsCommandModel and its derived classes
Done away with awful creation of sub-directories for the derived classes of "liggghtsCommandModel"
Followed standard OpenFOAM convention, which can be seen all-over OpenFOAM's sources.
Also fixed some parameter reading from the sub-directories.
2017-10-23 17:00:44 +02:00
fffc80bb33 cleaned-up reading of optional settings, e.g. the verbose boolean; minor style fixes
Made boolean Switches, which are defacto read-only, const variables.
Made increased use of OpenFOAM's own I/O methods for dictionaries, e.g. lookupOrDefault
for optional parameters
2017-10-23 16:59:33 +02:00
1d1ebd132f Merge pull request #36 from ParticulateFlow/feature/cleanUpDoxygenDocumentation
Feature/clean up doxygen documentation
2017-10-23 14:48:17 +02:00
2a11fd78e6 Doxygen setup: minor modifications
Now, environment variables are used, e.g. $CFDEM_VERSION. This closely
follows the set-up of OpenFOAM. Also, some settings were made similar
to OpenFOAM's setup.
2017-09-28 11:08:47 +02:00
95ba62b8e5 Initial commit for Doxygen setup 2017-09-27 17:08:45 +02:00
8f92ff2551 clean-up: remove all references to totalMomentumExchange force model
There is no force model "totalMomentumExchange". There are some references in
the tutorials and the doxygen files. All references to "totalMomentumExchange" have
been removed from the tutorials.
2017-09-27 15:44:15 +02:00
a12a5cbcfa increase ignorance
ignore the "lnInclude" directories
generalized .gitignore setting for build directories
2017-09-27 15:20:09 +02:00
3f4058206a clean-up: remove all references to RongDrag force model
There is no force model named "RongDrag", it is also not mentioned in the
documentation. Thus, it is safe to remove all references to it from the
tutorials.
2017-09-27 15:16:20 +02:00
cd425337dd clean-up: remove all references to DEMbasedDrag
There is force model named "DEMbasedDrag", thus all references to it
in the tutorials can be removed. It is not even mentioned in the
documentation.
2017-09-27 15:10:41 +02:00
8553d55f02 clean up: remove all references to localPSizeDiffSmoothing
The smoothing model "localPSizeDiffSmoothing" does not exist.
Thus, we can clear-out all references to it in the tutorials and
the documentation.
2017-09-27 14:55:03 +02:00
50df2a215b use cfdemCloud getter methods instead of defining some new in forceModel 2017-09-27 08:13:43 +02:00
375686831e Moved tutorials blockMeshDict file to /system 2017-09-22 10:58:50 +02:00
ff41603bc2 Updated tutorials with new /etc location 2017-09-22 10:57:49 +02:00
8054b35f8b Cleanup 2017-09-22 10:56:56 +02:00
bad73896c1 Updated cfdemSolverMultiphase Make/options 2017-09-22 10:55:09 +02:00
eb752cbdd6 Merge branch 'develop' into feature/OF4x-multiphase 2017-09-22 10:31:39 +02:00
ce309cae32 unravel setting of CG factor
do not obfuscate the code by setting CG of cfdemCloud in such a roundabout way:
just get CG from dataExchangeModel, then set it in cfdemCloud
2017-09-21 14:22:10 +02:00
fac3825a28 no need to print out field in verbose 2017-09-21 13:56:25 +02:00
2079017fc6 fix diffusion calculation error 2017-09-21 13:56:06 +02:00
b7562b76c6 comment molar fractions debug info
to be uncommented in the future
2017-09-21 13:55:30 +02:00
0ebaa0b2bd make getter methods const 2017-09-21 13:36:27 +02:00
3c4688826f remove unneeded myType() method
myType() just duplicates OpenFOAM's type() method
2017-09-14 09:27:49 +02:00
ae6902dbd6 Merge pull request #32 from ParticulateFlow/fix/blockMeshDictLocation
Moved blockMeshDict file to system folder
2017-09-13 15:43:17 +02:00
f31cb89065 Fixed merge conflict. 2017-09-08 12:25:32 +02:00
8c2726bc99 Updates from current master branch. 2017-09-08 10:32:20 +02:00
3ab97478a7 Merge branch 'master' into develop 2017-09-07 13:26:37 +02:00
d9e3e2a773 Update tutorial script
- No need for rdef (is deleted)
- Molarmasses must be in kg
- Consider every keyword required for sim to run
2017-09-06 17:54:55 +02:00
b3c451dbc9 Moved blockMeshDict file to system folder
Since OpenFOAM-3.0 it is the convention to put blockMeshDict into system
instead of constant/polyMesh
Having blockMeshDict in system is supported since OpenFOAM-2.3
2017-09-06 10:04:29 +02:00
b8921ec6ca Merge pull request #30 from ParticulateFlow/release
Release 17.08
2017-09-05 16:42:02 +02:00
3b5d46e7cb Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-09-04 15:16:40 +02:00
e4545b8be9 More info for debugging YEqn. 2017-09-04 15:16:20 +02:00
9814464fcf Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-09-04 15:11:51 +02:00
2adc864f0a use pre-increment 2017-09-04 14:59:24 +02:00
da37804145 More path correction for tutorial cases 2017-09-04 14:56:06 +02:00
027592cd95 fix functions.sh path for tutorial cases 2017-09-04 14:53:10 +02:00
ace0e60c8c Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-09-04 13:43:28 +02:00
4e7246381d Some changes for tutorial case with single shrinking particle. 2017-09-04 13:42:53 +02:00
f14ce1b7d2 Output mass source in separate line. 2017-09-04 13:40:55 +02:00
1e7fc386cc test case for unreacted shrinking core model 2017-09-04 13:40:35 +02:00
4bd7f6529e Fix original pressure equation, add alternative formulation. 2017-09-04 13:40:16 +02:00
ac4fa13745 Monitor mass changes. 2017-09-04 13:38:52 +02:00
69d4e6ff02 bump version number 2017-08-31 16:55:39 +02:00
2e14d14a60 Merge pull request #29 from ParticulateFlow/feature/cherry_pick_PUBLIC
Feature/cherry pick public
2017-08-31 16:19:05 +02:00
70617eb360 replace deprecated outputControl and outputInterval
replace with writeControl and writeInterval
2017-08-31 14:50:59 +02:00
c7ee75839b clean up LIGGGHTS scripts 2017-08-31 10:05:19 +02:00
006d9c7cd2 add comment 2017-08-31 09:57:12 +02:00
652e7b3f74 clean up whitespaces 2017-08-31 09:56:50 +02:00
557a9d3fad Changed boundary conditions for tutorial case and some numerical settings. 2017-08-30 19:16:21 +02:00
a761c22ede New path to source. 2017-08-30 14:46:25 +02:00
d1c8707c3e fix issue with voidfraction slightly > 1 in SyamlalThermCond 2017-08-30 13:18:31 +02:00
91b84ca607 fix calculation of timeStepFraction & voidfraction interpolation
merged from PUBLIC
2017-08-29 18:33:55 +02:00
777a50d8b6 Merge pull request #28 from ParticulateFlow/feature/cherry_pick_PUBLIC
Feature/cherry pick public
2017-08-29 10:36:09 +02:00
c4bb208a6a remove unneeded include and clean up whitespaces 2017-08-29 09:26:24 +02:00
dec9b7f959 pre-generate satellite points in engineSearchIB
mostly merged from PUBLIC
2017-08-29 09:15:16 +02:00
93faf28a9f use checkPeriodicCells flag from particleCloud 2017-08-28 17:57:45 +02:00
23616877fb use implicit type conversion 2017-08-28 16:02:58 +02:00
4e50b3e06c clean up whitespaces 2017-08-28 15:57:45 +02:00
8b3878de65 abort on Gauss void fraction model
merged from PUBLIC
2017-08-28 15:57:22 +02:00
f946c5765f use const variable from mathExtra.H 2017-08-28 15:51:02 +02:00
683fd04828 pre-calculate sqrt(3.0)
merged from PUBLIC
2017-08-28 15:42:13 +02:00
9650aff318 protect against division by zero
merged from PUBLIC
2017-08-28 15:41:44 +02:00
d5fbf402cb fix missing include 2017-08-28 15:37:16 +02:00
1b9f7020ac fix parameter in function call 2017-08-28 15:30:51 +02:00
68d9035225 clean up formatting, add some comments 2017-08-28 14:20:51 +02:00
2230dcaa57 rearrange code in MeiLift to save some operations 2017-08-28 12:32:11 +02:00
03ac321754 Merge with dev and corresponding changes. 2017-08-28 10:44:08 +02:00
fd1bffd0e8 Made pressure source term implicit, added debugging option of YEqn. 2017-08-28 07:46:38 +02:00
6e23baba7f fix Mei lift force
The equation was probably taken from the paper of Kurose and Komori
1999, which does not repoduce the original formula given by Mei 1992
correctly (which itself is missing a left parenthesis).
The correct formula can be looked up for example in Mei and Klausner
1994 or Loth and Dorgan 2009
2017-08-25 14:33:50 +02:00
42ecc8656a remove out-dated tutorial cases 2017-08-25 10:33:01 +02:00
bf0ff235b6 use proper data type for counters 2017-08-24 17:19:24 +02:00
e6d12f6790 make debug info live in separate block 2017-08-24 17:18:40 +02:00
9a1abb5f19 clean up whitespaces in mathExtra.H 2017-08-24 17:07:33 +02:00
8df363cf97 add some mathematical constants
cf. OpenFOAM mathematicalConstants.H
2017-08-24 17:06:23 +02:00
5b8072b11a Merge pull request #27 from ParticulateFlow/feature/cherry_pick_PUBLIC
Feature/cherry pick public
2017-08-24 16:17:53 +02:00
2e2701ccf7 remove unneeded parameter finaliser from IOModel::streamDataToPath 2017-08-24 09:58:01 +02:00
5e7b332dd9 clean up whitespaces 2017-08-23 18:02:29 +02:00
adc79029a1 use actual cell id of particles instead of dummy finaliser string 2017-08-23 18:01:22 +02:00
ad6a169ffd output position as position type instead of vector type 2017-08-23 18:00:00 +02:00
53d0988a4e IOModel::streamDataToPath - separate handling of position and vector
vector needs no finaliser
2017-08-23 17:58:41 +02:00
165a2b9611 no need for finalizer in case of 'label' 2017-08-23 17:55:57 +02:00
2e4c93f8ee use info from OFstream to create output file header 2017-08-23 17:52:51 +02:00
668b85582b simplify logic
don't waste any time if type == "origProcId"
2017-08-23 17:50:22 +02:00
6343a6a09c create OFstream on stack instead of heap 2017-08-23 17:45:58 +02:00
76b90cc3cc remove unnecessary copy to temp vector 2017-08-23 17:40:17 +02:00
bce10d17c1 clean up whitespaces 2017-08-23 17:36:22 +02:00
dd2e21be64 create OFstream on stack instead of heap 2017-08-23 17:35:08 +02:00
0aa8672ab1 Renaming diffusion coefficient values 2017-08-23 17:15:06 +02:00
67a5e7cc02 Carry T_exp outside of loop
- Depending on conditions it might be used for either loop
- Added extra comments for info
2017-08-23 17:12:35 +02:00
e1116e471b Merge pull request #26 from ParticulateFlow/feature/environment_setup
Feature/environment setup
2017-08-23 08:58:02 +02:00
67019b0c0b Merge branch 'feature/environment_setup' into feature/cherry_pick_PUBLIC 2017-08-22 15:55:47 +02:00
7ade0c27a7 Sourcing CFDEMcoupling: one-stop bashrc / cshrc
* a single bashrc / cshrc file for CFDEMcoupling, similar to OpenFOAM
* user-editable section on top, for:
- setting the versions of OpenFOAM and CFDEMcoupling
- setting installation paths
- setting user directory path
* allows to set/unset values from command-line parameters (important for
test harness installation)
* removed unused and deprecated environment variables
2017-08-22 14:36:12 +02:00
df1bf48938 clean up whitespaces in cfdemSystemTest.sh 2017-08-22 13:24:54 +02:00
a87ed03b61 display PATH env var in cfdemSysTest
We will add bin and library paths for cfdemcoupling binaries and
libraries in the future -> display PATH to see if they are set correctly
2017-08-22 13:23:30 +02:00
9f7c801fbe remove output of liggghts lib name in cfdemSysTest
with cmake compilation in place, it's always libliggghts.so
2017-08-22 13:19:57 +02:00
52eed4b351 remove check for pizza dir from cfdemSysTest
we don't use pizza anymore, just lpp
2017-08-22 13:18:09 +02:00
8f11235d08 update make options for compressible library
use same flags as for incompressible library
2017-08-22 13:15:13 +02:00
15b7c43839 remove unneeded environment variables
libraries do not exist or are never used
2017-08-22 10:41:35 +02:00
579264952f remove unneeded includes 2017-08-21 13:17:52 +02:00
116bf952ab remove commented out code 2017-08-21 13:17:26 +02:00
1213c90a50 clean up whitespaces and formatting 2017-08-21 13:09:33 +02:00
b2b3363104 add procBoundaryCorrection for dividedVoidfraction in case of engineIB 2017-08-21 12:40:10 +02:00
8b6222ba79 remove method no longer needed
using base class method
2017-08-21 12:34:45 +02:00
8e73260cb4 limit voidfractionNext and scale to values >= 0 2017-08-21 12:33:02 +02:00
777a9e06ec refactor IBVoidFraction class
move duplicate to separate function
2017-08-21 12:32:09 +02:00
4ac84930c5 add braces 2017-08-21 12:24:25 +02:00
10fd332943 correct boundary conditions of voidfraction field
correct BCs after modifying the voidfraction field
2017-08-21 12:23:41 +02:00
3dc7b6a150 pre-generate marker points in dividedVoidFraction class
generate marker points for unit sphere once and just scale these points
for each particle instead of constantly recalculating them
2017-08-18 11:35:30 +02:00
3f8885c9b7 add functions to get min dist of point to periodic particle image
add functions to voidFractionModel class to determine minimal distance
of a point to one of the periodic images of a particle
2017-08-17 17:13:16 +02:00
dc3f93f401 change cg incompatibility error to warning by default
added switch 'cgWarnOnly' to choose between warning (default) and error
2017-08-17 16:50:51 +02:00
5f123bb6a1 use flag from cfdemCloud for checking periodic cells in dividedVoidFraction class 2017-08-17 16:34:56 +02:00
123280958b use flag from cfdemCloud for checking periodic cells in IBVoidFraction class 2017-08-17 16:33:43 +02:00
1a98e6eaee determine necessity of periodic cell check in cfdemCloud class
only check for periodic cells in submodels if all boundary patches are
cyclic
2017-08-17 16:30:09 +02:00
807c6e30e7 fix memory leak
anything new shall be deleted;
2017-08-17 15:09:40 +02:00
1b51d5ce21 proper member initialization
allocating memory of zero size will produce useless pointer
set to NULL instead
2017-08-17 15:09:39 +02:00
fd6d9164c4 remove unneeded checks
according to standard, freeing a null pointer is a nop
some archaic C runtimes may have crashed on it in times long past
2017-08-17 15:09:39 +02:00
ec5ed28885 construct field as copy resetting name 2017-08-17 15:09:39 +02:00
df1be8e004 add trilinear void fraction source file to make file 2017-08-17 15:09:39 +02:00
a4bf2fdd42 add range check for imExSplitFactor value 2017-08-17 15:09:39 +02:00
ee06cc84cb construct field as copy resetting name 2017-08-17 15:09:39 +02:00
2c05e6e65f add trilinear void fraction model from PUBLIC 2017-08-17 15:09:39 +02:00
36d5805d2a shorter access methods 2017-08-17 15:09:39 +02:00
ab49a51003 const correctness 2017-08-17 15:09:39 +02:00
5563b9bd9c fix bug introduced in 13da1dd890
methods must have same const qualifier as in base class
2017-08-17 15:09:39 +02:00
14f5af4727 clean up whitespaces in tutorial run scripts 2017-08-16 15:43:41 +02:00
1fed0679a9 adjust tutorial run scripts to new etc location 2017-08-16 15:41:11 +02:00
d577248752 Added temporal smoothing to Make/files 2017-08-03 13:48:03 +02:00
134a511488 Reorginzied function objects and updated plot script 2017-07-28 13:25:32 +02:00
46567490e1 Cleanup of old function object syntax 2017-07-26 13:45:12 +02:00
35d35339d2 tankDrainage tutorial case updated to OpenFOAM-4.x 2017-07-26 12:55:46 +02:00
7320c1f5cf update case and decrease rhoMin
Case working fully with chemistry/diffusion/massTransfer terms
2017-07-18 15:31:09 +02:00
a1c47377fd cleanup and use noSlip 2017-07-18 15:29:27 +02:00
ca6dbf6f12 cleanup DEM scripts 2017-07-18 15:28:32 +02:00
28ddc53754 decrease rhoMin to avoid pressure divergence 2017-07-18 15:27:56 +02:00
bc2de27abf cleanup tutorial case 2017-07-18 15:27:36 +02:00
305b1a75a2 increase temperature 2017-07-18 15:27:05 +02:00
bf3e3260c4 cleanup 0 folder 2017-07-18 15:26:58 +02:00
3162ae65d1 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-07-14 13:08:50 +02:00
47c442ade1 add noise cancellation for molar fraction
Give screen output for pressure and volDiff
2017-07-14 13:07:16 +02:00
3cc5f288ff correct how Multicomp. mix diffusion for species is calculated 2017-07-12 12:05:55 +02:00
31e2cc5e8f Ensure no negative values (e.g. due to numerical noise) are communicated. 2017-07-11 14:57:44 +02:00
3fb41b3b41 Measure time used for gas-phase chemistry. 2017-07-11 10:19:06 +02:00
386487839f Adapted tutorial case: lower reaction rate, temperature limits. 2017-07-11 10:17:24 +02:00
a98ef63fa0 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-07-10 15:22:51 +02:00
077b355767 Adapted tutorial case for Arrhenius-shrinking particle. 2017-07-10 14:08:39 +02:00
23a2f0f450 change name of mole, and calc. of molar conc. in diffusion. 2017-07-10 13:25:39 +02:00
d520a8f642 Moved look-up of molar fraction fields in init() function because they do not exist at time of construction yet. 2017-07-10 11:32:15 +02:00
1a5f0f3cdf Adapted test cases to usage of molar fractions. 2017-07-06 14:39:27 +02:00
ccd45546f7 Use molar fractions instead of mass fractions. 2017-07-06 14:36:22 +02:00
847b8cb565 Changed name and calculation of molar concentration. 2017-07-06 14:35:49 +02:00
cc3e8f7495 cleanup 2017-07-03 14:15:53 +02:00
4a0b96191b Added functionality to temporally smoothen a vector field 2017-07-03 13:47:51 +02:00
f91b4e4266 Added smooth pressure force to 4.x 2017-07-03 09:55:39 +02:00
065373049d Added temporal smoothing model to 4.x 2017-07-03 09:55:04 +02:00
512f28c9a0 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-06-30 10:15:52 +02:00
9b6a643b0d Monitor total and current mass source. 2017-06-30 10:13:38 +02:00
349793270e Corrected dimensions. 2017-06-30 10:12:50 +02:00
0be782084d Changed solver to density-based thermodynamics. 2017-06-30 10:12:24 +02:00
29c417f018 Test case for shrinking particles and reactions within gas phase at fixed temperature and volume. 2017-06-30 10:09:42 +02:00
fb9b5e9b32 Changed settings in test case Shrinking_particle_model to density-based thermodynamics. 2017-06-30 08:08:23 +02:00
4a3496a48f change location where X array is defined 2017-06-29 15:22:08 +02:00
5cc0709fe1 add molar fraction as given property 2017-06-29 14:30:50 +02:00
069b824765 add default names to chem. models as not to repeat in coup. props. 2017-06-28 15:48:57 +02:00
e9f69b08ee Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-06-28 15:10:30 +02:00
e26032115c computes in case 2017-06-28 15:10:12 +02:00
34a05f9c14 Added post folder. 2017-06-27 10:28:53 +02:00
04991d42a0 Cleaning up test case. 2017-06-27 10:19:38 +02:00
ccf3da3ac6 Enforce sum_i Y_i = 1. 2017-06-27 10:09:44 +02:00
61e4c68486 Changed scope of rhoeps for monitoring purposes. 2017-06-27 10:08:07 +02:00
5d9a2384d3 Activate mass source terms from gas-solid reactions. 2017-06-27 10:05:04 +02:00
55bb185ef3 Cleaning up chemistry models. 2017-06-27 10:00:43 +02:00
c5e97bcc3c Eventually, mass sources need to be included. 2017-06-23 11:56:49 +02:00
44e78b5cc1 Replaced equal with correct non-equal sign. 2017-06-23 11:56:12 +02:00
ed0cbc50a7 Added missing time-step factor for source terms. Added possibility to execute species model only every Nth step. 2017-06-23 11:16:53 +02:00
0c0f6d5b10 Merge branch 'feature/cfdemSolverRhoPimple' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-06-23 10:05:20 +02:00
d65eb73516 modify force models acc. to cherry pick 2017-06-23 09:43:12 +02:00
93d3c2c163 add floating point limiation 2017-06-23 09:42:54 +02:00
ff4dcf804c Moved particle-fluid energy flux outside PIMPLE loop. Needs to be done only once per time step. 2017-06-23 08:53:49 +02:00
579054e9c2 Merge branch 'master' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/cfdemSolverRhoPimple 2017-06-23 08:32:49 +02:00
9b1fab0f00 Auto write density 2017-06-22 12:35:33 +02:00
5c17f4b7a3 Fixed mixture viscosity calculation to avoid numerical difussion 2017-06-22 12:27:55 +02:00
03cb141cb3 add limitations for diff. 2017-06-22 11:55:46 +02:00
13987f0ba3 Basics for statistical analysis of recurrence matrix. 2017-06-22 09:13:48 +02:00
e488ef863f update tutorial case 2017-06-21 11:45:12 +02:00
347b83ee2a tot mol for various gases 2017-06-21 11:42:13 +02:00
96e4b8f454 testmerge 2017-06-20 16:05:10 +02:00
df221a2407 modified tot. binary. diffusion, add comments for future reference.
Changed the molar fraction calculation for stagnant species. Now only
considers the molar fractions other then the reactant gas.

Should be fixed when using multiple species.
Dcoeff calculation also should be resetted when using other gases.
2017-06-20 15:34:58 +02:00
e58aad0a2a fix units 2017-06-19 16:02:13 +02:00
072c27529c add limitation for Rep 2017-06-14 13:29:27 +02:00
2c73184e28 rewoke pressure transfer - no need/not used 2017-06-14 13:29:08 +02:00
feeca38458 free memory with dat. ex. model 2017-06-13 15:33:43 +02:00
98de197258 transfer nu and Rep data to DEM 2017-06-13 11:01:03 +02:00
42ad14182f add verbose functionality 2017-06-13 11:00:32 +02:00
61337dfe70 cleanup 2017-06-12 17:14:28 +02:00
9bd2fcf326 introduce enum for forceSubModel switches 2017-06-12 16:07:39 +02:00
fe24c2c7ed fix some more const madness 2017-06-12 15:44:29 +02:00
5a52141ed7 add verbose, change nu calculation 2017-06-12 15:13:53 +02:00
89c29fb9d5 free all. memory with dataExchangeModel, cleanup whitespaces 2017-06-12 15:13:12 +02:00
3d0225127c add verbose opt. 2017-06-12 13:28:37 +02:00
250f7e0c60 add props for mass transfer 2017-06-09 15:38:19 +02:00
d31288a36e add basics for mass tran. coeff. calculation 2017-06-09 15:37:02 +02:00
13da1dd890 make clock model indpendent of cfdemCloud
New version only depends on valid Foam::Time instance
2017-05-24 11:53:29 +02:00
04119c6934 update tutorial case 2017-05-23 09:49:22 +02:00
e745512252 some comments 2017-05-23 09:49:06 +02:00
c19b04e6d0 save local variable 2017-05-19 14:40:26 +02:00
e11697a9f2 fix some more const madness 2017-05-19 14:35:26 +02:00
ac4c80e148 fix some const madness
generally:
setter methods should not be const
getter methods are predestined candidates for const
2017-05-18 16:56:46 +02:00
232e8a75d0 use better name for volScalarField 2017-05-18 14:10:00 +02:00
e8f8f4668d disable some warnings in make options for compressible
use the default 7 hexadecimal digits as the abbreviated object name;
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)
(same as in 80aaf69748 and
9e478e23a6)
2017-05-18 14:08:33 +02:00
b2a089a444 fix some typos 2017-05-18 13:59:01 +02:00
b9cff039ad fix up probe model
remove internal vProbes and sProbes and corresponding getter functions
since the data structures are unsuitable and they are not used anywhere
else;
remove misleading const specifiers from methods and the excruciating
mutable specifiers;
use const references as parameters where appropriate;
2017-05-18 13:57:58 +02:00
41788a1c95 Output recurrence jump vector. 2017-05-17 12:40:34 +02:00
3c0012294f update and fix SPM tutorial case 2017-05-16 15:10:36 +02:00
6a636658aa added grid coarsening/particle coarsening corrections to Beetstra drag model 2017-05-16 13:55:12 +02:00
9113908429 clean up whitespaces 2017-05-16 11:40:27 +02:00
a6875d8a4a use typename of force models for log file name 2017-05-16 09:37:50 +02:00
e84daeaf15 update Temperature in test_case 2017-05-12 13:34:02 +02:00
8a4fc7c3d4 fix dBinary, dCoeff scalar lists, add push to DEM 2017-05-12 12:46:33 +02:00
f8eb939de9 cleanup 2017-05-12 10:24:30 +02:00
1f82914428 calculate binary diffusion coefficient and mixture diffsuion coefficient 2017-05-12 10:24:15 +02:00
1e5bc6ef89 remove unneeded checks
delete NULL is a valid operation
2017-05-12 10:06:03 +02:00
d1dc21acb8 clean up whitespaces 2017-05-11 19:12:07 +02:00
dc8ca8b520 pass label by value instead of reference
index does not get modified; also avoid potential problems in case int
needs to be cast to a label of different size;
2017-05-11 19:10:12 +02:00
dfece32f5f clean up whitespaces 2017-05-11 18:21:53 +02:00
dd54ca1bba what has been allocated must be destroyed
new - delete
malloc - free
allocateArray - destroy
Programming 101: Don't mix them!
2017-05-11 18:00:54 +02:00
e265039fed remove superfluous namespace scoping 2017-05-11 17:02:38 +02:00
b04810f2c5 use proper data type 2017-05-11 16:38:11 +02:00
ea71689908 remove unused function 2017-05-11 16:27:02 +02:00
7673564896 fix up shortcuts for running LIGGGHTS 2017-05-11 15:23:36 +02:00
d78985fc83 remove dummy fields 2017-05-10 12:50:36 +02:00
f1eaed68e9 change volScalarField Smi fnction 2017-05-10 12:50:22 +02:00
b1bc6de4ff case to test diffusion coefficient 2017-05-10 11:45:38 +02:00
3f745df3db convert mass to mole fractions 2017-05-10 11:44:32 +02:00
1c91471ceb add totalMole field, hastables for molMass & diffVol 2017-05-09 15:27:20 +02:00
782cca6506 add dummy volScalarField, for testing 2017-05-09 12:04:07 +02:00
fa6b0ecf77 define and initialize variables 2017-05-08 17:24:11 +02:00
1b6dcc0183 define chemistry models in couplingProperties as list 2017-05-08 14:45:47 +02:00
d31a2f8fbb Smi read from 1st chem model / species 2017-05-08 14:44:57 +02:00
c02f3f15fa add diffusion_coefficient to lib 2017-05-08 14:10:56 +02:00
45af7ee546 Fixed tutorial errors 2017-05-03 13:27:25 +02:00
2f532af9bb update make options to include OFversion header location 2017-05-02 17:51:00 +02:00
4cbec2cffe adjust shell scripts to new etc location 2017-05-02 17:50:02 +02:00
2a77e96af0 rename dummy file to .gitignore 2017-05-02 16:51:28 +02:00
57a929dce2 move etc directory to CFDEM_PROJECT_DIR 2017-05-02 16:49:22 +02:00
833b1dc1d1 remove void test case 2017-05-02 14:57:23 +02:00
f0e1cbc94d Merge pull request #21 from ParticulateFlow/fix/uniformFixedValueVoidfractionBC
writing the value field inherited from fixedValue BC; fixing #20
2017-05-02 13:35:27 +02:00
1130005a52 update tutorial cases 2017-04-28 10:53:31 +02:00
514b6e8bab update tutorial case for USCM 2017-04-28 10:51:31 +02:00
d7ddb5face update tutorial to include pressure field name 2017-04-28 10:50:32 +02:00
7b156c5518 Consistent naming. 2017-04-27 14:45:15 +02:00
fba3a69243 writing the value field inherited from fixedValue BC; fixing #20 2017-04-25 14:47:07 +02:00
8dd1acfc83 Handling of hash table. 2017-04-20 17:59:54 +02:00
0ab701b246 Class that will calculate diffusion coefficients. 2017-04-20 17:37:48 +02:00
c0164b4f5a Latest tutorial case for 3layer Unreacted Core Model 2017-04-19 15:20:25 +02:00
0562ba1cd4 uncomment verbose 2017-04-18 09:14:36 +02:00
cb18593830 add CFDEM_LIGGGHTS_BIN_DIR to cfdemSysTest
path must not be empty for building LIGGGHTS via cmake (default)
resolves #19
2017-04-10 11:36:48 +02:00
176544c72f change order of vectors 2017-04-05 11:51:10 +02:00
9ffaeb32ac switch read direction 2017-03-28 16:04:28 +02:00
50bb355dbb working tutorial case for 3 layer shrink - only chem resist active 2017-03-27 10:51:51 +02:00
f84018214c add transfer of pressure at part. loc. 2017-03-27 10:49:33 +02:00
61ed3677bc cancel output of debug info 2017-03-27 10:49:01 +02:00
7e8d358911 add N2 props 2017-03-20 09:56:21 +01:00
6d007f7c97 minor changes, add rel layer radius output 2017-03-20 09:50:32 +01:00
69f93a1e27 Merge pull request #16 from ParticulateFlow/master
update develop with latest changes to master
2017-03-08 16:50:57 +01:00
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
a5a76110f7 Merge pull request #13 from ParticulateFlow/feature/recurrenceLibFixWarnings
fixed header
2017-03-06 16:29:47 +01:00
d7343605ce fixing more sloppy errors of myself 2017-03-06 16:24:28 +01:00
7ac6ee3937 fixed header 2017-03-06 16:18:33 +01:00
1536a6da54 Merge pull request #12 from ParticulateFlow/feature/recurrenceLibFixWarnings
Feature/recurrence lib fix warnings
2017-03-06 16:15:54 +01:00
a725249334 fix warning : control reaches end of non-void function [-Wreturn-type] 2017-03-06 16:08:54 +01:00
9c12f6acb0 ignore build folders lnInclude and linux64Gcc* 2017-03-06 16:08:05 +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
3718b7326d make SPM tut case work with N 2017-03-02 15:42:59 +01:00
f92ab5b6a7 add comm for N field 2017-03-02 15:41:45 +01:00
ea66961ba6 add W, and N fields to solver 2017-03-02 15:41:23 +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
0924b618f5 minor mods 2017-02-24 13:12:36 +01:00
3078b3af1b cleanup species 2017-02-24 09:42:58 +01:00
7f766b3afe added total mole field 2017-02-24 09:42:26 +01:00
cf3a6a5cbe changed molecular weight 2017-02-24 09:41:21 +01:00
44d111345d modify to include mole field 2017-02-23 16:13:32 +01:00
b85748ea3f added total mole field comm. 2017-02-23 16:13:10 +01:00
9b69b035d6 added calculation of mole field 2017-02-23 16:12:37 +01:00
4da55dd812 generate total mole field 2017-02-23 16:12:17 +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
38712e6c33 fixed gas properties 2017-02-09 16:25:09 +01:00
368f2550d8 update 3layer tutorial to OF4X 2017-02-07 15:14:25 +01:00
b9bf777116 Update createFields for OF4x 2017-02-06 09:35:11 +01:00
c334ef1f7f Update tutorial to OF4x 2017-02-06 09:32:54 +01:00
c69faa5e98 fixed compile errors 2017-02-03 14:42:52 +01:00
8e96e7d59a resolving update issues solverpimplechem 2017-02-03 13:03:16 +01:00
f30f8fd62b removed cfdemSolverPisoTemp 2017-02-03 13:02:32 +01:00
4a24c35c67 modifed solver 2017-02-03 12:20:08 +01:00
daa24bcfda update 3layer tut case 2017-02-03 10:50:55 +01:00
d2d3af79a0 adding merge deleted files 2017-02-03 10:44:10 +01:00
b858c75a93 update solver Eqn's 2017-02-03 10:43:48 +01:00
f3b0502612 Mergeing feature/fines into cfdemSolverRhoPimpleChem 2017-02-03 10:35:46 +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
a83140ee71 Recurrence statistics analysis and some minor changes. 2017-01-17 10:34:54 +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
9867e0188c Added comment. 2016-12-13 10:39:45 +01:00
0c6791ed28 delete old case 2016-12-12 13:42:23 +01:00
6fdae86988 some tweaks in tutorial case 2016-12-12 13:40:23 +01:00
2a5a9e863a fixed post, minor changes in init 2016-12-04 21:50:31 +01:00
56f8aad5a6 Some cleaning up. Appropriate handling of Cv and Cp. 2016-11-29 15:41:37 +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
c44e375473 Automatically determine fraction of DEM and CFD timesteps. Read coupling substep from recProperties file. 2016-11-22 11:32:46 +01:00
55a7d967e0 updated tutorial case 2016-11-18 13:30:35 +01:00
3b352ef16a tutorial case for chem/shrink/core 2016-11-16 16:16:00 +01:00
f84180b2c5 Improved particle temperature averaging. 2016-11-16 15:42:35 +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
c18e671956 Get time measurements right. 2016-10-31 11:22:43 +01:00
f1a448883a Put verbose part at right place. 2016-10-31 08:05:35 +01:00
0d0803e057 Implicit heat transfer. 2016-10-27 16:41:13 +02:00
bfe3836dc4 Merge branch 'feature/recurrenceLib' of https://github.com/ParticulateFlow/CFDEMcoupling into feature/recurrenceLib 2016-10-27 16:39:35 +02:00
c3388c5238 Various changes. 2016-10-27 16:39:01 +02: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
e268853de8 Fixing minor errors. 2016-09-26 13:28:31 +02:00
a3f903e02f Allow monitoring of Re and Nu. 2016-09-26 13:27:47 +02:00
9b28453113 read verbosity flag from recProperties
The classes recNorm and recModel also read the verbose flag from the
dictionary recProperties, as recModel has been doing. Up to now, the
boolean verbose_ of recNorm and recPath was initialized to "false" in the
initialisation list of the constructor. This made all if(verbose_)
tests in child classes of recNorm and recPath useless.
2016-09-20 10:14:34 +02:00
9c6d46b9ac changes in tutorial case 2016-09-20 08:33:11 +02:00
68eb34c7d9 fixed species transfer 2016-09-20 08:32:40 +02:00
fc0a6e64e3 Just one blank space. 2016-09-15 17:44:34 +02:00
fb311ae59b Temperature equation added. 2016-09-15 17:43:21 +02:00
05c1ed01e6 Export specific heat. 2016-09-15 17:42:35 +02:00
b6b2e7d1f4 Different treatment for velocity fluctuations. 2016-09-15 15:40:34 +02:00
ad3e9641e5 Fluxes. 2016-09-15 15:40:01 +02:00
dc734e39d0 Recurrence CFD with OF4.x, added solver for heat transfer. 2016-09-14 15:55:17 +02:00
01c1d60822 Update boundary conditions of wallQFactor. 2016-09-14 11:01:25 +02:00
9ffdc33ce5 Merge with OF4x; added some heat transfer related models. 2016-09-13 15:16:34 +02:00
fb99b20e8b Updating recLib. 2016-09-13 14:11:22 +02:00
82eaa3047c fix merge error 2016-09-12 13:55:14 +02:00
2477d40f7b working case reupload 2016-09-12 13:53:13 +02:00
9439089c05 latest working tutorial case 2016-09-12 13:49:52 +02:00
88f858a366 small changes 2016-09-06 15:34:10 +02:00
8e5c2df15d fix tutorial tses 2016-09-01 17:13:58 +02:00
cc88f66a48 added voidfraction into account 2016-09-01 17:13:18 +02:00
6835e86ab6 latest tutorial with multiple particles 2016-09-01 09:21:40 +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
58cc670128 latest tutorial case 2016-08-23 15:56:08 +02:00
8a1d096c56 reactionHeat Model added to energyModels 2016-08-23 15:55:27 +02:00
0e6e35006b fixed concetnration change on Eu-field 2016-08-18 09:04:41 +02:00
889eb45f14 minor fixes 2016-08-11 15:36:04 +02:00
cfe4254674 memory allocation to consider particles 2016-08-11 08:47:37 +02:00
42eacb256c changed int value to length 2016-08-10 14:53:21 +02:00
bf50c9b91d latest working tutorial case 2016-08-10 14:47:29 +02:00
cc308f841d debugging 2016-08-10 14:44:32 +02:00
1d48ed1b5f fixed memory allocation 2016-08-10 14:43:44 +02:00
0b88a5596c latest working solver 2016-08-10 14:43:06 +02:00
fff2eb3f35 Added smooth pressure gradient force model 2016-08-10 13:49:15 +02:00
6726c32fc7 pisoTemp solve was missing 2016-08-10 13:44:41 +02:00
fc95fef1ba update tutorial 2016-08-05 12:05:33 +02:00
dd33dcec5f added smi to chem model 2016-08-05 12:05:07 +02:00
69c2673e58 changes in no chemsitry model 2016-08-05 12:04:26 +02:00
b409fdf57d added solver and library to compile lists 2016-08-04 16:38:46 +02:00
21af66f36c multiphase tutorials updated 2016-08-04 16:23:50 +02:00
c7a57d1169 surfaceTension force model added 2016-08-04 16:01:13 +02:00
7b06e4d3a2 multiphase solver reworked to OF4.x 2016-08-04 16:00:50 +02:00
91858c93aa Diffusion of dyn hold up. 2016-08-04 14:40:57 +02:00
39f6b20de9 latest fix for tutorial case 2016-08-04 14:34:31 +02:00
cf2f4094f9 fixed species mass fields with deltaT 2016-08-04 14:33:28 +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
865c52834f Some restructuring. 2016-08-01 14:43:07 +02:00
3ff2ae9daa Some renaming and restructuring. 2016-08-01 07:14:45 +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
561f7fa865 Some cleaning up. 2016-07-22 08:08:50 +02:00
907054872b Cleaning up. 2016-07-21 15:28:05 +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
1fe6ce4788 Move recurrence stuff to own class. 2016-06-15 14:43:01 +02:00
af47724556 Move recurrence stuff out of cloud, create own structure for it. 2016-06-10 07:52:31 +02:00
3517e71e6d Refactoring of rCFD framework. 2016-06-09 20:48:27 +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
09726b8582 Recurrence CFD going to new format. 2016-04-15 11:17:01 +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
5d31a644c5 Timing. 2016-01-20 16:04:47 +01:00
1e3062c8b7 Some cleaning up of the fluctuation model. 2016-01-08 10:03:38 +01:00
06dfa5430a Changed fluctuation model. 2015-12-18 10:56:32 +01:00
d454396dd0 Minor changes. 2015-11-11 12:23:58 +01:00
e0b1837476 Recurrence solver based on model A. 2015-11-10 08:46:58 +01:00
41670f2446 Allow for empty averaging and voidfraction models. 2015-11-10 08:44:53 +01:00
30a216a934 Tracer model about to be removed. 2015-11-06 11:47:36 +01:00
8fc8c1991c Minor changes. 2015-11-05 17:04:07 +01:00
6a0928b188 Read or calculate fluxes. 2015-11-04 20:32:53 +01:00
0515ecd2d2 Handling tracer particles in recurrence CFDEM. 2015-11-04 11:59:51 +01:00
9b134cb9db Minor adaptions. 2015-11-04 11:58:53 +01:00
2abbdf1f51 New fluctuation model. 2015-10-29 18:40:26 +01:00
810217b4ad More options for fluctuations. 2015-10-25 11:45:17 +01:00
6124f12d15 Allow for velocity fluctuations. 2015-10-24 18:58:41 +02:00
061758b1e6 Messing around. 2015-10-23 12:13:56 +02:00
963f00d2c4 Might need smoothing for gradient force. 2015-10-23 11:27:43 +02:00
87f91613d7 Minor adaptions. 2015-10-22 15:36:14 +02:00
839e00a00e Added force model depending on error in voidfraction. 2015-10-20 15:35:24 +02:00
434ffad1e9 Switched from auto pointers to pointers to be returend from class standardRecModel. 2015-10-20 12:20:02 +02:00
f058371f65 Added forceModelRec gradConcentration. Will take care to adjust particle number density. 2015-10-16 11:16:35 +02:00
6d6ebf1629 Fixed velocity transfer from OF to LIGGGHTS. 2015-10-16 10:18:17 +02:00
4e60f9c9a8 Recurrence fields accesible via autoPtr now. 2015-10-15 16:28:45 +02:00
8deb1b7b9c Avoid overwriting of velocities. 2015-10-14 08:25:00 +02:00
fed7e6422c Changed local variable to member of class. 2015-10-14 08:18:20 +02:00
09d55794a5 Fixed bug in broadcasting array. Some processors had reserved too little space. 2015-10-13 14:53:34 +02:00
c38449cacd Runs. Sometimes. 2015-10-13 12:55:43 +02:00
b55ba48801 Still crashes on execution. 2015-10-12 15:43:58 +02:00
4aa3d944d5 Restored old version. 2015-10-12 14:43:51 +02:00
c07508f147 Changed path to start compilation in the correct directory. 2015-10-12 13:55:45 +02:00
68f158a3ae Changed how initial fields are provided. 2015-10-09 14:13:22 +02:00
859c26f4bb Compiles now. Crashes on execution. 2015-10-09 12:22:05 +02:00
0b5d507281 Minor changes. 2015-10-08 17:59:27 +02:00
2e93d70940 Might compile now. 2015-10-08 16:12:00 +02:00
433ce8e7fe Source files compile. Solver does not. 2015-10-08 14:12:56 +02:00
63f4497727 New class for recurrence forces. 2015-10-07 18:23:34 +02:00
4282dcf080 More rearranging. 2015-10-06 16:55:13 +02:00
6bb64cd937 Hardly anything new. 2015-10-04 18:21:12 +02:00
c97f483f64 Shoving pieces of code back and forth. 2015-10-02 11:28:58 +02:00
1307dd7153 Some restructuring. 2015-10-01 22:08:16 +02:00
1ebaea53a1 Minor changes, far from being useful. 2015-09-30 19:36:09 +02:00
de96a638a3 Some files for new recurrenceCFD solver. Far from working. 2015-09-30 00:12:15 +02: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
3749 changed files with 6129540 additions and 55934 deletions

72
.circleci/config.yml Normal file
View File

@ -0,0 +1,72 @@
version: 2
jobs:
build:
branches:
only:
- master
- develop
docker:
- image: ubuntu:trusty
environment:
WM_NCOMPPROCS: 2
working_directory: /root/CFDEM/CFDEMcoupling
steps:
- run:
name: Install package dependencies
command: sudo apt-get update && sudo apt-get install -y build-essential cmake openmpi-bin libopenmpi-dev python-dev git bc
- run:
name: Make project and user dir
command: mkdir -p /root/CFDEM/CFDEMcoupling && mkdir -p /root/CFDEM/-6
- checkout:
path: /root/CFDEM/CFDEMcoupling
- run:
name: Add OpenFOAM package repository
command: sudo apt-get install -y software-properties-common wget apt-transport-https && sudo sh -c "wget -O - http://dl.openfoam.org/gpg.key | apt-key add -" && sudo add-apt-repository http://dl.openfoam.org/ubuntu
- run:
name: Install OpenFOAM 6
command: sudo apt-get update && sudo apt-get -y install openfoam6
- run:
name: Clone LIGGGHTS repository
command: git clone https://github.com/ParticulateFlow/LIGGGHTS-PFM.git /root/CFDEM/LIGGGHTS
- run:
name: Build LIGGGHTS
command: >
shopt -s expand_aliases &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileLIGGGHTS.sh
no_output_timeout: 30m
- run:
name: Build CFDEMcoupling library
command: >
shopt -s expand_aliases &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_src.sh
- run:
name: Build CFDEMcoupling solvers
command: >
shopt -s expand_aliases &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_sol.sh
- run:
name: Build CFDEMcoupling utilities
command: >
shopt -s expand_aliases &&
source /opt/openfoam6/etc/bashrc &&
source /root/CFDEM/CFDEMcoupling/etc/bashrc &&
bash /root/CFDEM/CFDEMcoupling/etc/compileCFDEMcoupling_uti.sh

24
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,24 @@
<!-- Please provide a general summary of your changes in the title above. -->
## Description of proposed changes
<!-- Describe your changes in detail. -->
## Types of changes
<!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply. -->
<!-- Please try to limit your pull request to one type, submit multiple pull requests if needed. -->
- [ ] Bugfix
- [ ] Feature
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation updates
- [ ] Other (please describe):
## Checklist
<!-- Go over all the following points, and put an `x` in all the boxes that apply. -->
- [ ] Code compiles correctly (mandatory for bugfixes / features / refactoring / build process)
- [ ] Tests for the changes have been added / updated (mandatory for bugfixes / features)
- [ ] Documentation has been added / updated (mandatory for bugfixes / features)
## Further comments
<!-- If this is a relatively large or complex change, kick off the discussion by explaining
why you chose the solution you did and what alternatives you considered, etc... -->

6
.gitignore vendored
View File

@ -5,4 +5,10 @@
log_*
log.*
*~
*.swp
*.swo
**/linux*cc*/
**/.vscode
lnInclude

674
LICENSE Normal file
View File

@ -0,0 +1,674 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.

81
README
View File

@ -1,81 +0,0 @@
/*---------------------------------------------------------------------------*\
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 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(R) coupling provides an open source parallel coupled CFD-DEM framework
combining the strengths of 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(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.
The coupled solvers run fully parallel on distributed-memory clusters.
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
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 CFDEM(R)coupling
- "tutorials" directory including basic tutorial cases showing the functionality
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.
CFDEM(R)coupling stands for Computational Fluid Dynamics (CFD) -
Discrete Element Method (DEM) coupling.
CFDEM(R)coupling is an open-source code, distributed freely under the terms of the
GNU Public License (GPL).
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 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.
\*---------------------------------------------------------------------------*/

33
README.md Executable file
View File

@ -0,0 +1,33 @@
# CFDEMcoupling
CFDEM®coupling stands for Computational Fluid Dynamics (CFD) - Discrete Element Method (DEM) coupling. It combines the open source packages OpenFOAM® (CFD) and LIGGGHTS® (DEM) to simulate particle-laden flows. CFDEM®coupling is part of the [CFDEM®project](https://www.cfdem.com).
[![CircleCI](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling.svg?style=shield&circle-token=7e8118524babddbefccf4e3608a7545d405acbb4)](https://circleci.com/gh/ParticulateFlow/CFDEMcoupling)
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
## Disclaimer
> This is an academic adaptation of the CFDEM®coupling software package, released by the
[Department of Particulate Flow Modelling at Johannes Kepler University in Linz, Austria.](https://www.jku.at/pfm)
> LIGGGHTS® and CFDEM® are registered trademarks, and this offering is not approved or
endorsed by DCS Computing GmbH, the official producer of the LIGGGHTS® and CFDEM®coupling software.
> This offering is not approved or endorsed by OpenCFD Limited, producer and distributor of the OpenFOAM software via www.openfoam.com, and owner of the OPENFOAM® and OpenCFD® trade marks.
## Features
- Documentation and tutorials to get started
- A modular approach that allows for easy implementation of new models
- MPI parallelization for large scale problems
## License
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html)
- This software is distributed under the [GNU General Public License](https://opensource.org/licenses/GPL-3.0).
- Copyright © 2009- JKU Linz
- Copyright © 2012-2015 DCS Computing GmbH, Linz
- Some parts of CFDEM®coupling are based on OpenFOAM® and Copyright on these
parts is held by the OpenFOAM® Foundation (www.openfoam.org)
and potentially other parties.
- Some parts of CFDEM®coupling are contributed by other parties, which are
holding the Copyright. This is listed in each file of the distribution.

View File

@ -1,24 +1,33 @@
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 \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lincompressibleRASModels \
-lincompressibleLESModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-ldynamicFvMesh \
-ldynamicMesh \
-lfvOptions \
-l$(CFDEM_LIB_NAME)
-lsampling \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -6,7 +6,8 @@
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
Copyright (C) 2012-2015 DCS Computing GmbH,Linz
Copyright (C) 2015- JKU, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
@ -29,17 +30,21 @@ Application
Description
Transient solver for incompressible flow.
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 using immersed body
(fictitious domain) method is added.
Contributions
Alice Hager
Daniel Queteschiner
Thomas Lichtenegger
Achuth N. Balachandran Nair
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulenceModel.H"
#include "turbulentTransportModel.H"
#include "pisoControl.H"
#include "cfdemCloudIB.H"
#include "implicitCouple.H"
@ -52,28 +57,21 @@ Contributions
#include "cellSet.H"
#if defined(version22)
#include "meshToMeshNew.H"
#include "fvIOoptionList.H"
#endif
#include "fvOptions.H" // added the fvOptions library
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#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"
@ -91,61 +89,54 @@ 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;
particleCloud.evolve();
particleCloud.evolve(Us);
// Pressure-velocity PISO corrector
{
MRF.correctBoundaryVelocity(U);
// Momentum predictor
fvVectorMatrix UEqn
(
fvm::ddt(voidfraction,U)
fvm::ddt(voidfraction,U) + MRF.DDt(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));
fvOptions.correct(U);
}
// --- 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())
+ rUAf*fvc::ddtCorr(U, phi);
#else
phi = (fvc::interpolate(U) & mesh.Sf())
+ fvc::ddtPhiCorr(rUA, U, phi);
#endif
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
@ -156,20 +147,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();
}
@ -182,15 +162,14 @@ int main(int argc, char *argv[])
}
}
laminarTransport.correct();
turbulence->correct();
Info << "particleCloud.calcVelocityCorrection() " << endl;
volScalarField voidfractionNext=mesh.lookupObject<volScalarField>("voidfractionNext");
particleCloud.calcVelocityCorrection(p,U,phiIB,voidfractionNext);
#if defined(version22)
fvOptions.correct(U);
#endif
runTime.write();

View File

@ -26,21 +26,6 @@
),
mesh
);
//mod by alice
Info<< "Reading physical velocity field U" << endl;
Info<< "Note: only if voidfraction at boundary is 1, U is superficial velocity!!!\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//========================
// drag law modelling
@ -76,9 +61,8 @@
mesh
);
//mod by alice
Info<< "Reading field phiIB\n" << endl;
Info<< "Reading field voidfraction\n" << endl;
volScalarField voidfraction
(
IOobject
@ -91,6 +75,21 @@
),
mesh
);
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//========================
# include "createPhi.H"
@ -126,3 +125,5 @@
);
//===========================
#include "createMRF.H"

View File

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

View File

@ -0,0 +1,33 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-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$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(LIB_SRC)/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicFvMesh/lnInclude \
-I$(LIB_SRC)/dynamicMesh/dynamicMesh/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-ldynamicFvMesh \
-ldynamicMesh \
-lfvOptions \
-lsampling \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,19 @@
fvVectorMatrix UEqn
(
fvm::ddt(voidfractionNext,U) + MRF.DDt(U)
+ fvm::div(phi, U)
+ turbulence->divDevReff(U)
==
fvOptions(U)
+ (lambda*(1-voidfractionNext)/U.mesh().time().deltaT())*(fvc::Sp(1,Us)-fvm::Sp(1,U))
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (piso.momentumPredictor())
{
solve(UEqn == -fvc::grad(p));
fvOptions.correct(U);
}

View File

@ -0,0 +1,129 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Copyright (C) 1991-2009 OpenCFD Ltd.
Copyright (C) 2009-2012 JKU, Linz
Copyright (C) 2012-2015 DCS Computing GmbH,Linz
Copyright (C) 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, see <http://www.gnu.org/licenses/>.
Application
cfdemSolverIBContinuousForcing
Description
Transient solver for incompressible flow.
The code is an evolution of the solver pisoFoam in OpenFOAM(R) 1.6,
where additional functionality for CFD-DEM coupling using immersed body
(fictitious domain) method and a continuous forcing approach is added.
Contributions
Alice Hager
Achuth N. Balachandran Nair
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pisoControl.H"
#include "cfdemCloudIB.H"
#include "implicitCouple.H"
#include "averagingModel.H"
#include "regionModel.H"
#include "voidFractionModel.H"
#include "dynamicFvMesh.H"
#include "cellSet.H"
#include "fvOptions.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createDynamicFvMesh.H"
#include "createControl.H"
#include "createTimeControls.H"
#include "createFields.H"
#include "initContinuityErrs.H"
#include "createFvOptions.H"
// create cfdemCloud
#include "readGravitationalAcceleration.H"
cfdemCloudIB particleCloud(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;
//=== dyM ===================
interFace = mag(mesh.lookupObject<volScalarField>("voidfractionNext"));
mesh.update(); //dyM
#include "readTimeControls.H"
#include "CourantNo.H"
#include "setDeltaT.H"
// do particle stuff
Info << "- evolve()" << endl;
particleCloud.evolve(Us);
volScalarField voidfractionNext=mesh.lookupObject<volScalarField>("voidfractionNext");
// Pressure-velocity PISO corrector
{
MRF.correctBoundaryVelocity(U);
// Momentum predictor
#include "UEqn.H"
// --- PISO loop
while (piso.correct())
{
#include "pEqn.H"
}
}
laminarTransport.correct();
turbulence->correct();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,143 @@
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
);
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading the penalization factor field lambda\n" << endl;
volScalarField lambda
(
IOobject
(
"lambda",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//========================
// drag law modelling
//========================
Info<< "\nCreating dummy density field rho = 1\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("0", dimensionSet(1, -3, 0, 0, 0), 1.0)
);
Info<< "Reading field phiIB\n" << endl;
volScalarField phiIB
(
IOobject
(
"phiIB",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//mod by alice
Info<< "Reading field voidfraction\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//========================
# include "createPhi.H"
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)
);
//=== dyM ===================
Info<< "Reading field interFace\n" << endl;
volScalarField interFace
(
IOobject
(
"interFace",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
//dimensionedScalar("0", dimensionSet(0, -1, 0, 0, 0), 0.0)
dimensionedScalar("0", dimensionSet(0, 0, 0, 0, 0), 0.0)
);
//===========================
#include "createMRF.H"

View File

@ -0,0 +1,35 @@
volScalarField rUA = 1.0/UEqn.A();
surfaceScalarField rUAf(fvc::interpolate(rUA));
U = rUA*UEqn.H();
phi = (fvc::interpolate(U) & mesh.Sf())
+ rUAf*fvc::ddtCorr(U, phi); // Is there additional flux term due to the particle presence?
MRF.makeRelative(phi);
adjustPhi(phi, U, p);
while (piso.correctNonOrthogonal())
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rUA, 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 "continuityErrs.H"
U -= rUA*fvc::grad(p); // should we add a pressure correction?
U.correctBoundaryConditions();
fvOptions.correct(U);

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseMixture
wclean
#------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType multiphaseMixture
wmake
#------------------------------------------------------------------------------

View File

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

View File

@ -0,0 +1,34 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
$(PFLAGS) \
-ImultiphaseMixture/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-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 \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lcfdemMultiphaseInterFoam \
-linterfaceProperties \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,61 @@
const surfaceScalarField& rhoPhi(mixture.rhoPhi());
volScalarField muEff = rho*(turbulence->nu() + turbulence->nut());
if (modelType == "A")
muEff *= voidfraction;
fvVectorMatrix UEqn
(
fvm::ddt(rhoEps, U) - fvm::Sp(fvc::ddt(rhoEps),U)
+ fvm::div(rhoPhi, U) - fvm::Sp(fvc::div(rhoPhi),U)
//+ particleCloud.divVoidfractionTau(U, voidfraction)
- fvm::laplacian(muEff, U) - fvc::div(muEff*dev2(fvc::grad(U)().T()))
==
fvOptions(rho, U)
- fvm::Sp(Ksl,U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
{
solve
(
UEqn
==
fvc::reconstruct
(
(- ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh)) * mesh.magSf()
)
+
fvc::reconstruct
(
mixture.surfaceTensionForce() * mesh.magSf()
) * voidfraction
+ Ksl*Us
);
fvOptions.correct(U);
}
else if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
) * mesh.magSf()
) * voidfraction
+ Ksl*Us
);
fvOptions.correct(U);
}

View File

@ -0,0 +1,17 @@
// Additional solver-specific checks
// Useful if one wants to e.g. initialize floating particles using the Archimedes model
if (particleCloud.couplingProperties().found("unrestrictedForceModelSelection"))
{
Warning << "Using unrestrictedForceModelSelection, results may be incorrect!" << endl;
} else
{
#include "checkModelType.H"
}
word modelType = particleCloud.modelType();
if(!particleCloud.couplingProperties().found("useDDTvoidfraction"))
{
Warning << "Suppressing ddt(voidfraction) is not recommended with this solver as it may generate incorrect results!" << endl;
}

View File

@ -0,0 +1,21 @@
scalar alphaCoNum = 0.0;
scalar meanAlphaCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi
(
mixture.nearInterface()().primitiveField()
*fvc::surfaceSum(mag(phi))().primitiveField()
);
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
meanAlphaCoNum =
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
}
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
<< " max: " << alphaCoNum << endl;
// ************************************************************************* //

View File

@ -0,0 +1,153 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
Application
cfdemSolverMultiphase
Description
CFD-DEM solver for n incompressible fluids which captures the interfaces and
includes surface-tension and contact-angle effects for each phase. It is based
on the OpenFOAM(R)-4.x solver multiphaseInterFoam but extended to incorporate
DEM functionalities from the open-source DEM code LIGGGHTS.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "multiphaseMixture.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "cfdemCloud.H"
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#if OPENFOAM_VERSION_MAJOR >= 6
FatalError << "cfdemSolverMultiphase requires OpenFOAM 4.x or 5.x to work properly" << exit(FatalError);
#endif
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFvOptions.H"
#include "correctPhi.H"
#include "CourantNo.H"
turbulence->validate();
// create cfdemCloud
cfdemCloud particleCloud(mesh);
#include "additionalChecks.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
#include "CourantNo.H"
#include "alphaCourantNo.H"
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
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.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");
if(particleCloud.solveFlow())
{
mixture.solve();
rho = mixture.rho();
rhoEps = rho * voidfraction;
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
}
else
{
Info << "skipping flow solution." << endl;
}
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,11 @@
CorrectPhi
(
U,
phi,
p_rgh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1),
geometricZeroField(),
pimple
);
#include "continuityErrs.H"

View File

@ -0,0 +1,156 @@
//===============================
// particle interaction modelling
//===============================
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<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
voidfraction.oldTime();
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
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()
);
multiphaseMixture mixture(U, phi, voidfraction);
// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.rho()
);
rho.oldTime();
volScalarField rhoEps ("rhoEps", rho * voidfraction);
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, mixture)
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rho*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
pimple.dict(),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
mesh.setFluxRequired(p_rgh.name());

View File

@ -0,0 +1,5 @@
phase/phase.C
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
multiphaseMixture.C
LIB = $(CFDEM_LIB_DIR)/libcfdemMultiphaseInterFoam

View File

@ -0,0 +1,18 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
EXE_INC = \
$(PFLAGS) \
-IalphaContactAngle \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-Wno-deprecated-copy
LIB_LIBS = \
-linterfaceProperties \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -0,0 +1,146 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "alphaContactAngleFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
(
Istream& is
)
:
theta0_(readScalar(is)),
uTheta_(readScalar(is)),
thetaA_(readScalar(is)),
thetaR_(readScalar(is))
{}
Istream& operator>>
(
Istream& is,
alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
)
{
is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
return is;
}
Ostream& operator<<
(
Ostream& os,
const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
)
{
os << tp.theta0_ << token::SPACE
<< tp.uTheta_ << token::SPACE
<< tp.thetaA_ << token::SPACE
<< tp.thetaR_;
return os;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
zeroGradientFvPatchScalarField(p, iF)
{}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField& gcpsf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
thetaProps_(gcpsf.thetaProps_)
{}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
zeroGradientFvPatchScalarField(p, iF),
thetaProps_(dict.lookup("thetaProperties"))
{
evaluate();
}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField& gcpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
zeroGradientFvPatchScalarField(gcpsf, iF),
thetaProps_(gcpsf.thetaProps_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
os.writeKeyword("thetaProperties")
<< thetaProps_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField,
alphaContactAngleFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,215 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::alphaContactAngleFvPatchScalarField
Description
Contact-angle boundary condition for multi-phase interface-capturing
simulations. Used in conjuction with multiphaseMixture.
SourceFiles
alphaContactAngleFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef alphaContactAngleFvPatchScalarField_H
#define alphaContactAngleFvPatchScalarField_H
#include "zeroGradientFvPatchFields.H"
#include "multiphaseMixture.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class alphaContactAngleFvPatch Declaration
\*---------------------------------------------------------------------------*/
class alphaContactAngleFvPatchScalarField
:
public zeroGradientFvPatchScalarField
{
public:
class interfaceThetaProps
{
//- Equilibrium contact angle
scalar theta0_;
//- Dynamic contact angle velocity scale
scalar uTheta_;
//- Limiting advancing contact angle
scalar thetaA_;
//- Limiting receeding contact angle
scalar thetaR_;
public:
// Constructors
interfaceThetaProps()
{}
interfaceThetaProps(Istream&);
// Member functions
//- Return the equilibrium contact angle theta0
scalar theta0(bool matched=true) const
{
if (matched) return theta0_;
else return 180.0 - theta0_;
}
//- Return the dynamic contact angle velocity scale
scalar uTheta() const
{
return uTheta_;
}
//- Return the limiting advancing contact angle
scalar thetaA(bool matched=true) const
{
if (matched) return thetaA_;
else return 180.0 - thetaA_;
}
//- Return the limiting receeding contact angle
scalar thetaR(bool matched=true) const
{
if (matched) return thetaR_;
else return 180.0 - thetaR_;
}
// IO functions
friend Istream& operator>>(Istream&, interfaceThetaProps&);
friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
};
typedef HashTable
<
interfaceThetaProps,
multiphaseMixture::interfacePair,
multiphaseMixture::interfacePair::hash
> thetaPropsTable;
private:
// Private data
thetaPropsTable thetaProps_;
public:
//- Runtime type information
TypeName("alphaContactAngle");
// Constructors
//- Construct from patch and internal field
alphaContactAngleFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
alphaContactAngleFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given alphaContactAngleFvPatchScalarField
// onto a new patch
alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new alphaContactAngleFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new alphaContactAngleFvPatchScalarField(*this, iF)
);
}
// Member functions
//- Return the contact angle properties
const thetaPropsTable& thetaProps() const
{
return thetaProps_;
}
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,784 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
\*---------------------------------------------------------------------------*/
#include "multiphaseMixture.H"
#include "alphaContactAngleFvPatchScalarField.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
#include "surfaceInterpolate.H"
#include "fvcGrad.H"
#include "fvcSnGrad.H"
#include "fvcDiv.H"
#include "fvcFlux.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const Foam::scalar Foam::multiphaseMixture::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::multiphaseMixture::calcAlphas()
{
scalar level = 0.0;
alphas_ == 0.0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
alphas_ += level*iter();
level += 1.0;
}
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::calcNu() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// 1/nu
tmp<volScalarField> tnuInv = iter()/iter().nu();
volScalarField& nuInv = tnuInv.ref();
// nu
tmp<volScalarField> tnu = iter()*iter().nu();
volScalarField& nu = tnu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nuInv += iter()/iter().nu();
}
nu = 1/nuInv;
return tnu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixture::calcStf() const
{
tmp<surfaceScalarField> tstf
(
new surfaceScalarField
(
IOobject
(
"stf",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar
(
"stf",
dimensionSet(1, -2, -2, 0, 0),
0.0
)
)
);
surfaceScalarField& stf = tstf.ref();
forAllConstIter(PtrDictionary<phase>, phases_, iter1)
{
const phase& alpha1 = iter1();
PtrDictionary<phase>::const_iterator iter2 = iter1;
++iter2;
for (; iter2 != phases_.end(); ++iter2)
{
const phase& alpha2 = iter2();
sigmaTable::const_iterator sigma =
sigmas_.find(interfacePair(alpha1, alpha2));
if (sigma == sigmas_.end())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< " in list of sigma values"
<< exit(FatalError);
}
stf += dimensionedScalar("sigma", dimSigma_, sigma())
*fvc::interpolate(K(alpha1, alpha2))*
(
fvc::interpolate(alpha2)*fvc::snGrad(alpha1)
- fvc::interpolate(alpha1)*fvc::snGrad(alpha2)
);
}
}
return tstf;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::multiphaseMixture::multiphaseMixture
(
const volVectorField& U,
const surfaceScalarField& phi,
const volScalarField& voidfraction
)
:
IOdictionary
(
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
phases_(lookup("phases"), phase::iNew(U, phi)),
mesh_(U.mesh()),
U_(U),
phi_(phi),
voidfraction_(voidfraction),
rhoPhi_
(
IOobject
(
"rhoPhi",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("rhoPhi", dimMass/dimTime, 0.0)
),
surfaceTensionForce_
(
IOobject
(
"surfaceTensionForce",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("surfaceTensionForce", dimensionSet(1, -2, -2, 0, 0), 0.0)
),
alphas_
(
IOobject
(
"alphas",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("alphas", dimless, 0.0)
),
nu_
(
IOobject
(
"nu",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
calcNu()
),
sigmas_(lookup("sigmas")),
dimSigma_(1, 0, -2, 0, 0),
deltaN_
(
"deltaN",
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
calcAlphas();
alphas_.write();
surfaceTensionForce_ = calcStf();
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::rho() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<volScalarField> trho = iter()*iter().rho();
volScalarField& rho = trho.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rho += iter()*iter().rho();
}
return trho;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixture::rho(const label patchi) const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
scalarField& rho = trho.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rho += iter().boundaryField()[patchi]*iter().rho().value();
}
return trho;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::mu() const
{
return rho()*nu();
// PtrDictionary<phase>::const_iterator iter = phases_.begin();
// tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
// volScalarField& mu = tmu.ref();
// for (++iter; iter != phases_.end(); ++iter)
// {
// mu += iter()*iter().rho()*iter().nu();
// }
// return tmu;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixture::mu(const label patchi) const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> tmu =
iter().boundaryField()[patchi]
*iter().rho().value()
*iter().nu(patchi);
scalarField& mu = tmu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
mu +=
iter().boundaryField()[patchi]
*iter().rho().value()
*iter().nu(patchi);
}
return tmu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixture::muf() const
{
return nuf()*fvc::interpolate(rho());
// PtrDictionary<phase>::const_iterator iter = phases_.begin();
// tmp<surfaceScalarField> tmuf =
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// surfaceScalarField& muf = tmuf.ref();
// for (++iter; iter != phases_.end(); ++iter)
// {
// muf +=
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// }
// return tmuf;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::nu() const
{
return nu_;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixture::nu(const label patchi) const
{
//return nu_.boundaryField()[patchi];
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> tnu =
iter().boundaryField()[patchi]
*iter().nu(patchi);
scalarField& nu = tnu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nu +=
iter().boundaryField()[patchi]
*iter().nu(patchi);
}
return tnu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixture::nuf() const
{
//return muf()/fvc::interpolate(rho());
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<surfaceScalarField> tnuf =
fvc::interpolate(iter())*fvc::interpolate(iter().nu());
surfaceScalarField& nuf = tnuf.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nuf +=
fvc::interpolate(iter())*fvc::interpolate(iter().nu());
}
return tnuf;
}
void Foam::multiphaseMixture::solve()
{
correct();
const Time& runTime = mesh_.time();
volScalarField& alpha = phases_.first();
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
scalar cAlpha(readScalar(alphaControls.lookup("cAlpha")));
if (nAlphaSubCycles > 1)
{
surfaceScalarField rhoPhiSum
(
IOobject
(
"rhoPhiSum",
runTime.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", rhoPhi_.dimensions(), 0)
);
dimensionedScalar totalDeltaT = runTime.deltaT();
for
(
subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
FatalError << "Sub-cycling of the alpha equation not yet implemented!!" << abort(FatalError);
solveAlphas(cAlpha);
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
}
rhoPhi_ = rhoPhiSum;
}
else
{
solveAlphas(cAlpha);
}
// Update the mixture kinematic viscosity
nu_ = calcNu();
surfaceTensionForce_ = calcStf();
}
void Foam::multiphaseMixture::correct()
{
forAllIter(PtrDictionary<phase>, phases_, iter)
{
iter().correct();
}
}
Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseMixture::nHatfv
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const
{
/*
// Cell gradient of alpha
volVectorField gradAlpha =
alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
// Interpolated face-gradient of alpha
surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
*/
surfaceVectorField gradAlphaf
(
fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1))
- fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
);
// Face unit interface normal
return gradAlphaf/(mag(gradAlphaf) + deltaN_);
}
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixture::nHatf
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const
{
// Face unit interface normal flux
return nHatfv(alpha1, alpha2) & mesh_.Sf();
}
// Correction for the boundary condition on the unit normal nHat on
// walls to produce the correct contact angle.
// The dynamic contact angle is calculated from the component of the
// velocity on the direction of the interface, parallel to the wall.
void Foam::multiphaseMixture::correctContactAngle
(
const phase& alpha1,
const phase& alpha2,
surfaceVectorField::Boundary& nHatb
) const
{
const volScalarField::Boundary& gbf
= alpha1.boundaryField();
const fvBoundaryMesh& boundary = mesh_.boundary();
forAll(boundary, patchi)
{
if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
{
const alphaContactAngleFvPatchScalarField& acap =
refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
vectorField& nHatPatch = nHatb[patchi];
vectorField AfHatPatch
(
mesh_.Sf().boundaryField()[patchi]
/mesh_.magSf().boundaryField()[patchi]
);
alphaContactAngleFvPatchScalarField::thetaPropsTable::
const_iterator tp =
acap.thetaProps().find(interfacePair(alpha1, alpha2));
if (tp == acap.thetaProps().end())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< "\n in table of theta properties for patch "
<< acap.patch().name()
<< exit(FatalError);
}
bool matched = (tp.key().first() == alpha1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
(
U_.boundaryField()[patchi].patchInternalField()
- U_.boundaryField()[patchi]
);
Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
// Find the direction of the interface parallel to the wall
vectorField nWall
(
nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
);
// Normalise nWall
nWall /= (mag(nWall) + SMALL);
// Calculate Uwall resolved normal to the interface parallel to
// the interface
scalarField uwall(nWall & Uwall);
theta += (thetaA - thetaR)*tanh(uwall/uTheta);
}
// Reset nHatPatch to correspond to the contact angle
scalarField a12(nHatPatch & AfHatPatch);
scalarField b1(cos(theta));
scalarField b2(nHatPatch.size());
forAll(b2, facei)
{
b2[facei] = cos(acos(a12[facei]) - theta[facei]);
}
scalarField det(1.0 - a12*a12);
scalarField a((b1 - a12*b2)/det);
scalarField b((b2 - a12*b1)/det);
nHatPatch = a*AfHatPatch + b*nHatPatch;
nHatPatch /= (mag(nHatPatch) + deltaN_.value());
}
}
}
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixture::K
(
const phase& alpha1,
const phase& alpha2
) const
{
tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
// Simple expression for curvature
return -fvc::div(tnHatfv & mesh_.Sf());
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixture::nearInterface() const
{
tmp<volScalarField> tnearInt
(
new volScalarField
(
IOobject
(
"nearInterface",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar("nearInterface", dimless, 0.0)
)
);
forAllConstIter(PtrDictionary<phase>, phases_, iter)
{
tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
}
return tnearInt;
}
void Foam::multiphaseMixture::solveAlphas
(
const scalar cAlpha
)
{
static label nSolves=-1;
nSolves++;
word alphaScheme("div(phi,alpha)");
word alpharScheme("div(phirb,alpha)");
surfaceScalarField phic(mag(phi_/mesh_.magSf()));
phic = min(cAlpha*phic, max(phic));
PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size());
int phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
phase& alpha = iter();
alphaPhiCorrs.set
(
phasei,
new surfaceScalarField
(
"phi" + alpha.name() + "Corr",
fvc::flux
(
phi_,
alpha,
alphaScheme
)
)
);
surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
forAllIter(PtrDictionary<phase>, phases_, iter2)
{
phase& alpha2 = iter2();
if (&alpha2 == &alpha) continue;
surfaceScalarField phir(phic*nHatf(alpha, alpha2));
alphaPhiCorr += fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha,
alpharScheme
);
}
MULES::limit
(
1.0/mesh_.time().deltaT().value(),
voidfraction_,
alpha,
phi_,
alphaPhiCorr,
zeroField(),
zeroField(),
#if OPENFOAM_VERSION_MAJOR < 6
1,
0,
#else
oneField(),
zeroField(),
#endif
true
);
phasei++;
}
MULES::limitSum(alphaPhiCorrs);
rhoPhi_ = dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0);
volScalarField sumAlpha
(
IOobject
(
"sumAlpha",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar("sumAlpha", dimless, 0)
);
phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
phase& alpha = iter();
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
alphaPhi += upwind<scalar>(mesh_, phi_).flux(alpha);
MULES::explicitSolve
(
voidfraction_,
alpha,
alphaPhi,
zeroField(),
zeroField()
);
rhoPhi_ += alphaPhi*alpha.rho();
Info<< alpha.name() << " volume fraction, min, max = "
<< alpha.weightedAverage(mesh_.V()).value()
<< ' ' << min(alpha).value()
<< ' ' << max(alpha).value()
<< endl;
sumAlpha += alpha;
phasei++;
}
Info<< "Phase-sum volume fraction, min, max = "
<< sumAlpha.weightedAverage(mesh_.V()).value()
<< ' ' << min(sumAlpha).value()
<< ' ' << max(sumAlpha).value()
<< endl;
calcAlphas();
}
bool Foam::multiphaseMixture::read()
{
if (transportModel::read())
{
bool readOK = true;
PtrList<entry> phaseData(lookup("phases"));
label phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
readOK &= iter().read(phaseData[phasei++].dict());
}
lookup("sigmas") >> sigmas_;
return readOK;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,284 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
Class
multiphaseMixture
Description
This class is based on the OpenFOAM(R) Foam::multiphaseMixture class,
which is an incompressible multi-phase mixture with built in solution
for the phase fractions with interface compression for interface-capturing.
It has been extended to include the void fraction in the volume fraction
transport equations.
Derived from transportModel so that it can be unsed in conjunction with
the incompressible turbulence models.
Surface tension and contact-angle is handled for the interface
between each phase-pair.
SourceFiles
multiphaseMixture.C
\*---------------------------------------------------------------------------*/
#ifndef multiphaseMixture_H
#define multiphaseMixture_H
#include "incompressible/transportModel/transportModel.H"
#include "IOdictionary.H"
#include "phase.H"
#include "PtrDictionary.H"
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class multiphaseMixture Declaration
\*---------------------------------------------------------------------------*/
class multiphaseMixture
:
public IOdictionary,
public transportModel
{
public:
class interfacePair
:
public Pair<word>
{
public:
class hash
:
public Hash<interfacePair>
{
public:
hash()
{}
label operator()(const interfacePair& key) const
{
return word::hash()(key.first()) + word::hash()(key.second());
}
};
// Constructors
interfacePair()
{}
interfacePair(const word& alpha1Name, const word& alpha2Name)
:
Pair<word>(alpha1Name, alpha2Name)
{}
interfacePair(const phase& alpha1, const phase& alpha2)
:
Pair<word>(alpha1.name(), alpha2.name())
{}
// Friend Operators
friend bool operator==
(
const interfacePair& a,
const interfacePair& b
)
{
return
(
((a.first() == b.first()) && (a.second() == b.second()))
|| ((a.first() == b.second()) && (a.second() == b.first()))
);
}
friend bool operator!=
(
const interfacePair& a,
const interfacePair& b
)
{
return (!(a == b));
}
};
private:
// Private data
//- Dictionary of phases
PtrDictionary<phase> phases_;
const fvMesh& mesh_;
const volVectorField& U_;
const surfaceScalarField& phi_;
const volScalarField& voidfraction_;
surfaceScalarField rhoPhi_;
surfaceScalarField surfaceTensionForce_;
volScalarField alphas_;
volScalarField nu_;
typedef HashTable<scalar, interfacePair, interfacePair::hash>
sigmaTable;
sigmaTable sigmas_;
dimensionSet dimSigma_;
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
void calcAlphas();
tmp<volScalarField> calcNu() const;
void solveAlphas(const scalar cAlpha);
tmp<surfaceVectorField> nHatfv
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const;
tmp<surfaceScalarField> nHatf
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const;
void correctContactAngle
(
const phase& alpha1,
const phase& alpha2,
surfaceVectorField::Boundary& nHatb
) const;
tmp<volScalarField> K(const phase& alpha1, const phase& alpha2) const;
tmp<surfaceScalarField> calcStf() const;
public:
// Constructors
//- Construct from components
multiphaseMixture
(
const volVectorField& U,
const surfaceScalarField& phi,
const volScalarField& voidfraction
);
//- Destructor
virtual ~multiphaseMixture()
{}
// Member Functions
//- Return the phases
const PtrDictionary<phase>& phases() const
{
return phases_;
}
//- Return the velocity
const volVectorField& U() const
{
return U_;
}
//- Return the volumetric flux
const surfaceScalarField& phi() const
{
return phi_;
}
const surfaceScalarField& rhoPhi() const
{
return rhoPhi_;
}
//- Return the mixture density
tmp<volScalarField> rho() const;
//- Return the mixture density for patch
tmp<scalarField> rho(const label patchi) const;
//- Return the dynamic laminar viscosity
tmp<volScalarField> mu() const;
//- Return the dynamic laminar viscosity for patch
tmp<scalarField> mu(const label patchi) const;
//- Return the face-interpolated dynamic laminar viscosity
tmp<surfaceScalarField> muf() const;
//- Return the kinematic laminar viscosity
tmp<volScalarField> nu() const;
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const;
//- Return the face-interpolated dynamic laminar viscosity
tmp<surfaceScalarField> nuf() const;
tmp<surfaceScalarField> surfaceTensionForce() const
{
return surfaceTensionForce_;
}
//- Indicator of the proximity of the interface
// Field values are 1 near and 0 away for the interface.
tmp<volScalarField> nearInterface() const;
//- Solve for the mixture phase-fractions
void solve();
//- Correct the mixture properties
void correct();
//- Read base transportProperties dictionary
bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,98 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "phase.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phase::phase
(
const word& phaseName,
const dictionary& phaseDict,
const volVectorField& U,
const surfaceScalarField& phi
)
:
volScalarField
(
IOobject
(
IOobject::groupName("alpha", phaseName),
U.mesh().time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
name_(phaseName),
phaseDict_(phaseDict),
nuModel_
(
viscosityModel::New
(
IOobject::groupName("nu", phaseName),
phaseDict_,
U,
phi
)
),
rho_("rho", dimDensity, phaseDict_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
{
NotImplemented;
return autoPtr<phase>(NULL);
}
void Foam::phase::correct()
{
nuModel_->correct();
}
bool Foam::phase::read(const dictionary& phaseDict)
{
phaseDict_ = phaseDict;
if (nuModel_->read(phaseDict_))
{
phaseDict_.lookup("rho") >> rho_;
return true;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,163 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::phase
Description
Single incompressible phase derived from the phase-fraction.
Used as part of the multiPhaseMixture for interface-capturing multi-phase
simulations.
SourceFiles
phase.C
\*---------------------------------------------------------------------------*/
#ifndef phase_H
#define phase_H
#include "volFields.H"
#include "dictionaryEntry.H"
#include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class phase Declaration
\*---------------------------------------------------------------------------*/
class phase
:
public volScalarField
{
// Private data
word name_;
dictionary phaseDict_;
autoPtr<viscosityModel> nuModel_;
dimensionedScalar rho_;
public:
// Constructors
//- Construct from components
phase
(
const word& name,
const dictionary& phaseDict,
const volVectorField& U,
const surfaceScalarField& phi
);
//- Return clone
autoPtr<phase> clone() const;
//- Return a pointer to a new phase created on freestore
// from Istream
class iNew
{
const volVectorField& U_;
const surfaceScalarField& phi_;
public:
iNew
(
const volVectorField& U,
const surfaceScalarField& phi
)
:
U_(U),
phi_(phi)
{}
autoPtr<phase> operator()(Istream& is) const
{
dictionaryEntry ent(dictionary::null, is);
return autoPtr<phase>(new phase(ent.keyword(), ent, U_, phi_));
}
};
// Member Functions
const word& name() const
{
return name_;
}
const word& keyword() const
{
return name();
}
//- Return const-access to phase1 viscosityModel
const viscosityModel& nuModel() const
{
return nuModel_();
}
//- Return the kinematic laminar viscosity
tmp<volScalarField> nu() const
{
return nuModel_->nu();
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
{
return nuModel_->nu(patchi);
}
//- Return const-access to phase1 density
const dimensionedScalar& rho() const
{
return rho_;
}
//- Correct the phase properties
void correct();
//-Inherit read from volScalarField
using volScalarField::read;
//- Read base transportProperties dictionary
bool read(const dictionary& phaseDict);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,73 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUepsf("rAUepsf", fvc::interpolate(rAU*voidfraction));
surfaceScalarField rAUepsSqf("rAUepsSqf", fvc::interpolate(rAU*voidfraction*voidfraction));
volVectorField Ueps("Ueps", U * voidfraction);
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(HbyA*voidfraction)
+ fvc::interpolate(voidfraction*rho*rAU)*fvc::ddtCorr(U, phi)
);
adjustPhi(phiHbyA, U, p_rgh);
if (modelType == "A")
rAUepsf = rAUepsSqf;
surfaceScalarField phig (-ghf*fvc::snGrad(rho)*rAUepsf*mesh.magSf());
surfaceScalarField phiSt (mixture.surfaceTensionForce()*rAUepsSqf*mesh.magSf());
surfaceScalarField phiS (fvc::flux(voidfraction*Us*Ksl*rAU));
phiHbyA += phig + phiSt + phiS;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, Ueps, phiHbyA, rAUepsf);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
fvm::laplacian(rAUepsf, p_rgh) == particleCloud.ddtVoidfraction() + fvc::div(phiHbyA)
);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA - p_rghEqn.flux();
p_rgh.relax();
if (modelType == "A")
U = HbyA + voidfraction*rAU*fvc::reconstruct((phig-p_rghEqn.flux()+phiSt)/rAUepsf) + rAU*Us*Ksl;
else
U = HbyA + rAU*fvc::reconstruct((phig-p_rghEqn.flux()+phiSt)/rAUepsf) + rAU*Us*Ksl;
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}
#include "continuityErrs.H"
p == p_rgh + rho*gh;
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rho*gh;
}
}

View File

@ -0,0 +1,8 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
set -x
wclean libso multiphaseMixtureScalar
wclean
#------------------------------------------------------------------------------

View File

@ -0,0 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
# Parse arguments for library compilation
targetType=libso
. $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments
set -x
wmake $targetType multiphaseMixtureScalar
wmake
#------------------------------------------------------------------------------

View File

@ -0,0 +1,22 @@
// get mixture properties
Cs = mixture.Cs();
diffusionCorrection = mixture.diffusionCorrection();
Deff = particleCloud.diffCoeffM().diffCoeff();
// get scalar source from DEM
particleCloud.massContributions(Sm);
particleCloud.massCoefficients(Smi);
fvScalarMatrix CEqn
(
fvm::ddt(voidfraction,C)
+ fvm::div(phi,C)
- fvm::laplacian(Deff*voidfraction,C)
+ fvm::div(fvc::interpolate(Deff*voidfraction)*diffusionCorrection*mesh.magSf(), C)
==
Sm + fvm::Sp(Smi,C)
);
CEqn.relax();
fvOptions.constrain(CEqn);
CEqn.solve();

View File

@ -0,0 +1,22 @@
// get mixture properties
Cp = mixture.Cp();
kf = mixture.kf();
// get scalar source from DEM
particleCloud.energyContributions(Qsource);
particleCloud.energyCoefficients(QCoeff);
fvScalarMatrix EEqn
(
rho*Cp*(fvm::ddt(voidfraction,T)
+ fvm::div(phi,T))
- fvm::laplacian(thCond*voidfraction,T)
==
Qsource + fvm::Sp(QCoeff,T)
);
EEqn.relax();
fvOptions.constrain(EEqn);
EEqn.solve();

View File

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

View File

@ -0,0 +1,34 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
$(PFLAGS) \
-ImultiphaseMixtureScalar/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \
-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 \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lcfdemMultiphaseInterFoamScalar \
-linterfaceProperties \
-lincompressibleTransportModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lfiniteVolume \
-lfvOptions \
-lmeshTools \
-lsampling \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,61 @@
const surfaceScalarField& rhoPhi(mixture.rhoPhi());
volScalarField muEff = rho*(turbulence->nu() + turbulence->nut());
if (modelType == "A")
muEff *= voidfraction;
fvVectorMatrix UEqn
(
fvm::ddt(rhoEps, U) - fvm::Sp(fvc::ddt(rhoEps),U)
+ fvm::div(rhoPhi, U) - fvm::Sp(fvc::div(rhoPhi),U)
//+ particleCloud.divVoidfractionTau(U, voidfraction)
- fvm::laplacian(muEff, U) - fvc::div(muEff*dev2(fvc::grad(U)().T()))
==
fvOptions(rho, U)
- fvm::Sp(Ksl,U)
);
UEqn.relax();
fvOptions.constrain(UEqn);
if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
{
solve
(
UEqn
==
fvc::reconstruct
(
(- ghf*fvc::snGrad(rho) - fvc::snGrad(p_rgh)) * mesh.magSf()
)
+
fvc::reconstruct
(
mixture.surfaceTensionForce() * mesh.magSf()
) * voidfraction
+ Ksl*Us
);
fvOptions.correct(U);
}
else if (pimple.momentumPredictor())
{
solve
(
UEqn
==
fvc::reconstruct
(
(
mixture.surfaceTensionForce()
- ghf*fvc::snGrad(rho)
- fvc::snGrad(p_rgh)
) * mesh.magSf()
) * voidfraction
+ Ksl*Us
);
fvOptions.correct(U);
}

View File

@ -0,0 +1,17 @@
// Additional solver-specific checks
// Useful if one wants to e.g. initialize floating particles using the Archimedes model
if (particleCloud.couplingProperties().found("unrestrictedForceModelSelection"))
{
Warning << "Using unrestrictedForceModelSelection, results may be incorrect!" << endl;
} else
{
#include "checkModelType.H"
}
word modelType = particleCloud.modelType();
if(!particleCloud.couplingProperties().found("useDDTvoidfraction"))
{
Warning << "Suppressing ddt(voidfraction) is not recommended with this solver as it may generate incorrect results!" << endl;
}

View File

@ -0,0 +1,21 @@
scalar alphaCoNum = 0.0;
scalar meanAlphaCoNum = 0.0;
if (mesh.nInternalFaces())
{
scalarField sumPhi
(
mixture.nearInterface()().primitiveField()
*fvc::surfaceSum(mag(phi))().primitiveField()
);
alphaCoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue();
meanAlphaCoNum =
0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue();
}
Info<< "Interface Courant Number mean: " << meanAlphaCoNum
<< " max: " << alphaCoNum << endl;
// ************************************************************************* //

View File

@ -0,0 +1,164 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
Application
cfdemSolverMultiphaseScalar
Description
CFD-DEM solver for n incompressible fluids which captures the interfaces and
includes surface-tension and contact-angle effects for each phase. It is based
on the OpenFOAM(R)-4.x solver multiphaseInterFoam but extended to incorporate
DEM functionalities from the open-source DEM code LIGGGHTS.
Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "multiphaseMixtureScalar.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "CorrectPhi.H"
#include "cfdemCloudEnergy.H"
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
#include "thermCondModel.H"
#include "diffCoeffModel.H"
#include "energyModel.H"
#include "massTransferModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#if OPENFOAM_VERSION_MAJOR >= 6
FatalError << "cfdemSolverMultiphase requires OpenFOAM 4.x or 5.x to work properly" << exit(FatalError);
#endif
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "initContinuityErrs.H"
#include "createFields.H"
#include "createFvOptions.H"
#include "correctPhi.H"
#include "CourantNo.H"
turbulence->validate();
// create cfdemCloud
cfdemCloudEnergy particleCloud(mesh);
#include "additionalChecks.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
#include "CourantNo.H"
#include "alphaCourantNo.H"
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
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.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");
if(particleCloud.solveFlow())
{
mixture.solve();
rho = mixture.rho();
rhoEps = rho * voidfraction;
#include "EEqn.H"
#include "CEqn.H"
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#include "UEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
}
else
{
Info << "skipping flow solution." << endl;
}
particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
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,11 @@
CorrectPhi
(
U,
phi,
p_rgh,
dimensionedScalar("rAUf", dimTime/rho.dimensions(), 1),
geometricZeroField(),
pimple
);
#include "continuityErrs.H"

View File

@ -0,0 +1,342 @@
//===============================
// particle interaction modelling
//===============================
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<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
voidfraction.oldTime();
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field p_rgh\n" << endl;
volScalarField p_rgh
(
IOobject
(
"p_rgh",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
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()
);
multiphaseMixtureScalar mixture(U, phi, voidfraction);
// Need to store rho for ddt(rho, U)
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.rho()
);
rho.oldTime();
//========================
// scalar field modelling
//========================
Info<< "Reading/creating thermal fields\n" << endl;
volScalarField T
(
IOobject
(
"T",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
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)
);
volScalarField QCoeff
(
IOobject
(
"Qsource",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,-1,-3,-1,0,0,0), 0.0)
);
volScalarField Cp
(
IOobject
(
"Cp",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.Cp()
);
volScalarField kf
(
IOobject
(
"kf",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.kf()
);
volScalarField thCond
(
IOobject
(
"thCond",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0),
"zeroGradient"
);
Info<< "Reading/creating concentration fields\n" << endl;
volScalarField C
(
IOobject
(
"C",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
volScalarField Sm
(
IOobject
(
"Sm",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,-3,-1,0,0,0,0), 0.0)
);
volScalarField Smi
(
IOobject
(
"Smi",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,0,-1,0,0,0,0), 0.0)
);
volScalarField D
(
IOobject
(
"D",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.D()
);
volScalarField Deff
(
IOobject
(
"Deff",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,2,-1,0,0,0,0), 0.0)
);
volScalarField Cs
(
IOobject
(
"Cs",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mixture.Cs()
);
surfaceScalarField diffusionCorrection
(
IOobject
(
"diffusionCorrection",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mixture.diffusionCorrection()
);
//========================
volScalarField rhoEps ("rhoEps", rho * voidfraction);
// Construct incompressible turbulence model
autoPtr<incompressible::turbulenceModel> turbulence
(
incompressible::turbulenceModel::New(U, phi, mixture)
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"
#include "gh.H"
volScalarField p
(
IOobject
(
"p",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
p_rgh + rho*gh
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell
(
p,
p_rgh,
pimple.dict(),
pRefCell,
pRefValue
);
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
}
mesh.setFluxRequired(p_rgh.name());

View File

@ -0,0 +1,5 @@
phase/phase.C
alphaContactAngle/alphaContactAngleFvPatchScalarField.C
multiphaseMixtureScalar.C
LIB = $(CFDEM_LIB_DIR)/libcfdemMultiphaseInterFoamScalar

View File

@ -0,0 +1,18 @@
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
EXE_INC = \
$(PFLAGS) \
-IalphaContactAngle \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/lnInclude \
-I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-Wno-deprecated-copy
LIB_LIBS = \
-linterfaceProperties \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools

View File

@ -0,0 +1,146 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "alphaContactAngleFvPatchScalarField.H"
#include "addToRunTimeSelectionTable.H"
#include "fvPatchFieldMapper.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps
(
Istream& is
)
:
theta0_(readScalar(is)),
uTheta_(readScalar(is)),
thetaA_(readScalar(is)),
thetaR_(readScalar(is))
{}
Istream& operator>>
(
Istream& is,
alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
)
{
is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_;
return is;
}
Ostream& operator<<
(
Ostream& os,
const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp
)
{
os << tp.theta0_ << token::SPACE
<< tp.uTheta_ << token::SPACE
<< tp.thetaA_ << token::SPACE
<< tp.thetaR_;
return os;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF
)
:
zeroGradientFvPatchScalarField(p, iF)
{}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField& gcpsf,
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const fvPatchFieldMapper& mapper
)
:
zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper),
thetaProps_(gcpsf.thetaProps_)
{}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const fvPatch& p,
const DimensionedField<scalar, volMesh>& iF,
const dictionary& dict
)
:
zeroGradientFvPatchScalarField(p, iF),
thetaProps_(dict.lookup("thetaProperties"))
{
evaluate();
}
alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField& gcpsf,
const DimensionedField<scalar, volMesh>& iF
)
:
zeroGradientFvPatchScalarField(gcpsf, iF),
thetaProps_(gcpsf.thetaProps_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void alphaContactAngleFvPatchScalarField::write(Ostream& os) const
{
fvPatchScalarField::write(os);
os.writeKeyword("thetaProperties")
<< thetaProps_ << token::END_STATEMENT << nl;
writeEntry("value", os);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
makePatchTypeField
(
fvPatchScalarField,
alphaContactAngleFvPatchScalarField
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,215 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::alphaContactAngleFvPatchScalarField
Description
Contact-angle boundary condition for multi-phase interface-capturing
simulations. Used in conjuction with multiphaseMixtureScalar.
SourceFiles
alphaContactAngleFvPatchScalarField.C
\*---------------------------------------------------------------------------*/
#ifndef alphaContactAngleFvPatchScalarField_H
#define alphaContactAngleFvPatchScalarField_H
#include "zeroGradientFvPatchFields.H"
#include "multiphaseMixtureScalar.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class alphaContactAngleFvPatch Declaration
\*---------------------------------------------------------------------------*/
class alphaContactAngleFvPatchScalarField
:
public zeroGradientFvPatchScalarField
{
public:
class interfaceThetaProps
{
//- Equilibrium contact angle
scalar theta0_;
//- Dynamic contact angle velocity scale
scalar uTheta_;
//- Limiting advancing contact angle
scalar thetaA_;
//- Limiting receeding contact angle
scalar thetaR_;
public:
// Constructors
interfaceThetaProps()
{}
interfaceThetaProps(Istream&);
// Member functions
//- Return the equilibrium contact angle theta0
scalar theta0(bool matched=true) const
{
if (matched) return theta0_;
else return 180.0 - theta0_;
}
//- Return the dynamic contact angle velocity scale
scalar uTheta() const
{
return uTheta_;
}
//- Return the limiting advancing contact angle
scalar thetaA(bool matched=true) const
{
if (matched) return thetaA_;
else return 180.0 - thetaA_;
}
//- Return the limiting receeding contact angle
scalar thetaR(bool matched=true) const
{
if (matched) return thetaR_;
else return 180.0 - thetaR_;
}
// IO functions
friend Istream& operator>>(Istream&, interfaceThetaProps&);
friend Ostream& operator<<(Ostream&, const interfaceThetaProps&);
};
typedef HashTable
<
interfaceThetaProps,
multiphaseMixtureScalar::interfacePair,
multiphaseMixtureScalar::interfacePair::hash
> thetaPropsTable;
private:
// Private data
thetaPropsTable thetaProps_;
public:
//- Runtime type information
TypeName("alphaContactAngle");
// Constructors
//- Construct from patch and internal field
alphaContactAngleFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&
);
//- Construct from patch, internal field and dictionary
alphaContactAngleFvPatchScalarField
(
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const dictionary&
);
//- Construct by mapping given alphaContactAngleFvPatchScalarField
// onto a new patch
alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField&,
const fvPatch&,
const DimensionedField<scalar, volMesh>&,
const fvPatchFieldMapper&
);
//- Construct and return a clone
virtual tmp<fvPatchScalarField> clone() const
{
return tmp<fvPatchScalarField>
(
new alphaContactAngleFvPatchScalarField(*this)
);
}
//- Construct as copy setting internal field reference
alphaContactAngleFvPatchScalarField
(
const alphaContactAngleFvPatchScalarField&,
const DimensionedField<scalar, volMesh>&
);
//- Construct and return a clone setting internal field reference
virtual tmp<fvPatchScalarField> clone
(
const DimensionedField<scalar, volMesh>& iF
) const
{
return tmp<fvPatchScalarField>
(
new alphaContactAngleFvPatchScalarField(*this, iF)
);
}
// Member functions
//- Return the contact angle properties
const thetaPropsTable& thetaProps() const
{
return thetaProps_;
}
//- Write
virtual void write(Ostream&) const;
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,929 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
\*---------------------------------------------------------------------------*/
#include "multiphaseMixtureScalar.H"
#include "alphaContactAngleFvPatchScalarField.H"
#include "Time.H"
#include "subCycle.H"
#include "MULES.H"
#include "surfaceInterpolate.H"
#include "fvcGrad.H"
#include "fvcSnGrad.H"
#include "fvcDiv.H"
#include "fvcFlux.H"
// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * //
const Foam::scalar Foam::multiphaseMixtureScalar::convertToRad =
Foam::constant::mathematical::pi/180.0;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
void Foam::multiphaseMixtureScalar::calcAlphas()
{
scalar level = 0.0;
alphas_ == 0.0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
alphas_ += level*iter();
level += 1.0;
}
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::calcNu() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// 1/nu
tmp<volScalarField> tnuInv = iter()/iter().nu();
volScalarField& nuInv = tnuInv.ref();
// nu
tmp<volScalarField> tnu = iter()*iter().nu();
volScalarField& nu = tnu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nuInv += iter()/iter().nu();
}
nu = 1/nuInv;
return tnu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixtureScalar::calcStf() const
{
tmp<surfaceScalarField> tstf
(
new surfaceScalarField
(
IOobject
(
"stf",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar
(
"stf",
dimensionSet(1, -2, -2, 0, 0),
0.0
)
)
);
surfaceScalarField& stf = tstf.ref();
forAllConstIter(PtrDictionary<phase>, phases_, iter1)
{
const phase& alpha1 = iter1();
PtrDictionary<phase>::const_iterator iter2 = iter1;
++iter2;
for (; iter2 != phases_.end(); ++iter2)
{
const phase& alpha2 = iter2();
sigmaTable::const_iterator sigma =
sigmas_.find(interfacePair(alpha1, alpha2));
if (sigma == sigmas_.end())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< " in list of sigma values"
<< exit(FatalError);
}
stf += dimensionedScalar("sigma", dimSigma_, sigma())
*fvc::interpolate(K(alpha1, alpha2))*
(
fvc::interpolate(alpha2)*fvc::snGrad(alpha1)
- fvc::interpolate(alpha1)*fvc::snGrad(alpha2)
);
}
}
return tstf;
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::multiphaseMixtureScalar::multiphaseMixtureScalar
(
const volVectorField& U,
const surfaceScalarField& phi,
const volScalarField& voidfraction
)
:
IOdictionary
(
IOobject
(
"transportProperties",
U.time().constant(),
U.db(),
IOobject::MUST_READ_IF_MODIFIED,
IOobject::NO_WRITE
)
),
phases_(lookup("phases"), phase::iNew(U, phi)),
mesh_(U.mesh()),
U_(U),
phi_(phi),
voidfraction_(voidfraction),
rhoPhi_
(
IOobject
(
"rhoPhi",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("rhoPhi", dimMass/dimTime, 0.0)
),
surfaceTensionForce_
(
IOobject
(
"surfaceTensionForce",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("surfaceTensionForce", dimensionSet(1, -2, -2, 0, 0), 0.0)
),
alphas_
(
IOobject
(
"alphas",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh_,
dimensionedScalar("alphas", dimless, 0.0)
),
nu_
(
IOobject
(
"nu",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
calcNu()
),
sigmas_(lookup("sigmas")),
dimSigma_(1, 0, -2, 0, 0),
deltaN_
(
"deltaN",
1e-8/pow(average(mesh_.V()), 1.0/3.0)
)
{
calcAlphas();
alphas_.write();
surfaceTensionForce_ = calcStf();
}
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::rho() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<volScalarField> trho = iter()*iter().rho();
volScalarField& rho = trho.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rho += iter()*iter().rho();
}
return trho;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixtureScalar::rho(const label patchi) const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> trho = iter().boundaryField()[patchi]*iter().rho().value();
scalarField& rho = trho.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rho += iter().boundaryField()[patchi]*iter().rho().value();
}
return trho;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::mu() const
{
Info << "In multiphaseMixtureScalar mu()" << endl;
return rho()*nu();
// PtrDictionary<phase>::const_iterator iter = phases_.begin();
// tmp<volScalarField> tmu = iter()*iter().rho()*iter().nu();
// volScalarField& mu = tmu.ref();
// for (++iter; iter != phases_.end(); ++iter)
// {
// mu += iter()*iter().rho()*iter().nu();
// }
// return tmu;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixtureScalar::mu(const label patchi) const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> tmu =
iter().boundaryField()[patchi]
*iter().rho().value()
*iter().nu(patchi);
scalarField& mu = tmu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
mu +=
iter().boundaryField()[patchi]
*iter().rho().value()
*iter().nu(patchi);
}
return tmu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixtureScalar::muf() const
{
return nuf()*fvc::interpolate(rho());
// PtrDictionary<phase>::const_iterator iter = phases_.begin();
// tmp<surfaceScalarField> tmuf =
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// surfaceScalarField& muf = tmuf.ref();
// for (++iter; iter != phases_.end(); ++iter)
// {
// muf +=
// fvc::interpolate(iter())*iter().rho()*fvc::interpolate(iter().nu());
// }
// return tmuf;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::nu() const
{
return nu_;
}
Foam::tmp<Foam::scalarField>
Foam::multiphaseMixtureScalar::nu(const label patchi) const
{
//return nu_.boundaryField()[patchi];
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<scalarField> tnu =
iter().boundaryField()[patchi]
*iter().nu(patchi);
scalarField& nu = tnu.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nu +=
iter().boundaryField()[patchi]
*iter().nu(patchi);
}
return tnu;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixtureScalar::nuf() const
{
//return muf()/fvc::interpolate(rho());
PtrDictionary<phase>::const_iterator iter = phases_.begin();
tmp<surfaceScalarField> tnuf =
fvc::interpolate(iter())*fvc::interpolate(iter().nu());
surfaceScalarField& nuf = tnuf.ref();
for (++iter; iter != phases_.end(); ++iter)
{
nuf +=
fvc::interpolate(iter())*fvc::interpolate(iter().nu());
}
return tnuf;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::Cp() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// rho*Cp
tmp<volScalarField> trhoCp = iter()*iter().Cp()*iter().rho();
volScalarField& rhoCp = trhoCp.ref();
// Cp
tmp<volScalarField> tCp = iter()*iter().Cp();
volScalarField& Cp = tCp.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rhoCp += iter()*iter().Cp()*iter().rho();
}
Cp = rhoCp/rho();
return tCp;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::kf() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// rho*Cp/kf
tmp<volScalarField> trhoCpkf = iter()*iter().rho()*iter().Cp()/iter().kf();
volScalarField& rhoCpkf = trhoCpkf.ref();
// kf
tmp<volScalarField> tkf = iter()*iter().kf();
volScalarField& kf = tkf.ref();
for (++iter; iter != phases_.end(); ++iter)
{
rhoCpkf += iter()*iter().rho()*iter().Cp()/iter().kf();
}
kf = rho()*Cp()/rhoCpkf;
return tkf;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::D() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// 1/D
tmp<volScalarField> tDInv = iter()/iter().D();
volScalarField& DInv = tDInv.ref();
// D
tmp<volScalarField> tD = iter()*iter().D();
volScalarField& D = tD.ref();
for (++iter; iter != phases_.end(); ++iter)
{
DInv += iter()/iter().D();
}
D = 1/DInv;
return tD;
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::Cs() const
{
PtrDictionary<phase>::const_iterator iter = phases_.begin();
// Cs
tmp<volScalarField> tCs = iter()*iter().Cs();
volScalarField& Cs = tCs.ref();
for (++iter; iter != phases_.end(); ++iter)
{
Cs += iter()*iter().Cs();
}
return tCs;
}
Foam::tmp<Foam::surfaceScalarField>
Foam::multiphaseMixtureScalar::diffusionCorrection() const
{
surfaceScalarField numerator
(
IOobject
(
"numerator",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("zero", dimless/dimLength, 0.0)
);
surfaceScalarField denominator
(
IOobject
(
"denominator",
mesh_.time().timeName(),
mesh_,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh_,
dimensionedScalar("zero", dimless, 0.0)
);
PtrDictionary<phase>::const_iterator iter = phases_.begin();
const phase& alpha1 = iter();
for (++iter; iter != phases_.end(); ++iter)
{
const phase& alpha2 = iter();
scalar He = alpha1.Cs().value() / (alpha2.Cs().value() + SMALL);
numerator += (1/He - 1) * fvc::snGrad(alpha2);
denominator += fvc::interpolate(alpha2) * (1/He - 1);
}
tmp<surfaceScalarField> correction = numerator / (denominator + 1 + SMALL);
/*
PtrDictionary<phase>::const_iterator iter = phases_.begin();
const phase& alphaL = iter();
++iter;
const phase& alphaG = iter();
scalar He = alphaG.Cs().value() / (alphaL.Cs().value() + SMALL);
surfaceScalarField gradAlphaL = fvc::snGrad(alphaL);
surfaceScalarField surfAlphaL = fvc::interpolate(alphaL);
tmp<surfaceScalarField> correction = (1-He)/(surfAlphaL + He*(1-surfAlphaL) + 10*SMALL) * gradAlphaL;
*/
return correction;
}
void Foam::multiphaseMixtureScalar::solve()
{
correct();
const Time& runTime = mesh_.time();
volScalarField& alpha = phases_.first();
const dictionary& alphaControls = mesh_.solverDict("alpha");
label nAlphaSubCycles(readLabel(alphaControls.lookup("nAlphaSubCycles")));
scalar cAlpha(readScalar(alphaControls.lookup("cAlpha")));
if (nAlphaSubCycles > 1)
{
surfaceScalarField rhoPhiSum
(
IOobject
(
"rhoPhiSum",
runTime.timeName(),
mesh_
),
mesh_,
dimensionedScalar("0", rhoPhi_.dimensions(), 0)
);
dimensionedScalar totalDeltaT = runTime.deltaT();
for
(
subCycle<volScalarField> alphaSubCycle(alpha, nAlphaSubCycles);
!(++alphaSubCycle).end();
)
{
FatalError << "Sub-cycling of the alpha equation not yet implemented!!" << abort(FatalError);
solveAlphas(cAlpha);
rhoPhiSum += (runTime.deltaT()/totalDeltaT)*rhoPhi_;
}
rhoPhi_ = rhoPhiSum;
}
else
{
solveAlphas(cAlpha);
}
// Update the mixture kinematic viscosity
nu_ = calcNu();
surfaceTensionForce_ = calcStf();
}
void Foam::multiphaseMixtureScalar::correct()
{
forAllIter(PtrDictionary<phase>, phases_, iter)
{
iter().correct();
}
}
Foam::tmp<Foam::surfaceVectorField> Foam::multiphaseMixtureScalar::nHatfv
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const
{
/*
// Cell gradient of alpha
volVectorField gradAlpha =
alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2);
// Interpolated face-gradient of alpha
surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha);
*/
surfaceVectorField gradAlphaf
(
fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1))
- fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2))
);
// Face unit interface normal
return gradAlphaf/(mag(gradAlphaf) + deltaN_);
}
Foam::tmp<Foam::surfaceScalarField> Foam::multiphaseMixtureScalar::nHatf
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const
{
// Face unit interface normal flux
return nHatfv(alpha1, alpha2) & mesh_.Sf();
}
// Correction for the boundary condition on the unit normal nHat on
// walls to produce the correct contact angle.
// The dynamic contact angle is calculated from the component of the
// velocity on the direction of the interface, parallel to the wall.
void Foam::multiphaseMixtureScalar::correctContactAngle
(
const phase& alpha1,
const phase& alpha2,
surfaceVectorField::Boundary& nHatb
) const
{
const volScalarField::Boundary& gbf
= alpha1.boundaryField();
const fvBoundaryMesh& boundary = mesh_.boundary();
forAll(boundary, patchi)
{
if (isA<alphaContactAngleFvPatchScalarField>(gbf[patchi]))
{
const alphaContactAngleFvPatchScalarField& acap =
refCast<const alphaContactAngleFvPatchScalarField>(gbf[patchi]);
vectorField& nHatPatch = nHatb[patchi];
vectorField AfHatPatch
(
mesh_.Sf().boundaryField()[patchi]
/mesh_.magSf().boundaryField()[patchi]
);
alphaContactAngleFvPatchScalarField::thetaPropsTable::
const_iterator tp =
acap.thetaProps().find(interfacePair(alpha1, alpha2));
if (tp == acap.thetaProps().end())
{
FatalErrorInFunction
<< "Cannot find interface " << interfacePair(alpha1, alpha2)
<< "\n in table of theta properties for patch "
<< acap.patch().name()
<< exit(FatalError);
}
bool matched = (tp.key().first() == alpha1.name());
scalar theta0 = convertToRad*tp().theta0(matched);
scalarField theta(boundary[patchi].size(), theta0);
scalar uTheta = tp().uTheta();
// Calculate the dynamic contact angle if required
if (uTheta > SMALL)
{
scalar thetaA = convertToRad*tp().thetaA(matched);
scalar thetaR = convertToRad*tp().thetaR(matched);
// Calculated the component of the velocity parallel to the wall
vectorField Uwall
(
U_.boundaryField()[patchi].patchInternalField()
- U_.boundaryField()[patchi]
);
Uwall -= (AfHatPatch & Uwall)*AfHatPatch;
// Find the direction of the interface parallel to the wall
vectorField nWall
(
nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch
);
// Normalise nWall
nWall /= (mag(nWall) + SMALL);
// Calculate Uwall resolved normal to the interface parallel to
// the interface
scalarField uwall(nWall & Uwall);
theta += (thetaA - thetaR)*tanh(uwall/uTheta);
}
// Reset nHatPatch to correspond to the contact angle
scalarField a12(nHatPatch & AfHatPatch);
scalarField b1(cos(theta));
scalarField b2(nHatPatch.size());
forAll(b2, facei)
{
b2[facei] = cos(acos(a12[facei]) - theta[facei]);
}
scalarField det(1.0 - a12*a12);
scalarField a((b1 - a12*b2)/det);
scalarField b((b2 - a12*b1)/det);
nHatPatch = a*AfHatPatch + b*nHatPatch;
nHatPatch /= (mag(nHatPatch) + deltaN_.value());
}
}
}
Foam::tmp<Foam::volScalarField> Foam::multiphaseMixtureScalar::K
(
const phase& alpha1,
const phase& alpha2
) const
{
tmp<surfaceVectorField> tnHatfv = nHatfv(alpha1, alpha2);
correctContactAngle(alpha1, alpha2, tnHatfv.ref().boundaryFieldRef());
// Simple expression for curvature
return -fvc::div(tnHatfv & mesh_.Sf());
}
Foam::tmp<Foam::volScalarField>
Foam::multiphaseMixtureScalar::nearInterface() const
{
tmp<volScalarField> tnearInt
(
new volScalarField
(
IOobject
(
"nearInterface",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar("nearInterface", dimless, 0.0)
)
);
forAllConstIter(PtrDictionary<phase>, phases_, iter)
{
tnearInt.ref() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter()));
}
return tnearInt;
}
void Foam::multiphaseMixtureScalar::solveAlphas
(
const scalar cAlpha
)
{
static label nSolves=-1;
nSolves++;
word alphaScheme("div(phi,alpha)");
word alpharScheme("div(phirb,alpha)");
surfaceScalarField phic(mag(phi_/mesh_.magSf()));
phic = min(cAlpha*phic, max(phic));
PtrList<surfaceScalarField> alphaPhiCorrs(phases_.size());
int phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
phase& alpha = iter();
alphaPhiCorrs.set
(
phasei,
new surfaceScalarField
(
"phi" + alpha.name() + "Corr",
fvc::flux
(
phi_,
alpha,
alphaScheme
)
)
);
surfaceScalarField& alphaPhiCorr = alphaPhiCorrs[phasei];
forAllIter(PtrDictionary<phase>, phases_, iter2)
{
phase& alpha2 = iter2();
if (&alpha2 == &alpha) continue;
surfaceScalarField phir(phic*nHatf(alpha, alpha2));
alphaPhiCorr += fvc::flux
(
-fvc::flux(-phir, alpha2, alpharScheme),
alpha,
alpharScheme
);
}
MULES::limit
(
1.0/mesh_.time().deltaT().value(),
voidfraction_,
alpha,
phi_,
alphaPhiCorr,
zeroField(),
zeroField(),
#if OPENFOAM_VERSION_MAJOR < 6
1,
0,
#else
oneField(),
zeroField(),
#endif
true
);
phasei++;
}
MULES::limitSum(alphaPhiCorrs);
rhoPhi_ = dimensionedScalar("0", dimensionSet(1, 0, -1, 0, 0), 0);
volScalarField sumAlpha
(
IOobject
(
"sumAlpha",
mesh_.time().timeName(),
mesh_
),
mesh_,
dimensionedScalar("sumAlpha", dimless, 0)
);
phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
phase& alpha = iter();
surfaceScalarField& alphaPhi = alphaPhiCorrs[phasei];
alphaPhi += upwind<scalar>(mesh_, phi_).flux(alpha);
MULES::explicitSolve
(
voidfraction_,
alpha,
alphaPhi,
zeroField(),
zeroField()
);
rhoPhi_ += alphaPhi*alpha.rho();
Info<< alpha.name() << " volume fraction, min, max = "
<< alpha.weightedAverage(mesh_.V()).value()
<< ' ' << min(alpha).value()
<< ' ' << max(alpha).value()
<< endl;
sumAlpha += alpha;
phasei++;
}
Info<< "Phase-sum volume fraction, min, max = "
<< sumAlpha.weightedAverage(mesh_.V()).value()
<< ' ' << min(sumAlpha).value()
<< ' ' << max(sumAlpha).value()
<< endl;
calcAlphas();
}
bool Foam::multiphaseMixtureScalar::read()
{
if (transportModel::read())
{
bool readOK = true;
PtrList<entry> phaseData(lookup("phases"));
label phasei = 0;
forAllIter(PtrDictionary<phase>, phases_, iter)
{
readOK &= iter().read(phaseData[phasei++].dict());
}
lookup("sigmas") >> sigmas_;
return readOK;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,299 @@
/*---------------------------------------------------------------------------*\
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) 2018- Mathias Vångö, JKU Linz, Austria
Class
multiphaseMixtureScalar
Description
This class is based on the OpenFOAM(R) Foam::multiphaseMixtureScalar class,
which is an incompressible multi-phase mixture with built in solution
for the phase fractions with interface compression for interface-capturing.
It has been extended to include the void fraction in the volume fraction
transport equations.
Derived from transportModel so that it can be unsed in conjunction with
the incompressible turbulence models.
Surface tension and contact-angle is handled for the interface
between each phase-pair.
SourceFiles
multiphaseMixtureScalar.C
\*---------------------------------------------------------------------------*/
#ifndef multiphaseMixtureScalar_H
#define multiphaseMixtureScalar_H
#include "incompressible/transportModel/transportModel.H"
#include "IOdictionary.H"
#include "phase.H"
#include "PtrDictionary.H"
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class multiphaseMixtureScalar Declaration
\*---------------------------------------------------------------------------*/
class multiphaseMixtureScalar
:
public IOdictionary,
public transportModel
{
public:
class interfacePair
:
public Pair<word>
{
public:
class hash
:
public Hash<interfacePair>
{
public:
hash()
{}
label operator()(const interfacePair& key) const
{
return word::hash()(key.first()) + word::hash()(key.second());
}
};
// Constructors
interfacePair()
{}
interfacePair(const word& alpha1Name, const word& alpha2Name)
:
Pair<word>(alpha1Name, alpha2Name)
{}
interfacePair(const phase& alpha1, const phase& alpha2)
:
Pair<word>(alpha1.name(), alpha2.name())
{}
// Friend Operators
friend bool operator==
(
const interfacePair& a,
const interfacePair& b
)
{
return
(
((a.first() == b.first()) && (a.second() == b.second()))
|| ((a.first() == b.second()) && (a.second() == b.first()))
);
}
friend bool operator!=
(
const interfacePair& a,
const interfacePair& b
)
{
return (!(a == b));
}
};
private:
// Private data
//- Dictionary of phases
PtrDictionary<phase> phases_;
const fvMesh& mesh_;
const volVectorField& U_;
const surfaceScalarField& phi_;
const volScalarField& voidfraction_;
surfaceScalarField rhoPhi_;
surfaceScalarField surfaceTensionForce_;
volScalarField alphas_;
volScalarField nu_;
typedef HashTable<scalar, interfacePair, interfacePair::hash>
sigmaTable;
sigmaTable sigmas_;
dimensionSet dimSigma_;
//- Stabilisation for normalisation of the interface normal
const dimensionedScalar deltaN_;
//- Conversion factor for degrees into radians
static const scalar convertToRad;
// Private member functions
void calcAlphas();
tmp<volScalarField> calcNu() const;
void solveAlphas(const scalar cAlpha);
tmp<surfaceVectorField> nHatfv
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const;
tmp<surfaceScalarField> nHatf
(
const volScalarField& alpha1,
const volScalarField& alpha2
) const;
void correctContactAngle
(
const phase& alpha1,
const phase& alpha2,
surfaceVectorField::Boundary& nHatb
) const;
tmp<volScalarField> K(const phase& alpha1, const phase& alpha2) const;
tmp<surfaceScalarField> calcStf() const;
public:
// Constructors
//- Construct from components
multiphaseMixtureScalar
(
const volVectorField& U,
const surfaceScalarField& phi,
const volScalarField& voidfraction
);
//- Destructor
virtual ~multiphaseMixtureScalar()
{}
// Member Functions
//- Return the phases
const PtrDictionary<phase>& phases() const
{
return phases_;
}
//- Return the velocity
const volVectorField& U() const
{
return U_;
}
//- Return the volumetric flux
const surfaceScalarField& phi() const
{
return phi_;
}
const surfaceScalarField& rhoPhi() const
{
return rhoPhi_;
}
//- Return the mixture density
tmp<volScalarField> rho() const;
//- Return the mixture density for patch
tmp<scalarField> rho(const label patchi) const;
//- Return the dynamic laminar viscosity
tmp<volScalarField> mu() const;
//- Return the dynamic laminar viscosity for patch
tmp<scalarField> mu(const label patchi) const;
//- Return the face-interpolated dynamic laminar viscosity
tmp<surfaceScalarField> muf() const;
//- Return the kinematic laminar viscosity
tmp<volScalarField> nu() const;
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const;
//- Return the face-interpolated dynamic laminar viscosity
tmp<surfaceScalarField> nuf() const;
//- Return the heat capacity
tmp<volScalarField> Cp() const;
//- Return the thermal conductivity
tmp<volScalarField> kf() const;
//- Return the diffusion coefficient
tmp<volScalarField> D() const;
//- Return the solubility
tmp<volScalarField> Cs() const;
//- Return the diffusion correction term
tmp<surfaceScalarField> diffusionCorrection() const;
tmp<surfaceScalarField> surfaceTensionForce() const
{
return surfaceTensionForce_;
}
//- Indicator of the proximity of the interface
// Field values are 1 near and 0 away for the interface.
tmp<volScalarField> nearInterface() const;
//- Solve for the mixture phase-fractions
void solve();
//- Correct the mixture properties
void correct();
//- Read base transportProperties dictionary
bool read();
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,107 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
\*---------------------------------------------------------------------------*/
#include "phase.H"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::phase::phase
(
const word& phaseName,
const dictionary& phaseDict,
const volVectorField& U,
const surfaceScalarField& phi
)
:
volScalarField
(
IOobject
(
IOobject::groupName("alpha", phaseName),
U.mesh().time().timeName(),
U.mesh(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
U.mesh()
),
name_(phaseName),
phaseDict_(phaseDict),
nuModel_
(
viscosityModel::New
(
IOobject::groupName("nu", phaseName),
phaseDict_,
U,
phi
)
),
rho_("rho", dimDensity, phaseDict_),
Cp_("Cp", (dimSpecificHeatCapacity), phaseDict_),
kf_("kf", (dimPower/dimLength/dimTemperature), phaseDict_),
D_("D", dimViscosity, phaseDict_),
Cs_("Cs", dimDensity, phaseDict_)
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::phase> Foam::phase::clone() const
{
NotImplemented;
return autoPtr<phase>(NULL);
}
void Foam::phase::correct()
{
nuModel_->correct();
}
bool Foam::phase::read(const dictionary& phaseDict)
{
phaseDict_ = phaseDict;
phaseDict_.lookup("Cp") >> Cp_;
phaseDict_.lookup("kf") >> kf_;
phaseDict_.lookup("D") >> D_;
phaseDict_.lookup("Cs") >> Cs_;
if (nuModel_->read(phaseDict_))
{
phaseDict_.lookup("rho") >> rho_;
return true;
}
else
{
return false;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,190 @@
/*---------------------------------------------------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
OpenFOAM 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.
OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Class
Foam::phase
Description
Single incompressible phase derived from the phase-fraction.
Used as part of the multiphaseMixtureScalar for interface-capturing multi-phase
simulations.
SourceFiles
phase.C
\*---------------------------------------------------------------------------*/
#ifndef phase_H
#define phase_H
#include "volFields.H"
#include "dictionaryEntry.H"
#include "incompressible/viscosityModels/viscosityModel/viscosityModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class phase Declaration
\*---------------------------------------------------------------------------*/
class phase
:
public volScalarField
{
// Private data
word name_;
dictionary phaseDict_;
autoPtr<viscosityModel> nuModel_;
dimensionedScalar rho_;
dimensionedScalar Cp_;
dimensionedScalar kf_;
dimensionedScalar D_;
dimensionedScalar Cs_;
public:
// Constructors
//- Construct from components
phase
(
const word& name,
const dictionary& phaseDict,
const volVectorField& U,
const surfaceScalarField& phi
);
//- Return clone
autoPtr<phase> clone() const;
//- Return a pointer to a new phase created on freestore
// from Istream
class iNew
{
const volVectorField& U_;
const surfaceScalarField& phi_;
public:
iNew
(
const volVectorField& U,
const surfaceScalarField& phi
)
:
U_(U),
phi_(phi)
{}
autoPtr<phase> operator()(Istream& is) const
{
dictionaryEntry ent(dictionary::null, is);
return autoPtr<phase>(new phase(ent.keyword(), ent, U_, phi_));
}
};
// Member Functions
const word& name() const
{
return name_;
}
const word& keyword() const
{
return name();
}
//- Return const-access to phase1 viscosityModel
const viscosityModel& nuModel() const
{
return nuModel_();
}
//- Return the kinematic laminar viscosity
tmp<volScalarField> nu() const
{
return nuModel_->nu();
}
//- Return the laminar viscosity for patch
tmp<scalarField> nu(const label patchi) const
{
return nuModel_->nu(patchi);
}
//- Return const-access to phase1 density
const dimensionedScalar& rho() const
{
return rho_;
}
//- Return const-access to phase1 heat capacity
const dimensionedScalar& Cp() const
{
return Cp_;
}
//- Return const-access to phase1 thermal conductivity
const dimensionedScalar& kf() const
{
return kf_;
}
//- Return const-access to phase1 diffusion coefficient
const dimensionedScalar& D() const
{
return D_;
}
//- Return const-access to phase1 solubility
const dimensionedScalar& Cs() const
{
return Cs_;
}
//- Correct the phase properties
void correct();
//-Inherit read from volScalarField
using volScalarField::read;
//- Read base transportProperties dictionary
bool read(const dictionary& phaseDict);
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,73 @@
{
volScalarField rAU("rAU", 1.0/UEqn.A());
surfaceScalarField rAUepsf("rAUepsf", fvc::interpolate(rAU*voidfraction));
surfaceScalarField rAUepsSqf("rAUepsSqf", fvc::interpolate(rAU*voidfraction*voidfraction));
volVectorField Ueps("Ueps", U * voidfraction);
volVectorField HbyA(constrainHbyA(rAU*UEqn.H(), U, p_rgh));
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::flux(HbyA*voidfraction)
+ fvc::interpolate(voidfraction*rho*rAU)*fvc::ddtCorr(U, phi)
);
adjustPhi(phiHbyA, U, p_rgh);
if (modelType == "A")
rAUepsf = rAUepsSqf;
surfaceScalarField phig (-ghf*fvc::snGrad(rho)*rAUepsf*mesh.magSf());
surfaceScalarField phiSt (mixture.surfaceTensionForce()*rAUepsSqf*mesh.magSf());
surfaceScalarField phiS (fvc::flux(voidfraction*Us*Ksl*rAU));
phiHbyA += phig + phiSt + phiS;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p_rgh, Ueps, phiHbyA, rAUepsf);
while (pimple.correctNonOrthogonal())
{
fvScalarMatrix p_rghEqn
(
fvm::laplacian(rAUepsf, p_rgh) == particleCloud.ddtVoidfraction() + fvc::div(phiHbyA)
);
p_rghEqn.setReference(pRefCell, getRefCellValue(p_rgh, pRefCell));
p_rghEqn.solve(mesh.solver(p_rgh.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi = phiHbyA - p_rghEqn.flux();
p_rgh.relax();
if (modelType == "A")
U = HbyA + voidfraction*rAU*fvc::reconstruct((phig-p_rghEqn.flux()+phiSt)/rAUepsf) + rAU*Us*Ksl;
else
U = HbyA + rAU*fvc::reconstruct((phig-p_rghEqn.flux()+phiSt)/rAUepsf) + rAU*Us*Ksl;
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}
#include "continuityErrs.H"
p == p_rgh + rho*gh;
if (p_rgh.needReference())
{
p += dimensionedScalar
(
"p",
p.dimensions(),
pRefValue - getRefCellValue(p, pRefCell)
);
p_rgh = p - rho*gh;
}
}

View File

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

View File

@ -0,0 +1,24 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-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$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,43 @@
particleCloud.otherForces(fOther);
tmp<fvVectorMatrix> tUEqn
(
fvm::ddt(voidfraction,U) - fvm::Sp(fvc::ddt(voidfraction),U)
+ fvm::div(phi,U) - fvm::Sp(fvc::div(phi),U)
// in case of "periodic box" simulations the viscous term can be commented
// during testing the effect of this term on the results was negligible (about 1-2%)
+ particleCloud.divVoidfractionTau(U, voidfraction)
- fOther/rho
==
fvOptions(U)
- fvm::Sp(Ksl/rho,U)
);
fvVectorMatrix& UEqn = tUEqn.ref();
UEqn.relax();
fvOptions.constrain(UEqn);
volScalarField rAU = 1.0/UEqn.A();
surfaceScalarField rAUf("(1|A(U))", fvc::interpolate(rAU));
surfaceScalarField voidfractionf = fvc::interpolate(voidfraction);
surfaceScalarField phicForces
(
fvc::interpolate(rAU*(Ksl*Us)/rho) & mesh.Sf()
);
if (pimple.momentumPredictor() && (modelType=="B" || modelType=="Bfull"))
{
solve(UEqn == fvc::reconstruct(phicForces/rAUf - fvc::snGrad(p)*mesh.magSf()));
fvOptions.correct(U);
}
else if (pimple.momentumPredictor())
{
solve(UEqn == fvc::reconstruct(phicForces/rAUf - fvc::snGrad(p)*voidfractionf*mesh.magSf()));
fvOptions.correct(U);
}

View File

@ -0,0 +1,147 @@
/*---------------------------------------------------------------------------*\
Open Source CFD-DEM coupling
Copyright (C) 2023 Behrad Esgandari, JKU Linz, Austria
-------------------------------------------------------------------------------
License
This program 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 program 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 program. If not, see <https://www.gnu.org/licenses/>.
Application
cfdemSolverPimple
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 pimpleFoam in OpenFOAM(R) 6.0,
where additional functionality for CFD-DEM coupling is added.
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pimpleControl.H"
#include "fvOptions.H"
#include "cfdemCloud.H"
#include "implicitCouple.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"
// switch for periodic box simulations
Switch periodicBoxSwitch
(
pimple.dict().lookupOrDefault<Switch>("periodicBoxSwitch", false)
);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "CourantNo.H"
// 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.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");
if(particleCloud.solveFlow())
{
// Pressure-velocity PIMPLE corrector
while (pimple.loop())
{
// Momentum predictor
#include "UEqn.H"
// --- Inner PIMPLE loop
while (pimple.correct())
{
#include "pEqn.H"
}
}
laminarTransport.correct();
turbulence->correct();
}
else
{
Info << "skipping flow solution." << endl;
}
if (periodicBoxSwitch)
{
#include "periodicBoxProperties.H"
}
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,169 @@
//===============================
// Fluid Fields
//===============================
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
);
//===============================
// particle interaction modelling
//===============================
Info<< "\nReading momentum exchange field Ksl\n" << endl;
volScalarField Ksl
(
IOobject
(
"Ksl",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
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<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "\nCreating dummy density field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//===============================
#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
Info<< "Generating interstitial(!) flux field phiByVoidfraction\n" << endl;
surfaceScalarField phiByVoidfraction
(
IOobject
(
"phiByVoidfraction",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
linearInterpolate(U) & mesh.Sf()
);
//Periodic box
volScalarField unity
(
IOobject
(
"unity",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::NO_WRITE
),
mesh,
dimensionedScalar("unity", dimless, 1.0)
);
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), 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 @@
volScalarField rAUvoidfraction("(voidfraction2|A(U))",rAU*voidfraction);
surfaceScalarField rAUfvoidfraction("(voidfraction2|A(U)F)", fvc::interpolate(rAUvoidfraction));
volVectorField HbyA("HbyA", U);
HbyA = rAU*UEqn.H();
phi = voidfractionf*phiByVoidfraction;
surfaceScalarField phiHbyA
(
"phiHbyA",
(
(fvc::interpolate(HbyA) & mesh.Sf() )
+ phicForces //explicit contribution
+ rAUfvoidfraction*fvc::ddtCorr(U, phiByVoidfraction) //correction
)
);
if (modelType=="A")
rAUvoidfraction = volScalarField("(voidfraction2|A(U))",rAU*voidfraction*voidfraction);
// Update the fixedFluxPressure BCs to ensure flux consistency
if (modelType=="A")
{
volScalarField rUsed = rAU*voidfraction;
constrainPressure(p, U, phiHbyA, rUsed,MRF);
}
else constrainPressure(p, U, phiHbyA, rAU,MRF);
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rAUvoidfraction, p) == fvc::div(voidfractionf*phiHbyA) + particleCloud.ddtVoidfraction()
);
pEqn.setReference(pRefCell, pRefValue);
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phiByVoidfraction = phiHbyA - pEqn.flux()/voidfractionf;
phi = voidfractionf*phiByVoidfraction;
#include "continuityErrorPhiPU.H"
// Explicitly relax pressure for momentum corrector
p.relax();
U = fvc::reconstruct(phiHbyA)
- rAU*fvc::reconstruct(pEqn.flux()/voidfractionf/rAUf);
U.correctBoundaryConditions();
fvOptions.correct(U);
}
}

View File

@ -0,0 +1,65 @@
dimensionedVector gN = mesh.lookupObject<uniformDimensionedVectorField> ("g");
dimensionedScalar volume = fvc::domainIntegrate(unity);
Info<< "particle_ENSTROPHY: "
<< (
fvc::domainIntegrate( 0.5*magSqr(fvc::curl(Us)))
/volume
).value()
<< endl;
Info<< "air_ENSTROPHY: "
<< (
fvc::domainIntegrate( 0.5*magSqr(fvc::curl(U)))
/volume
).value()
<< endl;
Info<< "slip_velocity: "
<< - ((
fvc::domainIntegrate(voidfraction*(U&gN)).value()
/fvc::domainIntegrate(voidfraction*mag(gN)).value()
)
- (
fvc::domainIntegrate((1.0-voidfraction)*(Us&gN)).value()
/fvc::domainIntegrate((1.0-voidfraction)*mag(gN)).value()
))
<< endl;
dimensionedVector alpha1Us = fvc::domainIntegrate((1.0-voidfraction)*(Us))/fvc::domainIntegrate((1.0-voidfraction));
dimensionedVector alpha2U = fvc::domainIntegrate(voidfraction*(U))/fvc::domainIntegrate(voidfraction);
dimensionedScalar alpha1M = fvc::domainIntegrate((1.0-voidfraction))/volume;
dimensionedScalar alpha2M = scalar(1.0) - alpha1M;
Info<< "TKE gas: "
<< 0.5
*(
fvc::domainIntegrate(voidfraction*(U&U)).value()
/fvc::domainIntegrate(voidfraction).value()
)
- 0.5
*(
alpha2U.value()
&alpha2U.value()
)
<< endl;
Info<< "TKE solid: "
<< 0.5
*(
fvc::domainIntegrate((1.0-voidfraction)*(Us&Us)).value()
/fvc::domainIntegrate(1.0-voidfraction).value()
)
- 0.5
*(
alpha1Us.value()
&alpha1Us.value()
)
<< endl;
Info<< "PhiP2: "
<< fvc::domainIntegrate((1.0-voidfraction)*(1.0-voidfraction)).value()
/fvc::domainIntegrate(unity).value()
- alpha1M.value()*alpha1M.value()
<< endl;

View File

@ -1,15 +1,24 @@
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 \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lincompressibleRASModels \
-lincompressibleLESModels \
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-l$(CFDEM_LIB_NAME)
-lmeshTools \
-lfvOptions \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,27 @@
particleCloud.otherForces(fOther);
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)
- fOther/rho
==
fvOptions(U)
- 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,7 +36,9 @@ 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"
@ -51,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
@ -67,7 +71,6 @@ int main(int argc, char *argv[])
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "readPISOControls.H"
#include "CourantNo.H"
// do particle stuff
@ -78,17 +81,17 @@ int main(int argc, char *argv[])
{
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()));
reduce(fImpTotal, sumOp<vector>());
Info << "TotalForceExp: " << fTotal << endl;
Info << "TotalForceImp: " << fImpTotal << endl;
//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");
@ -100,95 +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)
);
UEqn.relax();
if (momentumPredictor && (modelType=="B" || modelType=="Bfull"))
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
else if (momentumPredictor)
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
#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);
surfaceScalarField rUAfvoidfraction("(voidfraction2|A(U)F)", fvc::interpolate(rUAvoidfraction));
U = rUA*UEqn.H();
#ifdef version23
phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() )
+ rUAfvoidfraction*fvc::ddtCorr(U, phi);
#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();
phi = phiGes;
}
} // end non-orthogonal corrector loop
#include "continuityErrorPhiPU.H"
if (modelType=="B" || modelType=="Bfull")
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;

View File

@ -46,6 +46,21 @@
//dimensionedScalar("0", dimensionSet(1, -3, -1, 0, 0), 1.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<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
@ -96,17 +111,17 @@
#define createPhi_H
Info<< "Reading/calculating face flux field phi\n" << endl;
surfaceScalarField phi
(
IOobject
(
(
IOobject
(
"phi",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
),
linearInterpolate(U*voidfraction) & mesh.Sf()
);
#endif
@ -122,3 +137,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

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

View File

@ -0,0 +1,28 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
EXE_INC = \
-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$(FOAM_SOLVERS)/incompressible/pisoFoam \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/derived/cfdemCloudRec \
-I$(LIB_SRC)/sampling/lnInclude \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lturbulenceModels \
-lincompressibleTurbulenceModels \
-lincompressibleTransportModels \
-lfiniteVolume \
-lmeshTools \
-lfvOptions \
-lsampling \
-l$(CFDEM_LIB_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS)

View File

@ -0,0 +1,126 @@
/*---------------------------------------------------------------------------*\
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/>.
Application
cfdemSolverPisoFreeStreaming
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,
where additional functionality for CFD-DEM coupling is added.
the particles follow the fluid velocity
\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "turbulentTransportModel.H"
#include "pisoControl.H"
#include "fvOptions.H"
#include "cfdemCloudRec.H"
#include "cfdemCloud.H"
#include "implicitCouple.H"
#include "clockModel.H"
#include "smoothingModel.H"
#include "forceModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "postProcess.H"
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "createControl.H"
#include "createFields.H"
#include "createFvOptions.H"
#include "initContinuityErrs.H"
cfdemCloudRec<cfdemCloud> particleCloud(mesh);
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.loop())
{
particleCloud.clockM().start(1,"Global");
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "CourantNo.H"
// do particle stuff
particleCloud.clockM().start(2,"Coupling");
particleCloud.evolve(voidfraction,Us,U);
particleCloud.clockM().stop("Coupling");
particleCloud.clockM().start(26,"Flow");
if(particleCloud.solveFlow())
{
// Pressure-velocity PISO corrector
{
// Momentum predictor
#include "UEqn.H"
// --- PISO loop
while (piso.correct())
{
#include "pEqn.H"
}
}
laminarTransport.correct();
turbulence->correct();
}
else
{
Info << "skipping flow solution." << endl;
}
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,110 @@
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
);
//===============================
// particle interaction modelling
//===============================
Info<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
IOobject
(
"voidfraction",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "\nCreating density field rho\n" << endl;
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
Info<< "Reading particle velocity field Us\n" << endl;
volVectorField Us
(
IOobject
(
"Us",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
//===============================
//# 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) & 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

@ -1,16 +1,24 @@
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 \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lincompressibleRASModels \
-lincompressibleLESModels \
-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,24 @@
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 \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR)\
-lincompressibleRASModels \
-lincompressibleLESModels \
-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

@ -36,10 +36,13 @@ 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
@ -62,136 +67,57 @@ int main(int argc, char *argv[])
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
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.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");
// 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();
#include "TEqn.H"
if(particleCloud.solveFlow())
{
// 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)
);
UEqn.relax();
if (momentumPredictor && (modelType=="B" || modelType=="Bfull"))
solve(UEqn == - fvc::grad(p) + Ksl/rho*Us);
else if (momentumPredictor)
solve(UEqn == - voidfraction*fvc::grad(p) + Ksl/rho*Us);
#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);
surfaceScalarField rUAfvoidfraction("(voidfraction2|A(U)F)", fvc::interpolate(rUAvoidfraction));
U = rUA*UEqn.H();
#ifdef version23
phi = ( fvc::interpolate(U*voidfraction) & mesh.Sf() )
+ rUAfvoidfraction*fvc::ddtCorr(U, phi);
#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();
phi = phiGes;
}
} // end non-orthogonal corrector loop
#include "continuityErrorPhiPU.H"
if (modelType=="B" || modelType=="Bfull")
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;
@ -202,6 +128,9 @@ int main(int argc, char *argv[])
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,23 @@
),
mesh
//dimensionedScalar("0", dimensionSet(0, 0, -1, 0, 0), 1.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<< "\nReading voidfraction field voidfraction = (Vgas/Vparticle)\n" << endl;
volScalarField voidfraction
(
@ -58,8 +73,8 @@
IOobject::AUTO_WRITE
),
mesh
);
);
Info<< "\nCreating density field rho\n" << endl;
volScalarField rho
(
@ -71,27 +86,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 +118,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 +133,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,54 @@
// 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);
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
// For implict T terms in the energy/enthalpy transport equation, use
// (he_n+1 - he_n) / (T_n+1 - T_n) = Cpv to eliminate T_n+1 with he_n+1.
// This formula is valid for ideal gases with e=e(T) and h=h(T). For
// incompressible fluids, e=e(T) holds, too, but enthalpy would need correction
// terms accounting for pressure variations.
fvScalarMatrix EEqn
(
fvm::ddt(rhoeps, he) + fvm::div(phi, he)
+ 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
)
- Qsource
- QCoeff*T
- fvm::Sp(QCoeff/Cpv, he)
+ QCoeff/Cpv*he
- fvc::laplacian(voidfraction*thCond,T)
- fvm::laplacian(voidfraction*thCond/Cpv,he)
+ fvc::laplacian(voidfraction*thCond/Cpv,he)
==
fvOptions(rho, he)
);
EEqn.relax();
fvOptions.constrain(EEqn);
EEqn.solve();
fvOptions.correct(he);
thermo.correct();
Info<< "T max/min/ave : " << max(T).value() << " " << min(T).value() << " " << average(T).value() << endl;
}

View File

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

View File

@ -0,0 +1,34 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
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 \
-Wno-deprecated-copy
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,184 @@
/*---------------------------------------------------------------------------*\
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"
#if OPENFOAM_VERSION_MAJOR >= 5
#include "pressureControl.H"
#endif
#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;
bool firstStep = true;
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 && smoothenForces)
{
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 OPENFOAM_VERSION_MAJOR < 6
if (pimple.nCorrPIMPLE() <= 1)
{
#include "rhoEqn.H"
}
rhoeps = rho*voidfraction;
#endif
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#if OPENFOAM_VERSION_MAJOR >= 6
if (pimple.firstIter())
{
#include "rhoEqn.H"
if (firstStep)
{
rhoeps.oldTime() = rho.oldTime()*voidfraction.oldTime();
firstStep = false;
}
rhoeps = rho*voidfraction;
}
#endif
#include "UEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
// besides this pEqn, OF offers a "pimple consistent"-option
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
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,244 @@
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 rhoeps("rhoeps", rho*voidfraction);
rhoeps.oldTime(); // switch on saving old time
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()
);
#if OPENFOAM_VERSION_MAJOR < 5
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
dimDensity,
GREAT
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
dimDensity,
0
)
);
#else
pressureControl pressureControl(p, rho, pimple.dict(), false);
#endif
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 conductivity field\n" << endl;
volScalarField thCond
(
IOobject
(
"thCond",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0),
"zeroGradient"
);
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)
);
bool smoothenForces
(
pimple.dict().lookupOrDefault<bool>
(
"smoothenForces",
false
)
);
if (smoothenForces) Info << "Smoothening implicit particle forces.\n" << endl;
else Info << "Not smoothening implicit particle forces.\n" << endl;
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,127 @@
rho = thermo.rho();
#if OPENFOAM_VERSION_MAJOR < 5
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
rhoeps = rho*voidfraction;
#else
rhoeps = rho*voidfraction;
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const volScalarField psip0(psi*p);
#endif
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", (modelType=="A")?fvc::interpolate(voidfraction*rhoeps*rAU):fvc::interpolate(rhoeps*rAU));
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();
}
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rhoeps)*fvc::flux(HbyA)
+ rhorAUf*fvc::ddtCorr(rhoeps, U, phi)
);
if (pimple.transonic())
{
// transonic version not implemented yet
}
else
{
// flux without pressure gradient contribution
phi = phiHbyA + phiUs;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rhoeps, U, phi, rhorAUf);
#if OPENFOAM_VERSION_MAJOR >= 5
fvScalarMatrix pDDtEqn
(
fvc::ddt(rhoeps)
+ psi*voidfraction*correction(fvm::ddt(p))
+ fvc::div(phi)
==
fvOptions(psi, p, rho.name())
);
#endif
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
#if OPENFOAM_VERSION_MAJOR < 5
fvScalarMatrix pEqn
(
fvm::ddt(psi*voidfraction, p)
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p)
==
fvOptions(psi, p, rho.name())
);
#else
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
#endif
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
}
}
// Thermodynamic density update
#if OPENFOAM_VERSION_MAJOR >= 5
thermo.correctRho(psi*p - psip0);
#endif
#include "rhoEqn.H"
#include "compressibleContinuityErrsPU.H"
// Explicitly relax pressure for momentum corrector
p.relax();
Info<< "p max/min/ave : " << max(p).value()
<< " " << min(p).value() << " " << average(p).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);
// Recalculate density from the relaxed pressure
#if OPENFOAM_VERSION_MAJOR >= 5
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
}
rho = thermo.rho();
#else
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
#endif
rhoeps = rho*voidfraction;
Info<< "rho max/min/ave : " << max(rho).value()
<< " " << min(rho).value() << " " << average(rho).value() << endl;
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

@ -0,0 +1,58 @@
// 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);
Cpv = he.name() == "e" ? thermo.Cv() : thermo.Cp();
// For implict T terms in the energy/enthalpy transport equation, use
// (he_n+1 - he_n) / (T_n+1 - T_n) = Cpv to eliminate T_n+1 with he_n+1.
// This formula is valid for ideal gases with e=e(T) and h=h(T). For
// incompressible fluids, e=e(T) holds, too, but enthalpy would need correction
// terms accounting for pressure variations.
fvScalarMatrix EEqn
(
fvm::ddt(rhoeps, he) + fvm::div(phi, he)
+ 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
)
- Qsource
- QCoeff*T
- fvm::Sp(QCoeff/Cpv, he)
+ QCoeff/Cpv*he
- fvc::laplacian(voidfraction*thCond,T)
- fvm::laplacian(voidfraction*thCond/Cpv,he)
+ fvc::laplacian(voidfraction*thCond/Cpv,he)
==
// + combustion->Sh()
fvOptions(rho, he)
);
EEqn.relax();
fvOptions.constrain(EEqn);
EEqn.solve();
fvOptions.correct(he);
thermo.correct();
Info<< "Qsource :" << max(Qsource).value() << " " << min(Qsource).value() << endl;
Info<< "QCoeff :" << max(QCoeff).value() << " " << min(QCoeff).value() << endl;
Info<< "Cpv :" << max(Cpv).value() << " " << min(Cpv).value() << endl;
Info<< "T max/min/ave : " << max(T).value() << " " << min(T).value() << " " << average(T).value() << endl;
Info<< "he max/min : " << max(he).value() << " " << min(he).value() << endl;
}

View File

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

View File

@ -0,0 +1,51 @@
include $(CFDEM_ADD_LIBS_DIR)/additionalLibs
FOAM_VERSION_MAJOR := $(word 1,$(subst ., ,$(WM_PROJECT_VERSION)))
PFLAGS+= -DOPENFOAM_VERSION_MAJOR=$(FOAM_VERSION_MAJOR)
PFLAGS+= -Dcompre
EXE_INC = \
$(PFLAGS) \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \
-I$(LIB_SRC)/TurbulenceModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude \
-I$(LIB_SRC)/sampling/lnInclude \
-I$(LIB_SRC)/fvOptions/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/lnInclude \
-I$(CFDEM_SRC_DIR)/lagrangian/cfdemParticle/cfdTools \
-I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \
-I$(LIB_SRC)/transportModels/compressible/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \
-I$(LIB_SRC)/regionModels/regionModel/lnInclude \
-I$(LIB_SRC)/regionModels/surfaceFilmModels/lnInclude \
-I$(LIB_SRC)/ODE/lnInclude \
-I$(LIB_SRC)/combustionModels/lnInclude \
-Wno-deprecated-copy
EXE_LIBS = \
-L$(CFDEM_LIB_DIR) \
-lfiniteVolume \
-lmeshTools \
-lturbulenceModels \
-lcompressibleTurbulenceModels \
-lcompressibleTransportModels \
-lfluidThermophysicalModels \
-lspecie \
-lsampling \
-lfvOptions \
-l$(CFDEM_LIB_COMP_NAME) \
$(CFDEM_ADD_LIB_PATHS) \
$(CFDEM_ADD_LIBS) \
-lreactionThermophysicalModels \
-lchemistryModel \
-lradiationModels \
-lregionModels \
-lsurfaceFilmModels \
-lODE \
-lcombustionModels

View File

@ -0,0 +1,31 @@
// Solve the Momentum equation
tmp<fvVectorMatrix> tUEqn
(
fvm::ddt(rhoeps,U) + fvm::div(phi, U)
+ particleCloud.divVoidfractionTau(U, voidfraction)
+ fvm::Sp(Ksl,U)
==
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,80 @@
particleCloud.clockM().start(29,"Y");
tmp<fv::convectionScheme<scalar> > mvConvection
(
fv::convectionScheme<scalar>::New
(
mesh,
fields,
phi,
mesh.divScheme("div(phi,Yi_h)")
)
);
{
combustion->correct();
#if OPENFOAM_VERSION_MAJOR < 5
dQ = combustion->dQ();
#else
Qdot = combustion->Qdot();
#endif
label inertIndex = -1;
volScalarField Yt(0.0*Y[0]);
forAll(Y, i)
{
if (Y[i].name() == inertSpecie) inertIndex = i;
if (Y[i].name() != inertSpecie || propagateInertSpecie)
{
volScalarField& Yi = Y[i];
fvScalarMatrix YiEqn
(
fvm::ddt(rhoeps, Yi)
+ mvConvection->fvmDiv(phi, Yi)
- fvm::laplacian(voidfraction*turbulence->muEff(), Yi)
==
combustion->R(Yi)
+ particleCloud.chemistryM(0).Smi(i)
+ fvOptions(rho, Yi)
);
YiEqn.relax();
fvOptions.constrain(YiEqn);
YiEqn.solve(mesh.solver("Yi"));
fvOptions.correct(Yi);
Yi.max(0.0);
if (Y[i].name() != inertSpecie) Yt += Yi;
}
}
if (inertIndex!=-1)
{
Y[inertIndex].max(inertLowerBound);
Y[inertIndex].min(inertUpperBound);
}
if (propagateInertSpecie)
{
if (inertIndex!=-1) Yt /= (1-Y[inertIndex] + ROOTVSMALL);
forAll(Y,i)
{
if (i!=inertIndex)
{
volScalarField& Yi = Y[i];
Yi = Yi/(Yt+ROOTVSMALL);
}
}
}
else
{
Y[inertIndex] = scalar(1) - Yt;
Y[inertIndex].max(0.0);
}
}
particleCloud.clockM().stop("Y");

View File

@ -0,0 +1,198 @@
/*---------------------------------------------------------------------------*\
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
cfdemSolverRhoPimpleChem
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 "turbulentFluidThermoModel.H"
#if OPENFOAM_VERSION_MAJOR < 6
#include "rhoCombustionModel.H"
#else
#include "rhoReactionThermo.H"
#include "CombustionModel.H"
#endif
#include "bound.H"
#include "pimpleControl.H"
#if OPENFOAM_VERSION_MAJOR >= 5
#include "pressureControl.H"
#endif
#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"
#include "chemistryModel.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;
bool firstStep = true;
// monitor mass variables
scalar m(0.0);
scalar m0(0.0);
label counter(0);
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 OPENFOAM_VERSION_MAJOR < 6
if (pimple.nCorrPIMPLE() <= 1)
{
#include "rhoEqn.H"
}
rhoeps = rho*voidfraction;
#endif
// --- Pressure-velocity PIMPLE corrector loop
while (pimple.loop())
{
#if OPENFOAM_VERSION_MAJOR >= 6
if (pimple.firstIter())
{
#include "rhoEqn.H"
if (firstStep)
{
rhoeps.oldTime() = rho.oldTime()*voidfraction.oldTime();
firstStep = false;
}
rhoeps = rho*voidfraction;
}
#endif
#include "UEqn.H"
#include "YEqn.H"
#include "EEqn.H"
// --- Pressure corrector loop
while (pimple.correct())
{
#include "molConc.H"
#include "pEqn.H"
}
if (pimple.turbCorr())
{
turbulence->correct();
}
}
#include "monitorMass.H"
particleCloud.clockM().start(31,"postFlow");
particleCloud.postFlow();
particleCloud.clockM().stop("postFlow");
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,313 @@
// thermodynamics, chemistry
#if OPENFOAM_VERSION_MAJOR < 6
Info<< "Creating combustion model\n" << endl;
autoPtr<combustionModels::rhoCombustionModel> combustion
(
combustionModels::rhoCombustionModel::New(mesh)
);
rhoReactionThermo& thermo = combustion->thermo();
#else
Info<< "Reading thermophysical properties\n" << endl;
autoPtr<rhoReactionThermo> pThermo(rhoReactionThermo::New(mesh));
rhoReactionThermo& thermo = pThermo();
#endif
thermo.validate(args.executable(), "h", "e");
basicSpecieMixture& composition = thermo.composition();
PtrList<volScalarField>& Y = composition.Y();
// read molecular weight
#if OPENFOAM_VERSION_MAJOR < 6
volScalarField W(composition.W());
#else
volScalarField W(thermo.W());
#endif
Switch propagateInertSpecie(true);
const word inertSpecie(thermo.lookup("inertSpecie"));
const scalar inertLowerBound(thermo.lookupOrDefault<scalar>("inertLowerBound",0.0));
const scalar inertUpperBound(thermo.lookupOrDefault<scalar>("inertUpperBound",1.0));
if (!composition.contains(inertSpecie))
{
FatalErrorIn(args.executable())
<< "Specified inert specie '" << inertSpecie << "' not found in "
<< "species list. Available species:" << composition.species()
<< exit(FatalError);
}
Info<< "inert will be bounded in [" << inertLowerBound << "," << inertUpperBound << "]" << endl;
volScalarField& p = thermo.p();
multivariateSurfaceInterpolationScheme<scalar>::fieldTable fields;
forAll(Y, i)
{
fields.add(Y[i]);
}
fields.add(thermo.he());
volScalarField rho
(
IOobject
(
"rho",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
thermo.rho()
);
// kinematic fields
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 rhoeps("rhoeps", rho*voidfraction);
rhoeps.oldTime(); // switch on saving old time
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()
);
#if OPENFOAM_VERSION_MAJOR < 5
dimensionedScalar rhoMax
(
dimensionedScalar::lookupOrDefault
(
"rhoMax",
pimple.dict(),
dimDensity,
GREAT
)
);
dimensionedScalar rhoMin
(
dimensionedScalar::lookupOrDefault
(
"rhoMin",
pimple.dict(),
dimDensity,
0
)
);
#else
pressureControl pressureControl(p, rho, pimple.dict(), false);
#endif
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 conductivity field\n" << endl;
volScalarField thCond
(
IOobject
(
"thCond",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(1,1,-3,-1,0,0,0), 0.0),
"zeroGradient"
);
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<< "Creating turbulence model\n" << endl;
autoPtr<compressible::turbulenceModel> turbulence
(
compressible::turbulenceModel::New
(
rho,
U,
phi,
thermo
)
);
mesh.setFluxRequired(p.name());
#if OPENFOAM_VERSION_MAJOR >= 6
Info<< "Creating combustion model\n" << endl;
autoPtr<CombustionModel<rhoReactionThermo>> combustion
(
CombustionModel<rhoReactionThermo>::New(thermo, turbulence())
);
#endif
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));
#if OPENFOAM_VERSION_MAJOR < 5
volScalarField dQ
(
IOobject
(
"dQ",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("dQ", dimEnergy/dimTime, 0.0)
);
#else
volScalarField Qdot
(
IOobject
(
"Qdot",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("Qdot", dimEnergy/dimVolume/dimTime, 0.0)
);
#endif
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
);
volScalarField molarConc
(
IOobject
(
"molarConc",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero",dimensionSet(0, -3, 0, 0, 1),0)
);
//===============================

View File

@ -0,0 +1,27 @@
{
volScalarField artMass = rhoeps;
scalar lowestValue(0.0);
label lVCell(-1);
forAll(Yi,cellI)
{
if(Yi[cellI] < 0.0)
{
artMass[cellI] *= Yi[cellI];
if(artMass[cellI] < lowestValue)
{
lowestValue=artMass[cellI];
lVCell = cellI;
}
}
else
{
artMass[cellI] *=0.0;
}
}
Info << "\nartificial mass of species " << Y[i].name() << " per time step: "<< fvc::domainIntegrate(artMass) << endl;
if(lVCell > -1)
{
Pout << Y[i].name() << ": time / lowest value " << runTime.timeName() << "\t" << lowestValue << "\n\tat cell " << lVCell << " with coordinates";
Pout << "\t" << mesh.C()[lVCell].component(0) << "\t" << mesh.C()[lVCell].component(1) << "\t" << mesh.C()[lVCell].component(2) << endl;
}
}

View File

@ -0,0 +1,12 @@
{
molarConc = 0.0 * molarConc;
forAll(Y, i)
{
volScalarField& Yi = Y[i];
dimensionedScalar mi("mi",dimensionSet(1, 0, 0, 0, -1),composition.W(i));
mi /= 1000.0; // g to kg
molarConc += rho * Yi / mi;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,7 @@
{
m=gSum(rhoeps*1.0*rhoeps.mesh().V());
if(counter==0) m0=m;
counter++;
Info << "\ncurrent gas mass = " << m << "\n" << endl;
Info << "\ncurrent added gas mass = " << m-m0 << "\n" << endl;
}

View File

@ -0,0 +1,131 @@
rho = thermo.rho();
#if OPENFOAM_VERSION_MAJOR < 5
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
rhoeps = rho*voidfraction;
#else
rhoeps = rho*voidfraction;
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution
const volScalarField psip0(psi*p);
#endif
volScalarField rAU(1.0/UEqn.A());
surfaceScalarField rhorAUf("rhorAUf", (modelType=="A")?fvc::interpolate(voidfraction*rhoeps*rAU):fvc::interpolate(rhoeps*rAU));
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();
}
surfaceScalarField phiHbyA
(
"phiHbyA",
fvc::interpolate(rhoeps)*fvc::flux(HbyA)
+ rhorAUf*fvc::ddtCorr(rhoeps, U, phi)
);
if (pimple.transonic())
{
// transonic version not implemented yet
}
else
{
// flux without pressure gradient contribution
phi = phiHbyA + phiUs;
// Update the pressure BCs to ensure flux consistency
constrainPressure(p, rhoeps, U, phi, rhorAUf);
volScalarField SmbyP(particleCloud.chemistryM(0).Sm() / p);
#if OPENFOAM_VERSION_MAJOR >= 5
fvScalarMatrix pDDtEqn
(
fvc::ddt(rhoeps)
+ psi*voidfraction*correction(fvm::ddt(p))
+ fvc::div(phi)
==
fvm::Sp(SmbyP, p)
+ fvOptions(psi, p, rho.name())
);
#endif
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
#if OPENFOAM_VERSION_MAJOR < 5
fvScalarMatrix pEqn
(
fvm::ddt(voidfraction, psi, p)
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p)
==
fvm::Sp(SmbyP, p)
+ fvOptions(psi, p, rho.name())
);
#else
fvScalarMatrix pEqn(pDDtEqn - fvm::laplacian(rhorAUf, p));
#endif
pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
if (pimple.finalNonOrthogonalIter())
{
phi += pEqn.flux();
}
}
}
// Thermodynamic density update
#if OPENFOAM_VERSION_MAJOR >= 5
thermo.correctRho(psi*p - psip0);
#endif
#include "rhoEqn.H"
#include "compressibleContinuityErrsPU.H"
// Explicitly relax pressure for momentum corrector
p.relax();
Info<< "p max/min/ave : " << max(p).value()
<< " " << min(p).value() << " " << average(p).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);
// Recalculate density from the relaxed pressure
#if OPENFOAM_VERSION_MAJOR >= 5
if (pressureControl.limit(p))
{
p.correctBoundaryConditions();
}
rho = thermo.rho();
#else
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
#endif
rhoeps = rho*voidfraction;
Info<< "rho max/min/ave : " << max(rho).value()
<< " " << min(rho).value() << " " << average(rho).value() << endl;
if (thermo.dpdt())
{
dpdt = fvc::ddt(voidfraction,p);
}

View File

@ -0,0 +1,109 @@
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
rhoeps = rho * voidfraction;
// Thermodynamic density needs to be updated by psi*d(p) after the
// pressure solution - done in 2 parts. Part 1:
thermo.rho() -= psi*p;
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);
volScalarField SmbyP(particleCloud.chemistryM(0).Sm() / p);
while (pimple.correctNonOrthogonal())
{
// Pressure corrector
fvScalarMatrix pEqn
(
// fvm::ddt(psi*voidfraction, p)
fvc::ddt(rhoeps) + psi*correction(fvm::ddt(voidfraction,p))
+ fvc::div(phi)
- fvm::laplacian(rhorAUf, p)
==
// particleCloud.chemistryM(0).Sm()
fvm::Sp(SmbyP, 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();
// Second part of thermodynamic density update
thermo.rho() += psi*p;
// Recalculate density from the relaxed pressure
rho = thermo.rho();
rho = max(rho, rhoMin);
rho = min(rho, rhoMax);
rho.relax();
rhoeps = rho * voidfraction;
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,18 @@
{
fvScalarMatrix rhoEqn
(
fvm::ddt(voidfraction,rho)
+ fvc::div(phi)
==
particleCloud.chemistryM(0).Sm()
+ fvOptions(rho)
);
fvOptions.constrain(rhoEqn);
rhoEqn.solve();
fvOptions.correct(rho);
}
// ************************************************************************* //

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