diff --git a/README b/README
new file mode 100644
index 00000000..a677e0a8
--- /dev/null
+++ b/README
@@ -0,0 +1,82 @@
+/*---------------------------------------------------------------------------*\
+ 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/utilities/cfdemPostproc/cfdemPostproc.C b/applications/utilities/cfdemPostproc/cfdemPostproc.C
index 52dc61c5..7fbec647 100644
--- a/applications/utilities/cfdemPostproc/cfdemPostproc.C
+++ b/applications/utilities/cfdemPostproc/cfdemPostproc.C
@@ -62,6 +62,7 @@ int main(int argc, char *argv[])
int count=0;
int DEM_dump_Interval=1000;
+ particleCloud.reAllocArrays();
double **positions_;
double **velocities_;
@@ -73,11 +74,14 @@ int main(int argc, char *argv[])
particleCloud.dataExchangeM().allocateArray(positions_,0.,3);
particleCloud.dataExchangeM().allocateArray(velocities_,0.,3);
- particleCloud.dataExchangeM().allocateArray(radii_,0.,1);
+ particleCloud.get_radii(radii_); // get ref to radii
+ //particleCloud.dataExchangeM().allocateArray(radii_,0.,1);
particleCloud.dataExchangeM().allocateArray(voidfractions_,0.,1);
particleCloud.dataExchangeM().allocateArray(particleWeights_,0.,1);
particleCloud.dataExchangeM().allocateArray(particleVolumes_,0.,1);
- particleCloud.dataExchangeM().allocateArray(cellIDs_,0.,1);
+ particleCloud.get_cellIDs(cellIDs_); // get ref to cellIDs
+ //particleCloud.dataExchangeM().allocateArray(cellIDs_,0.,1);
+
while (runTime.loop())
{
@@ -97,12 +101,8 @@ int main(int argc, char *argv[])
particleCloud.dataExchangeM().getData("v","vector-atom",velocities_,count);
particleCloud.dataExchangeM().getData("radius","scalar-atom",radii_,count);
- particleCloud.set_radii(radii_);
-
particleCloud.locateM().findCell(NULL,positions_,cellIDs_,particleCloud.numberOfParticles());
- particleCloud.set_cellIDs(cellIDs_);
-
particleCloud.voidFractionM().setvoidFraction
(
NULL,voidfractions_,particleWeights_,particleVolumes_
@@ -128,13 +128,13 @@ int main(int argc, char *argv[])
}
- delete positions_;
- delete velocities_;
- delete radii_;
- delete voidfractions_;
- delete particleWeights_;
- delete particleVolumes_;
- delete cellIDs_;
+ particleCloud.dataExchangeM().destroy(positions_,3);
+ particleCloud.dataExchangeM().destroy(velocities_,3);
+ //particleCloud.dataExchangeM().destroy(radii_); // destroyed in cloud
+ particleCloud.dataExchangeM().destroy(voidfractions_,1);
+ particleCloud.dataExchangeM().destroy(particleWeights_,1);
+ particleCloud.dataExchangeM().destroy(particleVolumes_,1);
+ //particleCloud.dataExchangeM().destroy(cellIDs_); // destroyed in cloud
Info<< "End\n" << endl;
diff --git a/doc/CFDEMcoupling_Manual.pdf b/doc/CFDEMcoupling_Manual.pdf
new file mode 100644
index 00000000..455d35f7
Binary files /dev/null and b/doc/CFDEMcoupling_Manual.pdf differ
diff --git a/doc/githubAccess_public.pdf b/doc/githubAccess_public.pdf
new file mode 100644
index 00000000..4e14c2ce
Binary files /dev/null and b/doc/githubAccess_public.pdf differ
diff --git a/doc/liggghtsCommandModel_writeLiggghts.html b/doc/liggghtsCommandModel_writeLiggghts.html
index 709e7063..685b9014 100644
--- a/doc/liggghtsCommandModel_writeLiggghts.html
+++ b/doc/liggghtsCommandModel_writeLiggghts.html
@@ -25,7 +25,7 @@ writeLiggghtsProps
overwrite switch2;
}
-
- switch1 = switch (choose on/off) to select if only last step is stored or every write step. "off" is not recommended (DEM data might get lost)
+
- switch1 = switch (choose on/off) to select if only last step is stored or every write step.
- name = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM"
diff --git a/doc/liggghtsCommandModel_writeLiggghts.txt b/doc/liggghtsCommandModel_writeLiggghts.txt
index 875ebd27..c0a2a310 100644
--- a/doc/liggghtsCommandModel_writeLiggghts.txt
+++ b/doc/liggghtsCommandModel_writeLiggghts.txt
@@ -23,7 +23,7 @@ writeLiggghtsProps
overwrite switch2;
\} :pre
-{switch1} = switch (choose on/off) to select if only last step is stored or every write step. "off" is not recommended (DEM data might get lost) :ulb,l
+{switch1} = switch (choose on/off) to select if only last step is stored or every write step. :ulb,l
{name} = name of the restart file to be written in /$caseDir/DEM/ default default "liggghts.restartCFDEM" :l
{switch2} = switch (choose on/off) to select if only one restart file $name or many files $name_$timeStamp are written :l
:ule
diff --git a/src/lagrangian/cfdemParticle/Make/files b/src/lagrangian/cfdemParticle/Make/files
index d1578924..c939c8b0 100644
--- a/src/lagrangian/cfdemParticle/Make/files
+++ b/src/lagrangian/cfdemParticle/Make/files
@@ -6,7 +6,6 @@ voidFractionModels = subModels/voidFractionModel
locateModels = subModels/locateModel
meshMotionModels = subModels/meshMotionModel
momCoupleModels = subModels/momCoupleModel
-regionModels = subModels/regionModel
dataExchangeModels = subModels/dataExchangeModel
averagingModels = subModels/averagingModel
clockModels = subModels/clockModel
@@ -20,18 +19,33 @@ $(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)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C
+$(forceModels)/BeetstraDrag/BeetstraDrag.C
+$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
+$(forceModels)/LaEuScalarDust/LaEuScalarDust.C
$(forceModels)/virtualMassForce/virtualMassForce.C
$(forceModels)/gradPForce/gradPForce.C
+$(forceModels)/gradULiftForce/gradULiftForce.C
$(forceModels)/viscForce/viscForce.C
$(forceModels)/MeiLift/MeiLift.C
+$(forceModels)/KochHillDragNLift/KochHillDragNLift.C
+$(forceModels)/solidsPressureForce/solidsPressureForce.C
+$(forceModels)/periodicPressure/periodicPressure.C
+$(forceModels)/periodicPressureControl/periodicPressureControl.C
+$(forceModels)/averageSlipVel/averageSlipVel.C
$(forceModelsMS)/forceModelMS/forceModelMS.C
$(forceModelsMS)/forceModelMS/newForceModelMS.C
@@ -42,6 +56,7 @@ $(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
@@ -60,21 +75,18 @@ $(locateModels)/turboEngineSearch/turboEngineSearch.C
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
$(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
-
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
diff --git a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
index b2a63cb1..2ef8725e 100755
--- a/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
+++ b/src/lagrangian/cfdemParticle/cfdTools/versionInfo.H
@@ -1,5 +1,5 @@
-word CFDEMversion="cfdem-2.4.7";
-word compatibleLIGGGHTSversion="2.2.3";
+word CFDEMversion="cfdem-2.5.0";
+word compatibleLIGGGHTSversion="2.2.4";
Info << "\nCFDEMcoupling version: " << CFDEMversion << "\n" << endl;
Info << "\n, compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << "\n" << endl;
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
index f5cd91a8..f94af2d2 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C
@@ -42,7 +42,6 @@ Description
#include "clockModel.H"
#include "liggghtsCommandModel.H"
-#include "mpi.h"
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
Foam::cfdemCloud::cfdemCloud
(
@@ -222,24 +221,18 @@ Foam::cfdemCloud::~cfdemCloud()
{
clockM().evalPar();
clockM().normHist();
- free2D(positions_);
- free2D(velocities_);
- free2D(impForces_);
- free2D(expForces_);
- free2D(DEMForces_);
- free2D(radii_);
- free2D(voidfractions_);
- free2D(cellIDs_);
- free2D(particleWeights_);
- free2D(particleVolumes_);
+ dataExchangeM().destroy(positions_,3);
+ dataExchangeM().destroy(velocities_,3);
+ dataExchangeM().destroy(impForces_,3);
+ dataExchangeM().destroy(expForces_,3);
+ dataExchangeM().destroy(DEMForces_,3);
+ dataExchangeM().destroy(radii_,1);
+ dataExchangeM().destroy(voidfractions_,1);
+ dataExchangeM().destroy(cellIDs_,1);
+ dataExchangeM().destroy(particleWeights_,1);
+ dataExchangeM().destroy(particleVolumes_,1);
}
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
-inline void Foam::cfdemCloud::free2D(double** array)
-{
- if(array) free(array[0]);
- free(array);
-}
-
void Foam::cfdemCloud::getDEMdata()
{
dataExchangeM().getData("radius","scalar-atom",radii_);
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
index a8d60166..76b36f9a 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H
@@ -162,8 +162,6 @@ protected:
autoPtr* liggghtsCommand_;
// Private member functions
- inline void free2D(double**);
-
virtual void getDEMdata();
virtual void giveDEMdata();
@@ -238,11 +236,11 @@ public:
inline double ** voidfractions() const;
- inline void set_radii(double**&) const;
+ inline void get_radii(double**&) const;
inline double ** cellIDs() const;
- inline void set_cellIDs(double**&) const;
+ inline void get_cellIDs(double**&) const;
inline double ** particleWeights() const;
diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
index 3bf79c50..af5f61a9 100644
--- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
+++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloudI.H
@@ -89,9 +89,13 @@ inline double ** cfdemCloud::voidfractions() const
return voidfractions_;
}
-inline void cfdemCloud::set_radii(double **& values) const
+inline void cfdemCloud::get_radii(double **& values) const
{
- radii_=values;
+// Info << "set_radii level=" << numberOfParticles_ << endl;
+ // make a copy of the array entries
+// for (int i=0;i
+
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@@ -56,22 +58,22 @@ void Foam::clockModel::start(int pos,std::string ident) const
{
if(particleCloud_.mesh().time().value() > startTime_)
{
- if (pos >= n_) // alternatively one fixed size?
- {
- n_ = 2*n_;
- deltaT_.resize(n_,0);
- identifier_.resize(n_,"");
- nOfRuns_.resize(n_,0);
- level_.resize(n_,-1);
- parent_.resize(n_,-2);
- }
- identifier_[pos]=ident;
- level_[pos] = curLev_;
- curLev_ += 1;
- parent_[pos]=curParent_;
- curParent_ = pos;
- nOfRuns_[pos] += 1;
- deltaT_[pos]-=std::clock();
+ if (pos >= n_) // alternatively one fixed size?
+ {
+ n_ = 2*n_;
+ deltaT_.resize(n_,0);
+ identifier_.resize(n_,"");
+ nOfRuns_.resize(n_,0);
+ level_.resize(n_,-1);
+ parent_.resize(n_,-2);
+ }
+ identifier_[pos]=ident;
+ level_[pos] = curLev_;
+ curLev_ += 1;
+ parent_[pos]=curParent_;
+ curParent_ = pos;
+ nOfRuns_[pos] += 1;
+ deltaT_[pos]-=std::clock();
}
return;
}
@@ -80,16 +82,16 @@ void Foam::clockModel::stop() const
{
if(particleCloud_.mesh().time().value() > startTime_)
{
- deltaT_[curParent_]+=std::clock();
- curLev_ -= 1;
- if (curParent_ >= 0)
- {
- curParent_ = parent_[curParent_];
- }
- else
- {
- curParent_ = -1;
- }
+ deltaT_[curParent_]+=std::clock();
+ curLev_ -= 1;
+ if (curParent_ >= 0)
+ {
+ curParent_ = parent_[curParent_];
+ }
+ else
+ {
+ curParent_ = -1;
+ }
}
return;
}
@@ -98,20 +100,20 @@ void Foam::clockModel::stop(std::string ident) const
{
if(particleCloud_.mesh().time().value() > startTime_)
{
- deltaT_[curParent_] += std::clock();
- if (curParent_ > 0 && identifier_[curParent_].compare(ident)!=0)
- {
- Pout<<"Warning: stop identifier did not equal start identifier! "<= 0)
- {
- curParent_ = parent_[curParent_];
- }
- else
- {
- curParent_ = -1;
- }
+ deltaT_[curParent_] += std::clock();
+ if (curParent_ > 0 && identifier_[curParent_].compare(ident)!=0)
+ {
+ Pout<<"Warning: stop identifier did not equal start identifier! "<= 0)
+ {
+ curParent_ = parent_[curParent_];
+ }
+ else
+ {
+ curParent_ = -1;
+ }
}
return;
}
@@ -355,11 +357,13 @@ void Foam::clockModel::normHist() const
plotHist(buffIn,identifier_[26],numprocs,myrank);
Info << "===========================" << endl;
+ getRAMUsage();
return;
}
void Foam::clockModel::plotHist(double buffIn,std::string identifier,int numprocs,int myrank) const
{
+/* // version using double*, problem: no alloc for double * and MPI
double* globalTime=NULL;
double* globalTime_all=NULL;
particleCloud_.dataExchangeM().allocateArray(globalTime,0.,numprocs);
@@ -374,7 +378,24 @@ void Foam::clockModel::plotHist(double buffIn,std::string identifier,int numproc
Info << "\t" <> line >> temp;
+ RssMem = RssMem + temp;
+ //Pout << temp << " ";
+ }
+ else if (line.substr(0,5).compare("Swap:") == 0)
+ {
+ strs << line;
+ strs >> line >> temp;
+ SwapMem = SwapMem + temp;
+ //Pout << strs.str() << " ";
+ }
+
+ }
+ }
+ double SwapMB = (double)SwapMem/1024.0; //kB -> MB
+ double RssMB = (double)RssMem/1024.0;
+
+ inFile.close();
+
+ // set up communication between Procs and plot Stuff
+ Info << " RAM USAGE HISTOGRAM in MB" << endl;
+ plotHist(RssMB,"RSS memory used",numprocs,myrank);
+ if (SwapMem > 0)
+ {
+ plotHist(SwapMB,"WARNING: Swap",numprocs,myrank);
+ }
+ Info << "===========================" << endl;
+
+ //Pout << "SWAP Memory used: " << SwapMem <<"MB\n";
+ //Pout << "Rss Memory used: " << RssMem <<"MB\n";
+
+
+ return;
+}
// * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * //
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
diff --git a/src/lagrangian/cfdemParticle/subModels/clockModel/clockModel/clockModel.H b/src/lagrangian/cfdemParticle/subModels/clockModel/clockModel/clockModel.H
index 392767a9..1049ac69 100644
--- a/src/lagrangian/cfdemParticle/subModels/clockModel/clockModel/clockModel.H
+++ b/src/lagrangian/cfdemParticle/subModels/clockModel/clockModel/clockModel.H
@@ -130,8 +130,10 @@ public:
void initElems();
std::vector calcShift() const; //detects empty indices in vector, when times are evaluated
void Hist() const; //calc Histogram
- void normHist() const; //calc normalized Histogram
+ virtual void normHist() const; //calc normalized Histogram
void plotHist(double,std::string,int,int) const; //plot histogramm to terminal
+ void getRAMUsage() const;
+
};
diff --git a/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.C b/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.C
index f1f2b682..550724fb 100644
--- a/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.C
+++ b/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.C
@@ -72,7 +72,6 @@ noClock::~noClock()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
-
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
diff --git a/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.H b/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.H
index 002693e0..dc89ad22 100644
--- a/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.H
+++ b/src/lagrangian/cfdemParticle/subModels/clockModel/noClock/noClock.H
@@ -77,13 +77,14 @@ public:
// Member Functions
- virtual void start(int pos) const {};
- virtual void start(int pos,std::string identifier) const {};
- virtual void stop() const {};
- virtual void stop(std::string identifier) const {};
- virtual std::string eval() const {return "";};
- virtual void evalFile() const {};
- virtual void evalPar() const {};
+ void start(int pos) const {};
+ void start(int pos,std::string identifier) const {};
+ void stop() const {};
+ void stop(std::string identifier) const {};
+ std::string eval() const {return "";};
+ void evalFile() const {};
+ void evalPar() const {};
+ void normHist() const {};
};
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.C b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.C
index d5225158..9aefceb5 100755
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/dataExchangeModel/dataExchangeModel.C
@@ -63,6 +63,10 @@ void Foam::dataExchangeModel::allocateArray
int length
) const
{
+ // this model should only be used for VTK (and File exchange model)
+ //if(particleCloud_.dataExchangeM().type() != "oneWayVTK")
+ // FatalError<< "dataExchangeModel::allocateArray should not be used with your dataExchangeModel" << abort(FatalError);
+
// allocate and init double array
array = new double*[length];
for (int i=0; imemory->destroy(array);
}
//============
@@ -328,8 +329,9 @@ void Foam::twoWayM2M::allocateArray
for (int j = 0; j < width; j++)
array[i][j] = initVal;
}
-void Foam::twoWayM2M::destroy(int** array) const
+void Foam::twoWayM2M::destroy(int** array,int len) const
{
+ // destroy array[i] first?
lmp->memory->destroy(array);
}
//============
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/twoWayM2M.H b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/twoWayM2M.H
index 88b888a3..7aa0188a 100644
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/twoWayM2M.H
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayM2M/twoWayM2M.H
@@ -182,12 +182,12 @@ public:
// double **
void allocateArray(double**&, double, int, int) const;
void allocateArray(double**&, double, int,const char* ="nparticles") const;
- void destroy(double**) const;
+ void destroy(double**,int) const;
//============
// int **
void allocateArray(int**&, int, int, int) const;
void allocateArray(int**&, int, int,const char* ="nparticles") const;
- void destroy(int**) const;
+ void destroy(int**,int) const;
//==============
//==============
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C
index a59ba8d4..4352ea1c 100644
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.C
@@ -198,10 +198,14 @@ void Foam::twoWayMPI::allocateArray
char* charLength= const_cast (length);
allocate_external_double(array, width,charLength,initVal,lmp);
}
-void Foam::twoWayMPI::destroy(double** array) const
+void Foam::twoWayMPI::destroy(double** array,int len) const
{
if (array == NULL) return;
- free(array[0]);
+
+ //for ( int i = 0; i < len; i++ ) // does not work
+ for ( int i = 0; i < 1; i++ )
+ free(array[i]);
+
free(array);
}
//============
@@ -230,10 +234,28 @@ void Foam::twoWayMPI::allocateArray
char* charLength= const_cast (length);
allocate_external_int(array, width,charLength,initVal,lmp);
}
-void Foam::twoWayMPI::destroy(int** array) const
+void Foam::twoWayMPI::destroy(int** array,int len) const
+{
+ if (array == NULL) return;
+
+ //for ( int i = 0; i < len; i++ ) // does not work
+ for ( int i = 0; i < 1; i++ )
+ free(array[i]);
+
+ free(array);
+}
+//============
+// int *
+void Foam::twoWayMPI::destroy(int* array) const
+{
+ if (array == NULL) return;
+ free(array);
+}
+//============
+// double *
+void Foam::twoWayMPI::destroy(double* array) const
{
if (array == NULL) return;
- free(array[0]);
free(array);
}
//============
diff --git a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H
index d006458c..0cd9bdba 100644
--- a/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H
+++ b/src/lagrangian/cfdemParticle/subModels/dataExchangeModel/twoWayMPI/twoWayMPI.H
@@ -143,12 +143,18 @@ public:
// double **
void allocateArray(double**&, double, int, int) const;
void allocateArray(double**&, double, int,const char* ="nparticles") const;
- void destroy(double**) const;
+ void destroy(double**,int) const;
//============
// int **
void allocateArray(int**&, int, int, int) const;
void allocateArray(int**&, int, int,const char* ="nparticles") const;
- void destroy(int**) const;
+ void destroy(int**,int) const;
+ //==============
+ // double *
+ void destroy(double*) const;
+ //============
+ // int **
+ void destroy(int*) const;
//==============
bool couple() const;
diff --git a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C
index 94cc822d..e5ec3e31 100644
--- a/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C
+++ b/src/lagrangian/cfdemParticle/subModels/voidFractionModel/voidFractionModel/voidFractionModel.C
@@ -94,7 +94,7 @@ voidFractionModel::voidFractionModel
voidFractionModel::~voidFractionModel()
{
- particleCloud_.dataExchangeM().destroy(cellsPerParticle_);
+ particleCloud_.dataExchangeM().destroy(cellsPerParticle_,1);
}
// * * * * * * * * * * * * * * public Member Functions * * * * * * * * * * * * * //
diff --git a/tutorials/cfdemPostproc/fillCylinder/Allrun.sh b/tutorials/cfdemPostproc/fillCylinder/Allrun.sh
index cae4aacb..f7a8bc58 100755
--- a/tutorials/cfdemPostproc/fillCylinder/Allrun.sh
+++ b/tutorials/cfdemPostproc/fillCylinder/Allrun.sh
@@ -46,7 +46,7 @@ if [ $liggghtsSim == "true" ]
#- generate VTK data
cd $casePath/DEM/post
- python -i $CFDEM_LPP_DIR/lpp.py dump.liggghts_init
+ python $CFDEM_LPP_DIR/lpp.py dump.liggghts_init
fi
@@ -58,7 +58,7 @@ if [ $cfdemPostProc == "true" ]
headerText="run_cfdemPostproc_fillCylinder_CFD"
logfileName="log_$headerText"
solverName="cfdemPostproc"
- debugMode="off" # on | off
+ debugMode="off" # on | off | strict
#--------------------------------------------------------------------------------#
#- clean up case
@@ -90,7 +90,6 @@ rm -r $casePath/CFD/particles
rm -r $casePath/CFD/VTK
rm -r $casePath/DEM/post/*
rm -r $casePath/DEM/log.*
-rm -r $casePath/log*
echo "done"
#- preserve post directory
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict
index 84219dac..b550dd41 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI/CFD/system/controlDict
@@ -23,7 +23,7 @@ startTime 0;
stopAt endTime;
-endTime 0.1;//0.01;
+endTime 0.1;//0.1;
deltaT 0.001;
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart
index b42fba18..015fc1f0 100644
Binary files a/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart and b/tutorials/cfdemSolverPiso/ErgunTestMPI/DEM/liggghts.restart differ
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh
index 90d8d867..a5fb18b5 100755
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/Allrun.sh
@@ -107,6 +107,7 @@ rm -rf $casePath/CFD/patchAverage_pressureDrop
rm -rf $casePath/CFD/probes
rm -rf $casePath/CFD/particles
rm -r $casePath/CFD/log.*
+rm -r $casePath/CFD/lagrangian
rm $casePath/log.liggghts
rm $casePath/DEM/liggghts.restartCFDEM*
rm $casePath/DEM/post/dump.*
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_init b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_init
index 4b17c060..07d5447b 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_init
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/constant/liggghtsCommands_init
@@ -29,12 +29,12 @@ liggghtsCommandModels
writeLiggghts
);
-/*
+
//- optional
writeLiggghtsProps
{
- writeLast on; // off is not recommended
- overwrite on;
-}*/
+ writeLast off;
+ overwrite off;
+}
// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict
index 820de536..672e8e74 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict
@@ -29,7 +29,7 @@ deltaT 0.001;
writeControl adjustableRunTime;
-writeInterval 0.001;//0.01;
+writeInterval 0.01;//0.01;
purgeWrite 0;
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_init b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_init
index 0a199a10..02f3633a 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_init
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_init
@@ -29,7 +29,7 @@ deltaT 0.001;
writeControl adjustableRunTime;
-writeInterval 0.001;//0.01;
+writeInterval 0.01;//0.01;
purgeWrite 0;
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart
index 820de536..672e8e74 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/CFD/system/controlDict_restart
@@ -29,7 +29,7 @@ deltaT 0.001;
writeControl adjustableRunTime;
-writeInterval 0.001;//0.01;
+writeInterval 0.01;//0.01;
purgeWrite 0;
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/in.liggghts_restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/in.liggghts_restart
index 17651640..e13e6f8e 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/in.liggghts_restart
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/in.liggghts_restart
@@ -11,7 +11,8 @@ units si
processors 2 1 1
#read the restart file
-read_restart ../DEM/liggghts.restartCFDEM
+#read_restart ../DEM/liggghts.restartCFDEM
+read_restart ../DEM/liggghts.restartCFDEM_0.050000
#do not do this here, the simulation box is in the restart file!
#region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart
index fbbeb42d..015fc1f0 100644
Binary files a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart and b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/liggghts.restart differ
diff --git a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy
index c20f250d..93cbd9a9 100644
--- a/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy
+++ b/tutorials/cfdemSolverPiso/ErgunTestMPI_restart/DEM/post/dummy
@@ -27,3 +27,11 @@ dummyfile
dummyfile
dummyfile
dummyfile
+dummyfile
+dummyfile
+dummyfile
+dummyfile
+dummyfile
+dummyfile
+dummyfile
+dummyfile
diff --git a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
index 8b929d6a..56342556 100755
--- a/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
+++ b/tutorials/cfdemSolverPiso/settlingTestMPI/CFD/constant/couplingProperties
@@ -32,7 +32,7 @@ couplingInterval 100;
voidFractionModel divided;//centre;//bigParticle;//
-locateModel turboEngineM2M;//standard;
+locateModel engine;//standard;
meshMotionModel noMeshMotion;
@@ -40,7 +40,7 @@ regionModel allRegion;
IOModel basicIO; //trackIO; //
-dataExchangeModel twoWayM2M;//twoWayMPI;//twoWayFiles;//oneWayVTK;//
+dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;//
averagingModel dense;//dilute;//
@@ -123,11 +123,6 @@ twoWayMPIProps
liggghtsPath "../DEM/in.liggghts_init";
}
-twoWayM2MProps
-{
- liggghtsPath "../DEM/in.liggghts_init";
-}
-
twoWayFilesProps
{
maxNumberOfParticles 10000;
@@ -152,11 +147,9 @@ bigParticleProps
scaleUpVol 1.0;
}
-turboEngineM2MProps
+engineProps
{
- turboEngineProps
- {
treeSearch true;
- }
}
+
// ************************************************************************* //
diff --git a/tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/liggghts.restart b/tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/liggghts.restart
index ac58871e..140dfa7d 100644
Binary files a/tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/liggghts.restart and b/tutorials/cfdemSolverPisoScalar/packedBedTemp/DEM/liggghts.restart differ