release on 2014-07-25_13-42-41

This commit is contained in:
goniva
2014-07-25 13:42:41 +02:00
parent b16fb689e1
commit 791bf252aa
78 changed files with 2288 additions and 421 deletions

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 is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
CFDEM coupling provides an open source parallel coupled CFD-DEM framework
combining the strengths of LIGGGHTS DEM code and the Open Source
CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand
standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM
code LIGGGHTS. 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 CFDEMcoupling
- "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.
CFDEMcoupling stands for Computational Fluid Dynamics (CFD) -
Discrete Element Method (DEM) coupling.
CFDEMcoupling is an open-source code, distributed freely under the terms of the
GNU Public License (GPL).
Core development of CFDEMcoupling is done by
Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
\*---------------------------------------------------------------------------*/
(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group.
This offering is not affiliated, approved or endorsed by ESI Group,
the producer of the OpenFOAM® software and owner of the OpenFOAM® trade mark.
\*---------------------------------------------------------------------------*/

View File

@ -220,21 +220,23 @@ listing below of styles within certain commands.
<TR ALIGN="center"><TD ><A HREF = "forceModel_SchillerNaumannDrag.html">forceModel_SchillerNaumannDrag</A></TD><TD ><A HREF = "forceModel_ShirgaonkarIB.html">forceModel_ShirgaonkarIB</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "forceModel_SchillerNaumannDrag.html">forceModel_SchillerNaumannDrag</A></TD><TD ><A HREF = "forceModel_ShirgaonkarIB.html">forceModel_ShirgaonkarIB</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "forceModel_gradPForce.html">forceModel_gradPForce</A></TD><TD ><A HREF = "forceModel_noDrag.html">forceModel_noDrag</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "forceModel_gradPForce.html">forceModel_gradPForce</A></TD><TD ><A HREF = "forceModel_noDrag.html">forceModel_noDrag</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "forceModel_particleCellVolume.html">forceModel_particleCellVolume</A></TD><TD ><A HREF = "forceModel_virtualMassForce.html">forceModel_virtualMassForce</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "forceModel_particleCellVolume.html">forceModel_particleCellVolume</A></TD><TD ><A HREF = "forceModel_virtualMassForce.html">forceModel_virtualMassForce</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "forceModel_viscForce.html">forceModel_viscForce</A></TD><TD ><A HREF = "liggghtsCommandModel.html">liggghtsCommandModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "forceModel_viscForce.html">forceModel_viscForce</A></TD><TD ><A HREF = "forceSubModel.html">forceSubModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_execute.html">liggghtsCommandModel_execute</A></TD><TD ><A HREF = "liggghtsCommandModel_readLiggghtsData.html">liggghtsCommandModel_readLiggghtsData</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "forceSubModel_ImEx.html">forceSubModel_ImEx</A></TD><TD ><A HREF = "forceSubModel_ImExCorr.html">forceSubModel_ImExCorr</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_runLiggghts.html">liggghtsCommandModel_runLiggghts</A></TD><TD ><A HREF = "liggghtsCommandModel_writeLiggghts.html">liggghtsCommandModel_writeLiggghts</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel.html">liggghtsCommandModel</A></TD><TD ><A HREF = "liggghtsCommandModel_execute.html">liggghtsCommandModel_execute</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "locateModel.html">locateModel</A></TD><TD ><A HREF = "locateModel_engineSearch.html">locateModel_engineSearch</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_readLiggghtsData.html">liggghtsCommandModel_readLiggghtsData</A></TD><TD ><A HREF = "liggghtsCommandModel_runLiggghts.html">liggghtsCommandModel_runLiggghts</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "locateModel_engineSearchIB.html">locateModel_engineSearchIB</A></TD><TD ><A HREF = "locateModel_standardSearch.html">locateModel_standardSearch</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "liggghtsCommandModel_writeLiggghts.html">liggghtsCommandModel_writeLiggghts</A></TD><TD ><A HREF = "locateModel.html">locateModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "locateModel_turboEngineSearch.html">locateModel_turboEngineSearch</A></TD><TD ><A HREF = "meshMotionModel.html">meshMotionModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "locateModel_engineSearch.html">locateModel_engineSearch</A></TD><TD ><A HREF = "locateModel_engineSearchIB.html">locateModel_engineSearchIB</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "meshMotionModel_noMeshMotion.html">meshMotionModel_noMeshMotion</A></TD><TD ><A HREF = "momCoupleModel.html">momCoupleModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "locateModel_standardSearch.html">locateModel_standardSearch</A></TD><TD ><A HREF = "locateModel_turboEngineSearch.html">locateModel_turboEngineSearch</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_explicitCouple.html">momCoupleModel_explicitCouple</A></TD><TD ><A HREF = "momCoupleModel_implicitCouple.html">momCoupleModel_implicitCouple</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "meshMotionModel.html">meshMotionModel</A></TD><TD ><A HREF = "meshMotionModel_noMeshMotion.html">meshMotionModel_noMeshMotion</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "momCoupleModel_noCouple.html">momCoupleModel_noCouple</A></TD><TD ><A HREF = "probeModel.html">probeModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "momCoupleModel.html">momCoupleModel</A></TD><TD ><A HREF = "momCoupleModel_explicitCouple.html">momCoupleModel_explicitCouple</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "probeModel_noProbe.html">probeModel_noProbe</A></TD><TD ><A HREF = "regionModel.html">regionModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "momCoupleModel_implicitCouple.html">momCoupleModel_implicitCouple</A></TD><TD ><A HREF = "momCoupleModel_noCouple.html">momCoupleModel_noCouple</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "probeModel.html">probeModel</A></TD><TD ><A HREF = "probeModel_noProbe.html">probeModel_noProbe</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "regionModel.html">regionModel</A></TD><TD ><A HREF = "regionModel_allRegion.html">regionModel_allRegion</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "smoothingModel.html">smoothingModel</A></TD><TD ><A HREF = "smoothingModel_constDiffSmoothing.html">smoothingModel_constDiffSmoothing</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD></TR> <TR ALIGN="center"><TD ><A HREF = "smoothingModel_noSmoothing.html">smoothingModel_noSmoothing</A></TD><TD ><A HREF = "voidFractionModel.html">voidfractionModel</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A> <TR ALIGN="center"><TD ><A HREF = "voidFractionModel_GaussVoidFraction.html">voidfractionModel_GaussVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_IBVoidFraction.html">voidfractionModel_IBVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_bigParticleVoidFraction.html">voidfractionModel_bigParticleVoidFraction</A></TD><TD ><A HREF = "voidFractionModel_centreVoidFraction.html">voidfractionModel_centreVoidFraction</A></TD></TR>
<TR ALIGN="center"><TD ><A HREF = "voidFractionModel_dividedVoidFraction.html">voidfractionModel_dividedVoidFraction</A>
</TD></TR></TABLE></DIV> </TD></TR></TABLE></DIV>
</HTML> </HTML>

Binary file not shown.

View File

@ -221,6 +221,10 @@ Reasonable example settings for the "liggghtsCommands" dictionary are given in t
@ -267,6 +271,9 @@ listing below of styles within certain commands.
"forceModel_particleCellVolume"_forceModel_particleCellVolume.html, "forceModel_particleCellVolume"_forceModel_particleCellVolume.html,
"forceModel_virtualMassForce"_forceModel_virtualMassForce.html, "forceModel_virtualMassForce"_forceModel_virtualMassForce.html,
"forceModel_viscForce"_forceModel_viscForce.html, "forceModel_viscForce"_forceModel_viscForce.html,
"forceSubModel"_forceSubModel.html,
"forceSubModel_ImEx"_forceSubModel_ImEx.html,
"forceSubModel_ImExCorr"_forceSubModel_ImExCorr.html,
"liggghtsCommandModel"_liggghtsCommandModel.html, "liggghtsCommandModel"_liggghtsCommandModel.html,
"liggghtsCommandModel_execute"_liggghtsCommandModel_execute.html, "liggghtsCommandModel_execute"_liggghtsCommandModel_execute.html,
"liggghtsCommandModel_readLiggghtsData"_liggghtsCommandModel_readLiggghtsData.html, "liggghtsCommandModel_readLiggghtsData"_liggghtsCommandModel_readLiggghtsData.html,

49
doc/forceSubModel.html Normal file
View File

@ -0,0 +1,49 @@
<HTML>
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
</CENTER>
<HR>
<H3>forceSubModel command
</H3>
<P><B>Syntax:</B>
</P>
<P>Defined in couplingProperties sub-dictionary of the force model in use. If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded.
</P>
<PRE>forceSubModels
(
model_x
model_y
);
</PRE>
<UL><LI>model = name of force sub-model to be applied
</UL>
<P><B>Examples:</B>
</P>
<PRE>forceSubModels
(
ImEx
);
</PRE>
<P>Note: This examples list might not be complete - please look for other models (forceSubModel_XY) in this documentation.
</P>
<P><B>Description:</B>
</P>
<P>The force sub model is designed to hold the settings a force model can have. For now it handles the treatExplicit, treatDEM and implDEM option.
</P>
<P><B>Restrictions:</B>
</P>
<P>None.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "forceSubModel_ImEx.html">ImEx</A>
</P>
<P>Note: This examples list may be incomplete - please look for other models (forceSubModel_XY) in this documentation.
</P>
<P><B>Default:</B> none.
</P>
</HTML>

45
doc/forceSubModel.txt Normal file
View File

@ -0,0 +1,45 @@
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
:link(lws,http://www.cfdem.com)
:link(lc,CFDEMcoupling_Manual.html#comm)
:line
forceSubModel command :h3
[Syntax:]
Defined in couplingProperties sub-dictionary of the force model in use. If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded.
forceSubModels
(
model_x
model_y
); :pre
model = name of force sub-model to be applied :ul
[Examples:]
forceSubModels
(
ImEx
); :pre
Note: This examples list might not be complete - please look for other models (forceSubModel_XY) in this documentation.
[Description:]
The force sub model is designed to hold the settings a force model can have. For now it handles the treatExplicit, treatDEM and implDEM option.
[Restrictions:]
None.
[Related commands:]
"ImEx"_forceSubModel_ImEx.html
Note: This examples list may be incomplete - please look for other models (forceSubModel_XY) in this documentation.
[Default:] none.

View File

@ -0,0 +1,45 @@
<HTML>
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
</CENTER>
<HR>
<H3>forceSubModel_ImEx command
</H3>
<P><B>Syntax:</B>
</P>
<P>Defined in couplingProperties sub-dictionary of the force model in use.
</P>
<P>forceSubModels
(
ImEx;
);
</P>
<P>treatExplicit true; // optional for some force models.
treatDEM true; // optional for some force models.
implDEM true; // optional for some force models.
</P>
<P><B>Examples:</B>
</P>
<P>forceSubModels
(
ImEx;
);
treatExplicit true; // optional for some force models.
</P>
<P><B>Description:</B>
</P>
<P> If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded. Depending on the force model different keywords are read and can therefrore be set (see the log file). If the keyword is provided, its value is used.
</P>
<P><B>Restrictions:</B>
</P>
<P>none.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "forceSubModel.html">forceSubModel</A>
</P>
</HTML>

View File

@ -0,0 +1,42 @@
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
:link(lws,http://www.cfdem.com)
:link(lc,CFDEMcoupling_Manual.html#comm)
:line
forceSubModel_ImEx command :h3
[Syntax:]
Defined in couplingProperties sub-dictionary of the force model in use.
forceSubModels
(
ImEx;
);
treatExplicit true; // optional for some force models.
treatDEM true; // optional for some force models.
implDEM true; // optional for some force models.
[Examples:]
forceSubModels
(
ImEx;
);
treatExplicit true; // optional for some force models.
[Description:]
If no force sub-model is applied ImEx is used as default. If the keyword "forceSubModels" is provided, a choice of sub model is demanded. Depending on the force model different keywords are read and can therefrore be set (see the log file). If the keyword is provided, its value is used.
[Restrictions:]
none.
[Related commands:]
"forceSubModel"_forceSubModel.html

View File

@ -0,0 +1,46 @@
<HTML>
<CENTER><A HREF = "http://www.cfdem.com">CFDEMproject WWW Site</A> - <A HREF = "CFDEMcoupling_Manual.html#comm">CFDEM Commands</A>
</CENTER>
<HR>
<H3>forceSubModel_ImExCorr command
</H3>
<P><B>Syntax:</B>
</P>
<P>Defined in couplingProperties sub-dictionary of the force model in use.
</P>
<P>forceSubModels
(
ImExCorr;
);
</P>
<P>treatExplicit true; // optional for some force models.
treatDEM true; // optional for some force models.
implDEM true; // optional for some force models.
explicitInterpCorr true; // optional for some force models.
</P>
<P><B>Examples:</B>
</P>
<P>forceSubModels
(
ImExCorr;
);
treatExplicit true; // optional for some force models.
</P>
<P><B>Description:</B>
</P>
<P> Same as ImEx, but it additionally reads "explicitInterpCorr" to correct the error steming from interpolation of Ufluid and averaging of Uparticles.
</P>
<P><B>Restrictions:</B>
</P>
<P>none.
</P>
<P><B>Related commands:</B>
</P>
<P><A HREF = "forceSubModel.html">forceSubModel</A>
</P>
</HTML>

View File

@ -0,0 +1,43 @@
"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c
:link(lws,http://www.cfdem.com)
:link(lc,CFDEMcoupling_Manual.html#comm)
:line
forceSubModel_ImExCorr command :h3
[Syntax:]
Defined in couplingProperties sub-dictionary of the force model in use.
forceSubModels
(
ImExCorr;
);
treatExplicit true; // optional for some force models.
treatDEM true; // optional for some force models.
implDEM true; // optional for some force models.
explicitInterpCorr true; // optional for some force models.
[Examples:]
forceSubModels
(
ImExCorr;
);
treatExplicit true; // optional for some force models.
[Description:]
Same as ImEx, but it additionally reads "explicitInterpCorr" to correct the error steming from interpolation of Ufluid and averaging of Uparticles.
[Restrictions:]
none.
[Related commands:]
"forceSubModel"_forceSubModel.html

Binary file not shown.

View File

@ -1,12 +1,13 @@
cfdemCloud = cfdemCloud cfdemCloud = cfdemCloud
forceModels = subModels/forceModel forceModels = subModels/forceModel
forceSubModels = subModels/forceModel/forceSubModels
forceModelsMS = subModels/forceModelMS forceModelsMS = subModels/forceModelMS
IOModels = subModels/IOModel IOModels = subModels/IOModel
voidFractionModels = subModels/voidFractionModel voidFractionModels = subModels/voidFractionModel
voidFractionModelsMS = subModels/voidFractionModelMS
locateModels = subModels/locateModel locateModels = subModels/locateModel
meshMotionModels = subModels/meshMotionModel meshMotionModels = subModels/meshMotionModel
momCoupleModels = subModels/momCoupleModel momCoupleModels = subModels/momCoupleModel
regionModels = subModels/regionModel
dataExchangeModels = subModels/dataExchangeModel dataExchangeModels = subModels/dataExchangeModel
averagingModels = subModels/averagingModel averagingModels = subModels/averagingModel
clockModels = subModels/clockModel clockModels = subModels/clockModel
@ -15,6 +16,8 @@ smoothingModels = subModels/smoothingModel
probeModels = subModels/probeModel probeModels = subModels/probeModel
$(cfdemCloud)/cfdemCloud.C $(cfdemCloud)/cfdemCloud.C
derived/cfdemCloudBiDisperse/cfdemCloudBiDisperse.C
derived/cfdemCloudBiDisperseRotation/cfdemCloudBiDisperseRotation.C
derived/cfdemCloudIB/cfdemCloudIB.C derived/cfdemCloudIB/cfdemCloudIB.C
derived/cfdemCloudMS/cfdemCloudMS.C derived/cfdemCloudMS/cfdemCloudMS.C
@ -23,36 +26,66 @@ $(forceModels)/forceModel/newForceModel.C
$(forceModels)/noDrag/noDrag.C $(forceModels)/noDrag/noDrag.C
$(forceModels)/checkCouplingInterval/checkCouplingInterval.C $(forceModels)/checkCouplingInterval/checkCouplingInterval.C
$(forceModels)/DiFeliceDrag/DiFeliceDrag.C $(forceModels)/DiFeliceDrag/DiFeliceDrag.C
$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C
$(forceModels)/GidaspowDrag/GidaspowDrag.C $(forceModels)/GidaspowDrag/GidaspowDrag.C
$(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C $(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C
$(forceModels)/Archimedes/Archimedes.C $(forceModels)/Archimedes/Archimedes.C
$(forceModels)/ArchimedesIB/ArchimedesIB.C $(forceModels)/ArchimedesIB/ArchimedesIB.C
$(forceModels)/interface/interface.C $(forceModels)/interface/interface.C
$(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C $(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C
$(forceModels)/interfaceParticleProbe/interfaceParticleProbe.C
$(forceModels)/fieldStore/fieldStore.C
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
$(forceModels)/fieldBound/fieldBound.C
$(forceModels)/volWeightedAverage/volWeightedAverage.C
$(forceModels)/totalMomentumExchange/totalMomentumExchange.C
$(forceModels)/UStore/UStore.C
$(forceModels)/KochHillDrag/KochHillDrag.C $(forceModels)/KochHillDrag/KochHillDrag.C
$(forceModels)/KochHillRWDrag/KochHillRWDrag.C $(forceModels)/KochHillRWDrag/KochHillRWDrag.C
$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C
$(forceModels)/BeetstraDrag/BeetstraDrag.C
$(forceModels)/OzelSundaresanDrag/OzelSundaresanDrag.C
$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C $(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
$(forceModels)/LaEuScalarDust/LaEuScalarDust.C
$(forceModels)/virtualMassForce/virtualMassForce.C $(forceModels)/virtualMassForce/virtualMassForce.C
$(forceModels)/gradPForce/gradPForce.C $(forceModels)/gradPForce/gradPForce.C
$(forceModels)/gradULiftForce/gradULiftForce.C
$(forceModels)/HollowayDrag/HollowayDrag.C
$(forceModels)/viscForce/viscForce.C $(forceModels)/viscForce/viscForce.C
$(forceModels)/MeiLift/MeiLift.C $(forceModels)/MeiLift/MeiLift.C
$(forceModels)/melting/melting.C
/*$(forceModels)/KochHillDragNLift/KochHillDragNLift.C*/
$(forceModels)/stokesSpheroidDrag/stokesSpheroidDrag.C
$(forceModels)/solidsPressureForce/solidsPressureForce.C
$(forceModels)/periodicPressure/periodicPressure.C
$(forceModels)/periodicPressureControl/periodicPressureControl.C
$(forceModels)/averageSlipVel/averageSlipVel.C
$(forceModels)/particleCellVolume/particleCellVolume.C $(forceModels)/particleCellVolume/particleCellVolume.C
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
$(forceModels)/volWeightedAverage/volWeightedAverage.C $(forceSubModels)/forceSubModel/newForceSubModel.C
$(forceSubModels)/forceSubModel/forceSubModel.C
$(forceSubModels)/ImEx/ImEx.C
$(forceSubModels)/ImExCorr/ImExCorr.C
$(forceModelsMS)/forceModelMS/forceModelMS.C $(forceModelsMS)/forceModelMS/forceModelMS.C
$(forceModelsMS)/forceModelMS/newForceModelMS.C $(forceModelsMS)/forceModelMS/newForceModelMS.C
$(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C $(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C
$(forceModelsMS)/GidaspowDragMS/GidaspowDragMS.C
$(forceModelsMS)/noDragMS/noDragMS.C
$(probeModels)/probeModel/probeModel.C $(probeModels)/probeModel/probeModel.C
$(probeModels)/probeModel/newProbeModel.C $(probeModels)/probeModel/newProbeModel.C
$(probeModels)/noProbe/noProbe.C $(probeModels)/noProbe/noProbe.C
$(probeModels)/particleProbe/particleProbe.C $(probeModels)/particleProbe/particleProbe.C
/*$(probeModels)/interfaceParticleProbe/interfaceParticleProbe.C*/
$(IOModels)/IOModel/IOModel.C $(IOModels)/IOModel/IOModel.C
$(IOModels)/IOModel/newIOModel.C $(IOModels)/IOModel/newIOModel.C
$(IOModels)/noIO/noIO.C $(IOModels)/noIO/noIO.C
$(IOModels)/basicIO/basicIO.C $(IOModels)/basicIO/basicIO.C
$(IOModels)/tempIO/tempIO.C
$(IOModels)/colorIO/colorIO.C
$(IOModels)/trackIO/trackIO.C $(IOModels)/trackIO/trackIO.C
$(IOModels)/sophIO/sophIO.C $(IOModels)/sophIO/sophIO.C
@ -60,46 +93,53 @@ $(voidFractionModels)/voidFractionModel/voidFractionModel.C
$(voidFractionModels)/voidFractionModel/newVoidFractionModel.C $(voidFractionModels)/voidFractionModel/newVoidFractionModel.C
$(voidFractionModels)/centreVoidFraction/centreVoidFraction.C $(voidFractionModels)/centreVoidFraction/centreVoidFraction.C
$(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C $(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C
$(voidFractionModels)/dividedVoidFractionBiDi/dividedVoidFractionBiDi.C
$(voidFractionModels)/dividedVoidFractionMS/dividedVoidFractionMS.C $(voidFractionModels)/dividedVoidFractionMS/dividedVoidFractionMS.C
$(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C $(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C
$(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C $(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C
$(voidFractionModels)/IBVoidFraction/IBVoidFraction.C $(voidFractionModels)/IBVoidFraction/IBVoidFraction.C
$(voidFractionModels)/weightedNeigbhorsVoidFraction/weightedNeigbhorsVoidFraction.C
$(voidFractionModelsMS)/voidFractionModelMS/voidFractionModelMS.C
$(voidFractionModelsMS)/voidFractionModelMS/newVoidFractionModelMS.C
$(locateModels)/locateModel/locateModel.C $(locateModels)/locateModel/locateModel.C
$(locateModels)/locateModel/newLocateModel.C $(locateModels)/locateModel/newLocateModel.C
$(locateModels)/standardSearch/standardSearch.C $(locateModels)/standardSearch/standardSearch.C
$(locateModels)/engineSearch/engineSearch.C $(locateModels)/engineSearch/engineSearch.C
$(locateModels)/turboEngineSearch/turboEngineSearch.C
$(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C $(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C
$(locateModels)/turboEngineSearch/turboEngineSearch.C
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
$(locateModels)/engineSearchIB/engineSearchIB.C $(locateModels)/engineSearchIB/engineSearchIB.C
$(locateModels)/hyperEngineSearch/hyperEngineSearch.C
$(locateModels)/ijkSearch/ijkSearch.C
$(meshMotionModels)/meshMotionModel/meshMotionModel.C $(meshMotionModels)/meshMotionModel/meshMotionModel.C
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C $(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
$(meshMotionModels)/noMeshMotion/noMeshMotion.C $(meshMotionModels)/noMeshMotion/noMeshMotion.C
$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C
$(momCoupleModels)/momCoupleModel/momCoupleModel.C $(momCoupleModels)/momCoupleModel/momCoupleModel.C
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C $(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
$(momCoupleModels)/explicitCouple/explicitCouple.C $(momCoupleModels)/explicitCouple/explicitCouple.C
$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C
$(momCoupleModels)/implicitCouple/implicitCouple.C $(momCoupleModels)/implicitCouple/implicitCouple.C
$(momCoupleModels)/noCouple/noCouple.C $(momCoupleModels)/noCouple/noCouple.C
$(regionModels)/regionModel/regionModel.C
$(regionModels)/regionModel/newRegionModel.C
$(regionModels)/allRegion/allRegion.C
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C $(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C $(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C $(dataExchangeModels)/oneWayVTK/oneWayVTK.C
$(dataExchangeModels)/twoWayFiles/twoWayFiles.C $(dataExchangeModels)/twoWayFiles/twoWayFiles.C
$(dataExchangeModels)/noDataExchange/noDataExchange.C $(dataExchangeModels)/noDataExchange/noDataExchange.C
$(dataExchangeModels)/twoWayMPI/twoWayMPI.C $(dataExchangeModels)/twoWayMPI/twoWayMPI.C
$(dataExchangeModels)/twoWayM2M/twoWayM2M.C
$(dataExchangeModels)/twoWayMany2Many/twoWayMany2Many.C $(dataExchangeModels)/twoWayMany2Many/twoWayMany2Many.C
$(averagingModels)/averagingModel/averagingModel.C $(averagingModels)/averagingModel/averagingModel.C
$(averagingModels)/averagingModel/newAveragingModel.C $(averagingModels)/averagingModel/newAveragingModel.C
$(averagingModels)/dilute/dilute.C $(averagingModels)/dilute/dilute.C
$(averagingModels)/dense/dense.C $(averagingModels)/dense/dense.C
$(averagingModels)/denseBiDi/denseBiDi.C
$(clockModels)/clockModel/clockModel.C $(clockModels)/clockModel/clockModel.C
$(clockModels)/clockModel/newClockModel.C $(clockModels)/clockModel/newClockModel.C
@ -108,6 +148,7 @@ $(clockModels)/noClock/noClock.C
$(liggghtsCommandModels)/liggghtsCommandModel/liggghtsCommandModel.C $(liggghtsCommandModels)/liggghtsCommandModel/liggghtsCommandModel.C
$(liggghtsCommandModels)/liggghtsCommandModel/newLiggghtsCommandModel.C $(liggghtsCommandModels)/liggghtsCommandModel/newLiggghtsCommandModel.C
$(liggghtsCommandModels)/colorParticles/colorParticles.C
$(liggghtsCommandModels)/execute/execute.C $(liggghtsCommandModels)/execute/execute.C
$(liggghtsCommandModels)/runLiggghts/runLiggghts.C $(liggghtsCommandModels)/runLiggghts/runLiggghts.C
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C $(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
@ -117,5 +158,6 @@ $(smoothingModels)/smoothingModel/smoothingModel.C
$(smoothingModels)/smoothingModel/newSmoothingModel.C $(smoothingModels)/smoothingModel/newSmoothingModel.C
$(smoothingModels)/noSmoothing/noSmoothing.C $(smoothingModels)/noSmoothing/noSmoothing.C
$(smoothingModels)/constDiffSmoothing/constDiffSmoothing.C $(smoothingModels)/constDiffSmoothing/constDiffSmoothing.C
$(smoothingModels)/localPSizeDiffSmoothing/localPSizeDiffSmoothing.C
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME) LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)

View File

@ -14,11 +14,12 @@ EXE_INC = \
-I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \ -I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \
-I$(CFDEM_LIGGGHTS_SRC_DIR) \ -I$(CFDEM_LIGGGHTS_SRC_DIR) \
-I$(CFDEM_M2MLIB_PATH) \ -I$(CFDEM_M2MLIB_PATH) \
-I$(CFDEM_Many2ManyLIB_PATH) \
-I$(CFDEM_SRC_DIR)/cfdTools \ -I$(CFDEM_SRC_DIR)/cfdTools \
LIB_LIBS = \ LIB_LIBS = \
$(PLIBS) \ $(PLIBS) \
-L$(CFDEM_LIB_DIR) \ -L$(FOAM_USER_LIBBIN) \
-lfiniteVolume \ -lfiniteVolume \
-lincompressibleRASModels \ -lincompressibleRASModels \
-lincompressibleLESModels \ -lincompressibleLESModels \
@ -27,5 +28,11 @@ LIB_LIBS = \
-lmpi_cxx \ -lmpi_cxx \
-L$(CFDEM_LIGGGHTS_SRC_DIR) \ -L$(CFDEM_LIGGGHTS_SRC_DIR) \
-Wl,--whole-archive -l$(CFDEM_LIGGGHTS_LIB_NAME) -Wl,--no-whole-archive \ -Wl,--whole-archive -l$(CFDEM_LIGGGHTS_LIB_NAME) -Wl,--no-whole-archive \
-L$(CFDEM_M2MLIB_PATH) \
-lcouple \
-L$(CFDEM_Many2ManyLIB_PATH) \ -L$(CFDEM_Many2ManyLIB_PATH) \
-lcoupleMany2Many -lcoupleMany2Many \
/* add -I$(CFDEM_POEMSLIB_PATH) \ to EXE_INC */
/* -L$(CFDEM_POEMSLIB_PATH) \ */
/* -lpoems */

View File

@ -1,4 +1,4 @@
word CFDEMversion="cfdem-2.7.1"; word CFDEMversion="cfdem-2.7.2";
word compatibleLIGGGHTSversion="3.0.2"; word compatibleLIGGGHTSversion="3.0.2";
word OFversion="2.3.x-commit-4d6f4a3115ff76ec4154c580eb041bc95ba4ec09"; word OFversion="2.3.x-commit-4d6f4a3115ff76ec4154c580eb041bc95ba4ec09";

View File

@ -202,6 +202,7 @@ public:
friend class dataExchangeModel; friend class dataExchangeModel;
friend class voidFractionModel; friend class voidFractionModel;
friend class forceModel; friend class forceModel;
friend class forceSubModel;
// Constructors // Constructors

View File

@ -8,7 +8,7 @@
//#define comp // if comp is on - you must use Make/options_comp! //#define comp // if comp is on - you must use Make/options_comp!
//define multi sphere //define multi sphere
#define multisphere //#define multisphere
// features of 2.1 work also in 2.3 // features of 2.1 work also in 2.3
#if defined(version23) #if defined(version23)

View File

@ -1,4 +0,0 @@
#syntax: makefileName/dir
#note: dir is not a path, just a keyword here
###############################################
Many2Many/dir

View File

@ -1,2 +1,11 @@
lagrangian/cfdemParticle/dir lagrangian/cfdemParticle/dir
#====================================================='
#- RADL
fvOptions/dir
cylPorousMedia/dir
#====================================================='
#- other
finiteVolume/dir finiteVolume/dir

View File

@ -1,4 +1,14 @@
cfdemSolverPisoMS/dir
cfdemSolverPiso/dir cfdemSolverPiso/dir
cfdemSolverIB/dir cfdemSolverIB/dir
cfdemSolverPisoScalar/dir cfdemSolverPisoScalar/dir
cfdemSolverPimpleImEx/dir
cfdemSolverIBInterLubrication/dir
cfdemSolverIBScalar/dir
cfdemSolverInterDyM/dir
cfdemSolverInterDyMPC/dir
cfdemSolverBubble/dir
cfdemSolverPisoMS/dir
cfdemSolverPimpleDyM_22x/dir
cfdemSolverPimpleDyMMS_22x/dir
cfdemSolverPimpleDyMScalar_22x/dir
myPimpleDyMFoam/dir

View File

@ -7,15 +7,51 @@
#===================================================================# #===================================================================#
cfdemSolverPiso/settlingTestMPI/dir cfdemSolverPiso/settlingTestMPI/dir
cfdemSolverPiso/ErgunTestMPI/dir cfdemSolverPiso/ErgunTestMPI/dir
cfdemSolverPiso/ErgunTestMPI_cgs/dir cfdemSolverPiso/ErgunTestMPI_cgs/dir
cfdemSolverPiso/ErgunTestMPI_restart/dir cfdemSolverPiso/ErgunTestMPI_restart/dir
cfdemSolverIB/twoSpheresGlowinskiMPI/dir cfdemSolverIB/twoSpheresGlowinskiMPI/dir
cfdemSolverPisoScalar/packedBedTemp/dir cfdemSolverPisoScalar/packedBedTemp/dir
#===================================================================#
# RADL
#cfdemSolverPimpleImEx/settlingTestMPI/dir
#cfdemSolverPimpleImEx/ErgunTestMPI/dir
#cfdemSolverPimpleImEx/crossFlow/dir
#cfdemSolverIB/periodicCase/dir
#cfdemSolverIB/cfdemIBPeriodicCubicalBox_fullyPeriodic/dir
#cfdemSolverIBInterLubrication/twoCoatedParticlesRelMotion_smallTest/dir
#cfdemSolverIBScalar/cfdemIBPeriodicCubicalBoxScalar/dir
#===================================================================#
# NesteJacobs
#Projects/Neste/cfdemSolverBubble/3pFBreactor/dir
#Projects/Neste/cfdemSolverInterDyM/3pFBreactor/dir
#===================================================================#
# not in release:
#cfdemSolverPiso/settlingTestBigParticleMPI/dir
cfdemSolverPiso/ErgunTestCG/dir cfdemSolverPiso/ErgunTestCG/dir
cfdemSolverPiso/ErgunTestM2M/dir
#cfdemSolverPiso/HopperEmptying/dir
cfdemSolverPimpleDyM/ErgunTestMPI/dir
#cfdemSolverPisoMS/settlingTestMPI/dir
#cfdemSolverPisoMS/ErgunTestMPI/dir
#cfdemSolverInterDyM/twoPhaseSettlingTest/dir
#cfdemSolverInterDyM/ErgunTestMPI/dir
#cfdemSolverInterDyM/granularPiston/dir
#cfdemSolverInterDyM/sugarNcoffee/dir
#cfdemSolverBubble/ErgunTestMPI_pureLiquid/dir
#- these examples are already designed for 2.3.x
#cfdemSolverInterDyMPC/sugarNcoffee/dir
#cfdemSolverInterDyMPC/granularPiston/dir
#cfdemSolverInterDyMPC/meltingPot/dir

View File

@ -86,13 +86,22 @@ Archimedes::Archimedes
Info << "2-dimensional simulation - make sure DEM side is 2D" << endl; Info << "2-dimensional simulation - make sure DEM side is 2D" << endl;
} }
if (propsDict_.found("treatExplicit")) treatExplicit_=true; // init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
forceSubM(0).setSwitchesList(1,true); // activate treatDEM switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (modelType_=="A"){ if (modelType_=="A"){
treatDEM_=true; forceSubM(0).setSwitches(1,true); // treatDEM = true
Info << "accounting for Archimedes only on DEM side!" << endl; Info << "accounting for Archimedes only on DEM side!" << endl;
} }
if (modelType_=="B"){ if (modelType_=="B"){
treatDEM_=false; forceSubM(0).setSwitches(1,false); // treatDEM = false
Info << "accounting for Archimedes on DEM and CFD side!" << endl; Info << "accounting for Archimedes on DEM and CFD side!" << endl;
} }
@ -143,14 +152,8 @@ void Archimedes::setForce() const
} }
} }
if(!treatDEM_) // write particle based data to global array
{ forceSubM(0).partToArray(index,force,vector::zero);
if(treatExplicit_)
for(int j=0;j<3;j++) expForces()[index][j] += force[j];
else
for(int j=0;j<3;j++) impForces()[index][j] += force[j];
}
for(int j=0;j<3;j++) DEMForces()[index][j] += force[j];
//} //}
} }
} }

View File

@ -85,9 +85,18 @@ ArchimedesIB::ArchimedesIB
Info << "2-dimensional simulation - make sure DEM side is 2D" << endl; Info << "2-dimensional simulation - make sure DEM side is 2D" << endl;
} }
if (propsDict_.found("treatExplicit")) treatExplicit_=true; // init force sub model
treatDEM_=true; setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
forceSubM(0).setSwitches(1,true); // treatDEM = true
Info << "accounting for Archimedes only on DEM side!" << endl; Info << "accounting for Archimedes only on DEM side!" << endl;
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
} }
@ -131,12 +140,9 @@ void ArchimedesIB::setForce() const
// set force on particle // set force on particle
if(twoDimensional_) Warning<<"ArchimedesIB model doesn't work for 2D right now!!\n"<< endl; if(twoDimensional_) Warning<<"ArchimedesIB model doesn't work for 2D right now!!\n"<< endl;
if(!treatDEM_)
{ // write particle based data to global array
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += force[j]; forceSubM(0).partToArray(index,force,vector::zero);
else for(int j=0;j<3;j++) impForces()[index][j] += force[j];
}
for(int j=0;j<3;j++) DEMForces()[index][j] += force[j];
//} //}
} }
} }

View File

@ -72,7 +72,6 @@ DiFeliceDrag::DiFeliceDrag
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")), voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)), voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
interpolation_(false), interpolation_(false),
splitImplicitExplicit_(false),
UsFieldName_(propsDict_.lookup("granVelFieldName")), UsFieldName_(propsDict_.lookup("granVelFieldName")),
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)), UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
scaleDia_(1.), scaleDia_(1.),
@ -88,24 +87,26 @@ DiFeliceDrag::DiFeliceDrag
particleCloud_.probeM().writeHeader(); particleCloud_.probeM().writeHeader();
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("interpolation")) if (propsDict_.found("interpolation"))
{ {
Info << "using interpolated value of U." << endl; Info << "using interpolated value of U." << endl;
interpolation_=true; interpolation_=true;
} }
if (propsDict_.found("splitImplicitExplicit"))
{
Info << "will split implicit / explicit force contributions." << endl;
splitImplicitExplicit_ = true;
if(!interpolation_)
Info << "WARNING: will only consider fluctuating particle velocity in implicit / explicit force split!" << endl;
}
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
if (propsDict_.found("scale")) if (propsDict_.found("scale"))
scaleDia_=scalar(readScalar(propsDict_.lookup("scale"))); scaleDia_=scalar(readScalar(propsDict_.lookup("scale")));
if (propsDict_.found("scaleDrag")) if (propsDict_.found("scaleDrag"))
scaleDrag_=scalar(readScalar(propsDict_.lookup("scaleDrag"))); scaleDrag_=scalar(readScalar(propsDict_.lookup("scaleDrag")));
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
} }
@ -137,6 +138,8 @@ void DiFeliceDrag::setForce() const
scalar voidfraction(1); scalar voidfraction(1);
vector Ufluid(0,0,0); vector Ufluid(0,0,0);
vector drag(0,0,0); vector drag(0,0,0);
vector dragExplicit(0,0,0);
scalar dragCoefficient(0);
label cellI=0; label cellI=0;
vector Us(0,0,0); vector Us(0,0,0);
vector Ur(0,0,0); vector Ur(0,0,0);
@ -147,11 +150,6 @@ void DiFeliceDrag::setForce() const
scalar Rep(0); scalar Rep(0);
scalar Cd(0); scalar Cd(0);
vector UfluidFluct(0,0,0);
vector UsFluct(0,0,0);
vector dragExplicit(0,0,0);
scalar dragCoefficient(0);
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_); interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
interpolationCellPoint<vector> UInterpolator_(U_); interpolationCellPoint<vector> UInterpolator_(U_);
@ -164,6 +162,9 @@ void DiFeliceDrag::setForce() const
cellI = particleCloud_.cellIDs()[index][0]; cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0); drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
dragCoefficient=0;
Ufluid =vector(0,0,0);
if (cellI > -1) // particle Found if (cellI > -1) // particle Found
{ {
@ -186,7 +187,6 @@ void DiFeliceDrag::setForce() const
magUr = mag(Ur); magUr = mag(Ur);
Rep = 0; Rep = 0;
Cd = 0; Cd = 0;
dragCoefficient = 0;
if (magUr > 0) if (magUr > 0)
{ {
@ -212,13 +212,7 @@ void DiFeliceDrag::setForce() const
drag = dragCoefficient*Ur; //total drag force! drag = dragCoefficient*Ur; //total drag force!
//Split forces forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_,index);
if(splitImplicitExplicit_)
{
UfluidFluct = Ufluid - U_[cellI];
UsFluct = Us - UsField_[cellI];
dragExplicit = dragCoefficient*(UfluidFluct - UsFluct); //explicit part of force
}
} }
if(verbose_ && index >-1 && index <102) if(verbose_ && index >-1 && index <102)
@ -233,12 +227,6 @@ void DiFeliceDrag::setForce() const
Pout << "Rep = " << Rep << endl; Pout << "Rep = " << Rep << endl;
Pout << "Cd = " << Cd << endl; Pout << "Cd = " << Cd << endl;
Pout << "drag (total) = " << drag << endl; Pout << "drag (total) = " << drag << endl;
if(splitImplicitExplicit_)
{
Pout << "UfluidFluct = " << UfluidFluct << endl;
Pout << "UsFluct = " << UsFluct << endl;
Pout << "dragExplicit = " << dragExplicit << endl;
}
} }
//Set value fields and write the probe //Set value fields and write the probe
@ -253,18 +241,9 @@ void DiFeliceDrag::setForce() const
particleCloud_.probeM().writeProbe(index, sValues, vValues); particleCloud_.probeM().writeProbe(index, sValues, vValues);
} }
} }
// set force on particle
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j];
else //implicit treatment, taking explicit force contribution into account
{
for(int j=0;j<3;j++)
{
impForces()[index][j] += drag[j] - dragExplicit[j]; //only consider implicit part!
expForces()[index][j] += dragExplicit[j];
}
}
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j]; // write particle based data to global array
forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
} }
//} //}
} }

View File

@ -76,8 +76,6 @@ private:
bool interpolation_; // use interpolated U field values bool interpolation_; // use interpolated U field values
bool splitImplicitExplicit_; // use splitting of implicit and explict force contribution
word UsFieldName_; word UsFieldName_;
const volVectorField& UsField_; // the average particle velocity field (for implicit/expliti force split) const volVectorField& UsField_; // the average particle velocity field (for implicit/expliti force split)

View File

@ -72,7 +72,6 @@ GidaspowDrag::GidaspowDrag
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)), voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
phi_(readScalar(propsDict_.lookup("phi"))), phi_(readScalar(propsDict_.lookup("phi"))),
interpolation_(false), interpolation_(false),
splitImplicitExplicit_(false),
UsFieldName_(propsDict_.lookup("granVelFieldName")), UsFieldName_(propsDict_.lookup("granVelFieldName")),
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)), UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
scaleDia_(1.), scaleDia_(1.),
@ -89,22 +88,18 @@ GidaspowDrag::GidaspowDrag
particleCloud_.probeM().writeHeader(); particleCloud_.probeM().writeHeader();
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("interpolation")) interpolation_=true; if (propsDict_.found("interpolation")) interpolation_=true;
if (propsDict_.found("splitImplicitExplicit"))
{ // init force sub model
Info << "will split implicit / explicit force contributions." << endl; setForceSubModels(propsDict_);
splitImplicitExplicit_ = true;
if(!interpolation_) // define switches which can be read from dict
Info << "WARNING: will only consider fluctuating particle velocity in implicit / explicit force split!" << endl; forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
} forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
if (propsDict_.found("implDEM"))
{ // read those switches defined above, if provided in dict
treatExplicit_=false; forceSubM(0).readSwitches();
implDEM_=true;
setImpDEMdrag();
Info << "Using implicit DEM drag formulation." << endl;
}
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
if (propsDict_.found("scale")) if (propsDict_.found("scale"))
scaleDia_=scalar(readScalar(propsDict_.lookup("scale"))); scaleDia_=scalar(readScalar(propsDict_.lookup("scale")));
@ -162,8 +157,7 @@ void GidaspowDrag::setForce() const
scalar betaP(0); //momentum exchange of the very particle scalar betaP(0); //momentum exchange of the very particle
vector dragExplicit(0,0,0); vector dragExplicit(0,0,0);
vector UfluidFluct(0,0,0); scalar dragCoefficient(0);
vector UsFluct(0,0,0);
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_); interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
interpolationCellPoint<vector> UInterpolator_(U_); interpolationCellPoint<vector> UInterpolator_(U_);
@ -176,10 +170,12 @@ void GidaspowDrag::setForce() const
//{ //{
cellI = particleCloud_.cellIDs()[index][0]; cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0); drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
betaP = 0; betaP = 0;
Vs = 0; Vs = 0;
Ufluid =vector(0,0,0); Ufluid =vector(0,0,0);
voidfraction=0; voidfraction=0;
dragCoefficient = 0;
if (cellI > -1) // particle Found if (cellI > -1) // particle Found
{ {
@ -234,21 +230,14 @@ void GidaspowDrag::setForce() const
} }
// calc particle's drag // calc particle's drag
drag = Vs * betaP * Ur * scaleDrag_; dragCoefficient = Vs*betaP*scaleDrag_;
if (modelType_=="B") if (modelType_=="B")
drag /= voidfraction; dragCoefficient /= voidfraction;
//Split forces drag = dragCoefficient * Ur;
if(splitImplicitExplicit_)
{
UfluidFluct = Ufluid - U_[cellI];
UsFluct = Us - UsField_[cellI];
dragExplicit = Vs * betaP * (UfluidFluct - UsFluct); //explicit part of force
if (modelType_=="B") // explicitInterpCorr
dragExplicit /= voidfraction; forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_);
}
if(verbose_ && index >=0 && index <2) if(verbose_ && index >=0 && index <2)
{ {
@ -265,13 +254,6 @@ void GidaspowDrag::setForce() const
Pout << "Rep = " << Rep << endl; Pout << "Rep = " << Rep << endl;
Pout << "betaP = " << betaP << endl; Pout << "betaP = " << betaP << endl;
Pout << "drag = " << drag << endl; Pout << "drag = " << drag << endl;
if(splitImplicitExplicit_)
{
Pout << "UfluidFluct = " << UfluidFluct << endl;
Pout << "UsFluct = " << UsFluct << endl;
Pout << "dragExplicit = " << dragExplicit << endl;
}
} }
//Set value fields and write the probe //Set value fields and write the probe
@ -287,30 +269,8 @@ void GidaspowDrag::setForce() const
} }
} }
// set force on particle // write particle based data to global array
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
else //implicit treatment, taking explicit force contribution into account
{
for(int j=0;j<3;j++)
{
impForces()[index][j] += drag[j] - dragExplicit[j]; //only consider implicit part!
expForces()[index][j] += dragExplicit[j];
}
}
// set Cd
if(implDEM_)
{
for(int j=0;j<3;j++) fluidVel()[index][j]=Ufluid[j];
if (modelType_=="B" && cellI > -1)
Cds()[index][0] = Vs*betaP/voidfraction*scaleDrag_;
else
Cds()[index][0] = Vs*betaP*scaleDrag_;
}else{
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j];
}
//}// end if mask //}// end if mask
}// end loop particles }// end loop particles

View File

@ -82,11 +82,9 @@ private:
bool interpolation_; // use interpolated field values bool interpolation_; // use interpolated field values
bool splitImplicitExplicit_; // use splitting of implicit and explict force contribution
word UsFieldName_; word UsFieldName_;
const volVectorField& UsField_; // the average particle velocity field (for implicit/expliti force split) const volVectorField& UsField_; // the average particle velocity field
mutable scalar scaleDia_; mutable scalar scaleDia_;

View File

@ -71,6 +71,8 @@ KochHillDrag::KochHillDrag
rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)), rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")), voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)), voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
interpolation_(false), interpolation_(false),
scaleDia_(1.), scaleDia_(1.),
scaleDrag_(1.) scaleDrag_(1.)
@ -85,15 +87,18 @@ KochHillDrag::KochHillDrag
particleCloud_.probeM().writeHeader(); particleCloud_.probeM().writeHeader();
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("interpolation")) interpolation_=true; if (propsDict_.found("interpolation")) interpolation_=true;
if (propsDict_.found("implDEM"))
{ // init force sub model
treatExplicit_=false; setForceSubModels(propsDict_);
implDEM_=true;
setImpDEMdrag(); // define switches which can be read from dict
Info << "Using implicit DEM drag formulation." << endl; forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
} forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
if (propsDict_.found("scale")) if (propsDict_.found("scale"))
@ -131,6 +136,8 @@ void KochHillDrag::setForce() const
scalar voidfraction(1); scalar voidfraction(1);
vector Ufluid(0,0,0); vector Ufluid(0,0,0);
vector drag(0,0,0); vector drag(0,0,0);
vector dragExplicit(0,0,0);
scalar dragCoefficient(0);
label cellI=0; label cellI=0;
vector Us(0,0,0); vector Us(0,0,0);
@ -155,6 +162,8 @@ void KochHillDrag::setForce() const
//{ //{
cellI = particleCloud_.cellIDs()[index][0]; cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0); drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
dragCoefficient=0;
betaP = 0; betaP = 0;
Vs = 0; Vs = 0;
Ufluid =vector(0,0,0); Ufluid =vector(0,0,0);
@ -217,10 +226,14 @@ void KochHillDrag::setForce() const
betaP = 18.*nuf*rho/(ds/scaleDia_*ds/scaleDia_)*voidfraction*F; betaP = 18.*nuf*rho/(ds/scaleDia_*ds/scaleDia_)*voidfraction*F;
// calc particle's drag // calc particle's drag
drag = Vs*betaP*Ur*scaleDrag_; dragCoefficient = Vs*betaP*scaleDrag_;
if (modelType_=="B") if (modelType_=="B")
drag /= voidfraction; dragCoefficient /= voidfraction;
drag = dragCoefficient * Ur;
// explicitInterpCorr
forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_);
} }
if(verbose_ && index >=0 && index <2) if(verbose_ && index >=0 && index <2)
@ -251,23 +264,9 @@ void KochHillDrag::setForce() const
particleCloud_.probeM().writeProbe(index, sValues, vValues); particleCloud_.probeM().writeProbe(index, sValues, vValues);
} }
} }
// set force on particle
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j];
else for(int j=0;j<3;j++) impForces()[index][j] += drag[j];
// set Cd // write particle based data to global array
if(implDEM_) forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
{
for(int j=0;j<3;j++) fluidVel()[index][j]=Ufluid[j];
if (modelType_=="B" && cellI > -1)
Cds()[index][0] = Vs*betaP/voidfraction*scaleDrag_;
else
Cds()[index][0] = Vs*betaP*scaleDrag_;
}else{
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j];
}
//} //}
} }

View File

@ -78,6 +78,10 @@ private:
const volScalarField& voidfraction_; const volScalarField& voidfraction_;
word UsFieldName_;
const volVectorField& UsField_;
bool interpolation_; // use interpolated field values bool interpolation_; // use interpolated field values
mutable scalar scaleDia_; mutable scalar scaleDia_;

View File

@ -71,6 +71,8 @@ KochHillRWDrag::KochHillRWDrag
rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)), rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")), voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)), voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
UsFieldName_(propsDict_.lookupOrDefault("granVelFieldName",word("Us"))),
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
interpolation_(false), interpolation_(false),
scale_(1.), scale_(1.),
randomTauE_(false), randomTauE_(false),
@ -80,16 +82,19 @@ KochHillRWDrag::KochHillRWDrag
{ {
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("interpolation")) interpolation_=true; if (propsDict_.found("interpolation")) interpolation_=true;
if (propsDict_.found("randomTauE")) randomTauE_=true; if (propsDict_.found("randomTauE")) randomTauE_=true;
if (propsDict_.found("implDEM"))
{ // init force sub model
treatExplicit_=false; setForceSubModels(propsDict_);
implDEM_=true;
setImpDEMdrag(); // define switches which can be read from dict
Info << "Using implicit DEM drag formulation." << endl; forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
} forceSubM(0).setSwitchesList(2,true); // activate implDEM switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
if (propsDict_.found("scale")) if (propsDict_.found("scale"))
@ -162,6 +167,8 @@ void KochHillRWDrag::setForce() const
scalar voidfraction(1); scalar voidfraction(1);
vector Ufluid(0,0,0); vector Ufluid(0,0,0);
vector drag(0,0,0); vector drag(0,0,0);
vector dragExplicit(0,0,0);
scalar dragCoefficient(0);
label cellI=0; label cellI=0;
vector Us(0,0,0); vector Us(0,0,0);
@ -211,12 +218,13 @@ void KochHillRWDrag::setForce() const
//{ //{
cellI = particleCloud_.cellIDs()[index][0]; cellI = particleCloud_.cellIDs()[index][0];
drag = vector(0,0,0); drag = vector(0,0,0);
dragExplicit = vector(0,0,0);
dragCoefficient=0;
betaP = 0; betaP = 0;
Vs = 0; Vs = 0;
Ufluid =vector(0,0,0); Ufluid =vector(0,0,0);
// Pout << "RW-TEST: cellI = " << cellI << endl; // TEST-Output // Pout << "RW-TEST: cellI = " << cellI << endl; // TEST-Output
Info << "haha1" << endl;
if (cellI > -1) // particle Found if (cellI > -1) // particle Found
{ {
if(interpolation_) if(interpolation_)
@ -285,7 +293,6 @@ Info << "haha1" << endl;
} else { } else {
minDeltaT = timeE; minDeltaT = timeE;
} }
Info << "haha3" << endl;
//Pout << "RW-TEST: timeE = " << timeE << " timeCR = " << timeCr << endl; // TEST-Output //Pout << "RW-TEST: timeE = " << timeE << " timeCR = " << timeCr << endl; // TEST-Output
// calculate time step of next update // calculate time step of next update
@ -300,11 +307,9 @@ Info << "haha3" << endl;
//Pout << "RW-TEST: Ufluid[" << dim << "] = " << Ufluid[dim] << " Ufluct = " << partUfluct_[index][dim] << " k = " << k << endl; // TEST-Output //Pout << "RW-TEST: Ufluid[" << dim << "] = " << Ufluid[dim] << " Ufluct = " << partUfluct_[index][dim] << " k = " << k << endl; // TEST-Output
Ufluid[dim] = Ufluid[dim] + partUfluct_[index][dim]; Ufluid[dim] = Ufluid[dim] + partUfluct_[index][dim];
} }
Info << "haha4" << endl;
} }
else else
{ {
Info << "haha5" << endl;
// no update of the turbulent velocity part // no update of the turbulent velocity part
// modify current fluid velocity // modify current fluid velocity
for(int dim=0;dim<3;dim++) for(int dim=0;dim<3;dim++)
@ -322,7 +327,6 @@ Info << "haha5" << endl;
Rep = 0; Rep = 0;
Vs = ds*ds*ds*M_PI/6; Vs = ds*ds*ds*M_PI/6;
volumefraction = 1-voidfraction+SMALL; volumefraction = 1-voidfraction+SMALL;
Info << "haha6" << endl;
if (magUr > 0) if (magUr > 0)
{ {
// calc particle Re Nr // calc particle Re Nr
@ -352,11 +356,14 @@ Info << "haha6" << endl;
betaP = 18.*nuf*rho/(ds/scale_*ds/scale_)*voidfraction*F; betaP = 18.*nuf*rho/(ds/scale_*ds/scale_)*voidfraction*F;
// calc particle's drag // calc particle's drag
drag = Vs*betaP*Ur; dragCoefficient = Vs*betaP;//*scaleDrag_;
if (modelType_=="B") if (modelType_=="B")
drag /= voidfraction; dragCoefficient /= voidfraction;
Info << "haha7" << endl;
drag = dragCoefficient * Ur;
// explicitInterpCorr
forceSubM(0).explicitInterpCorr(dragExplicit,dragCoefficient,Ufluid,U_[cellI],Us,UsField_[cellI],verbose_);
} }
if(verbose_ && index >=0 && index <2) if(verbose_ && index >=0 && index <2)
@ -372,30 +379,11 @@ Info << "haha7" << endl;
Pout << "Rep = " << Rep << endl; Pout << "Rep = " << Rep << endl;
Pout << "drag = " << drag << endl; Pout << "drag = " << drag << endl;
} }
Info << "haha8" << endl;
} }
Info << "haha9" << endl; // write particle based data to global array
// set force on particle forceSubM(0).partToArray(index,drag,dragExplicit,Ufluid,dragCoefficient);
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j];
else for(int j=0;j<3;j++) impForces()[index][j] += drag[j];
// set Cd
if(implDEM_)
{
for(int j=0;j<3;j++) fluidVel()[index][j]=Ufluid[j];
if (modelType_=="B")
Cds()[index][0] = Vs*betaP/voidfraction;
else
Cds()[index][0] = Vs*betaP;
}else{
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j];
}
Info << "haha10" << endl;
//} //}
} }
Info << "haha11" << endl;
} }

View File

@ -79,6 +79,10 @@ private:
const volScalarField& voidfraction_; const volScalarField& voidfraction_;
word UsFieldName_;
const volVectorField& UsField_; // the average particle velocity field
bool interpolation_; // use interpolated field values bool interpolation_; // use interpolated field values
mutable scalar scale_; mutable scalar scale_;

View File

@ -76,7 +76,15 @@ MeiLift::MeiLift
vorticity_(sm.mesh().lookupObject<volVectorField> (vorticityFieldName_))*/ vorticity_(sm.mesh().lookupObject<volVectorField> (vorticityFieldName_))*/
{ {
if (propsDict_.found("useSecondOrderTerms")) useSecondOrderTerms_=true; if (propsDict_.found("useSecondOrderTerms")) useSecondOrderTerms_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (propsDict_.found("interpolation")) interpolation_=true; if (propsDict_.found("interpolation")) interpolation_=true;
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
@ -261,13 +269,8 @@ void MeiLift::setForce() const
//********************************** //**********************************
} }
// set force on particle // write particle based data to global array
if(!treatDEM_) forceSubM(0).partToArray(index,lift,vector::zero);
{
if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += lift[j];
else for(int j=0;j<3;j++) expForces()[index][j] += lift[j];
}
for(int j=0;j<3;j++) DEMForces()[index][j] += lift[j];
//} //}
} }

View File

@ -79,7 +79,16 @@ SchillerNaumannDrag::SchillerNaumannDrag
particleCloud_.probeM().writeHeader(); particleCloud_.probeM().writeHeader();
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
particleCloud_.checkCG(false); particleCloud_.checkCG(false);
} }
@ -163,10 +172,9 @@ void SchillerNaumannDrag::setForce() const
particleCloud_.probeM().writeProbe(index, sValues, vValues); particleCloud_.probeM().writeProbe(index, sValues, vValues);
} }
} }
// set force on particle
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; // write particle based data to global array
else for(int j=0;j<3;j++) impForces()[index][j] += drag[j]; forceSubM(0).partToArray(index,drag,vector::zero);
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j];
//} //}
} }

View File

@ -86,7 +86,16 @@ ShirgaonkarIB::ShirgaonkarIB
Info << "2-dimensional simulation - make sure DEM side is 2D" << endl; Info << "2-dimensional simulation - make sure DEM side is 2D" << endl;
Info << "depth of domain is assumed to be :" << depth_ << endl; Info << "depth of domain is assumed to be :" << depth_ << endl;
} }
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
particleCloud_.checkCG(false); particleCloud_.checkCG(false);
} }
@ -146,9 +155,8 @@ void ShirgaonkarIB::setForce() const
particleCloud_.probeM().writeProbe(index, sValues, vValues); particleCloud_.probeM().writeProbe(index, sValues, vValues);
} }
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += drag[j]; // write particle based data to global array
else for(int j=0;j<3;j++) impForces()[index][j] += drag[j]; forceSubM(0).partToArray(index,drag,vector::zero);
for(int j=0;j<3;j++) DEMForces()[index][j] += drag[j];
if(verbose_) Info << "impForces = " << impForces()[index][0]<<","<<impForces()[index][1]<<","<<impForces()[index][2] << endl; if(verbose_) Info << "impForces = " << impForces()[index][0]<<","<<impForces()[index][1]<<","<<impForces()[index][2] << endl;
//} //}

View File

@ -56,9 +56,9 @@ forceModel::forceModel
: :
dict_(dict), dict_(dict),
particleCloud_(sm), particleCloud_(sm),
treatExplicit_(false), //treatExplicit_(false),
treatDEM_(false), //treatDEM_(false),
implDEM_(false), //implDEM_(false),
impParticleForces_ impParticleForces_
( IOobject ( IOobject
( (
@ -86,7 +86,9 @@ forceModel::forceModel
coupleForce_(true), coupleForce_(true),
modelType_(sm.modelType()), modelType_(sm.modelType()),
probeIt_(sm.probeM().active()), probeIt_(sm.probeM().active()),
requiresEx_(false) requiresEx_(false),
forceSubModels_(wordList(0)),
forceSubModel_(new autoPtr<forceSubModel>[nrForceSubModels()])
{} {}
@ -165,6 +167,29 @@ void forceModel::treatVoidCells() const
} }
} }
void forceModel::setForceSubModels(dictionary& dict)
{
if (dict.found("forceSubModels"))
forceSubModels_ = wordList(dict.lookup("forceSubModels"));
else{
forceSubModels_ = wordList(1);
forceSubModels_[0] = "ImEx";
}
delete[] forceSubModel_;
forceSubModel_ = new autoPtr<forceSubModel>[nrForceSubModels()];
Info << "nrForceSubModels()=" << nrForceSubModels() << endl;
for (int i=0;i<nrForceSubModels();i++)
{
forceSubModel_[i] = forceSubModel::New
(
dict,
particleCloud_,
*this,
forceSubModels_[i]
);
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam } // End namespace Foam

View File

@ -42,6 +42,7 @@ SourceFiles
#include "fvCFD.H" #include "fvCFD.H"
#include "cfdemCloud.H" #include "cfdemCloud.H"
#include "probeModel.H" #include "probeModel.H"
#include "forceSubModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam namespace Foam
@ -61,11 +62,9 @@ protected:
cfdemCloud& particleCloud_; cfdemCloud& particleCloud_;
Switch treatExplicit_; // marker to treat force in implicit way (otherwise explicit) //Switch treatExplicit_; // marker to treat force in implicit way (otherwise explicit)
//Switch treatDEM_; // marker to use the force only on DEM side
Switch treatDEM_; // marker to use the force only on DEM side //Switch implDEM_; // marker to use the implicit force on DEM side
Switch implDEM_; // marker to use the implicit force on DEM side
mutable volVectorField impParticleForces_; // sum of implicit particle forces [N] mutable volVectorField impParticleForces_; // sum of implicit particle forces [N]
@ -79,6 +78,10 @@ protected:
bool requiresEx_; //requires a orientation vector bool requiresEx_; //requires a orientation vector
wordList forceSubModels_;
autoPtr<forceSubModel>* forceSubModel_;
public: public:
//- Runtime type information //- Runtime type information
@ -150,13 +153,19 @@ public:
inline const bool& coupleForce() const { return coupleForce_;}; inline const bool& coupleForce() const { return coupleForce_;};
void const setImpDEMdrag() const {particleCloud_.impDEMdrag_=true;};
virtual inline bool& requiresEx() { return requiresEx_;}; virtual inline bool& requiresEx() { return requiresEx_;};
void repartitionImExForces() const; //Repartition Implixit/Explicit forces void repartitionImExForces() const; //Repartition Implixit/Explicit forces
void treatVoidCells() const; void treatVoidCells() const;
inline const wordList& forceSubModels(){ return forceSubModels_; };
inline const forceSubModel& forceSubM(int i) const { return forceSubModel_[i]; };
inline int nrForceSubModels(){ return forceSubModels_.size(); };
void setForceSubModels(dictionary& dict);
}; };

View File

@ -0,0 +1,81 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "ImEx.H"
#include "addToRunTimeSelectionTable.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(ImEx, 0);
addToRunTimeSelectionTable
(
forceSubModel,
ImEx,
dictionary
);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
ImEx::ImEx
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm
)
:
forceSubModel(dict,sm,fm)
{}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
ImEx::~ImEx()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,95 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
Class
ImEx
SourceFiles
ImEx.C
\*---------------------------------------------------------------------------*/
#ifndef ImEx_H
#define ImEx_H
#include "forceSubModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class ImEx Declaration
\*---------------------------------------------------------------------------*/
class ImEx
:
public forceSubModel
{
private:
public:
//- Runtime type information
TypeName("ImEx");
// Constructors
//- Construct from components
ImEx
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm
);
// Destructor
~ImEx();
// Member Functions
word myType() const{return typeName; };
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,182 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "forceSubModel.H"
#include "forceModel.H"
#include "mathExtra.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(forceSubModel, 0);
defineRunTimeSelectionTable(forceSubModel, dictionary);
// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
// Construct from components
forceSubModel::forceSubModel
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm
)
:
dict_(dict),
particleCloud_(sm),
forceModel_(fm),
nrDefaultSwitches_(3),
switchesNameList_(wordList(nrDefaultSwitches_)),
switchesList_(List<Switch>(nrDefaultSwitches_)),
switches_(List<Switch>(nrDefaultSwitches_))
{
// init switches lists
switchesNameList_[0]="treatExplicit";
switchesNameList_[1]="treatDEM";
switchesNameList_[2]="implDEM";
for(int i=0;i<switchesList_.size();i++)
{
switchesList_[i]=false;
switches_[i]=false;
}
// sanity check of what is defined above
if(switchesNameList_.size() != nrDefaultSwitches_)
FatalError<< "please check the nr of switches defined in forceSubModel class." << abort(FatalError);
}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
forceSubModel::~forceSubModel()
{}
// * * * * * * * * * * * * * * * * Member Fct * * * * * * * * * * * * * * * //
void forceSubModel::partToArray
(
label& index,
vector& dragTot,
const vector& dragEx,
const vector& Ufluid,
scalar Cd
) const
{
// forces for CFD
if(!switches_[1])// !treatDEM
{
if(switches_[0]) // treatExplicit
{
for(int j=0;j<3;j++)
myForceM().expForces()[index][j] += dragTot[j];
}
else //implicit treatment, taking explicit force contribution into account
{
for(int j=0;j<3;j++)
{
myForceM().impForces()[index][j] += dragTot[j] - dragEx[j]; //only consider implicit part!
myForceM().expForces()[index][j] += dragEx[j];
}
}
}
// forces for DEM
if(switches_[2]) // implDEM
{
for(int j=0;j<3;j++)
myForceM().fluidVel()[index][j]=Ufluid[j];
myForceM().Cds()[index][0]=Cd;
}
else
{
for(int j=0;j<3;j++)
myForceM().DEMForces()[index][j] += dragTot[j];
}
}
void forceSubModel::explicitInterpCorr
(
vector& dragExplicit,
scalar& dragCoefficient,
vector& Ufluid,
const vector& Ucell,
vector& Us,
const vector& UsCell,
bool verbose,
label index
) const
{
dragExplicit=vector::zero;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
void forceSubModel::readSwitches() const
{
Info << "\nforceSubModel:" << myType() << endl;
forAll(switchesNameList_,i)
{
if(switchesList_[i] > 0+SMALL)
{
Info << " looking for " << switchesNameList_[i] << " ..." << endl;
if (dict_.found(switchesNameList_[i]))
switches_[i]=Switch(dict_.lookup(switchesNameList_[i]));
Info << "\t" << switchesNameList_[i] << " = " << switches_[i] << endl;
}
}
Info << endl;
if(switches_[2]) // implDEM=true
{
// communicate implDEM to particleCloud
particleCloud_.impDEMdrag_=true;
// do sanity check
if(switches_[0]) // treatExplicit=true
{
Warning<< "please check your settings, treatExplicit together with implDEM does not work! (using treatExplicit=false)" << endl;
switches_[0]=false;
}
}
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -0,0 +1,156 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
Class
forceSubModel
SourceFiles
forceSubModel.C
\*---------------------------------------------------------------------------*/
#ifndef forceSubModel_H
#define forceSubModel_H
#include "fvCFD.H"
#include "cfdemCloud.H"
#include "probeModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
/*---------------------------------------------------------------------------*\
Class forceSubModel Declaration
\*---------------------------------------------------------------------------*/
class forceSubModel
{
protected:
// Protected data
const dictionary& dict_;
cfdemCloud& particleCloud_;
forceModel& forceModel_;
label nrDefaultSwitches_; // nr of switches defined in mother class
wordList switchesNameList_; // names of switches available
mutable List<Switch> switchesList_; // switches which are requested in dict
mutable List<Switch> switches_;
public:
//- Runtime type information
TypeName("forceSubModel");
// Declare runtime constructor selection table
declareRunTimeSelectionTable
(
autoPtr,
forceSubModel,
dictionary,
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm
),
(dict,sm,fm)
);
// Constructors
//- Construct from components
forceSubModel
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm
);
// Destructor
virtual ~forceSubModel();
// Selector
static autoPtr<forceSubModel> New
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm,
word forceType
);
// Member Functions
void partToArray(label&, vector&, const vector&, const vector& Ufluid=vector::zero, scalar Cd=scalar(0)) const;
virtual void explicitInterpCorr(vector&, scalar&, vector&, const vector&, vector&, const vector&, bool,label index=100) const;
// Access
virtual word myType() const=0;
inline forceModel& myForceM() const { return forceModel_;};
inline const List<Switch>& switches() const { return switches_;};
inline const wordList& switchesNameList() const { return switchesNameList_;};
void setSwitchesList(label i, bool v) const { switchesList_[i] = label(v);};
void setSwitches(label i, Switch v) const { switches_[i] = v;};
virtual void readSwitches() const;
const label& nrDefaultSwitches() const {return nrDefaultSwitches_;};
};
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#endif
// ************************************************************************* //

View File

@ -0,0 +1,79 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM(R). Note: this code is not part of OpenFOAM(R) (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
#include "error.H"
#include "forceSubModel.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
autoPtr<forceSubModel> forceSubModel::New
(
const dictionary& dict,
cfdemCloud& sm,
forceModel& fm,
word forceType
)
{
Info<< "Selecting forceSubModel "
<< forceType << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(forceType);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalError
<< "forceSubModel::New(const dictionary&, const spray&) : "
<< endl
<< " unknown forceSubModelType type "
<< forceType
<< ", constructor not in hash table" << endl << endl
<< " Valid forceSubModel types are :"
<< endl;
Info<< dictionaryConstructorTablePtr_->toc()
<< abort(FatalError);
}
return autoPtr<forceSubModel>(cstrIter()(dict,sm,fm));
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -74,16 +74,26 @@ gradPForce::gradPForce
addedMassCoeff_(0.0), addedMassCoeff_(0.0),
interpolation_(false) interpolation_(false)
{ {
if (propsDict_.found("verbose")) verbose_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (modelType_ == "B") if (modelType_ == "B")
{ {
FatalError <<"using model gradPForce with model type B is not valid\n" << abort(FatalError); FatalError <<"using model gradPForce with model type B is not valid\n" << abort(FatalError);
}else }else
{ {
treatDEM_=true; forceSubM(0).setSwitches(1,true); // treatDEM = true
Info << "gradPForce is applied only to DEM side" << endl; Info << "gradPForce is applied only to DEM side" << endl;
} }
if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("useU")) useU_=true; if (propsDict_.found("useU")) useU_=true;
if (propsDict_.found("useAddedMass")) if (propsDict_.found("useAddedMass"))
{ {
@ -131,7 +141,6 @@ void gradPForce::setForce() const
gradPField = fvc::grad(0.5*rho_*U2); gradPField = fvc::grad(0.5*rho_*U2);
}*/ }*/
vector gradP; vector gradP;
scalar ds;
scalar Vs; scalar Vs;
scalar rho; scalar rho;
vector position; vector position;
@ -188,12 +197,8 @@ void gradPForce::setForce() const
} }
} }
// set force on particle // write particle based data to global array
if(!treatDEM_){ forceSubM(0).partToArray(index,force,vector::zero);
if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += force[j];
else for(int j=0;j<3;j++) expForces()[index][j] += force[j];
}
for(int j=0;j<3;j++) DEMForces()[index][j] += force[j];
//} //}
} }

View File

@ -78,7 +78,15 @@ interface::interface
{ {
if (propsDict_.found("C")) C_=readScalar(propsDict_.lookup("C")); if (propsDict_.found("C")) C_=readScalar(propsDict_.lookup("C"));
if (propsDict_.found("interpolation")) interpolation_=true; if (propsDict_.found("interpolation")) interpolation_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
Info << "check if interpolation really works - use directly interpolationCellPoint<vector> ???" << endl; Info << "check if interpolation really works - use directly interpolationCellPoint<vector> ???" << endl;
particleCloud_.checkCG(false); particleCloud_.checkCG(false);
@ -179,9 +187,9 @@ Info << "interface::setForce" << endl;
Info << "interface force is limited to " << interfaceForce << endl; Info << "interface force is limited to " << interfaceForce << endl;
}*/ }*/
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += interfaceForce[j]; // write particle based data to global array
else for(int j=0;j<3;j++) impForces()[index][j] += interfaceForce[j]; forceSubM(0).partToArray(index,interfaceForce,vector::zero);
for(int j=0;j<3;j++) DEMForces()[index][j] += interfaceForce[j];
} // end if particle found on proc domain } // end if particle found on proc domain
//}// end if in mask //}// end if in mask
}// end loop particles }// end loop particles

View File

@ -68,6 +68,15 @@ noDrag::noDrag
if(dict.found(word(typeName + "Props"))) if(dict.found(word(typeName + "Props")))
propsDict_=dictionary(dict.subDict(typeName + "Props")); propsDict_=dictionary(dict.subDict(typeName + "Props"));
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (propsDict_.found("noDEMForce")) noDEMForce_=true; if (propsDict_.found("noDEMForce")) noDEMForce_=true;
if (propsDict_.found("keepCFDForce")) keepCFDForce_=true; if (propsDict_.found("keepCFDForce")) keepCFDForce_=true;
@ -89,15 +98,21 @@ void noDrag::setForce() const
// Do nothing // Do nothing
Info << "noDrag::setForce" << endl; Info << "noDrag::setForce" << endl;
label cellI=0; label cellI=0;
bool treatExplicit=forceSubM(0).switches()[0];
for(int index = 0;index < particleCloud_.numberOfParticles(); ++index) for(int index = 0;index < particleCloud_.numberOfParticles(); ++index)
{ {
cellI = particleCloud_.cellIDs()[index][0]; cellI = particleCloud_.cellIDs()[index][0];
if (cellI > -1) // particle Found if (cellI > -1) // particle Found
{ {
// set force on particle //==========================
// set force on particle (new code)
// write particle based data to global array
//forceSubM(0).partToArray(index,drag,dragExplicit);
//==========================
// set force on particle (old code)
if(!keepCFDForce_) if(!keepCFDForce_)
{ {
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] = 0.; if(treatExplicit) for(int j=0;j<3;j++) expForces()[index][j] = 0.;
else for(int j=0;j<3;j++) impForces()[index][j] = 0.; else for(int j=0;j<3;j++) impForces()[index][j] = 0.;
} }
if(noDEMForce_) if(noDEMForce_)
@ -109,6 +124,7 @@ void noDrag::setForce() const
for(int j=0;j<3;j++) fluidVel()[index][j] = 0.; for(int j=0;j<3;j++) fluidVel()[index][j] = 0.;
} }
} }
//==========================
} }
} }
} }

View File

@ -77,7 +77,16 @@ virtualMassForce::virtualMassForce
// get memory for 2d array // get memory for 2d array
particleCloud_.dataExchangeM().allocateArray(UrelOld_,0.,3); particleCloud_.dataExchangeM().allocateArray(UrelOld_,0.,3);
} }
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
particleCloud_.checkCG(true); particleCloud_.checkCG(true);
//Append the field names to be probed //Append the field names to be probed
@ -146,10 +155,9 @@ void virtualMassForce::setForce() const
particleCloud_.probeM().writeProbe(index, sValues, vValues); particleCloud_.probeM().writeProbe(index, sValues, vValues);
} }
} }
// set force on particle
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += virtualMassForce[j]; // write particle based data to global array
else for(int j=0;j<3;j++) impForces()[index][j] += virtualMassForce[j]; forceSubM(0).partToArray(index,virtualMassForce,vector::zero);
for(int j=0;j<3;j++) DEMForces()[index][j] += virtualMassForce[j];
//} //}
} }

View File

@ -70,16 +70,25 @@ viscForce::viscForce
addedMassCoeff_(0.0), addedMassCoeff_(0.0),
interpolation_(false) interpolation_(false)
{ {
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (modelType_ == "B") if (modelType_ == "B")
{ {
FatalError <<"using model viscForce with model type B is not valid\n" << abort(FatalError); FatalError <<"using model viscForce with model type B is not valid\n" << abort(FatalError);
}else }else
{ {
treatDEM_=true; forceSubM(0).setSwitches(1,true); // treatDEM = true
Info << "viscForce is applied only to DEM side" << endl; Info << "viscForce is applied only to DEM side" << endl;
} }
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
if (propsDict_.found("useAddedMass")) if (propsDict_.found("useAddedMass"))
{ {
@ -132,7 +141,6 @@ void viscForce::setForce() const
#endif #endif
vector divTau; vector divTau;
scalar ds;
scalar Vs; scalar Vs;
vector position; vector position;
vector force; vector force;
@ -185,13 +193,8 @@ void viscForce::setForce() const
} }
} }
// set force on particle // write particle based data to global array
if(!treatDEM_){ forceSubM(0).partToArray(index,force,vector::zero);
if(!treatExplicit_) for(int j=0;j<3;j++) impForces()[index][j] += force[j];
else for(int j=0;j<3;j++) expForces()[index][j] += force[j];
}
for(int j=0;j<3;j++) DEMForces()[index][j] += force[j];
//} //}
} }
} }

View File

@ -88,7 +88,16 @@ DiFeliceDragMS::DiFeliceDragMS
particleCloud_.probeM().writeHeader(); particleCloud_.probeM().writeHeader();
if (propsDict_.found("verbose")) verbose_=true; if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
// init force sub model
setForceSubModels(propsDict_);
// define switches which can be read from dict
forceSubM(0).setSwitchesList(0,true); // activate treatExplicit switch
// read those switches defined above, if provided in dict
forceSubM(0).readSwitches();
if (propsDict_.found("interpolation")) if (propsDict_.found("interpolation"))
{ {
Info << "using interpolated value of U." << endl; Info << "using interpolated value of U." << endl;
@ -246,7 +255,7 @@ void DiFeliceDragMS::setForce() const
} }
} }
// set force on bodies // set force on bodies
if(treatExplicit_) for(int j=0;j<3;j++) cloudRefMS().expForcesCM()[index][j] += drag[j]; if(forceSubM(0).switches()[0]) for(int j=0;j<3;j++) cloudRefMS().expForcesCM()[index][j] += drag[j];
else //implicit treatment, taking explicit force contribution into account else //implicit treatment, taking explicit force contribution into account
{ {
for(int j=0;j<3;j++) for(int j=0;j<3;j++)

View File

@ -92,7 +92,7 @@ void forceModelMS::setForcesOnParticle() const
<< nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl; << nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl;
nrigidC = 1000; nrigidC = 1000;
} }
if(treatExplicit_) for(int j=0;j<3;j++) expForces()[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC; if(forceSubM(0).switches()[0]) for(int j=0;j<3;j++) expForces()[index][j] += cloudRefMS().expForcesCM()[ind][j] / nrigidC;
else{ else{
for(int j=0;j<3;j++){ for(int j=0;j<3;j++){
impForces()[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC; impForces()[index][j] += cloudRefMS().impForcesCM()[ind][j] / nrigidC;

View File

View File

@ -0,0 +1,95 @@
#echo both
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
processors 2 2 1
region reg block 0. 1. 0. 1. 0. 4. units box
create_box 1 reg
neighbor 0.3 bin
neigh_modify delay 0 binsize 0.01
# Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype 5.e7
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.9
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history #Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00003
fix gravi all gravity 981 vector 0.0 0.0 -1.0
# walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 1.
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 1.
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 4.
# cfd coupling
fix cfd all couple/cfd couple_every 10 mpi
fix cfd2 all couple/cfd/force
# create single partciles
create_atoms 1 single .5 .5 3.5 units box
create_atoms 1 single .5 .5 3.16 units box
set atom 1 diameter 0.167 density 1.5 vx 0 vy 0 vz 0
set atom 2 diameter 0.167 density 1.5 vx 0 vy 0 vz 0
variable vx1 equal vx[1]
variable vy1 equal vy[1]
variable vz1 equal vz[1]
variable vx2 equal vx[2]
variable vy2 equal vy[2]
variable vz2 equal vz[2]
variable x1 equal x[1]
variable y1 equal y[1]
variable z1 equal z[1]
variable x2 equal x[2]
variable y2 equal y[2]
variable z2 equal z[2]
variable time equal step*dt
fix extra1 all print 100 "${time} ${vx1} ${vy1} ${vz1}" file ../DEM/post/velocity_particle_1.txt title "%" screen no
fix extra2 all print 100 "${time} ${vx2} ${vy2} ${vz2}" file ../DEM/post/velocity_particle_2.txt title "%" screen no
fix extra3 all print 100 "${time} ${x1} ${y1} ${z1}" file ../DEM/post/position_particle_1.txt title "%" screen no
fix extra4 all print 100 "${time} ${x2} ${y2} ${z2}" file ../DEM/post/position_particle_2.txt title "%" screen no
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere #wenn das ausgeblendet, dann kein vel update
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]
run 1

View File

@ -65,20 +65,13 @@ cp ../../$logfileName $testHarnessPath
#- clean up case #- clean up case
echo "deleting data at: $casePath" echo "deleting data at: $casePath"
rm -r $casePath/CFD/0.* source $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -r $casePath/CFD/callgrind.* cd $casePath/CFD
rm -r $casePath/CFD/*.out cleanCase
rm -r $casePath/CFD/VTK rm -r $casePath/CFD/clockData
rm -r $casePath/CFD/couplingFiles/* rm $casePath/DEM/post/*.*
rm -r $casePath/CFD/processor* #rm -r $casePath/DEM/post/restart/*.*
rm -r $casePath/CFD/particles*
rm -r $casePath/CFD/probes
rm -r $casePath/DEM/post/*
rm -r $casePath/DEM/log.*
rm -r $casePath/log_*
echo "done"
#- preserve post directory #- preserve post directory
touch $casePath/DEM/post/.gitignore touch $casePath/DEM/post/.gitignore
echo "done"

View File

@ -87,7 +87,7 @@ cd $casePath/CFD
cleanCase cleanCase
rm -r $casePath/CFD/clockData rm -r $casePath/CFD/clockData
rm -r $casePath/DEM/post/*.* rm -r $casePath/DEM/post/*.*
rm -r $casePath/DEM/post/restart/*.* #rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore touch $casePath/DEM/post/.gitignore
touch $casePath/DEM/post/restart/.gitignore touch $casePath/DEM/post/restart/.gitignore
echo "done" echo "done"

View File

@ -22,7 +22,7 @@ if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then
echo "LIGGGHTS init was run before - using existing restart file" echo "LIGGGHTS init was run before - using existing restart file"
else else
#- run DEM in new terminal #- run DEM in new terminal
$casePath/DEMrun.sh $casePath/parDEMrun.sh
fi fi
#- run parallel CFD-DEM in new terminal #- run parallel CFD-DEM in new terminal

View File

@ -149,9 +149,12 @@ GidaspowDragProps
} }
DiFeliceDragProps DiFeliceDragProps
{ {
//verbose;
velFieldName "U"; velFieldName "U";
densityFieldName "rho"; densityFieldName "rho";
voidfractionFieldName "voidfraction"; voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation;
} }
KochHillDragProps KochHillDragProps
@ -161,6 +164,12 @@ KochHillDragProps
densityFieldName "rho"; densityFieldName "rho";
voidfractionFieldName "voidfraction"; voidfractionFieldName "voidfraction";
interpolation; interpolation;
//forceSubModels
//(
// ImExCorr
//);
//implDEM true;
//explicitInterpCorr true;
} }
BeetstraDragProps BeetstraDragProps

View File

@ -0,0 +1,66 @@
# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.0005 bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
# change the particles density
set group all density 2000
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force/implicit
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# center of mass
compute centerOfMass all com
# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -87,7 +87,7 @@ cd $casePath/CFD
cleanCase cleanCase
rm -r $casePath/CFD/clockData rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.* rm $casePath/DEM/post/*.*
rm -r $casePath/DEM/post/restart/*.* #rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore touch $casePath/DEM/post/.gitignore
touch $casePath/DEM/post/restart/.gitignore touch $casePath/DEM/post/restart/.gitignore
echo "done" echo "done"

View File

@ -0,0 +1,30 @@
#!/bin/bash
#===================================================================#
# DEMrun script for ErgunTestMPI testcase
# init ErgunTestMPI
# Christoph Goniva - July 2014
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
echo "starting DEM run in parallel..."
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs=4
machineFileName="none"
debugMode="off"
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

View File

@ -22,7 +22,7 @@ if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then
echo "LIGGGHTS init was run before - using existing restart file" echo "LIGGGHTS init was run before - using existing restart file"
else else
#- run DEM #- run DEM
$casePath/DEMrun.sh $casePath/parDEMrun.sh
fi fi
#- run parallel CFD-DEM in new terminal #- run parallel CFD-DEM in new terminal

View File

@ -0,0 +1,66 @@
# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units cgs
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.1 bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 981 vector 0.0 0.0 -1.0
# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 5.53
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 1.385 0. 0.
# change the particles density
set group all density 2.0
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# center of mass
compute centerOfMass all com
# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -82,21 +82,12 @@ fi
#- clean up case #- clean up case
echo "deleting data at: $casePath :\n" echo "deleting data at: $casePath :\n"
rm -r $casePath/CFD/0.* source $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -r $casePath/CFD/callgrind.* cd $casePath/CFD
rm -r $casePath/CFD/*.out cleanCase
rm -r $casePath/CFD/log.*
rm -r $casePath/CFD/octave/octave-core
rm -r $casePath/CFD/VTK
rm -r $casePath/CFD/processor*
rm -r $casePath/CFD/couplingFiles/*
rm -r $casePath/CFD/probes
rm -r $casePath/CFD/postProcessing
rm -r $casePath/CFD/lagrangian
rm -r $casePath/CFD/clockData rm -r $casePath/CFD/clockData
rm -r $casePath/DEM/log.* rm $casePath/DEM/post/*.*
rm -r $casePath/DEM/post/*.* #rm -r $casePath/DEM/post/restart/*.*
rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore touch $casePath/DEM/post/.gitignore
touch $casePath/DEM/post/restart/.gitignore touch $casePath/DEM/post/restart/.gitignore
echo "done" echo "done"

View File

@ -0,0 +1,28 @@
#!/bin/bash
#===================================================================#
# DEMrun script for ErgunTestMPI testcase
# init ErgunTestMPI
# Daniel Queteschiner - June 2014
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs="4"
machineFileName="none" # yourMachinefileName | none
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName

View File

@ -24,7 +24,7 @@ if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then
echo "LIGGGHTS init was run before - using existing restart file" echo "LIGGGHTS init was run before - using existing restart file"
else else
#- run DEM in new terminal #- run DEM in new terminal
$casePath/DEMrun.sh $casePath/parDEMrun.sh
fi fi
#-------------------------------------------------------# #-------------------------------------------------------#
@ -110,7 +110,7 @@ cd $casePath/CFD
cleanCase cleanCase
rm -r $casePath/CFD/clockData rm -r $casePath/CFD/clockData
rm -r $casePath/DEM/post/*.* rm -r $casePath/DEM/post/*.*
rm -r $casePath/DEM/post/restart/*.* #rm -r $casePath/DEM/post/restart/*.*
touch $casePath/DEM/post/.gitignore touch $casePath/DEM/post/.gitignore
touch $casePath/DEM/post/restart/.gitignore touch $casePath/DEM/post/restart/.gitignore
echo "done" echo "done"

View File

@ -0,0 +1,235 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
modelType "A"; // A or B
couplingInterval 100;
voidFractionModel divided;//centre;//
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off;
dataExchangeModel twoWayMPI;//twoWayM2M;//twoWayFiles;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
KochHillDrag
gradPForce
viscForce
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "RASProperties";//"LESProperties";//
//===========================================================================//
// sub-model properties
localPSizeDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
dSmoothingLength 1.5e-3;
Csmoothing 1.0;
}
constDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
smoothingLength 1.5e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
densityFieldName "rho";
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
densityFieldName "rho";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation;
}
viscForceProps
{
velocityFieldName "U";
densityFieldName "rho";
interpolation;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
densityFieldName "rho";
}
GidaspowDragProps
{
verbose;
velFieldName "U";
densityFieldName "rho";
voidfractionFieldName "voidfraction";
phi 1;
}
DiFeliceDragProps
{
velFieldName "U";
densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
KochHillDragProps
{
//verbose;
velFieldName "U";
densityFieldName "rho";
voidfractionFieldName "voidfraction";
}
BeetstraDragProps
{
velFieldName "U";
densityFieldName "rho";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
interpolation ;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
// verbose ;
}
virtualMassForceProps
{
velFieldName "U";
densityFieldName "rho";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
verbose;
}
oneWayVTKProps
{
couplingFilename "vtk_out%4.4d.vtk";
maxNumberOfParticles 30000;
}
twoWayFilesProps
{
maxNumberOfParticles 10100;
}
centreProps
{
alphaMin 0.10;
}
engineProps
{
treeSearch true;
}
turboEngineM2MProps
{
turboEngineProps
{
treeSearch true;
}
}
dividedProps
{
alphaMin 0.01;
scaleUpVol 1.0;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_run";
}
// ************************************************************************* //

View File

@ -0,0 +1,44 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object liggghtsCommands;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
liggghtsCommandModels
(
runLiggghts
writeLiggghts
);
runLiggghtsProps
{
preNo false;
}
//- optional
writeLiggghtsProps
{
writeLast on;
writeName "post/restart/liggghts.restartCFDEM";
}
// ************************************************************************* //

View File

@ -0,0 +1,117 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application pisoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.05;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.01;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
//libs ( "libgroovyBC.so" "libfiniteVolumeCFDEM.so");
functions
(
probes
{
type probes;
// Where to load it from
functionObjectLibs ( "libsampling.so" );
// Name of the directory for probe data
name probes;
probeLocations
(
(0 0 0.0001)
(0 0 0.0026)
(0 0 0.0051)
(0 0 0.0076)
(0 0 0.0101)
(0 0 0.0126)
(0 0 0.0151)
(0 0 0.0176)
(0 0 0.0201)
(0 0 0.0226)
(0 0 0.0251)
(0 0 0.0276)
(0 0 0.0301)
(0 0 0.0326)
(0 0 0.0351)
(0 0 0.0375)
(0 0 0.0401)
(0 0 0.0426)
(0 0 0.0451)
(0 0 0.0476)
(0 0 0.0529)
);
// Fields to be probed
fields ( p U voidfraction volAverage_voidfraction voidfractionNext voidfractionPrev);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
}
/*pressureDrop
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
fields
(
p
);
factor 1;
}*/
);
// ************************************************************************* //

View File

@ -0,0 +1,65 @@
# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.0005 bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran model hertz tangential history primitive type 1 zcylinder 0.01385 0. 0.
# change the particles density
set group all density 2000
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# center of mass
compute centerOfMass all com
# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 5000 ../DEM/post/dump*.liggghts_restart id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
run 1

View File

@ -0,0 +1,28 @@
#!/bin/bash
#===================================================================#
# DEMrun script for ErgunTestMPI_restart testcase
# init ErgunTestMPI_restart
# Daniel Queteschiner - June 2014, DCS Computing GmbH
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs="2"
machineFileName="none" # yourMachinefileName | none
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName

View File

@ -0,0 +1,73 @@
# Pour granular particles into chute container, then induce flow
echo both
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array sort 0 0
communicate single vel yes
boundary f f f
newton off
units si
region reg block 0 0.1 0 0.1 0 0.1 units box
create_box 1 reg
neighbor 0.003 bin
neigh_modify delay 0 binsize 0.01
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#fix m5 all property/global characteristicVelocity scalar 2.0
# pair style
pair_style gran model hertz tangential history # hertz without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 -1.0 0.0
# walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.0
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 0.1
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.1
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.01
# create single partciles
create_atoms 1 single 0.05 0.025 0.05 units box
set group all diameter 0.0001 density 3000
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
variable vx equal vx[1]
variable vy equal vy[1]
variable vz equal vz[1]
variable time equal step*dt
fix extra all print 100 "${time} ${vx} ${vy} ${vz}" file ../DEM/post/velocity.txt title "#" screen no
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 1000 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
run 1 upto

View File

@ -0,0 +1,75 @@
# read packed bed and calc convective heat transfer
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
echo both
units si
processors 1 1 2
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.003 bin
neigh_modify delay 0 binsize 0.01
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
fix m2 all property/global poissonsRatio peratomtype 0.45
fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.81 vector 0. 0. -1.
# walls
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.0
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 0.1
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.1
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 1.1
# heat transfer
fix ftco all property/global thermalConductivity peratomtype 5. # lambda in [W/(K*m)]
fix ftca all property/global thermalCapacity peratomtype 0.1 # cp in [J/(kg*K)]
fix heattransfer all heat/gran initial_temperature 600.
# set particle temperature for the bed
run 0
region total block INF INF INF INF INF INF units box
set region total property/atom Temp 600.
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
# this one invokes heat transfer calculation, transfers per-particle temperature and adds convective heat flux to particles
fix cfd3 all couple/cfd/convection T0 600
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 100 ../DEM/post/dump.liggghts_run id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
run 1

View File

@ -84,21 +84,12 @@ fi
#- clean up case #- clean up case
echo "deleting data at: $casePath : ???\n" echo "deleting data at: $casePath : ???\n"
rm -r $casePath/CFD/0.* source $WM_PROJECT_DIR/bin/tools/CleanFunctions
rm -r $casePath/CFD/1 cd $casePath/CFD
rm -r $casePath/CFD/callgrind.* cleanCase
rm -r $casePath/CFD/*.out rm -r $casePath/CFD/clockData
rm -r $casePath/CFD/octave/*.eps rm $casePath/DEM/post/*.*
rm -r $casePath/CFD/octave/octave-core #rm -r $casePath/DEM/post/restart/*.*
rm -r $casePath/CFD/VTK
rm -r $casePath/CFD/processor*
rm -r $casePath/DEM/post/*.*
rm -r $casePath/DEM/post/restart/*.*
rm -r $casePath/DEM/log.*
rm -r $casePath/CFD/log.*
rm -r $casePath/CFD/probes
rm -r $casePath/CFD/postProcessing
rm -r $casePath/log_*
echo "done" echo "done"
#- preserve post directory #- preserve post directory

View File

@ -0,0 +1,28 @@
#!/bin/bash
#===================================================================#
# DEMrun script for ErgunTestMPI testcase
# init ErgunTestMPI
# Daniel Queteschiner - June 2014
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs="2"
machineFileName="none" # yourMachinefileName | none
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName