mirror of
https://github.com/ParticulateFlow/CFDEMcoupling-PFM.git
synced 2025-12-08 06:37:44 +00:00
release on 2014-07-04_08-57-37
This commit is contained in:
81
README
Executable file
81
README
Executable 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. 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.
|
||||
\*---------------------------------------------------------------------------*/
|
||||
@ -76,9 +76,15 @@ int main(int argc, char *argv[])
|
||||
|
||||
Info << "update Ksl.internalField()" << endl;
|
||||
Ksl = particleCloud.momCoupleM(0).impMomSource();
|
||||
particleCloud.smoothingM().smoothen(Ksl);
|
||||
Ksl.correctBoundaryConditions();
|
||||
|
||||
//Force Checks
|
||||
vector fTotal(0,0,0);
|
||||
vector fImpTotal = sum(mesh.V()*Ksl.internalField()*(Us.internalField()-U.internalField()));
|
||||
reduce(fImpTotal, sumOp<vector>());
|
||||
Info << "TotalForceExp: " << fTotal << endl;
|
||||
Info << "TotalForceImp: " << fImpTotal << endl;
|
||||
|
||||
#include "solverDebugInfo.H"
|
||||
particleCloud.clockM().stop("Coupling");
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -33,7 +33,8 @@
|
||||
</P>
|
||||
<P>Note that the variable "imExSplitFactor" can be set in the couplingProperties in order to treat implicitly defined forces (in the implementation of the force model) as explicit ones. "imExSplitFactor 1.0;" is set by default, meaning that all implicit forces will be considered implicitly, whereas "imExSplitFactor 0.0;" would mean that implicitly defined forces will be treated in an explicit fashion.
|
||||
</P>
|
||||
<P><B>Description:</B>
|
||||
<P>Note that the switch "treatVoidCellsAsExplicitForce true;" can be set in the couplingProperties in order to change the treatment of cells which are void of particles. This is only relevant if (i) smoothing is used, and (ii) implicit force coupling is performed. By default, the particle veloctiy field (Us) will be smoothed to obtain a meaningful reference quantity for the implicit force coupling. In case "treatVoidCellsAsExplicitForce true;" is set, however, Us will not be smoothed and implicit forces (after the smoothing has been performed) in cells void of particles be treated as explicit ones. This avoids the problem of defining Us in cells that are void of particles, but for which an implicit coupling force is obtained in the smoothing process.
|
||||
<B>Description:</B>
|
||||
</P>
|
||||
<P>The momCoupleModel is the base class for momentum exchange between DEM and CFD simulation.
|
||||
</P>
|
||||
|
||||
@ -31,6 +31,7 @@ Forces can be coupled in an implicit way to the fluid solver (i.e., when solving
|
||||
|
||||
Note that the variable "imExSplitFactor" can be set in the couplingProperties in order to treat implicitly defined forces (in the implementation of the force model) as explicit ones. "imExSplitFactor 1.0;" is set by default, meaning that all implicit forces will be considered implicitly, whereas "imExSplitFactor 0.0;" would mean that implicitly defined forces will be treated in an explicit fashion.
|
||||
|
||||
Note that the switch "treatVoidCellsAsExplicitForce true;" can be set in the couplingProperties in order to change the treatment of cells which are void of particles. This is only relevant if (i) smoothing is used, and (ii) implicit force coupling is performed. By default, the particle veloctiy field (Us) will be smoothed to obtain a meaningful reference quantity for the implicit force coupling. In case "treatVoidCellsAsExplicitForce true;" is set, however, Us will not be smoothed and implicit forces (after the smoothing has been performed) in cells void of particles be treated as explicit ones. This avoids the problem of defining Us in cells that are void of particles, but for which an implicit coupling force is obtained in the smoothing process.
|
||||
[Description:]
|
||||
|
||||
The momCoupleModel is the base class for momentum exchange between DEM and CFD simulation.
|
||||
|
||||
@ -3,10 +3,10 @@ forceModels = subModels/forceModel
|
||||
forceModelsMS = subModels/forceModelMS
|
||||
IOModels = subModels/IOModel
|
||||
voidFractionModels = subModels/voidFractionModel
|
||||
voidFractionModelsMS = subModels/voidFractionModelMS
|
||||
locateModels = subModels/locateModel
|
||||
meshMotionModels = subModels/meshMotionModel
|
||||
momCoupleModels = subModels/momCoupleModel
|
||||
regionModels = subModels/regionModel
|
||||
dataExchangeModels = subModels/dataExchangeModel
|
||||
averagingModels = subModels/averagingModel
|
||||
clockModels = subModels/clockModel
|
||||
@ -15,6 +15,7 @@ smoothingModels = subModels/smoothingModel
|
||||
probeModels = subModels/probeModel
|
||||
|
||||
$(cfdemCloud)/cfdemCloud.C
|
||||
derived/cfdemCloudBiDisperse/cfdemCloudBiDisperse.C
|
||||
derived/cfdemCloudIB/cfdemCloudIB.C
|
||||
derived/cfdemCloudMS/cfdemCloudMS.C
|
||||
|
||||
@ -23,36 +24,59 @@ $(forceModels)/forceModel/newForceModel.C
|
||||
$(forceModels)/noDrag/noDrag.C
|
||||
$(forceModels)/checkCouplingInterval/checkCouplingInterval.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)/interfaceParticleProbe/interfaceParticleProbe.C
|
||||
$(forceModels)/fieldStore/fieldStore.C
|
||||
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
|
||||
$(forceModels)/fieldBound/fieldBound.C
|
||||
$(forceModels)/volWeightedAverage/volWeightedAverage.C
|
||||
$(forceModels)/totalMomentumExchange/totalMomentumExchange.C
|
||||
$(forceModels)/KochHillDrag/KochHillDrag.C
|
||||
$(forceModels)/KochHillRWDrag/KochHillRWDrag.C
|
||||
$(forceModels)/BeetstraDrag/multiphaseFlowBasic/multiphaseFlowBasic.C
|
||||
$(forceModels)/BeetstraDrag/BeetstraDrag.C
|
||||
$(forceModels)/LaEuScalarLiquid/LaEuScalarLiquid.C
|
||||
$(forceModels)/LaEuScalarTemp/LaEuScalarTemp.C
|
||||
$(forceModels)/LaEuScalarDust/LaEuScalarDust.C
|
||||
$(forceModels)/virtualMassForce/virtualMassForce.C
|
||||
$(forceModels)/gradPForce/gradPForce.C
|
||||
$(forceModels)/gradULiftForce/gradULiftForce.C
|
||||
$(forceModels)/HollowayDrag/HollowayDrag.C
|
||||
$(forceModels)/viscForce/viscForce.C
|
||||
$(forceModels)/MeiLift/MeiLift.C
|
||||
$(forceModels)/melting/melting.C
|
||||
$(forceModels)/KochHillDragNLift/KochHillDragNLift.C
|
||||
/*$(forceModels)/stokesSpheroidDrag/stokesSpheroidDrag.C*/
|
||||
$(forceModels)/solidsPressureForce/solidsPressureForce.C
|
||||
$(forceModels)/periodicPressure/periodicPressure.C
|
||||
$(forceModels)/periodicPressureControl/periodicPressureControl.C
|
||||
$(forceModels)/averageSlipVel/averageSlipVel.C
|
||||
$(forceModels)/particleCellVolume/particleCellVolume.C
|
||||
$(forceModels)/fieldTimeAverage/fieldTimeAverage.C
|
||||
$(forceModels)/volWeightedAverage/volWeightedAverage.C
|
||||
|
||||
$(forceModelsMS)/forceModelMS/forceModelMS.C
|
||||
$(forceModelsMS)/forceModelMS/newForceModelMS.C
|
||||
$(forceModelsMS)/DiFeliceDragMS/DiFeliceDragMS.C
|
||||
$(forceModelsMS)/GidaspowDragMS/GidaspowDragMS.C
|
||||
$(forceModelsMS)/noDragMS/noDragMS.C
|
||||
|
||||
$(probeModels)/probeModel/probeModel.C
|
||||
$(probeModels)/probeModel/newProbeModel.C
|
||||
$(probeModels)/noProbe/noProbe.C
|
||||
$(probeModels)/particleProbe/particleProbe.C
|
||||
/*$(probeModels)/interfaceParticleProbe/interfaceParticleProbe.C*/
|
||||
|
||||
$(IOModels)/IOModel/IOModel.C
|
||||
$(IOModels)/IOModel/newIOModel.C
|
||||
$(IOModels)/noIO/noIO.C
|
||||
$(IOModels)/basicIO/basicIO.C
|
||||
$(IOModels)/tempIO/tempIO.C
|
||||
$(IOModels)/colorIO/colorIO.C
|
||||
$(IOModels)/trackIO/trackIO.C
|
||||
$(IOModels)/sophIO/sophIO.C
|
||||
|
||||
@ -60,34 +84,39 @@ $(voidFractionModels)/voidFractionModel/voidFractionModel.C
|
||||
$(voidFractionModels)/voidFractionModel/newVoidFractionModel.C
|
||||
$(voidFractionModels)/centreVoidFraction/centreVoidFraction.C
|
||||
$(voidFractionModels)/dividedVoidFraction/dividedVoidFraction.C
|
||||
$(voidFractionModels)/dividedVoidFractionBiDi/dividedVoidFractionBiDi.C
|
||||
$(voidFractionModels)/dividedVoidFractionMS/dividedVoidFractionMS.C
|
||||
$(voidFractionModels)/bigParticleVoidFraction/bigParticleVoidFraction.C
|
||||
$(voidFractionModels)/GaussVoidFraction/GaussVoidFraction.C
|
||||
$(voidFractionModels)/IBVoidFraction/IBVoidFraction.C
|
||||
$(voidFractionModels)/weightedNeigbhorsVoidFraction/weightedNeigbhorsVoidFraction.C
|
||||
|
||||
$(voidFractionModelsMS)/voidFractionModelMS/voidFractionModelMS.C
|
||||
$(voidFractionModelsMS)/voidFractionModelMS/newVoidFractionModelMS.C
|
||||
|
||||
$(locateModels)/locateModel/locateModel.C
|
||||
$(locateModels)/locateModel/newLocateModel.C
|
||||
$(locateModels)/standardSearch/standardSearch.C
|
||||
$(locateModels)/engineSearch/engineSearch.C
|
||||
$(locateModels)/engineSearchMany2Many/engineSearchMany2Many.C
|
||||
$(locateModels)/turboEngineSearch/turboEngineSearch.C
|
||||
$(locateModels)/turboEngineSearchM2M/turboEngineSearchM2M.C
|
||||
$(locateModels)/engineSearchIB/engineSearchIB.C
|
||||
|
||||
$(locateModels)/hyperEngineSearch/hyperEngineSearch.C
|
||||
$(locateModels)/ijkSearch/ijkSearch.C
|
||||
|
||||
$(meshMotionModels)/meshMotionModel/meshMotionModel.C
|
||||
$(meshMotionModels)/meshMotionModel/newMeshMotionModel.C
|
||||
$(meshMotionModels)/noMeshMotion/noMeshMotion.C
|
||||
$(meshMotionModels)/DEMdrivenMeshMotion/DEMdrivenMeshMotion.C
|
||||
|
||||
$(momCoupleModels)/momCoupleModel/momCoupleModel.C
|
||||
$(momCoupleModels)/momCoupleModel/newMomCoupleModel.C
|
||||
$(momCoupleModels)/explicitCouple/explicitCouple.C
|
||||
$(momCoupleModels)/explicitCoupleSource/explicitCoupleSource.C
|
||||
$(momCoupleModels)/implicitCouple/implicitCouple.C
|
||||
$(momCoupleModels)/noCouple/noCouple.C
|
||||
|
||||
$(regionModels)/regionModel/regionModel.C
|
||||
$(regionModels)/regionModel/newRegionModel.C
|
||||
$(regionModels)/allRegion/allRegion.C
|
||||
|
||||
$(dataExchangeModels)/dataExchangeModel/dataExchangeModel.C
|
||||
$(dataExchangeModels)/dataExchangeModel/newDataExchangeModel.C
|
||||
$(dataExchangeModels)/oneWayVTK/oneWayVTK.C
|
||||
@ -95,11 +124,13 @@ $(dataExchangeModels)/twoWayFiles/twoWayFiles.C
|
||||
$(dataExchangeModels)/noDataExchange/noDataExchange.C
|
||||
$(dataExchangeModels)/twoWayMPI/twoWayMPI.C
|
||||
$(dataExchangeModels)/twoWayM2M/twoWayM2M.C
|
||||
$(dataExchangeModels)/twoWayMany2Many/twoWayMany2Many.C
|
||||
|
||||
$(averagingModels)/averagingModel/averagingModel.C
|
||||
$(averagingModels)/averagingModel/newAveragingModel.C
|
||||
$(averagingModels)/dilute/dilute.C
|
||||
$(averagingModels)/dense/dense.C
|
||||
$(averagingModels)/denseBiDi/denseBiDi.C
|
||||
|
||||
$(clockModels)/clockModel/clockModel.C
|
||||
$(clockModels)/clockModel/newClockModel.C
|
||||
@ -108,6 +139,7 @@ $(clockModels)/noClock/noClock.C
|
||||
|
||||
$(liggghtsCommandModels)/liggghtsCommandModel/liggghtsCommandModel.C
|
||||
$(liggghtsCommandModels)/liggghtsCommandModel/newLiggghtsCommandModel.C
|
||||
$(liggghtsCommandModels)/colorParticles/colorParticles.C
|
||||
$(liggghtsCommandModels)/execute/execute.C
|
||||
$(liggghtsCommandModels)/runLiggghts/runLiggghts.C
|
||||
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
|
||||
@ -117,5 +149,6 @@ $(smoothingModels)/smoothingModel/smoothingModel.C
|
||||
$(smoothingModels)/smoothingModel/newSmoothingModel.C
|
||||
$(smoothingModels)/noSmoothing/noSmoothing.C
|
||||
$(smoothingModels)/constDiffSmoothing/constDiffSmoothing.C
|
||||
$(smoothingModels)/localPSizeDiffSmoothing/localPSizeDiffSmoothing.C
|
||||
|
||||
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)
|
||||
|
||||
@ -14,11 +14,12 @@ EXE_INC = \
|
||||
-I$(LIB_SRC)/OpenFOAM/containers/HashTables/labelHashSet \
|
||||
-I$(CFDEM_LIGGGHTS_SRC_DIR) \
|
||||
-I$(CFDEM_M2MLIB_PATH) \
|
||||
-I$(CFDEM_Many2ManyLIB_PATH) \
|
||||
-I$(CFDEM_SRC_DIR)/cfdTools \
|
||||
|
||||
LIB_LIBS = \
|
||||
$(PLIBS) \
|
||||
-L$(CFDEM_LIB_DIR) \
|
||||
-L$(FOAM_USER_LIBBIN) \
|
||||
-lfiniteVolume \
|
||||
-lincompressibleRASModels \
|
||||
-lincompressibleLESModels \
|
||||
@ -28,4 +29,10 @@ LIB_LIBS = \
|
||||
-L$(CFDEM_LIGGGHTS_SRC_DIR) \
|
||||
-Wl,--whole-archive -l$(CFDEM_LIGGGHTS_LIB_NAME) -Wl,--no-whole-archive \
|
||||
-L$(CFDEM_M2MLIB_PATH) \
|
||||
-lcouple
|
||||
-lcouple \
|
||||
-L$(CFDEM_Many2ManyLIB_PATH) \
|
||||
-lcoupleMany2Many \
|
||||
|
||||
/* add -I$(CFDEM_POEMSLIB_PATH) \ to EXE_INC */
|
||||
/* -L$(CFDEM_POEMSLIB_PATH) \ */
|
||||
/* -lpoems */
|
||||
|
||||
@ -100,6 +100,7 @@ Foam::cfdemCloud::cfdemCloud
|
||||
cgOK_(true),
|
||||
impDEMdrag_(false),
|
||||
imExSplitFactor_(1.0),
|
||||
treatVoidCellsAsExplicitForce_(false),
|
||||
useDDTvoidfraction_(false),
|
||||
ddtVoidfraction_
|
||||
(
|
||||
@ -219,6 +220,8 @@ Foam::cfdemCloud::cfdemCloud
|
||||
solveFlow_=Switch(couplingProperties_.lookup("solveFlow"));
|
||||
if (couplingProperties_.found("imExSplitFactor"))
|
||||
imExSplitFactor_ = readScalar(couplingProperties_.lookup("imExSplitFactor"));
|
||||
if (couplingProperties_.found("treatVoidCellsAsExplicitForce"))
|
||||
treatVoidCellsAsExplicitForce_ = readBool(couplingProperties_.lookup("treatVoidCellsAsExplicitForce"));
|
||||
if (couplingProperties_.found("verbose")) verbose_=true;
|
||||
if (couplingProperties_.found("ignore")) ignore_=true;
|
||||
if (turbulenceModelType_=="LESProperties")
|
||||
@ -508,7 +511,12 @@ bool Foam::cfdemCloud::evolve
|
||||
//Smoothen "next" fields
|
||||
smoothingM().dSmoothing();
|
||||
smoothingM().smoothen(voidFractionM().voidFractionNext());
|
||||
smoothingM().smoothenReferenceField(averagingM().UsNext());
|
||||
|
||||
//only smoothen if we use implicit force coupling in cells void of particles
|
||||
//because we need unsmoothened Us field to detect cells for explicit
|
||||
//force coupling
|
||||
if(!treatVoidCellsAsExplicitForce())
|
||||
smoothingM().smoothenReferenceField(averagingM().UsNext());
|
||||
|
||||
clockM().stop("setVectorAverage");
|
||||
}
|
||||
|
||||
@ -142,6 +142,8 @@ protected:
|
||||
|
||||
mutable scalar imExSplitFactor_;
|
||||
|
||||
mutable bool treatVoidCellsAsExplicitForce_; //will treat the coupling force in cells with no Us data explicitly
|
||||
|
||||
bool useDDTvoidfraction_;
|
||||
|
||||
mutable volScalarField ddtVoidfraction_;
|
||||
@ -245,6 +247,8 @@ public:
|
||||
|
||||
inline const scalar& imExSplitFactor() const;
|
||||
|
||||
inline const bool& treatVoidCellsAsExplicitForce() const;
|
||||
|
||||
inline const bool& ignore() const;
|
||||
|
||||
inline const fvMesh& mesh() const;
|
||||
@ -298,6 +302,13 @@ public:
|
||||
virtual inline double ** particleDensity() const {return NULL;};
|
||||
virtual inline int ** particleTypes() const {return NULL;};
|
||||
virtual label particleType(label index) const {return -1;};
|
||||
|
||||
//access to the particle's rotation and torque data
|
||||
virtual inline double ** DEMTorques() const {return NULL;};
|
||||
virtual inline double ** omegaArray() const {return NULL;};
|
||||
virtual vector omega(int) const {return Foam::vector(0,0,0);};
|
||||
|
||||
//access to the particles' orientation information
|
||||
virtual inline double ** exArray() const {return NULL;};
|
||||
virtual vector ex(int) const {return Foam::vector(0,0,0);};
|
||||
|
||||
|
||||
@ -60,6 +60,11 @@ inline const scalar& cfdemCloud::imExSplitFactor() const
|
||||
return imExSplitFactor_;
|
||||
};
|
||||
|
||||
inline const bool& cfdemCloud::treatVoidCellsAsExplicitForce() const
|
||||
{
|
||||
return treatVoidCellsAsExplicitForce_;
|
||||
}
|
||||
|
||||
inline const scalar& cfdemCloud::cg() const
|
||||
{
|
||||
return cg_;
|
||||
|
||||
@ -56,14 +56,14 @@ cfdemCloudMS::cfdemCloudMS
|
||||
cellIDsCM_(NULL),
|
||||
bodies_(NULL),
|
||||
nrigids_(NULL),
|
||||
exCM_(NULL),
|
||||
eyCM_(NULL),
|
||||
ezCM_(NULL),
|
||||
typeCM_(NULL),
|
||||
typeVolCM_(NULL),
|
||||
VclumpCM_(NULL),
|
||||
particleWeightsCM_(NULL),
|
||||
dHCM_(NULL),
|
||||
nClumpTypes_(1),
|
||||
clumpType_(NULL),
|
||||
clumpVol_(NULL),
|
||||
clumpDH_(NULL),
|
||||
clumpWeights_(NULL),
|
||||
//exCM_(NULL),
|
||||
//eyCM_(NULL),
|
||||
//ezCM_(NULL),
|
||||
//SclumpCM_(NULL),
|
||||
//scalingCM_(NULL),
|
||||
//Cclump_ex_(NULL),
|
||||
@ -72,8 +72,6 @@ cfdemCloudMS::cfdemCloudMS
|
||||
expForcesCM_(NULL),
|
||||
DEMForcesCM_(NULL),
|
||||
numberOfClumps_(-1),
|
||||
overlapCorr_(readScalar(couplingProperties_.lookup("overlapCorr"))),
|
||||
monoMS_(Switch(couplingProperties_.lookup("monoMS"))),
|
||||
numberOfClumpsChanged_(false),
|
||||
useforcePerClump_(false),
|
||||
forceModels_(couplingProperties_.lookup("forceModelsMS"))
|
||||
@ -88,9 +86,6 @@ cfdemCloudMS::cfdemCloudMS
|
||||
forceModels_[i]
|
||||
);
|
||||
}
|
||||
|
||||
if(overlapCorr_>1.0) FatalError << "overlapCorr_ must be <= 1."<< abort(FatalError);
|
||||
Info << "overlapCorr_=" << overlapCorr_ << endl;
|
||||
}
|
||||
|
||||
|
||||
@ -103,14 +98,13 @@ cfdemCloudMS::~cfdemCloudMS()
|
||||
delete cellIDsCM_;
|
||||
delete bodies_;
|
||||
delete nrigids_;
|
||||
delete exCM_;
|
||||
delete eyCM_;
|
||||
delete ezCM_;
|
||||
delete typeCM_;
|
||||
delete typeVolCM_;
|
||||
delete VclumpCM_;
|
||||
delete particleWeightsCM_;
|
||||
delete dHCM_;
|
||||
delete clumpType_;
|
||||
delete clumpVol_;
|
||||
delete clumpDH_;
|
||||
delete clumpWeights_;
|
||||
//delete exCM_;
|
||||
//delete eyCM_;
|
||||
//delete ezCM_;
|
||||
//delete SclumpCM_;
|
||||
//delete scalingCM_;
|
||||
//delete Cclump_ex_;
|
||||
@ -126,34 +120,43 @@ cfdemCloudMS::~cfdemCloudMS()
|
||||
void cfdemCloudMS::getDEMdata()
|
||||
{
|
||||
cfdemCloud::getDEMdata();
|
||||
// update NClumpTypes in data exch. model
|
||||
//dataExchangeM().checkNClumpTypes();
|
||||
|
||||
dataExchangeM().getData("xcm","vector-multisphere",positionsCM_); // position of the centre of mass
|
||||
dataExchangeM().getData("vcm","vector-multisphere",velocitiesCM_); // velocity of the centre of mass
|
||||
dataExchangeM().getData("body","scalar-atom",bodies_); // clump-particle connex
|
||||
|
||||
dataExchangeM().getData("nrigid","scalar-multisphere",nrigids_); // # particles in clump
|
||||
dataExchangeM().getData("ex_space","vector-multisphere",exCM_); // axis of inertia
|
||||
dataExchangeM().getData("ey_space","vector-multisphere",eyCM_); // axis of inertia
|
||||
dataExchangeM().getData("ez_space","vector-multisphere",ezCM_); // axis of inertia
|
||||
dataExchangeM().getData("clumptype","scalar-multisphere",clumpType_); // type of the clump
|
||||
|
||||
// dataExchangeM().getData("typeCM","scalar-multisphere",typeCM_); // type of the clump
|
||||
// dataExchangeM().getData("nTypes","scalar-global",nTypes_); // nr of clump types
|
||||
// dataExchangeM().getData("Vclump","vector-global",typeVolCM_); // Volume of the clump type
|
||||
setClumpVolume(); // can be replaced once volume is communicated!!!
|
||||
setdHCM(); // calc and store dHCM
|
||||
nClumpTypes_=dataExchangeM().getNumberOfTypes(); // nr of clump types
|
||||
double* typeVol_=dataExchangeM().getTypeVol(); // volume of the clump
|
||||
|
||||
// dataExchangeM().getScalarData("Sclump",SclumpCM_); // surface area of the clump
|
||||
// dataExchangeM().getScalarData("scaling",scalingCM_); // scaling of the clump
|
||||
// dataExchangeM().getScalarData("Cclump_ex",Cclump_ex_); // cross section of the clump in ex normal direction
|
||||
// dataExchangeM().getScalarData("Cclump_ey",Cclump_ey_); // cross section of the clump in ey normal direction
|
||||
//- save clump volume and mass
|
||||
double **typeDH(NULL);
|
||||
dataExchangeM().allocateArray(typeDH,-1,1,nClumpTypes()+1);
|
||||
for(int k = 1;k <= nClumpTypes(); k++)
|
||||
typeDH[k][0]=pow(typeVol_[k]*1.9099,1./3.); // 6/pi=1.9099 // calc a hydraulic diameter as d of vol equal sphere
|
||||
|
||||
// calc Saequi, surface area of the vol aequivalent sphere
|
||||
// Saequi=pi*pow(6*VclumpCM_/pi,2./3.);
|
||||
int ct(0);
|
||||
double dh(0);
|
||||
for(int ind = 0;ind < numberOfClumps(); ind++)
|
||||
{
|
||||
ct=clumpType()[0][ind];
|
||||
clumpVol_[ind][0] = typeVol_[ct];
|
||||
clumpDH_[ind][0]=typeDH[ct][0];
|
||||
//Info << "ct=" << ct << endl;
|
||||
//Info << "clumpVol()[ind][0]=" << clumpVol()[ind][0] << endl;
|
||||
//Info << "clumpDH()[ind][0]=" << clumpDH()[ind][0] << endl;
|
||||
}
|
||||
delete typeDH;
|
||||
// --
|
||||
|
||||
// calc Caequi, cross section of the vol aequivalent sphere
|
||||
// Caequi=Saequi/4;
|
||||
//dataExchangeM().getData("ex_space","vector-multisphere",exCM_); // axis of inertia
|
||||
//dataExchangeM().getData("ey_space","vector-multisphere",eyCM_); // axis of inertia
|
||||
//dataExchangeM().getData("ez_space","vector-multisphere",ezCM_); // axis of inertia
|
||||
//dataExchangeM().getScalarData("Sclump",SclumpCM_); // surface area of the clump
|
||||
//dataExchangeM().getScalarData("scaling",scalingCM_); // scaling of the clump
|
||||
//dataExchangeM().getScalarData("Cclump_ex",Cclump_ex_); // cross section of the clump in ex normal direction
|
||||
//dataExchangeM().getScalarData("Cclump_ey",Cclump_ey_); // cross section of the clump in ey normal direction
|
||||
}
|
||||
|
||||
void Foam::cfdemCloudMS::giveDEMdata()
|
||||
@ -185,22 +188,19 @@ bool cfdemCloudMS::reAllocArrays() const
|
||||
{
|
||||
if(cfdemCloud::reAllocArrays())
|
||||
{
|
||||
int nClumpTypes = dataExchangeM().nClumpTypes();
|
||||
|
||||
// get arrays of new length
|
||||
dataExchangeM().allocateArray(positionsCM_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(velocitiesCM_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(cellIDsCM_,-1,1,"nbodies");
|
||||
dataExchangeM().allocateArray(bodies_,0,1);
|
||||
dataExchangeM().allocateArray(nrigids_,0,1,"nbodies");
|
||||
dataExchangeM().allocateArray(exCM_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(eyCM_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(ezCM_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(typeCM_,0,1,"nbodies");
|
||||
dataExchangeM().allocateArray(typeVolCM_,0,1,nClumpTypes);
|
||||
dataExchangeM().allocateArray(VclumpCM_,0,1,"nbodies");
|
||||
dataExchangeM().allocateArray(particleWeightsCM_,1,1,"nbodies");
|
||||
dataExchangeM().allocateArray(dHCM_,1.,1,"nbodies");
|
||||
dataExchangeM().allocateArray(nrigids_,0,1,"nbodies");
|
||||
dataExchangeM().allocateArray(clumpType_,0,3,"nbodies");
|
||||
dataExchangeM().allocateArray(clumpVol_,0,1,"nbodies");
|
||||
dataExchangeM().allocateArray(clumpDH_,1.,1,"nbodies");
|
||||
dataExchangeM().allocateArray(clumpWeights_,1,1,"nbodies");
|
||||
//dataExchangeM().allocateArray(exCM_,0,3,"nbodies");
|
||||
//dataExchangeM().allocateArray(eyCM_,0,3,"nbodies");
|
||||
//dataExchangeM().allocateArray(ezCM_,0,3,"nbodies");
|
||||
//dataExchangeM().allocateArray(SclumpCM_,0,3,nClumpTypes);
|
||||
//dataExchangeM().allocateArray(scalingCM_,0,3,"nbodies");
|
||||
//dataExchangeM().allocateArray(Cclump_ex_,0,3,nClumpTypes);
|
||||
@ -259,98 +259,19 @@ void Foam::cfdemCloudMS::setParticleForceField()
|
||||
(
|
||||
forceM(0).impParticleForces(),
|
||||
impForcesCM_,
|
||||
particleWeightsCM_,
|
||||
clumpWeights_,
|
||||
numberOfClumps()
|
||||
);
|
||||
averagingM().setVectorSumSimple
|
||||
(
|
||||
forceM(0).expParticleForces(),
|
||||
expForcesCM_,
|
||||
particleWeightsCM_,
|
||||
clumpWeights_,
|
||||
numberOfClumps()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
void Foam::cfdemCloudMS::setClumpVolume()
|
||||
{
|
||||
//============================================
|
||||
// final version if vol is transferred
|
||||
//label type;
|
||||
//for(int ind = 0;ind < numberOfClumps(); ind++)
|
||||
//{
|
||||
// type = typeCM()[ind][0];
|
||||
// VclumpCM()[ind][0] = typeVolCM()[type][0];
|
||||
//}
|
||||
//============================================
|
||||
|
||||
|
||||
//============================================
|
||||
// prelim version
|
||||
scalar r(0);
|
||||
int nrigidC(-1);
|
||||
label ind(-1);
|
||||
label prevInd(-2);
|
||||
|
||||
// loop all particles
|
||||
// NOTE: this approach is inefficient and
|
||||
// assumes same overlap for all clumps
|
||||
for(int index = 0;index < numberOfParticles(); index++)
|
||||
{
|
||||
ind=body(index);
|
||||
// clump not found
|
||||
if (ind < 0) Warning <<"clump was deleted??? ind = "<< ind << endl;
|
||||
//else
|
||||
{
|
||||
//if(verbose_) Pout <<"clump :"<< ind << " found on this proc, cellIDCM(ind)=" << cellIDCM(ind) << endl;
|
||||
|
||||
// particles of clump have same size
|
||||
// Note: does this work in parallel???
|
||||
if(monoMS_)
|
||||
{
|
||||
if(prevInd!=ind)
|
||||
{
|
||||
prevInd=ind;
|
||||
nrigidC=nrigid(ind);
|
||||
|
||||
if (nrigidC <= 0)
|
||||
{
|
||||
Warning <<"A BUG occurred in Foam::cfdemCloudMS::setClumpVolume() nrigidC = "
|
||||
<< nrigidC <<", ind = " << ind <<", index=" << index <<"\n" << endl;
|
||||
nrigidC = 1;
|
||||
}
|
||||
r=radius(index);
|
||||
VclumpCM_[ind][0]=nrigidC*r*r*r*0.52360*overlapCorr_; // pi/6=0.52360
|
||||
//if(verbose_) Pout << "ind=" << ind << " ,VclumpCM_[ind][0]" << VclumpCM_[ind][0] << endl;
|
||||
}
|
||||
}
|
||||
// particles of clump can have different size
|
||||
else
|
||||
{
|
||||
r=radius(index);
|
||||
VclumpCM_[ind][0]+=r*r*r*0.52360*overlapCorr_; // pi/6=0.52360
|
||||
//if(verbose_) Pout << "summing up volume: " << "ind=" << ind << " ,VclumpCM_[ind][0]" << VclumpCM_[ind][0] << endl;
|
||||
}
|
||||
}
|
||||
//else
|
||||
//if(verbose_) Pout <<"clump :"<< ind << " not found on this proc." << endl;
|
||||
}
|
||||
if(verbose_)
|
||||
{
|
||||
for(int ind = 0;ind < numberOfClumps(); ind++)
|
||||
Pout << "clumpVolume: " << "ind=" << ind << " ,VclumpCM_[ind][0]" << VclumpCM_[ind][0] << endl;
|
||||
}
|
||||
//============================================
|
||||
}
|
||||
|
||||
void Foam::cfdemCloudMS::setdHCM()
|
||||
{
|
||||
// calc a hydraulic diameter as d of vol equal sphere
|
||||
for(int ind = 0;ind < numberOfClumps(); ind++)
|
||||
dHCM_[ind][0]=pow(VclumpCM_[ind][0]*1.9099,1./3.); // 6/pi=1.9099
|
||||
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
// PUBLIC MEMBER FUNCTIONS
|
||||
|
||||
|
||||
@ -66,17 +66,15 @@ private:
|
||||
mutable int **bodies_;
|
||||
mutable int **nrigids_;
|
||||
|
||||
mutable double **exCM_;
|
||||
mutable double **eyCM_;
|
||||
mutable double **ezCM_;
|
||||
|
||||
mutable double **typeCM_;
|
||||
mutable double **typeVolCM_;
|
||||
mutable double **VclumpCM_;
|
||||
mutable double **particleWeightsCM_;
|
||||
|
||||
mutable double **dHCM_;
|
||||
mutable int **clumpType_;
|
||||
mutable int nClumpTypes_;
|
||||
mutable double **clumpVol_;
|
||||
mutable double **clumpDH_;
|
||||
mutable double **clumpWeights_;
|
||||
|
||||
//mutable double **exCM_;
|
||||
//mutable double **eyCM_;
|
||||
//mutable double **ezCM_;
|
||||
//mutable double **SclumpCM_;
|
||||
//mutable double **scalingCM_;
|
||||
//mutable double **Cclump_ex_;
|
||||
@ -87,8 +85,6 @@ private:
|
||||
mutable double **DEMForcesCM_;
|
||||
|
||||
int numberOfClumps_;
|
||||
scalar overlapCorr_; // ratio between clump vol and sum(particle vol)
|
||||
Switch monoMS_;
|
||||
bool numberOfClumpsChanged_;
|
||||
|
||||
bool useforcePerClump_;
|
||||
@ -104,8 +100,6 @@ private:
|
||||
void findCells();
|
||||
void setForces();
|
||||
void setParticleForceField();
|
||||
void setClumpVolume(); // can be replaced once volume is communicated!!!
|
||||
void setdHCM();
|
||||
|
||||
public:
|
||||
|
||||
@ -128,8 +122,6 @@ public:
|
||||
|
||||
inline double particleVolume(int);
|
||||
|
||||
//inline double d(int);
|
||||
|
||||
inline vector positionCM(int);
|
||||
|
||||
inline vector velocityCM(int);
|
||||
@ -144,13 +136,13 @@ public:
|
||||
|
||||
inline double **& velocitiesCM() const;
|
||||
|
||||
inline double **& typeCM() const;
|
||||
inline int **& clumpType() const;
|
||||
|
||||
inline double **& typeVolCM() const;
|
||||
inline int nClumpTypes() const;
|
||||
|
||||
inline double **& VclumpCM() const;
|
||||
inline double **& clumpVol() const;
|
||||
|
||||
inline double **& dHCM() const;
|
||||
inline double **& clumpDH() const;
|
||||
|
||||
inline double **& impForcesCM() const;
|
||||
|
||||
|
||||
@ -42,18 +42,12 @@ inline label Foam::cfdemCloudMS::body(int index)
|
||||
inline double cfdemCloudMS::particleVolume(int index)
|
||||
{
|
||||
int ind = body(index); // particle to clump ID
|
||||
double Vp(VclumpCM_[ind][0]);
|
||||
double Vp(clumpVol_[ind][0]);
|
||||
int nR(nrigid(ind));
|
||||
if(nR>0) Vp/=nR;
|
||||
return Vp;
|
||||
}
|
||||
|
||||
/*inline double cfdemCloudMS::d(int index)
|
||||
{
|
||||
int ind = body(index); // particle to clump ID
|
||||
return dHCM_[ind][0];
|
||||
}*/
|
||||
|
||||
inline vector Foam::cfdemCloudMS::positionCM(int index)
|
||||
{
|
||||
vector pos;
|
||||
@ -93,24 +87,24 @@ inline double **& cfdemCloudMS::velocitiesCM() const
|
||||
return velocitiesCM_;
|
||||
}
|
||||
|
||||
inline double **& cfdemCloudMS::typeCM() const
|
||||
inline int cfdemCloudMS::nClumpTypes() const
|
||||
{
|
||||
return typeCM_;
|
||||
return nClumpTypes_;
|
||||
}
|
||||
|
||||
inline double **& cfdemCloudMS::typeVolCM() const
|
||||
inline int **& cfdemCloudMS::clumpType() const
|
||||
{
|
||||
return typeVolCM_;
|
||||
return clumpType_;
|
||||
}
|
||||
|
||||
inline double **& cfdemCloudMS::VclumpCM() const
|
||||
inline double **& cfdemCloudMS::clumpVol() const
|
||||
{
|
||||
return VclumpCM_;
|
||||
return clumpVol_;
|
||||
}
|
||||
|
||||
inline double **& cfdemCloudMS::dHCM() const
|
||||
inline double **& cfdemCloudMS::clumpDH() const
|
||||
{
|
||||
return dHCM_;
|
||||
return clumpDH_;
|
||||
}
|
||||
|
||||
inline double **& cfdemCloudMS::impForcesCM() const
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
//#define comp // if comp is on - you must use Make/options_comp!
|
||||
|
||||
//define multi sphere
|
||||
//#define multisphere
|
||||
#define multisphere
|
||||
|
||||
// features of 2.1 work also in 2.3
|
||||
#if defined(version23)
|
||||
|
||||
@ -139,6 +139,7 @@ compileLIGGGHTS()
|
||||
logpath="$1"
|
||||
logfileName="$2"
|
||||
headerText="$3"
|
||||
clean="$4"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- clean up old log file
|
||||
@ -157,9 +158,14 @@ compileLIGGGHTS()
|
||||
echo 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
#- wclean and wmake
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lmp_"$CFDEM_LIGGGHTS_MAKEFILE_NAME
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lib"$CFDEM_LIGGGHTS_LIB_NAME".a"
|
||||
make clean-all 2>&1 | tee -a $logpath/$logfileName
|
||||
if [[ $clean == "false" ]]; then
|
||||
echo "not cleaning LIGGGHTS"
|
||||
else
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lmp_"$CFDEM_LIGGGHTS_MAKEFILE_NAME
|
||||
rm $CFDEM_LIGGGHTS_SRC_DIR/"lib"$CFDEM_LIGGGHTS_LIB_NAME".a"
|
||||
make clean-all 2>&1 | tee -a $logpath/$logfileName
|
||||
echo "cleaning LIGGGHTS"
|
||||
fi
|
||||
if [[ $WM_NCOMPPROCS == "" ]]; then
|
||||
echo "compiling LIGGGHTS on one CPU"
|
||||
make $CFDEM_LIGGGHTS_MAKEFILE_NAME 2>&1 | tee -a $logpath/$logfileName
|
||||
|
||||
@ -1 +1,11 @@
|
||||
lagrangian/cfdemParticle/dir
|
||||
|
||||
#====================================================='
|
||||
#- RADL
|
||||
fvOptions/dir
|
||||
cylPorousMedia/dir
|
||||
|
||||
#====================================================='
|
||||
#- other
|
||||
finiteVolume/dir
|
||||
|
||||
|
||||
@ -1,4 +1,14 @@
|
||||
cfdemSolverPisoMS/dir
|
||||
cfdemSolverPiso/dir
|
||||
cfdemSolverIB/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
|
||||
|
||||
@ -7,15 +7,51 @@
|
||||
#===================================================================#
|
||||
|
||||
cfdemSolverPiso/settlingTestMPI/dir
|
||||
|
||||
cfdemSolverPiso/ErgunTestMPI/dir
|
||||
|
||||
cfdemSolverPiso/ErgunTestMPI_cgs/dir
|
||||
|
||||
cfdemSolverPiso/ErgunTestMPI_restart/dir
|
||||
|
||||
cfdemSolverIB/twoSpheresGlowinskiMPI/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/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
|
||||
|
||||
|
||||
|
||||
|
||||
@ -137,7 +137,7 @@ void Foam::dataExchangeModel::allocateArray
|
||||
{
|
||||
int len=0;
|
||||
if(strcmp(length,"nparticles")==0) len = particleCloud_.numberOfParticles();
|
||||
else if (strcmp(length,"nbodies")==0) len = nClumpTypes_;
|
||||
else if (strcmp(length,"nbodies")==0) len = particleCloud_.numberOfClumps();
|
||||
else FatalError<<"call allocateArray with length, nparticles or nbodies!\n" << abort(FatalError);
|
||||
allocateArray(array,initVal,width,len);
|
||||
}
|
||||
@ -226,7 +226,7 @@ scalar Foam::dataExchangeModel::timeStepFraction() const
|
||||
}
|
||||
int Foam::dataExchangeModel::getNumberOfParticles() const
|
||||
{
|
||||
Warning << "ask for nr of clumps - which is not supported for this dataExchange model" << endl;
|
||||
Warning << "ask for nr of particles - which is not supported for this dataExchange model" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -235,7 +235,17 @@ int Foam::dataExchangeModel::getNumberOfClumps() const
|
||||
Warning << "ask for nr of clumps - which is not supported for this dataExchange model" << endl;
|
||||
return -1;
|
||||
}
|
||||
int Foam::dataExchangeModel::getNumberOfTypes() const
|
||||
{
|
||||
Warning << "ask for nr of types - which is not supported for this dataExchange model" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
double* Foam::dataExchangeModel::getTypeVol() const
|
||||
{
|
||||
Warning << "ask for type volume - which is not supported for this dataExchange model" << endl;
|
||||
return NULL;
|
||||
}
|
||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||
|
||||
// Construct from components
|
||||
@ -248,7 +258,6 @@ dataExchangeModel::dataExchangeModel
|
||||
dict_(dict),
|
||||
particleCloud_(sm),
|
||||
maxNumberOfParticles_(0),
|
||||
nClumpTypes_(1),
|
||||
couplingStep_(0),
|
||||
DEMts_(-1.),
|
||||
couplingInterval_(readScalar(dict_.lookup("couplingInterval")))
|
||||
|
||||
@ -62,8 +62,6 @@ protected:
|
||||
|
||||
int maxNumberOfParticles_;
|
||||
|
||||
int nClumpTypes_;
|
||||
|
||||
mutable int couplingStep_;
|
||||
|
||||
scalar DEMts_;
|
||||
@ -120,8 +118,6 @@ public:
|
||||
// Member Function
|
||||
inline const int& maxNumberOfParticles() const {return maxNumberOfParticles_;};
|
||||
|
||||
inline int nClumpTypes() const {return nClumpTypes_;};
|
||||
|
||||
template <typename T>
|
||||
void getData
|
||||
(
|
||||
@ -240,6 +236,8 @@ public:
|
||||
|
||||
virtual int getNumberOfParticles() const;
|
||||
virtual int getNumberOfClumps() const;
|
||||
virtual int getNumberOfTypes() const;
|
||||
virtual double* getTypeVol() const;
|
||||
|
||||
inline void setPositions(label n,double* pos) const
|
||||
{
|
||||
|
||||
Binary file not shown.
@ -114,7 +114,6 @@ twoWayMPI::twoWayMPI
|
||||
twoWayMPI::~twoWayMPI()
|
||||
{}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * private Member Functions * * * * * * * * * * * * * //
|
||||
char* twoWayMPI::wordToChar(word& inWord) const
|
||||
{
|
||||
@ -414,9 +413,29 @@ int Foam::twoWayMPI::getNumberOfClumps() const
|
||||
return liggghts_get_maxtag_ms(lmp);
|
||||
#endif
|
||||
|
||||
Warning << "liggghts_get_maxtag_ms(lmp) is commented here!" << endl;
|
||||
Warning << "liggghts_get_maxtag_ms(lmp) is not available here!" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Foam::twoWayMPI::getNumberOfTypes() const
|
||||
{
|
||||
#ifdef multisphere
|
||||
return liggghts_get_ntypes_ms(lmp);
|
||||
#endif
|
||||
Warning << "liggghts_get_maxtag_ms(lmp) is not available here!" << endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
double* Foam::twoWayMPI::getTypeVol() const
|
||||
{
|
||||
#ifdef multisphere
|
||||
return liggghts_get_vclump_ms(lmp);
|
||||
#endif
|
||||
|
||||
Warning << "liggghts_get_vclump_ms(lmp) is not available here!" << endl;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -164,6 +164,8 @@ public:
|
||||
|
||||
int getNumberOfParticles() const;
|
||||
int getNumberOfClumps() const;
|
||||
int getNumberOfTypes() const;
|
||||
double* getTypeVol() const;
|
||||
|
||||
word myType() const{return typeName; };
|
||||
|
||||
|
||||
@ -72,8 +72,12 @@ GidaspowDrag::GidaspowDrag
|
||||
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
|
||||
phi_(readScalar(propsDict_.lookup("phi"))),
|
||||
interpolation_(false),
|
||||
splitImplicitExplicit_(false),
|
||||
UsFieldName_(propsDict_.lookup("granVelFieldName")),
|
||||
UsField_(sm.mesh().lookupObject<volVectorField> (UsFieldName_)),
|
||||
scaleDia_(1.),
|
||||
scaleDrag_(1.)
|
||||
scaleDrag_(1.),
|
||||
switchingVoidfraction_(0.8)
|
||||
{
|
||||
//Append the field names to be probed
|
||||
particleCloud_.probeM().initialize(typeName, "gidaspowDrag.logDat");
|
||||
@ -87,6 +91,13 @@ GidaspowDrag::GidaspowDrag
|
||||
if (propsDict_.found("verbose")) verbose_=true;
|
||||
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
|
||||
if (propsDict_.found("interpolation")) 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;
|
||||
}
|
||||
if (propsDict_.found("implDEM"))
|
||||
{
|
||||
treatExplicit_=false;
|
||||
@ -100,6 +111,9 @@ GidaspowDrag::GidaspowDrag
|
||||
if (propsDict_.found("scaleDrag"))
|
||||
scaleDrag_=scalar(readScalar(propsDict_.lookup("scaleDrag")));
|
||||
|
||||
if (propsDict_.found("switchingVoidfraction"))
|
||||
switchingVoidfraction_ = readScalar(propsDict_.lookup("switchingVoidfraction"));
|
||||
|
||||
Info << "Gidaspow - interpolation switch: " << interpolation_ << endl;
|
||||
}
|
||||
|
||||
@ -145,9 +159,12 @@ void GidaspowDrag::setForce() const
|
||||
scalar localPhiP(0);
|
||||
|
||||
scalar CdMagUrLag(0); //Cd of the very particle
|
||||
scalar KslLag(0); //momentum exchange of the very particle (per unit volume)
|
||||
scalar betaP(0); //momentum exchange of the very particle
|
||||
|
||||
vector dragExplicit(0,0,0);
|
||||
vector UfluidFluct(0,0,0);
|
||||
vector UsFluct(0,0,0);
|
||||
|
||||
interpolationCellPoint<scalar> voidfractionInterpolator_(voidfraction_);
|
||||
interpolationCellPoint<vector> UInterpolator_(U_);
|
||||
|
||||
@ -194,37 +211,45 @@ void GidaspowDrag::setForce() const
|
||||
localPhiP = 1.0f-voidfraction+SMALL;
|
||||
Vs = ds*ds*ds*M_PI/6;
|
||||
|
||||
//Compute specific drag coefficient (i.e., Force per unit slip velocity and per m³ SUSPENSION)
|
||||
if(voidfraction > 0.8) //dilute
|
||||
// calc particle's drag coefficient (i.e., Force per unit slip velocity and per m³ PARTICLE)
|
||||
if(voidfraction > switchingVoidfraction_) //dilute
|
||||
{
|
||||
Rep=ds/scaleDia_*voidfraction*magUr/nuf;
|
||||
CdMagUrLag = (24.0*nuf/(ds/scaleDia_*voidfraction)) //1/magUr missing here, but compensated in expression for KslLag!
|
||||
*(scalar(1)+0.15*Foam::pow(Rep, 0.687));
|
||||
CdMagUrLag = (24.0*nuf/(ds/scaleDia_*voidfraction)) //1/magUr missing here, but compensated in expression for betaP!
|
||||
*(scalar(1.0)+0.15*Foam::pow(Rep, 0.687));
|
||||
|
||||
KslLag = 0.75*(
|
||||
rho*localPhiP*voidfraction*CdMagUrLag
|
||||
betaP = 0.75*( //this is betaP = beta / localPhiP!
|
||||
rho*voidfraction*CdMagUrLag
|
||||
/
|
||||
(ds/scaleDia_*Foam::pow(voidfraction,2.65))
|
||||
);
|
||||
}
|
||||
else //dense
|
||||
{
|
||||
KslLag = (150*Foam::pow(localPhiP,2)*nuf*rho)/
|
||||
(voidfraction*ds/scaleDia_*ds/scaleDia_+SMALL)
|
||||
betaP = (150 * localPhiP*nuf*rho) //this is betaP = beta / localPhiP!
|
||||
/ (voidfraction*ds/scaleDia_*ds/scaleDia_)
|
||||
+
|
||||
(1.75*(localPhiP) * magUr * rho)/
|
||||
((ds/scaleDia_));
|
||||
(1.75 * magUr * rho)
|
||||
/((ds/scaleDia_));
|
||||
}
|
||||
|
||||
// calc particle's drag coefficient (i.e., Force per unit slip velocity and per m³ PARTICLE)
|
||||
betaP = KslLag / localPhiP;
|
||||
|
||||
// calc particle's drag
|
||||
drag = Vs * betaP * Ur * scaleDrag_;
|
||||
|
||||
if (modelType_=="B")
|
||||
drag /= voidfraction;
|
||||
|
||||
//Split forces
|
||||
if(splitImplicitExplicit_)
|
||||
{
|
||||
UfluidFluct = Ufluid - U_[cellI];
|
||||
UsFluct = Us - UsField_[cellI];
|
||||
dragExplicit = Vs * betaP * (UfluidFluct - UsFluct); //explicit part of force
|
||||
|
||||
if (modelType_=="B")
|
||||
dragExplicit /= voidfraction;
|
||||
}
|
||||
|
||||
if(verbose_ && index >=0 && index <2)
|
||||
{
|
||||
Pout << "cellI = " << cellI << endl;
|
||||
@ -240,6 +265,13 @@ void GidaspowDrag::setForce() const
|
||||
Pout << "Rep = " << Rep << endl;
|
||||
Pout << "betaP = " << betaP << 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
|
||||
@ -257,7 +289,14 @@ void GidaspowDrag::setForce() const
|
||||
|
||||
// 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];
|
||||
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_)
|
||||
|
||||
@ -31,6 +31,8 @@ Description
|
||||
Gidaspow drag law
|
||||
- only valid for low-Reynolds number systems (Re_p<1000)
|
||||
- including interpolation of the velocity to the exact position
|
||||
- splits off explicit drag component due to fluctuation in fluid and particle
|
||||
velocity
|
||||
|
||||
Class
|
||||
GidaspowDrag
|
||||
@ -80,10 +82,18 @@ private:
|
||||
|
||||
bool interpolation_; // use interpolated field values
|
||||
|
||||
bool splitImplicitExplicit_; // use splitting of implicit and explict force contribution
|
||||
|
||||
word UsFieldName_;
|
||||
|
||||
const volVectorField& UsField_; // the average particle velocity field (for implicit/expliti force split)
|
||||
|
||||
mutable scalar scaleDia_;
|
||||
|
||||
mutable scalar scaleDrag_;
|
||||
|
||||
mutable scalar switchingVoidfraction_; //voidfraction above which dilute formulation will be used
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
|
||||
@ -209,7 +209,8 @@ void KochHillDrag::setForce() const
|
||||
// calc model coefficient F3
|
||||
scalar F3 = 0.0673+0.212*volumefraction+0.0232/pow(voidfraction,5);
|
||||
|
||||
//Calculate F
|
||||
//Calculate F (the factor 0.5 is introduced, since Koch and Hill, ARFM 33:619–47, use the radius
|
||||
//to define Rep, and we use the particle diameter, see vanBuijtenen et al., CES 66:2368–2376.
|
||||
scalar F = voidfraction * (F0 + 0.5*F3*Rep);
|
||||
|
||||
// calc drag model coefficient betaP
|
||||
|
||||
@ -31,7 +31,7 @@ Description
|
||||
|
||||
#include "error.H"
|
||||
#include "forceModel.H"
|
||||
|
||||
#include "mathExtra.H"
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
namespace Foam
|
||||
@ -145,6 +145,26 @@ void forceModel::repartitionImExForces() const
|
||||
}
|
||||
}
|
||||
|
||||
void forceModel::treatVoidCells() const
|
||||
{
|
||||
//force coupling force in cells where there are no particles to be explicit force
|
||||
if(particleCloud_.treatVoidCellsAsExplicitForce())
|
||||
{
|
||||
int counter(0);
|
||||
volVectorField& Us = particleCloud_.averagingM().UsNext();
|
||||
forAll(Us,cellI)
|
||||
{
|
||||
if ( mag(Us[cellI]) == 0.0) // cell is void of particles
|
||||
{
|
||||
expParticleForces_[cellI] += impParticleForces_[cellI];
|
||||
impParticleForces_[cellI] *= 0.0;
|
||||
counter +=1;
|
||||
}
|
||||
}
|
||||
Info << "Re-partitioned "<< counter << " cells void of particles" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
} // End namespace Foam
|
||||
|
||||
@ -151,11 +151,12 @@ public:
|
||||
inline const bool& coupleForce() const { return coupleForce_;};
|
||||
|
||||
void const setImpDEMdrag() const {particleCloud_.impDEMdrag_=true;};
|
||||
|
||||
|
||||
virtual inline bool& requiresEx() { return requiresEx_;};
|
||||
|
||||
//Repartition Implixit/Explicit forces
|
||||
void repartitionImExForces() const;
|
||||
void repartitionImExForces() const; //Repartition Implixit/Explicit forces
|
||||
|
||||
void treatVoidCells() const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ void DiFeliceDragMS::setForce() const
|
||||
|
||||
Us = cloudRefMS().velocityCM(index);
|
||||
Ur = Ufluid-Us;
|
||||
ds = cloudRefMS().dHCM()[index][0];
|
||||
ds = cloudRefMS().clumpDH()[index][0];
|
||||
nuf = nufField[cellI];
|
||||
rho = rho_[cellI];
|
||||
magUr = mag(Ur);
|
||||
|
||||
@ -81,6 +81,11 @@ writeLiggghts::writeLiggghts
|
||||
writeLast_=Switch(propsDict_.lookup("writeLast"));
|
||||
}
|
||||
|
||||
if(propsDict_.found("writeName"))
|
||||
{
|
||||
propsDict_.lookup("writeName") >> writeName_;
|
||||
}
|
||||
|
||||
if (!writeLast_ && propsDict_.found("overwrite"))
|
||||
{
|
||||
overwrite_=Switch(propsDict_.lookup("overwrite"));
|
||||
|
||||
@ -2,15 +2,18 @@
|
||||
|
||||
#===================================================================#
|
||||
# allrun script for testcase as part of test routine
|
||||
# run settlingTest
|
||||
# Christoph Goniva - Sept. 2010
|
||||
# run ErgunTestMPI
|
||||
# Christoph Goniva - June 2014
|
||||
#===================================================================#
|
||||
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
|
||||
# check if mesh was built
|
||||
if [ -d "$casePath/CFD/constant/polyMesh/boundary" ]; then
|
||||
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
|
||||
echo "mesh was built before - using old mesh"
|
||||
else
|
||||
echo "mesh needs to be built"
|
||||
@ -18,5 +21,28 @@ else
|
||||
blockMesh
|
||||
fi
|
||||
|
||||
# check if DEM case was run
|
||||
if [ -f "$casePath/DEM/liggghts.restart" ]; then
|
||||
echo "DEM restart file found"
|
||||
else
|
||||
echo "starting DEM run..."
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$casePath"
|
||||
headerText="run_liggghts_ErgunTestMPI_DEM"
|
||||
logfileName="log_$headerText"
|
||||
solverName="in.liggghts_init"
|
||||
nrProcs=4
|
||||
machineFileName="none"
|
||||
debugMode="off"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- clean up case
|
||||
rm -r $casePath/DEM/post/*
|
||||
|
||||
#- call function to run DEM case
|
||||
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode
|
||||
fi
|
||||
|
||||
#- run parallel CFD-DEM in new terminal
|
||||
gnome-terminal --title='cfdemSolverPiso ErgunTestMPI CFD' -e "bash $casePath/parCFDDEMrun.sh"
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1.0e5;
|
||||
internalField uniform 1;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -37,7 +37,7 @@ boundaryField
|
||||
//type zeroGradient;
|
||||
|
||||
type fixedValue;
|
||||
value uniform 1.0e5;
|
||||
value $internalField;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Binary file not shown.
@ -48,7 +48,7 @@ averagingModel dense;//dilute;//
|
||||
|
||||
clockModel off; //standardClock;//
|
||||
|
||||
smoothingModel constDiffSmoothing; //off;//
|
||||
smoothingModel off;//constDiffSmoothing; //
|
||||
|
||||
//useDDTvoidfraction;
|
||||
|
||||
|
||||
@ -24,10 +24,10 @@ 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
|
||||
#fix m5 all property/global characteristicVelocity scalar 2.0
|
||||
|
||||
#pair style
|
||||
pair_style gran model hooke tangential history #Hookean without cohesion
|
||||
pair_style gran model hertz tangential history #hertzan without cohesion
|
||||
pair_coeff * *
|
||||
|
||||
#timestep, gravity
|
||||
@ -35,12 +35,12 @@ timestep 0.00001
|
||||
fix gravi all gravity 9.81 vector 0.0 -1.0 0.0
|
||||
|
||||
#walls (liggghts 2.0)
|
||||
fix xwalls1 all wall/gran model hooke tangential history primitive type 1 xplane 0.0
|
||||
fix xwalls2 all wall/gran model hooke tangential history primitive type 1 xplane 0.1
|
||||
fix ywalls1 all wall/gran model hooke tangential history primitive type 1 yplane 0.0
|
||||
fix ywalls2 all wall/gran model hooke tangential history primitive type 1 yplane 0.1
|
||||
fix zwalls1 all wall/gran model hooke tangential history primitive type 1 zplane 0.0
|
||||
fix zwalls2 all wall/gran model hooke tangential history primitive type 1 zplane 0.01
|
||||
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
|
||||
|
||||
#-import mesh from cad:
|
||||
#fix cad1 all mesh/gran hopperGenauerSALOME.stl 1 1.0 0. 0. 0. 0. 180. 0.
|
||||
|
||||
@ -16,7 +16,7 @@ FoamFile
|
||||
|
||||
dimensions [0 2 -2 0 0 0 0];
|
||||
|
||||
internalField uniform 1.0e5;
|
||||
internalField uniform 0;
|
||||
|
||||
boundaryField
|
||||
{
|
||||
@ -24,19 +24,19 @@ boundaryField
|
||||
wall
|
||||
{
|
||||
type zeroGradient;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
inlet
|
||||
{
|
||||
type zeroGradient;
|
||||
//type fixedValue;
|
||||
//value uniform 100000;
|
||||
value uniform 0;
|
||||
}
|
||||
|
||||
outlet
|
||||
{
|
||||
//type zeroGradient;
|
||||
type fixedValue;
|
||||
value uniform 100000;
|
||||
value uniform 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -25,6 +25,8 @@ FoamFile
|
||||
|
||||
//===========================================================================//
|
||||
// sub-models & settings
|
||||
|
||||
//skipFlowSol;
|
||||
//verbose;
|
||||
|
||||
modelType B; // A or B
|
||||
@ -45,7 +47,7 @@ probeModel off;
|
||||
|
||||
dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;//
|
||||
|
||||
averagingModel dense;//dilute;//
|
||||
averagingModel dense;
|
||||
|
||||
clockModel off;
|
||||
|
||||
@ -53,16 +55,14 @@ smoothingModel off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
|
||||
|
||||
forceModels
|
||||
(
|
||||
noDrag
|
||||
Archimedes
|
||||
volWeightedAverage
|
||||
//volWeightedAverage
|
||||
);
|
||||
|
||||
forceModelsMS
|
||||
(
|
||||
//DiFeliceDragMS
|
||||
GidaspowDragMS
|
||||
//noDragMS
|
||||
DiFeliceDragMS
|
||||
//GidaspowDragMS
|
||||
);
|
||||
|
||||
momCoupleModels
|
||||
@ -82,25 +82,12 @@ implicitCoupleProps
|
||||
voidfractionFieldName "voidfraction";
|
||||
}
|
||||
|
||||
ArchimedesProps
|
||||
dividedProps
|
||||
{
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
}
|
||||
gradPForceProps
|
||||
{
|
||||
pFieldName "p";
|
||||
densityFieldName "rho";
|
||||
velocityFieldName "U";
|
||||
interpolation;
|
||||
alphaMin 0.9;
|
||||
scaleUpVol 1.0;
|
||||
}
|
||||
|
||||
viscForceProps
|
||||
{
|
||||
velocityFieldName "U";
|
||||
densityFieldName "rho";
|
||||
interpolation;
|
||||
}
|
||||
volWeightedAverageProps
|
||||
{
|
||||
scalarFieldNames
|
||||
@ -114,22 +101,14 @@ volWeightedAverageProps
|
||||
lowerThreshold 0;
|
||||
//verbose;
|
||||
}
|
||||
totalMomentumExchangeProps
|
||||
{
|
||||
implicitMomExFieldName "Ksl";
|
||||
explicitMomExFieldName "none";
|
||||
fluidVelFieldName "U";
|
||||
granVelFieldName "Us";
|
||||
densityFieldName "rho";
|
||||
}
|
||||
|
||||
DiFeliceDragMSProps
|
||||
{
|
||||
velFieldName "U";
|
||||
densityFieldName "rho";
|
||||
voidfractionFieldName "voidfraction";
|
||||
hydraulicDiameter 0.002;
|
||||
//verbose;
|
||||
granVelFieldName "Us";
|
||||
//verbose;
|
||||
}
|
||||
|
||||
GidaspowDragMSProps
|
||||
@ -140,42 +119,10 @@ GidaspowDragMSProps
|
||||
hydraulicDiameter 0.002;
|
||||
}
|
||||
|
||||
oneWayVTKProps
|
||||
ArchimedesProps
|
||||
{
|
||||
couplingFilename "vtk_out%4.4d.vtk";
|
||||
maxNumberOfParticles 30000;
|
||||
}
|
||||
|
||||
twoWayFilesProps
|
||||
{
|
||||
maxNumberOfParticles 10100;
|
||||
}
|
||||
|
||||
centreProps
|
||||
{
|
||||
alphaMin 0.10;
|
||||
}
|
||||
|
||||
dividedMSProps
|
||||
{
|
||||
alphaMin 0.05;
|
||||
scaleUpVol 1.0;
|
||||
clumpVol 1.8433e-9; // this is particles volume, not clump!
|
||||
nrigid 10;
|
||||
}
|
||||
|
||||
bigParticleProps
|
||||
{
|
||||
alphaMin 0.05;
|
||||
scaleUpVol 50.0;
|
||||
maxCellsPerParticle 1000;
|
||||
}
|
||||
|
||||
GaussProps
|
||||
{
|
||||
maxCellsPerParticle 5000;
|
||||
alphaMin 0.05;
|
||||
scaleUpVol 10.0;
|
||||
densityFieldName "rho";
|
||||
gravityFieldName "g";
|
||||
}
|
||||
|
||||
engineProps
|
||||
|
||||
@ -36,9 +36,10 @@ divSchemes
|
||||
div(phi,R) Gauss limitedLinear 1;
|
||||
div(R) Gauss linear;
|
||||
div(phi,nuTilda) Gauss limitedLinear 1;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
div((nuEff*dev(T(grad(U))))) Gauss linear;
|
||||
div((viscousTerm*dev(grad(U).T()))) Gauss linear;
|
||||
div((nu*dev(grad(U).T()))) Gauss linear;
|
||||
div((nuEff*dev(grad(U).T()))) Gauss linear;
|
||||
}
|
||||
|
||||
laplacianSchemes
|
||||
|
||||
Binary file not shown.
@ -18,7 +18,7 @@ casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
logpath=$casePath
|
||||
headerText="run_parallel_cfdemSolverPisoMS_ErgunTestMPI_CFDDEM"
|
||||
logfileName="log_$headerText"
|
||||
solverName="cfdemSolverPimpleDyMMS_22x" #"cfdemSolverPisoMS"
|
||||
solverName="cfdemSolverPimpleDyMMS_22x"
|
||||
nrProcs="2"
|
||||
machineFileName="none" # yourMachinefileName | none
|
||||
debugMode="off" # on | off
|
||||
|
||||
@ -2,15 +2,18 @@
|
||||
|
||||
#===================================================================#
|
||||
# allrun script for testcase as part of test routine
|
||||
# run settlingTest
|
||||
# Christoph Goniva - August 2011
|
||||
# run packedBedTemp
|
||||
# Christoph Goniva - June 2014
|
||||
#===================================================================#
|
||||
|
||||
#- define variables
|
||||
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
|
||||
|
||||
#- include functions
|
||||
source $CFDEM_SRC_DIR/lagrangian/cfdemParticle/etc/functions.sh
|
||||
|
||||
# check if mesh was built
|
||||
if [ -d "$casePath/CFD/constant/polyMesh/boundary" ]; then
|
||||
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
|
||||
echo "mesh was built before - using old mesh"
|
||||
else
|
||||
echo "mesh needs to be built"
|
||||
@ -18,6 +21,29 @@ else
|
||||
blockMesh
|
||||
fi
|
||||
|
||||
# check if DEM case was run
|
||||
if [ -f "$casePath/DEM/liggghts.restart" ]; then
|
||||
echo "DEM restart file found"
|
||||
else
|
||||
echo "starting DEM run..."
|
||||
#--------------------------------------------------------------------------------#
|
||||
#- define variables
|
||||
logpath="$casePath"
|
||||
headerText="run_liggghts_packedBedTemp_DEM"
|
||||
logfileName="log_$headerText"
|
||||
solverName="in.liggghts_init"
|
||||
nrProcs=4
|
||||
machineFileName="none"
|
||||
debugMode="off"
|
||||
#--------------------------------------------------------------------------------#
|
||||
|
||||
#- clean up case
|
||||
rm -r $casePath/DEM/post/*
|
||||
|
||||
#- call function to run DEM case
|
||||
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode
|
||||
fi
|
||||
|
||||
#- run parallel CFD-DEM in new terminal
|
||||
gnome-terminal --title='cfdemSolverPisoScalar packedBedTemp CFD' -e "bash $casePath/parCFDDEMrun.sh"
|
||||
|
||||
|
||||
@ -132,7 +132,7 @@ oneWayVTKProps
|
||||
twoWayMPIProps
|
||||
{
|
||||
maxNumberOfParticles 10000;
|
||||
liggghtsPath "../DEM/in.liggghts_init";
|
||||
liggghtsPath "../DEM/in.liggghts_resume";
|
||||
}
|
||||
|
||||
centreProps
|
||||
|
||||
@ -1,20 +1,21 @@
|
||||
|
||||
# read packed bed and calc convective heat transfer
|
||||
#Particle packing by insertion and successive growing of particles
|
||||
|
||||
atom_style granular
|
||||
atom_modify map array
|
||||
communicate single vel yes
|
||||
boundary m m m
|
||||
newton off
|
||||
echo both
|
||||
|
||||
communicate single vel yes
|
||||
|
||||
units si
|
||||
processors 1 1 2
|
||||
processors 1 1 *
|
||||
|
||||
#read the restart file
|
||||
read_restart ../DEM/liggghts.restart
|
||||
region reg block 0. 0.1 0. 0.1 0. 1.1 units box
|
||||
create_box 1 reg
|
||||
|
||||
neighbor 0.003 bin
|
||||
neigh_modify delay 0 binsize 0.01
|
||||
neighbor 0.002 bin
|
||||
neigh_modify delay 0
|
||||
|
||||
|
||||
#Material properties required for new pair styles
|
||||
@ -24,15 +25,12 @@ 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
|
||||
#New 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
|
||||
#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 0.1
|
||||
@ -41,43 +39,35 @@ fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplan
|
||||
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 1.1
|
||||
|
||||
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
|
||||
|
||||
#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.
|
||||
fix ftco all property/global thermalConductivity peratomtype 5.
|
||||
fix ftca all property/global thermalCapacity peratomtype 10.
|
||||
fix heattransfer all heat/gran initial_temperature 263.
|
||||
|
||||
#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. # former property/paratom
|
||||
#particle distributions and insertion
|
||||
region bc block 0. 0.1 0. 0.1 0. 1.1 units box
|
||||
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.011
|
||||
fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
|
||||
|
||||
#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
|
||||
|
||||
#variable vx equal vx[1]
|
||||
#variable vy equal vy[1]
|
||||
#variable vz equal vz[1]
|
||||
#variable time equal step*dt
|
||||
#fix extra all print 500 "${time} ${vx} ${vy} ${vz}" file ../DEM/post/velocity.txt title "%" screen no
|
||||
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -3. insert_every 10000 overlapcheck yes all_in yes particles_in_region 1005 region bc
|
||||
|
||||
#apply nve integration to all particles that are inserted as single particles
|
||||
fix integr all nve/sphere
|
||||
|
||||
|
||||
#screen output
|
||||
#output settings, include total thermal energy
|
||||
compute 1 all erotate/sphere
|
||||
thermo_style custom step atoms ke c_1 vol
|
||||
thermo_style custom step atoms ke c_1 f_heattransfer 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
|
||||
#insert the first particles
|
||||
run 1
|
||||
dump dmp all custom 100 ../DEM/post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_Temp[0] f_heatFlux[0]
|
||||
dump dmp all custom 1000 post/dump.packing id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius f_heattransfer[0] f_heatFlux[0]
|
||||
|
||||
run 150000
|
||||
|
||||
write_restart liggghts.restart
|
||||
|
||||
run 1
|
||||
|
||||
Binary file not shown.
@ -1 +0,0 @@
|
||||
dummyfile
|
||||
|
||||
@ -83,25 +83,11 @@ if [ $postproc == "true" ]
|
||||
fi
|
||||
|
||||
#- clean up case
|
||||
echo "deleting data at: $casePath : ???\n"
|
||||
rm -r $casePath/CFD/0.*
|
||||
rm -r $casePath/CFD/1
|
||||
rm -r $casePath/CFD/callgrind.*
|
||||
rm -r $casePath/CFD/*.out
|
||||
rm -r $casePath/CFD/octave/*.eps
|
||||
rm -r $casePath/CFD/octave/octave-core
|
||||
rm -r $casePath/CFD/VTK
|
||||
rm -r $casePath/CFD/processor*
|
||||
echo "deleting data at: $casePath :\n"
|
||||
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
|
||||
cd $casePath/CFD
|
||||
cleanCase
|
||||
rm -r $casePath/CFD/clockData
|
||||
rm -r $casePath/DEM/post/*
|
||||
rm -r $casePath/DEM/log.*
|
||||
rm -r $casePath/CFD/log.*
|
||||
rm -r $casePath/DEM/log.*
|
||||
rm -r $casePath/CFD/probes
|
||||
rm -r $casePath/CFD/postProcessing
|
||||
rm -r $casePath/log_*
|
||||
(cd $casePath/DEM/post && touch dummy)
|
||||
echo "done"
|
||||
|
||||
#- preserve post directory
|
||||
echo "dummyfile" >> $casePath/DEM/post/dummy
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user