diff --git a/README b/README deleted file mode 100644 index a677e0a8..00000000 --- a/README +++ /dev/null @@ -1,82 +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 Silicon Graphics -International Corp. This offering is not affiliated, approved or endorsed by -Silicon Graphics International Corp., the producer of the OpenFOAM(R) software -and owner of the OpenFOAM(R) trademark. -\*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C index 4fc1d08b..352236d7 100644 --- a/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C +++ b/applications/solvers/cfdemSolverPiso/cfdemSolverPiso.C @@ -50,13 +50,11 @@ int main(int argc, char *argv[]) #include "createTime.H" #include "createMesh.H" #include "createFields.H" - #include "initContinuityErrs.H" // create cfdemCloud #include "readGravitationalAcceleration.H" cfdemCloud particleCloud(mesh); - #include "checkModelType.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/cfdemPostproc/cfdemPostproc.C b/applications/utilities/cfdemPostproc/cfdemPostproc.C index 69bc5d3d..04400a96 100644 --- a/applications/utilities/cfdemPostproc/cfdemPostproc.C +++ b/applications/utilities/cfdemPostproc/cfdemPostproc.C @@ -1,33 +1,34 @@ /*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | + CFDEMcoupling - Open Source CFD-DEM coupling + + CFDEMcoupling is part of the CFDEMproject + www.cfdem.com + Christoph Goniva, christoph.goniva@cfdem.com + Copyright (C) 1991-2009 OpenCFD Ltd. + Copyright (C) 2009-2012 JKU, Linz + Copyright (C) 2012- DCS Computing GmbH,Linz ------------------------------------------------------------------------------- License - This file is part of OpenFOAM. + This file is part of CFDEMcoupling. - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. + 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. - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + 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 OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + along with CFDEMcoupling. If not, see . Application cfdemPostproc Description Tool for DEM->CFD (Lagrange->Euler) mapping to calculate local voidfraction - \*---------------------------------------------------------------------------*/ #include "fvCFD.H" diff --git a/applications/utilities/writeUfluid/Make/files b/applications/utilities/writeUfluid/Make/files new file mode 100644 index 00000000..26244494 --- /dev/null +++ b/applications/utilities/writeUfluid/Make/files @@ -0,0 +1,3 @@ +writeUfluid.C + +EXE = $(FOAM_APPBIN)/writeUfluid diff --git a/applications/utilities/writeUfluid/Make/options b/applications/utilities/writeUfluid/Make/options new file mode 100644 index 00000000..0bc784e4 --- /dev/null +++ b/applications/utilities/writeUfluid/Make/options @@ -0,0 +1,10 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/lagrangian/basic/lnInclude + +EXE_LIBS = \ + -lfiniteVolume \ + -lmeshTools \ + -lgenericPatchFields \ + -llagrangian diff --git a/applications/utilities/writeUfluid/createFields.H b/applications/utilities/writeUfluid/createFields.H new file mode 100644 index 00000000..c5316d89 --- /dev/null +++ b/applications/utilities/writeUfluid/createFields.H @@ -0,0 +1,25 @@ + +IOdictionary propsDict +( + IOobject + ( + "particleTrackProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED + ) +); + +const word cloudName(propsDict.lookup("cloudName")); + +//label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency"))); + +// outputMode: compositeFile, filePerTrack +//word outputmode(propsDict.lookup("outputMode")) + +//label maxPositions(readLabel(propsDict.lookup("maxPositions"))); + +// outputFormat: raw, vtk +//word outputFormat(propsDict.lookup("outputFormat")); + + diff --git a/applications/utilities/writeUfluid/particleTrackProperties b/applications/utilities/writeUfluid/particleTrackProperties new file mode 100644 index 00000000..b2caae7a --- /dev/null +++ b/applications/utilities/writeUfluid/particleTrackProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object particleTrackProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cloudName cfdemCloud1; + +sampleFrequency 1; + +maxPositions 1000000; + +maxPositions 20000; +// ************************************************************************* // diff --git a/applications/utilities/writeUfluid/writeUfluid.C b/applications/utilities/writeUfluid/writeUfluid.C new file mode 100644 index 00000000..cde6c88f --- /dev/null +++ b/applications/utilities/writeUfluid/writeUfluid.C @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + CFDEMcoupling - Open Source CFD-DEM coupling + + CFDEMcoupling is part of the CFDEMproject + www.cfdem.com + Christoph Goniva, christoph.goniva@cfdem.com + Copyright (C) 1991-2009 OpenCFD Ltd. + Copyright (C) 2009-2012 JKU, Linz + Copyright (C) 2012- DCS Computing GmbH,Linz +------------------------------------------------------------------------------- +License + This file is part of CFDEMcoupling. + + CFDEMcoupling is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with CFDEMcoupling. If not, see . + +Application + writeUfluidwriteUfluid + +Description + Writes the the cell center fluid velocity to particles in the lagrangian + time directory. +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Cloud.H" +#include "IOdictionary.H" +#include "fvCFD.H" +#include "fvMesh.H" +#include "Time.H" +#include "timeSelector.H" +#include "OFstream.H" +#include "passiveParticleCloud.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + timeSelector::addOptions(); + #include "addRegionOption.H" + + #include "setRootCase.H" + + #include "createTime.H" + instantList timeDirs = timeSelector::select0(runTime, args); + #include "createMesh.H" + #include "createFields.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int nParticle=0; + forAll(timeDirs, timeI) + { + runTime.setTime(timeDirs[timeI], timeI); + Info<< "Time = " << runTime.timeName() << endl; + IOobject UHeader + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ + ); + if (UHeader.headerOk()) + { + volVectorField U(UHeader,mesh); + passiveParticleCloud myCloud(mesh, cloudName); + myCloud.write(); + nParticle = myCloud.size(); + IOField Ufluid(myCloud.fieldIOobject("Ufluid",IOobject::NO_READ),nParticle); + label i = 0; + forAllConstIter(passiveParticleCloud, myCloud, iter) + { + Ufluid[i]=U[iter().cell()]; + i++; + } + Ufluid.write(); + } + else + { + Info << "velocity field not found" << endl; + } + } + return 0; +} + + +// ************************************************************************* // diff --git a/doc/CFDEMcoupling_Manual.html b/doc/CFDEMcoupling_Manual.html index 175b3086..148ce0c3 100644 --- a/doc/CFDEMcoupling_Manual.html +++ b/doc/CFDEMcoupling_Manual.html @@ -189,32 +189,33 @@ listing below of styles within certain commands.

- - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + +
IOModelIOModel_basicIO
IOModel_noIOaveragingModel
averagingModel_dilutecfdemSolverIB
cfdemSolverPisocfdemSolverPisoScalar
clockModelclockModel_noClock
clockModel_standardClockdataExchangeModel
dataExchangeModel_noDataExchangedataExchangeModel_oneWayVTK
dataExchangeModel_twoWayFilesdataExchangeModel_twoWayMPI
forceModelforceModel_Archimedes
forceModel_ArchimedesIBforceModel_DiFeliceDrag
forceModel_GidaspowDragforceModel_KochHillDrag
forceModel_LaEuScalarTempforceModel_MeiLift
forceModel_SchillerNaumannDragforceModel_ShirgaonkarIB
forceModel_gradPForceforceModel_noDrag
forceModel_virtualMassForceforceModel_viscForce
liggghtsCommandModelliggghtsCommandModel_execute
liggghtsCommandModel_readLiggghtsDataliggghtsCommandModel_runLiggghts
liggghtsCommandModel_writeLiggghtslocateModel
locateModel_engineSearchlocateModel_engineSearchIB
locateModel_standardSearchlocateModel_turboEngineSearch
meshMotionModelmeshMotionModel_noMeshMotion
momCoupleModelmomCoupleModel_explicitCouple
momCoupleModel_implicitCouplemomCoupleModel_noCouple
regionModelregionModel_allRegion
voidfractionModelvoidfractionModel_GaussVoidFraction
voidfractionModel_IBVoidFractionvoidfractionModel_bigParticleVoidFraction
voidfractionModel_centreVoidFractionvoidfractionModel_dividedVoidFraction +
IOModel_noIOIOModel_trackIO
averagingModelaveragingModel_dilute
cfdemSolverIBcfdemSolverPiso
cfdemSolverPisoScalarclockModel
clockModel_noClockclockModel_standardClock
dataExchangeModeldataExchangeModel_noDataExchange
dataExchangeModel_oneWayVTKdataExchangeModel_twoWayFiles
dataExchangeModel_twoWayMPIforceModel
forceModel_ArchimedesforceModel_ArchimedesIB
forceModel_DiFeliceDragforceModel_GidaspowDrag
forceModel_KochHillDragforceModel_LaEuScalarTemp
forceModel_MeiLiftforceModel_SchillerNaumannDrag
forceModel_ShirgaonkarIBforceModel_gradPForce
forceModel_noDragforceModel_virtualMassForce
forceModel_viscForceliggghtsCommandModel
liggghtsCommandModel_executeliggghtsCommandModel_readLiggghtsData
liggghtsCommandModel_runLiggghtsliggghtsCommandModel_writeLiggghts
locateModellocateModel_engineSearch
locateModel_engineSearchIBlocateModel_standardSearch
locateModel_turboEngineSearchmeshMotionModel
meshMotionModel_noMeshMotionmomCoupleModel
momCoupleModel_explicitCouplemomCoupleModel_implicitCouple
momCoupleModel_noCoupleregionModel
regionModel_allRegionvoidfractionModel
voidfractionModel_GaussVoidFractionvoidfractionModel_IBVoidFraction
voidfractionModel_bigParticleVoidFractionvoidfractionModel_centreVoidFraction
voidfractionModel_dividedVoidFraction
diff --git a/doc/CFDEMcoupling_Manual.pdf b/doc/CFDEMcoupling_Manual.pdf index 598f4080..2d19fcb4 100644 Binary files a/doc/CFDEMcoupling_Manual.pdf and b/doc/CFDEMcoupling_Manual.pdf differ diff --git a/doc/CFDEMcoupling_Manual.txt b/doc/CFDEMcoupling_Manual.txt index a0e342ac..b35b211e 100644 --- a/doc/CFDEMcoupling_Manual.txt +++ b/doc/CFDEMcoupling_Manual.txt @@ -368,6 +368,28 @@ Reasonable example settings for the "liggghtsCommands" dictionary are given in t + + + + + + + + + + + + + + + + + + + + + + @@ -398,6 +420,7 @@ listing below of styles within certain commands. "IOModel"_IOModel.html, "IOModel_basicIO"_IOModel_basicIO.html, "IOModel_noIO"_IOModel_noIO.html, +"IOModel_trackIO"_IOModel_trackIO.html, "averagingModel"_averagingModel.html, "averagingModel_dilute"_averagingModel_dilute.html, "cfdemSolverIB"_cfdemSolverIB.html, diff --git a/doc/IOModel_trackIO.html b/doc/IOModel_trackIO.html new file mode 100644 index 00000000..d9ac1dea --- /dev/null +++ b/doc/IOModel_trackIO.html @@ -0,0 +1,32 @@ + +
CFDEMproject WWW Site - CFDEM Commands +
+ + + + +
+ +

IOModel_trackIO command +

+

Syntax: +

+

Defined in couplingProperties dictionary. +

+
IOModel "trackIO"; 
+
+

Examples: +

+
IOModel "trackIO"; 
+
+

Description: +

+

The basic IO-model writes particle positions, velocities, index and radii to files. The output directories ($casePath/CFD/$timestep) are created automatically. Data is written every write time of the CFD simulation. +

+

Restrictions: None. +

+

Related commands: +

+

IOModel +

+ diff --git a/doc/IOModel_trackIO.txt b/doc/IOModel_trackIO.txt new file mode 100644 index 00000000..27ac1400 --- /dev/null +++ b/doc/IOModel_trackIO.txt @@ -0,0 +1,29 @@ +"CFDEMproject WWW Site"_lws - "CFDEM Commands"_lc :c + +:link(lws,http://www.cfdem.com) +:link(lc,CFDEMcoupling_Manual.html#comm) + +:line + +IOModel_trackIO command :h3 + +[Syntax:] + +Defined in couplingProperties dictionary. + +IOModel "trackIO"; :pre + +[Examples:] + +IOModel "trackIO"; :pre + +[Description:] + +The basic IO-model writes particle positions, velocities, index and radii to files. The output directories ($casePath/CFD/$timestep) are created automatically. Data is written every write time of the CFD simulation. + +[Restrictions:] None. + +[Related commands:] + +"IOModel"_IOModel.html + diff --git a/doc/githubAccess_public.html b/doc/githubAccess_public.html index 6327ba48..6d7b5274 100644 --- a/doc/githubAccess_public.html +++ b/doc/githubAccess_public.html @@ -137,6 +137,18 @@ Alternatively you can run each tutorial using the Allrun.sh scripts in th

If you want to run your own cases, please do so in $CFDEM_PROJECT_USER_DIR/run which is automatically being generated. E.g. copy one of the tutorial cases there, adapt it to your needs. Changes in $CFDEM_TUT_DIR will be lost after every git stash!

+

Additional Installations: +

+

Optionally you can install lpp which will help you convert the DEM (dump) data to VTK format. For standard CFD-DEM runs this will not be necessary. To get the DEM postporcessing tool "lpp" you need python-numpy package installed: +

+
sudo apt-get install python-numpy 
+
+

You can pull the latest version of lpp with: +

+
cd $HOME/LIGGGHTS 
+
+
git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/lpp mylpp 
+

Troubleshooting:

  • toubles with git clone? diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf index 115be5cd..2113f61d 100644 Binary files a/doc/githubAccess_public.pdf and b/doc/githubAccess_public.pdf differ diff --git a/doc/githubAccess_public.txt b/doc/githubAccess_public.txt index 0df7ae64..123f0c45 100644 --- a/doc/githubAccess_public.txt +++ b/doc/githubAccess_public.txt @@ -123,6 +123,17 @@ In case questions concerning the installation arise, please feel free to contact If you want to run your own cases, please do so in $CFDEM_PROJECT_USER_DIR/run which is automatically being generated. E.g. copy one of the tutorial cases there, adapt it to your needs. Changes in $CFDEM_TUT_DIR will be lost after every {git stash}! +[Additional Installations:] + +Optionally you can install lpp which will help you convert the DEM (dump) data to VTK format. For standard CFD-DEM runs this will not be necessary. To get the DEM postporcessing tool "lpp" you need python-numpy package installed: + +sudo apt-get install python-numpy :pre + +You can pull the latest version of lpp with: + +cd $HOME/LIGGGHTS :pre +git clone git://cfdem.git.sourceforge.net/gitroot/cfdem/lpp mylpp :pre + [Troubleshooting:] toubles with git clone? :ulb,l diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files index 296016c3..8c035bf7 100644 --- a/src/lagrangian/cfdemParticle/Make/files +++ b/src/lagrangian/cfdemParticle/Make/files @@ -1,5 +1,6 @@ cfdemCloud = cfdemCloud forceModels = subModels/forceModel +forceModelsMS = subModels/forceModelMS IOModels = subModels/IOModel voidFractionModels = subModels/voidFractionModel locateModels = subModels/locateModel @@ -13,33 +14,53 @@ liggghtsCommandModels = subModels/liggghtsCommandModel $(cfdemCloud)/cfdemCloud.C derived/cfdemCloudIB/cfdemCloudIB.C +derived/cfdemCloudMS/cfdemCloudMS.C $(forceModels)/forceModel/forceModel.C $(forceModels)/forceModel/newForceModel.C $(forceModels)/noDrag/noDrag.C $(forceModels)/DiFeliceDrag/DiFeliceDrag.C +$(forceModels)/DiFeliceDragNLift/DiFeliceDragNLift.C $(forceModels)/GidaspowDrag/GidaspowDrag.C $(forceModels)/SchillerNaumannDrag/SchillerNaumannDrag.C $(forceModels)/Archimedes/Archimedes.C $(forceModels)/ArchimedesIB/ArchimedesIB.C $(forceModels)/interface/interface.C $(forceModels)/ShirgaonkarIB/ShirgaonkarIB.C +$(forceModels)/fieldTimeAverage/fieldTimeAverage.C +$(forceModels)/fieldBound/fieldBound.C +$(forceModels)/volWeightedAverage/volWeightedAverage.C +$(forceModels)/totalMomentumExchange/totalMomentumExchange.C $(forceModels)/KochHillDrag/KochHillDrag.C +$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C $(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C +$(forceModels)/LaEuScalarDust/LaEuScalarDust.C $(forceModels)/virtualMassForce/virtualMassForce.C $(forceModels)/gradPForce/gradPForce.C +$(forceModels)/gradULiftForce/gradULiftForce.C $(forceModels)/viscForce/viscForce.C $(forceModels)/MeiLift/MeiLift.C +$(forceModels)/KochHillDragNLift/KochHillDragNLift.C +$(forceModels)/solidsPressureForce/solidsPressureForce.C +$(forceModels)/periodicPressure/periodicPressure.C +$(forceModels)/averageSlipVel/averageSlipVel.C + +$(forceModelsMS)/forceModelMS/forceModelMS.C +$(forceModelsMS)/forceModelMS/newForceModelMS.C +$(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C $(IOModels)/IOModel/IOModel.C $(IOModels)/IOModel/newIOModel.C $(IOModels)/noIO/noIO.C $(IOModels)/basicIO/basicIO.C +$(IOModels)/trackIO/trackIO.C +$(IOModels)/sophIO/sophIO.C $(voidFractionModels)/voidFractionModel/voidFractionModel.C $(voidFractionModels)/voidFractionModel/newVoidFractionModel.C $(voidFractionModels)/centreVoidFraction/centreVoidFraction.C $(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C +$(voidFractionModels)/dividedVoidFractionMS/dividedVoidFractionMS.C $(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C $(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C $(voidFractionModels)/IBVoidFraction/IBVoidFraction.C @@ -55,16 +76,19 @@ $(locateModels)/engineSearchIB/engineSearchIB.C $(meshMotionModels)/meshMotionModel/meshMotionModel.C $(meshMotionModels)/meshMotionModel/newMeshMotionModel.C $(meshMotionModels)/noMeshMotion/noMeshMotion.C +$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C $(momCoupleModels)/momCoupleModel/momCoupleModel.C $(momCoupleModels)/momCoupleModel/newMomCoupleModel.C $(momCoupleModels)/explicitCouple/explicitCouple.C +$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C $(momCoupleModels)/implicitCouple/implicitCouple.C $(momCoupleModels)/noCouple/noCouple.C $(regionModels)/regionModel/regionModel.C $(regionModels)/regionModel/newRegionModel.C $(regionModels)/allRegion/allRegion.C +$(regionModels)/differentialRegion/differentialRegion.C $(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C $(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C diff --git a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H index 40d42951..83a50a6a 100755 --- a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H +++ b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H @@ -1,4 +1,4 @@ -word CFDEMversion="cfdem-2.4.2"; +word CFDEMversion="cfdem-2.4.3"; Info << "\ncfdem version: " << CFDEMversion << "\n" << endl; diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H index f4489022..e4972bb4 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H @@ -233,6 +233,8 @@ public: inline double ** expForces() const; + inline double ** DEMForces() const; + inline double ** radii() const; inline double ** voidfractions() const; diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H index ac7a0777..36577458 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H @@ -74,6 +74,11 @@ inline double ** cfdemCloud::expForces() const return expForces_; } +inline double ** cfdemCloud::DEMForces() const +{ + return DEMForces_; +} + inline double ** cfdemCloud::radii() const { return radii_; diff --git a/src/lagrangian/cfdemParticle/etc/functions.sh b/src/lagrangian/cfdemParticle/etc/functions.sh index 3fd1acb9..1801478c 100755 --- a/src/lagrangian/cfdemParticle/etc/functions.sh +++ b/src/lagrangian/cfdemParticle/etc/functions.sh @@ -557,3 +557,18 @@ trackMem() done | /usr/bin/sort -n -k2 >> $fileName } +#========================================# +#- remove brackets from file +removeBracketsFromFile() +{ + #--------------------------------------------------------------------------------# + #- define variables + oldFileName="$1" + newFileName="$oldFileName""_noBrackets" + #--------------------------------------------------------------------------------# + + sed -e 's/[(,)]//g' $oldFileName > $newFileName +} + + + diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C index a3c29a5c..527a0c10 100644 --- a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C +++ b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.C @@ -55,6 +55,15 @@ fileName IOModel::createTimeDir(fileName path) const return timeDirPath; } +fileName IOModel::createLagrangianDir(fileName path) const +{ + fileName lagrangianDirPath(path/"lagrangian"); + mkDir(lagrangianDirPath,0777); + fileName cfdemCloudDirPath(lagrangianDirPath/"cfdemCloud1"); + mkDir(cfdemCloudDirPath,0777); + return cfdemCloudDirPath; +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H index b8e0c7b0..dc70faf8 100644 --- a/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H +++ b/src/lagrangian/cfdemParticle/subModels/IOModel/IOModel/IOModel.H @@ -112,6 +112,8 @@ public: virtual void dumpDEMdata() const; fileName createTimeDir(fileName) const; + + fileName createLagrangianDir(fileName) const; }; diff --git a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C index 1f15853b..82805a0b 100644 --- a/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C +++ b/src/lagrangian/cfdemParticle/subModels/IOModel/basicIO/basicIO.C @@ -63,7 +63,8 @@ basicIO::basicIO IOModel(dict,sm), //propsDict_(dict.subDict(typeName + "Props")), dirName_("particles"), - path_("dev/null") + path_("dev/null"), + lagPath_("dev/null") { //if (propsDict_.found("dirName")) dirName_=word(propsDict_.lookup("dirName")); path_ = buildFilePath(dirName_); @@ -86,13 +87,13 @@ void basicIO::dumpDEMdata() const if (time_.outputTime()) { // make time directory - fileName lagPath=createTimeDir(path_); - lagPath=createTimeDir(fileName(lagPath/"lagrangian")); + lagPath_=createTimeDir(path_); + lagPath_=createTimeDir(fileName(lagPath_/"lagrangian")); // stream data to file - streamDataToPath(lagPath, particleCloud_.positions(), particleCloud_.numberOfParticles(), "positions","vector","Cloud","0"); - streamDataToPath(lagPath, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "v","vector","vectorField",""); - streamDataToPath(lagPath, particleCloud_.radii(), particleCloud_.numberOfParticles(), "r","scalar","scalarField",""); + streamDataToPath(lagPath_, particleCloud_.positions(), particleCloud_.numberOfParticles(), "positions","vector","Cloud","0"); + streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "v","vector","vectorField",""); + streamDataToPath(lagPath_, particleCloud_.radii(), particleCloud_.numberOfParticles(), "r","scalar","scalarField",""); } } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -111,7 +112,7 @@ fileName basicIO::buildFilePath(word dirName) const void basicIO::streamDataToPath(fileName path, double** array,int n,word name,word type,word className,word finaliser) const { - vector position; + vector vec; OFstream* fileStream = new OFstream(fileName(path/name)); *fileStream << "FoamFile\n"; *fileStream << "{version 2.0; format ascii;class "<< className << "; location 0;object "<< name <<";}\n"; @@ -123,8 +124,8 @@ void basicIO::streamDataToPath(fileName path, double** array,int n,word name,wor if (type=="scalar"){ *fileStream << array[index][0] << " \n"; }else { - for(int i=0;i<3;i++) position[i] = array[index][i]; - *fileStream <<"( "<< position[0] <<" "<","0"); + streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "v","vector","vectorField",""); + streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "origId","label","labelField",""); + streamDataToPath(lagPath_, particleCloud_.velocities(), particleCloud_.numberOfParticles(), "origProcId","origProcId","labelField",""); + streamDataToPath(lagPath_, particleCloud_.radii(), particleCloud_.numberOfParticles(), "r","scalar","scalarField",""); + } +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Private Member Functions + +fileName trackIO::buildFilePath(word dirName) const +{ + // create file structure + fileName path("."/dirName); + OFstream* stubFile = new OFstream(fileName(path/"particles.foam")); + delete stubFile; + return path; +} + +void trackIO::streamDataToPath(fileName path, double** array,int n,word name,word type,word className,word finaliser) const +{ + vector vec; + OFstream* fileStream = new OFstream(fileName(path/name)); + *fileStream << "FoamFile\n"; + *fileStream << "{version 2.0; format ascii;class "<< className << "; location 0;object "<< name <<";}\n"; + *fileStream << n <<"\n"; + if(type!="origProcId")*fileStream << "(\n"; + else if(type=="origProcId")*fileStream <<"{0}"<< "\n"; + + for(int index = 0;index < n; ++index) + { + if (type=="scalar"){ + *fileStream << array[index][0] << finaliser << " \n"; + }else if (type=="position"){ + for(int i=0;i<3;i++) vec[i] = array[index][i]; +// You may need to use these two lines if you have cyclics +// if(vec[0]<0)vec[0]+=0.12;if(vec[0]>0.12)vec[0]-=0.12; +// if(vec[1]<0)vec[1]+=0.06;if(vec[1]>0.06)vec[1]-=0.06; + *fileStream <<"( "<< vec[0] <<" "< 0) { // calc particle Re Nr - Rep = ds*voidfraction*magUr/(nuf+SMALL); + Rep = ds/scale_*voidfraction*magUr/(nuf+SMALL); // calc model coefficient F0 scalar F0=0.; @@ -170,7 +172,7 @@ void KochHillDrag::setForce scalar F3 = 0.0673+0.212*volumefraction+0.0232/pow(voidfraction,5); // calc model coefficient beta - scalar beta = 18*nuf*rho*voidfraction*voidfraction*volumefraction/(ds*ds)* + scalar beta = 18*nuf*rho*voidfraction*voidfraction*volumefraction/(ds/scale_*ds/scale_)* (F0 + 0.5*F3*Rep); // calc particle's drag @@ -180,12 +182,13 @@ void KochHillDrag::setForce drag /= voidfraction; } - if(verbose_ && index >100 && index <102) + if(verbose_ && index >=0 && index <2) { Info << "index = " << index << endl; Info << "Us = " << Us << endl; Info << "Ur = " << Ur << endl; Info << "ds = " << ds << endl; + Info << "ds/scale = " << ds/scale_ << endl; Info << "rho = " << rho << endl; Info << "nuf = " << nuf << endl; Info << "voidfraction = " << voidfraction << endl; diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.C b/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.C index e54817b5..6800c514 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.C @@ -83,7 +83,8 @@ forceModel::forceModel dimensionedVector("zero", dimensionSet(1,1,-2,0,0), vector(0,0,0)) // N ), coupleForce_(true), - modelType_(sm.modelType()) + modelType_(sm.modelType()), + scale_(1.) {} diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.H b/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.H index cb76edd0..e1910f10 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.H +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/forceModel/forceModel.H @@ -72,6 +72,8 @@ protected: const word modelType_; + scalar scale_; + public: //- Runtime type information diff --git a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C index 86ca474e..c1b2db3f 100644 --- a/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C +++ b/src/lagrangian/cfdemParticle/subModels/forceModel/gradPForce/gradPForce.C @@ -161,7 +161,7 @@ void gradPForce::setForce else force = -Vs*gradP; - if(verbose_ && index >0 && index <2) + if(verbose_ && index >=0 && index <2) { Info << "index = " << index << endl; Info << "gradP = " << gradP << endl; diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C index 8a3d29cc..069565b3 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.C @@ -133,7 +133,7 @@ tmp explicitCouple::expMomSource() const // calc fNext forAll(fNext_,cellI) { - fNext_[cellI] = particleCloud_.forceM(0).expParticleForces()[cellI] / particleCloud_.mesh().V()[cellI]; + fNext_[cellI] = arrayToField(cellI); // limiter for (int i=0;i<3;i++) @@ -162,6 +162,11 @@ void Foam::explicitCouple::resetMomSourceField() const fNext_.internalField() = vector::zero; } +inline vector Foam::explicitCouple::arrayToField(label cellI) const +{ + return particleCloud_.forceM(0).expParticleForces()[cellI] / particleCloud_.mesh().V()[cellI]; +} + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.H b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.H index 6c7a1354..9ab43367 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.H +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/explicitCouple/explicitCouple.H @@ -64,6 +64,8 @@ private: vector fLimit_; // limit for for exchange field + virtual inline vector arrayToField(label) const; + public: //- Runtime type information @@ -88,6 +90,7 @@ public: tmp expMomSource() const; void resetMomSourceField() const; + }; diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.C b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.C index 048dc156..737f1618 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.C +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.C @@ -64,6 +64,11 @@ tmp momCoupleModel::expMomSource() const return tsource; } +void momCoupleModel::setSourceField(volVectorField & a) const +{ + //do nothing; +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components diff --git a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.H b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.H index 5b52db92..53aa3d7d 100644 --- a/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.H +++ b/src/lagrangian/cfdemParticle/subModels/momCoupleModel/momCoupleModel/momCoupleModel.H @@ -115,6 +115,8 @@ public: virtual tmp expMomSource() const; virtual void resetMomSourceField() const=0; + + virtual void setSourceField(volVectorField &) const; }; diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy index 23e8ce62..2dfe60a2 100644 --- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy +++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy @@ -17,3 +17,4 @@ dummyfile dummyfile dummyfile dummyfile +dummyfile diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties index 7d200ed9..0003f94e 100755 --- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties @@ -38,7 +38,7 @@ meshMotionModel noMeshMotion; regionModel allRegion; -IOModel basicIO; +IOModel basicIO; //trackIO; // dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;// @@ -90,6 +90,7 @@ KochHillDragProps { velFieldName "U"; densityFieldName "rho"; + voidfractionFieldName "voidfraction"; } MeiLiftProps diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties new file mode 100644 index 00000000..cd48fa8b --- /dev/null +++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/particleTrackProperties @@ -0,0 +1,23 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 2.1.x | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object particleTrackProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +cloudName cfdemCloud1; + +sampleFrequency 1; + +maxPositions 10; +// ************************************************************************* //