release on 2013-04-08_18-56-48

This commit is contained in:
goniva
2013-04-08 18:56:48 +02:00
parent ed43e52cad
commit 097b38b17b
17 changed files with 153 additions and 67 deletions

81
README Normal file
View File

@ -0,0 +1,81 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM. 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.
\*---------------------------------------------------------------------------*/

Binary file not shown.

Binary file not shown.

View File

@ -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
@ -21,18 +20,33 @@ $(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)/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
@ -62,21 +76,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
@ -102,4 +113,4 @@ $(liggghtsCommandModels)/runLiggghts/runLiggghts.C
$(liggghtsCommandModels)/writeLiggghts/writeLiggghts.C
$(liggghtsCommandModels)/readLiggghtsData/readLiggghtsData.C
LIB = $(FOAM_USER_LIBBIN)/lib$(CFDEM_LIB_NAME)
LIB = $(CFDEM_LIB_DIR)/lib$(CFDEM_LIB_NAME)

View File

@ -419,7 +419,10 @@ bool Foam::cfdemCloud::evolve
// reset vol Fields
clockM().start(16,"resetVolFields");
if(verbose_) Info << "- resetVolFields()" << endl;
if(verbose_){
Info << "couplingStep:" << dataExchangeM().couplingStep()
<< "\n- resetVolFields()" << endl;
}
averagingM().resetVectorAverage(averagingM().UsPrev(),averagingM().UsNext());
voidFractionM().resetVoidFractions();
averagingM().resetVectorAverage(forceM(0).impParticleForces(),forceM(0).impParticleForces(),true);
@ -495,7 +498,6 @@ bool Foam::cfdemCloud::evolve
clockM().start(23,"giveDEMdata");
giveDEMdata();
clockM().stop("giveDEMdata");
}//end dataExchangeM().couple()
Info << "\n timeStepFraction() = " << dataExchangeM().timeStepFraction() << endl;
@ -506,7 +508,7 @@ bool Foam::cfdemCloud::evolve
// calc ddt(voidfraction)
if (doCouple) calcDdtVoidfraction(voidFractionM().voidFractionNext());
//calcDdtVoidfraction(alpha); // alternative with scale=1!
//calcDdtVoidfraction(alpha); // alternative with scale=1! (does not see change in alpha?)
// update particle velocity Field
Us.internalField() = averagingM().UsInterp();
@ -572,7 +574,6 @@ void cfdemCloud::calcDdtVoidfraction(volScalarField& voidfraction) const
{
Info << "calculating ddt(voidfraction) based on couplingTime" << endl;
scalar scale=mesh().time().deltaT().value()/dataExchangeM().couplingTime();
Info << "scale="<< scale << endl;
ddtVoidfraction_ = fvc::ddt(voidfraction) * scale;
}

View File

@ -130,6 +130,10 @@ tmp<volVectorField> explicitCouple::expMomSource() const
)
);
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
if(1-tsf < 1e-4) //tsf==1
{
// calc fNext
forAll(fNext_,cellI)
{
@ -141,18 +145,11 @@ tmp<volVectorField> explicitCouple::expMomSource() const
if (fNext_[cellI][i] > fLimit_[i]) fNext_[cellI][i] = fLimit_[i];
}
}
// underrelaxation of f
if (particleCloud_.dataExchangeM().couplingStep() > 1)
tsource() = fPrev_;
}else
{
tsource() = (1 - particleCloud_.dataExchangeM().timeStepFraction()) * fPrev_
+ particleCloud_.dataExchangeM().timeStepFraction() * fNext_;
tsource() = (1 - tsf) * fPrev_ + tsf * fNext_;
}
else
{
tsource() = fNext_;
}
return tsource;
}

View File

@ -139,9 +139,13 @@ tmp<volScalarField> implicitCouple::impMomSource() const
)
);
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
// calc Ksl
scalar Ur;
if(1-tsf < 1e-4) //tsf==1
{
forAll(KslNext_,cellI)
{
Ur = mag(U_[cellI] - Us_[cellI]);
@ -157,16 +161,10 @@ tmp<volScalarField> implicitCouple::impMomSource() const
// limiter
if (KslNext_[cellI] > KslLimit_) KslNext_[cellI] = KslLimit_;
}
// underrelaxation of Ksl
if (particleCloud_.dataExchangeM().couplingStep() > 1)
tsource() = KslPrev_;
}else
{
tsource() = (1 - particleCloud_.dataExchangeM().timeStepFraction()) * KslPrev_
+ particleCloud_.dataExchangeM().timeStepFraction() * KslNext_;
}
else
{
tsource() = KslNext_;
tsource() = (1 - tsf) * KslPrev_ + tsf * KslNext_;
}
return tsource;

View File

@ -122,19 +122,15 @@ tmp<volScalarField> Foam::voidFractionModel::voidFractionInterp() const
)
);
// use this instead of above code???
//tmp<volScalarField> tsource = voidfractionPrev_;
if(particleCloud_.dataExchangeM().couplingStep() > 1)
scalar tsf = particleCloud_.dataExchangeM().timeStepFraction();
if(1-tsf < 1e-4) //tsf==1
{
tsource() = (1 - particleCloud_.dataExchangeM().timeStepFraction()) * voidfractionPrev_
+ particleCloud_.dataExchangeM().timeStepFraction() * voidfractionNext_;
tsource() = voidfractionPrev_;
}
else
{
tsource() = voidfractionNext_;
tsource() = (1 - tsf) * voidfractionPrev_ + tsf * voidfractionNext_;
}
return tsource;
}

View File

@ -1,2 +1,3 @@
dummyfile
dummyfile
dummyfile

View File

@ -26,8 +26,6 @@ FoamFile
//===========================================================================//
// sub-models & settings
//ignoreDDTvoidfraction;
modelType "A"; // A or B
couplingInterval 100;

View File

@ -23,13 +23,13 @@ startTime 0;
stopAt endTime;
endTime 0.1;//0.1;
endTime 0.1;
deltaT 0.0005;
writeControl adjustableRunTime;
writeInterval 0.001;
writeInterval 0.01;
purgeWrite 0;

View File

@ -40,3 +40,6 @@ dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile

View File

@ -9,7 +9,7 @@ path = '../../DEM/post/velocity.txt';
data = load(path);
U_sim = data(:,2:4);
t_sim = data(:,1);
fprintf('final velociy of sim = %f/%f/%f m/s\n',U_sim(length(U_sim(:,1)),1),U_sim(length(U_sim(:,1)),2),U_sim(length(U_sim(:,1)),3) )
fprintf('final velocity of sim = %f/%f/%f m/s\n',U_sim(length(U_sim(:,1)),1),U_sim(length(U_sim(:,1)),2),U_sim(length(U_sim(:,1)),3) )
%====================================%

View File

@ -25,7 +25,7 @@ dimensions [0 0 -1 1 0 0 0];
// rho=1
// --> Tsource = 1
internalField uniform 1;
internalField uniform 0;
boundaryField
{

View File

@ -28,7 +28,7 @@ FoamFile
modelType B; // A or B
couplingInterval 100;
couplingInterval 500;
voidFractionModel divided;

View File

@ -23,13 +23,13 @@ startTime 0;
stopAt endTime;
endTime 1;
endTime 1.0;
deltaT 0.001;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.01;
writeInterval 0.1;
purgeWrite 0;

View File

@ -39,7 +39,7 @@ divSchemes
div((nuEff*dev(grad(U).T()))) Gauss linear;
div((viscousTerm*dev(grad(U).T()))) Gauss linear;
div((nu*dev(grad(U).T()))) Gauss linear;
div(phi,T) Gauss upwind; //limitedLinear 1;
div(phi,T) Gauss limitedLinear 1; //Gauss upwind; //
}
laplacianSchemes