release on 2013-04-08_08-37-55

This commit is contained in:
goniva
2013-04-08 08:37:57 +02:00
parent b035a9d5b6
commit 966151a93e
42 changed files with 208 additions and 335 deletions

81
README
View File

@ -1,81 +0,0 @@
/*---------------------------------------------------------------------------*\
CFDEMcoupling - Open Source CFD-DEM coupling
CFDEMcoupling is part of the CFDEMproject
www.cfdem.com
Christoph Goniva, christoph.goniva@cfdem.com
Copyright 2009-2012 JKU Linz
Copyright 2012- DCS Computing GmbH, Linz
-------------------------------------------------------------------------------
License
This file is part of CFDEMcoupling.
CFDEMcoupling is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 3 of the License, or (at your
option) any later version.
CFDEMcoupling is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with CFDEMcoupling; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Description
This code is designed to realize coupled CFD-DEM simulations using LIGGGHTS
and OpenFOAM. Note: this code is not part of OpenFOAM (see DISCLAIMER).
\*---------------------------------------------------------------------------*/
CFDEM coupling provides an open source parallel coupled CFD-DEM framework
combining the strengths of LIGGGHTS DEM code and the Open Source
CFD package OpenFOAM(R)(*). The CFDEMcoupling toolbox allows to expand
standard CFD solvers of OpenFOAM(R)(*) to include a coupling to the DEM
code LIGGGHTS. In this toolbox the particle representation within the
CFD solver is organized by "cloud" classes. Key functionalities are organised
in sub-models (e.g. force models, data exchange models, etc.) which can easily
be selected and combined by dictionary settings.
The coupled solvers run fully parallel on distributed-memory clusters.
Features are:
- its modular approach allows users to easily implement new models
- its MPI parallelization enables to use it for large scale problems
- the "forum"_lws on CFD-DEM gives the possibility to exchange with other
users / developers
- the use of GIT allows to easily update to the latest version
- basic documentation is provided
The file structure:
- "src" directory including the source files of the coupling toolbox and models
- "applications" directory including the solver files for coupled CFD-DEM simulations
- "doc" directory including the documentation of CFDEMcoupling
- "tutorials" directory including basic tutorial cases showing the functionality
Details on installation are given on the "www.cfdem.com"
The functionality of this CFD-DEM framwork is described via "tutorial cases" showing
how to use different solvers and models.
CFDEMcoupling stands for Computational Fluid Dynamics (CFD) -
Discrete Element Method (DEM) coupling.
CFDEMcoupling is an open-source code, distributed freely under the terms of the
GNU Public License (GPL).
Core development of CFDEMcoupling is done by
Christoph Goniva and Christoph Kloss, both at DCS Computing GmbH, 2012
\*---------------------------------------------------------------------------*/
(*) "OpenFOAM(R)"_of is a registered trade mark of the ESI Group.
This offering is not affiliated, approved or endorsed by ESI Group,
the producer of the OpenFOAM® software and owner of the OpenFOAM® trade mark.
\*---------------------------------------------------------------------------*/

View File

@ -27,7 +27,7 @@ while (pimple.correctNonOrthogonal())
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + fvc::ddt(voidfraction)
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
);
pEqn.setReference(pRefCell, pRefValue);

View File

@ -132,7 +132,7 @@ int main(int argc, char *argv[])
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + fvc::ddt(voidfraction)
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
);
pEqn.setReference(pRefCell, pRefValue);

View File

@ -143,7 +143,7 @@ int main(int argc, char *argv[])
// Pressure corrector
fvScalarMatrix pEqn
(
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + fvc::ddt(voidfraction)
fvm::laplacian(rUAvoidfraction, p) == fvc::div(phiGes) + particleCloud.ddtVoidfraction()
);
pEqn.setReference(pRefCell, pRefValue);

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

@ -1,5 +1,5 @@
word CFDEMversion="cfdem-2.5.2";
word compatibleLIGGGHTSversion="2.2.4";
word CFDEMversion="cfdem-2.5.3";
word compatibleLIGGGHTSversion="2.3.2";
Info << "\nCFDEMcoupling version: " << CFDEMversion << "\n" << endl;
Info << "\n, compatible to LIGGGHTS version: " << compatibleLIGGGHTSversion << "\n" << endl;

View File

@ -95,6 +95,20 @@ Foam::cfdemCloud::cfdemCloud
turbulenceModelType_(couplingProperties_.lookup("turbulenceModelType")),
cgOK_(true),
impDEMdrag_(false),
useDDTvoidfraction_(true),
ddtVoidfraction_
(
IOobject
(
"ddtVoidfraction",
mesh.time().timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero", dimensionSet(0,0,-1,0,0), 0) // 1/s
),
turbulence_
(
#if defined(version21) || defined(version16ext)
@ -184,6 +198,11 @@ Foam::cfdemCloud::cfdemCloud
if (turbulenceModelType_=="LESProperties")
Info << "WARNING - LES functionality not yet tested!" << endl;
if (couplingProperties_.found("ignoreDDTvoidfraction"))
useDDTvoidfraction_=false;
else
Info << "ignoring ddt(voidfraction)" << endl;
forceModel_ = new autoPtr<forceModel>[nrForceModels()];
for (int i=0;i<nrForceModels();i++)
{
@ -476,6 +495,7 @@ bool Foam::cfdemCloud::evolve
clockM().start(23,"giveDEMdata");
giveDEMdata();
clockM().stop("giveDEMdata");
}//end dataExchangeM().couple()
Info << "\n timeStepFraction() = " << dataExchangeM().timeStepFraction() << endl;
@ -484,6 +504,10 @@ bool Foam::cfdemCloud::evolve
alpha.internalField() = voidFractionM().voidFractionInterp();
alpha.correctBoundaryConditions();
// calc ddt(voidfraction)
if (doCouple) calcDdtVoidfraction(voidFractionM().voidFractionNext());
//calcDdtVoidfraction(alpha); // alternative with scale=1!
// update particle velocity Field
Us.internalField() = averagingM().UsInterp();
Us.correctBoundaryConditions();
@ -534,13 +558,22 @@ tmp<fvVectorMatrix> cfdemCloud::divVoidfractionTau(volVectorField& U,volScalarFi
);
}
void cfdemCloud::resetArray(double**& array,int length,int width,double resetVal)
tmp<volScalarField> cfdemCloud::ddtVoidfraction() const
{
for(int index = 0;index < length; ++index){
for(int i=0;i<width;i++){
array[index][i] = resetVal;
}
if (dataExchangeM().couplingStep() <= 2 || !useDDTvoidfraction_)
{
Info << "suppressing ddt(voidfraction)" << endl;
return tmp<volScalarField> (ddtVoidfraction_ * 0.);
}
return tmp<volScalarField> (ddtVoidfraction_) ;
}
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;
}
tmp<volScalarField> cfdemCloud::voidfractionNuEff(volScalarField& voidfraction) const
@ -569,6 +602,14 @@ tmp<volScalarField> cfdemCloud::voidfractionNuEff(volScalarField& voidfraction)
}
}
void cfdemCloud::resetArray(double**& array,int length,int width,double resetVal)
{
for(int index = 0;index < length; ++index){
for(int i=0;i<width;i++){
array[index][i] = resetVal;
}
}
}
// * * * * * * * * * * * * * * * * IOStream operators * * * * * * * * * * * //
#include "cfdemCloudIO.C"

View File

@ -43,9 +43,7 @@ SourceFiles
#define cfdemCloud_H
// choose version
#define version21
//#define version16ext
//#define version15
#include "OFversion.H"
// choose comp/incomp
//#define comp
@ -139,6 +137,10 @@ protected:
bool impDEMdrag_;
bool useDDTvoidfraction_;
mutable volScalarField ddtVoidfraction_;
#if defined(version21) || defined(version16ext)
#ifdef comp
const compressible::turbulenceModel& turbulence_;
@ -315,6 +317,10 @@ public:
// functions
tmp<fvVectorMatrix> divVoidfractionTau(volVectorField& ,volScalarField&) const;
tmp<volScalarField> ddtVoidfraction() const;
void calcDdtVoidfraction(volScalarField& voidfraction) const;
tmp<volScalarField> voidfractionNuEff(volScalarField&) const;
void resetArray(double**&,int,int,double resetVal=0.);

View File

@ -114,13 +114,13 @@ 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
@ -148,9 +148,10 @@ void Foam::cfdemCloudMS::giveDEMdata()
{
for(int i=0;i<3;i++){
impForcesCM()[index][i] += expForcesCM()[index][i] + DEMForcesCM()[index][i];
Info << "index=" << index << " ,impForcesCM()[index][i]=" << impForcesCM()[index][i] << endl;
}
}
if(forceM(0).coupleForce()) dataExchangeM().giveData("dragforce_cm","vector-multisphere",impForcesCM());
if(forceM(0).coupleForce()) dataExchangeM().giveData("dragforce","vector-multisphere",impForcesCM());
if(verbose_) Info << "giveDEMdata done." << endl;
}

View File

@ -0,0 +1,3 @@
#define version21
//#define version16ext
//#define version15

View File

@ -54,12 +54,15 @@ export CFDEM_LIB_DIR=$FOAM_USER_LIBBIN
#- path to apps
export CFDEM_APP_DIR=$FOAM_USER_APPBIN
#- path to OF version flag file
export CFDEM_OFVERSION_DIR=$CFDEM_SRC_DIR/etc/OFversion
#------------------------------------------------------------------------------
#- settings for lpp postproc tool
#------------------------------------------------------------------------------
#- nr of procs for lpp tool
export CFDEM_LPP_NPROCS=1
export CFDEM_LPP_NPROCS=4
#- nr of procs for lpp tool
export CFDEM_LPP_CHUNKSIZE=1
@ -132,7 +135,7 @@ export -f cfdemLiggghts
cfdemLiggghtsPar() { mpirun -np $2 $CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME < $1; }
export -f cfdemLiggghtsPar
# check if the directory exists
# check if the run directory exists
if [ -d "$CFDEM_PROJECT_USER_DIR" ]; then
:
else
@ -140,7 +143,7 @@ else
cd $CFDEM_PROJECT_DIR/..
echo "make new dirs $CFDEM_PROJECT_DIR/../$LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION ? (y/n)"
read YN
if [ $YN=="y" ]; then
if [ $YN == "y" ]; then
mkdir $LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION
cd $LOGNAME-$CFDEM_VERSION-$WM_PROJECT_VERSION
mkdir run

View File

@ -125,6 +125,9 @@ alias cfdemTestTUT 'bash $CFDEM_SRC_DIR/etc/testTutorials.sh'
#- shortcut to run liggghts in serial
alias cfdemLiggghts '$CFDEM_LIGGGHTS_SRC_DIR/lmp_$CFDEM_LIGGGHTS_MAKEFILE_NAME'
#- shortcut to run liggghts in parallel
# unfortunately no functions available in csh
#- shortcut to run lpp
alias lpp 'python -i $CFDEM_LPP_DIR/lpp.py \!:1'

View File

@ -177,8 +177,18 @@ DEMrun()
casePath="$3"
headerText="$4"
solverName="$5"
debugMode="$6"
#--------------------------------------------------------------------------------#
if [ $debugMode == "on" ]; then
debugMode="valgrind"
elif [ $debugMode == "strict" ]; then
#debugMode="valgrind --leak-check=full -v --trace-children=yes --track-origins=yes"
debugMode="valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes"
else
debugMode=""
fi
#- clean up old log file
rm $logpath/$logfileName
@ -195,8 +205,7 @@ DEMrun()
echo 2>&1 | tee -a $logpath/$logfileName
#- run applictaion
#liggghts < $solverName 2>&1 | tee -a $logpath/$logfileName
$CFDEM_LIGGGHTS_SRC_DIR/$CFDEM_LIGGGHTS_LIB_NAME < $solverName 2>&1 | tee -a $logpath/$logfileName
$debugMode $CFDEM_LIGGGHTS_SRC_DIR/$CFDEM_LIGGGHTS_LIB_NAME < $solverName 2>&1 | tee -a $logpath/$logfileName
#- keep terminal open (if started in new terminal)
#read
@ -220,6 +229,15 @@ parDEMrun()
debugMode="$8"
#--------------------------------------------------------------------------------#
if [ $debugMode == "on" ]; then
debugMode="valgrind"
elif [ $debugMode == "strict" ]; then
#debugMode="valgrind --leak-check=full -v --trace-children=yes --track-origins=yes"
debugMode="valgrind --tool=memcheck --leak-check=yes --show-reachable=yes --num-callers=20 --track-fds=yes"
else
debugMode=""
fi
#- clean up old log file
rm $logpath/$logfileName

View File

@ -217,8 +217,11 @@ bool Foam::dataExchangeModel::couple() const
scalar Foam::dataExchangeModel::timeStepFraction() const
{
//return fraction between previous coupling TS and actual TS
scalar DEMtime = DEMts_ * couplingInterval_;
scalar frac = ( ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() ) - (couplingStep_-1) * DEMtime) / DEMtime;
//scalar DEMtime = DEMts_ * couplingInterval_;
//scalar frac = ( ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() ) - (couplingStep_) * DEMtime) / DEMtime; //Chr 05.03.2013
scalar frac = ( particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value() - couplingStep_ * couplingTime() ) / couplingTime();
if (frac<1e-4) frac = 1;
return frac;
}
int Foam::dataExchangeModel::getNumberOfParticles() const

View File

@ -213,8 +213,9 @@ public:
inline bool doCoupleNow() const
{
if (particleCloud_.mesh().time().value()-particleCloud_.mesh().time().startTime().value()
- (couplingStep_*(DEMts_*couplingInterval_))
> particleCloud_.mesh().time().deltaT().value()/2)
- ((1+couplingStep_)*(DEMts_*couplingInterval_))
+ SMALL > 0) // Chr 27.03.2013 : first coupling after DEMts_*couplingInterval_
// > particleCloud_.mesh().time().deltaT().value()/2) // Chr 27.03.2013
{
return true;
}

View File

@ -71,7 +71,8 @@ KochHillDrag::KochHillDrag
rho_(sm.mesh().lookupObject<volScalarField> (densityFieldName_)),
voidfractionFieldName_(propsDict_.lookup("voidfractionFieldName")),
voidfraction_(sm.mesh().lookupObject<volScalarField> (voidfractionFieldName_)),
interpolation_(false)
interpolation_(false),
scale_(1.)
{
if (propsDict_.found("verbose")) verbose_=true;
if (propsDict_.found("treatExplicit")) treatExplicit_=true;
@ -84,6 +85,9 @@ KochHillDrag::KochHillDrag
Info << "Using implicit DEM drag formulation." << endl;
}
particleCloud_.checkCG(true);
if (propsDict_.found("scale"))
scale_=scalar(readScalar(propsDict_.lookup("scale")));
}
@ -97,6 +101,13 @@ KochHillDrag::~KochHillDrag()
void KochHillDrag::setForce() const
{
if (scale_ > 1)
Info << "KochHill using scale = " << scale_ << endl;
else if (cg() > 1){
scale_=cg();
Info << "KochHill using scale from liggghts cg = " << scale_ << endl;
}
// get viscosity field
#ifdef comp
const volScalarField nufField = particleCloud_.turbulence().mu()/rho_;
@ -164,7 +175,7 @@ void KochHillDrag::setForce() const
if (magUr > 0)
{
// calc particle Re Nr
Rep = ds/cg()*voidfraction*magUr/(nuf+SMALL);
Rep = ds/scale_*voidfraction*magUr/(nuf+SMALL);
// calc model coefficient F0
scalar F0=0.;
@ -187,7 +198,7 @@ void KochHillDrag::setForce() const
scalar F = voidfraction * (F0 + 0.5*F3*Rep);
// calc drag model coefficient betaP
betaP = 18.*nuf*rho/(ds/cg()*ds/cg())*voidfraction*F;
betaP = 18.*nuf*rho/(ds/scale_*ds/scale_)*voidfraction*F;
// calc particle's drag
drag = Vs*betaP*Ur;
@ -202,7 +213,7 @@ void KochHillDrag::setForce() const
Pout << "Us = " << Us << endl;
Pout << "Ur = " << Ur << endl;
Pout << "ds = " << ds << endl;
Pout << "ds/scale = " << ds/cg() << endl;
Pout << "ds/scale = " << ds/scale_ << endl;
Pout << "rho = " << rho << endl;
Pout << "nuf = " << nuf << endl;
Pout << "voidfraction = " << voidfraction << endl;

View File

@ -80,6 +80,8 @@ private:
bool interpolation_; // use interpolated field values
mutable scalar scale_;
public:
//- Runtime type information

View File

@ -122,6 +122,10 @@ public:
tmp<volScalarField> voidFractionInterp() const;
inline volScalarField& voidFractionPrev()const { return voidfractionPrev_; }
inline volScalarField& voidFractionNext()const { return voidfractionNext_; }
void resetVoidFractions() const;
//void undoVoidFractions(double**const&) const;

View File

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

View File

@ -30,7 +30,7 @@ phip = 1 % sphericity
epsilon = 0.451335 % void fraction
Ustart = 0.002
Uend = 0.02
timeStepSize = 0.001; % time interval of pressure data
timeStepSize = 0.0005; % time interval of pressure data
Tstart = 0;
Tend = t_sim(length(t_sim));
deltaU=(Uend-Ustart)/((Tend-Tstart)/timeStepSize);

View File

@ -25,11 +25,11 @@ stopAt endTime;
endTime 0.1;//0.1;
deltaT 0.001;
deltaT 0.0005;
writeControl adjustableRunTime;
writeInterval 0.01;
writeInterval 0.001;
purgeWrite 0;

View File

@ -38,3 +38,5 @@ dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile

View File

@ -53,7 +53,7 @@ create_atoms 1 single 0.05 0.04 0.046 units box
set group all diameter 0.0001 density 3000
#cfd coupling
fix cfd all couple/cfd couple_every 10 mpi
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force
variable vx equal vx[1]

View File

@ -2,14 +2,14 @@ echo both
# Pour granular particles into chute container
atom_style hybrid granular molecular
atom_style sphere
atom_modify map array sort 0 0
communicate single vel yes
boundary m m m
newton off
units si
#processors 1 2 1
region reg block -0.015 0.015 -0.015 0.015 -0.001 0.0554 units box
create_box 1 reg
@ -17,8 +17,6 @@ create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
mass 1 1.0
#Material properties required for new pair styles
fix m1 all property/global youngsModulus peratomtype 5.e6
@ -27,7 +25,7 @@ fix m3 all property/global coefficientRestitution peratomtypepair 1 0.3
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5
#pair style
pair_style gran/hertz/history 1 0 #Hertzian without cohesion
pair_style gran/hertz/history
pair_coeff * *
#timestep, gravity
@ -35,8 +33,9 @@ timestep 0.00001
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
#walls
fix zwalls all wall/gran/hertz/history 1 0 zplane 0.0 0.0553 1
fix cylwalls all wall/gran/hertz/history 1 0 zcylinder 0.01385 1
fix zwalls1 all wall/gran/hertz/history primitive type 1 zplane 0.0
fix zwalls2 all wall/gran/hertz/history primitive type 1 zplane 0.0553
fix cylwalls all wall/gran/hertz/history primitive type 1 zcylinder 0.01385 0. 0. tangential_damping off
#============================
@ -46,12 +45,12 @@ fix pdd1 all particledistribution/discrete 1. 1 pts1 1.0
#region and insertion
group rigid_group region reg
region bc cylinder z 0.0 0.0 0.012 0.001 0.05 units box
region bc cylinder z 0.0 0.0 0.012 0.001 0.055 units box
fix ins rigid_group insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes region bc ntry_mc 10000 particles_in_region 2500 # volumefraction_region 0.01 #
#integrator for multisphere rigid bodies
fix integr rigid_group rigid/multisphere
fix integr rigid_group multisphere
#============================
#cfd coupling
@ -70,5 +69,5 @@ compute_modify thermo_temp dynamic yes
run 1
dump dmp all custom 5000 ../DEM/post/dump.liggghts_init id type type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
run 80000 upto
run 10000 upto
#write_restart liggghts.restart

View File

@ -3,3 +3,7 @@ dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile
dummyfile

View File

@ -16,13 +16,15 @@ FoamFile
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 1);
internalField uniform (0 0 0.001);
boundaryField
{
wall
{
//type fixedValue;
//value uniform (0 0 0);
type slip;
}
@ -31,6 +33,7 @@ boundaryField
type fixedValue;
value uniform (0 0 1);
}
outlet
{
type zeroGradient;

View File

@ -16,7 +16,7 @@ FoamFile
dimensions [0 2 -2 0 0 0 0];
internalField uniform 1.0e5;
internalField uniform 0;
boundaryField
{
@ -36,7 +36,7 @@ boundaryField
{
//type zeroGradient;
type fixedValue;
value uniform 1.0e5;
value uniform 0;
}
}

View File

@ -32,7 +32,7 @@ boundaryField
}
outlet
{
type zeroGradient;;
type zeroGradient;
}
}

View File

@ -28,7 +28,7 @@ FoamFile
modelType B; // A or B
couplingInterval 200;
couplingInterval 100;
voidFractionModel divided;
@ -40,11 +40,11 @@ regionModel allRegion;
IOModel basicIO;
dataExchangeModel twoWayMPI;//twoWayFiles;//oneWayVTK;//
dataExchangeModel twoWayMPI;
averagingModel dilute;//dense;//
averagingModel dense;//dilute;//
clockModel off;
clockModel off;//standardClock;//
forceModels
(
@ -107,7 +107,9 @@ gradPForceProps
{
pFieldName "p";
densityFieldName "rho";
interpolation;
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation;
}
viscForceProps

View File

@ -18,19 +18,19 @@ convertToMeters 1.;
vertices
(
(0. 0 -0.1)
(0.1 0 -0.1)
(0.1 0.1 -0.1)
(0. 0.1 -0.1)
(0. 0 1.1)
(0.1 0 1.1)
(0.1 0.1 1.1)
(0. 0.1 1.1)
(0. 0 -0.5)
(0.1 0 -0.5)
(0.1 0.1 -0.5)
(0. 0.1 -0.5)
(0. 0 1.5)
(0.1 0 1.5)
(0.1 0.1 1.5)
(0. 0.1 1.5)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (2 2 22) simpleGrading (1 1 1)
hex (0 1 2 3 4 5 6 7) (2 2 33) simpleGrading (1 1 1)
);
edges

View File

@ -15,27 +15,10 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5e-03;
DT DT [ 0 2 -1 0 0 0 0 ] 2.1399e-5;//2.1399e-5; // lambda/(rho*Cp) = 0.0256/(1.188*1007)
CrossPowerLawCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
m m [ 0 0 1 0 0 0 0 ] 1;
n n [ 0 0 0 0 0 0 0 ] 1;
}
BirdCarreauCoeffs
{
nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06;
nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06;
k k [ 0 0 1 0 0 0 0 ] 0;
n n [ 0 0 0 0 0 0 0 ] 1;
}
// ************************************************************************* //

View File

@ -44,6 +44,7 @@ fprintf('final pressureDrop of sim = %f Pa\n',dp_sim(length(dp_sim)) )
%====================================%
figure(1)
plot(t_sim,dpErgun*ones(1,length(t_sim)),t_sim,dp_sim)
axis([0,0.7,0,dpErgun(length(dpErgun))])
title("Ergun pressure drop")
legend("analytical - Ergun","simulation")

View File

@ -15,7 +15,7 @@ FoamFile
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application interDyMFoam;
application cfdemSolverPisoScalar;
startFrom startTime;
@ -23,13 +23,13 @@ startTime 0;
stopAt endTime;
endTime 0.7;
endTime 1;
deltaT 0.0001;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.1;//0.002;
writeInterval 0.01;
purgeWrite 0;
@ -47,10 +47,12 @@ runTimeModifiable yes;
adjustTimeStep no;
maxCo 1;
maxCo 0.1;
maxDeltaT 1;
//libs ( "libgroovyBC.so" );
functions
(
@ -63,8 +65,8 @@ functions
name probes;
probeLocations
(
(0.05 0.05 -0.099)
(0.05 0.05 1.099)
(0.05 0.05 -0.499)
(0.05 0.05 1.499)
);
// Fields to be probed
@ -154,5 +156,4 @@ functions
factor 1;
}*/
);
// ************************************************************************* //

View File

@ -1,158 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
application interDyMFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 0.7;
deltaT 0.0001;
writeControl adjustableRunTime;
writeInterval 0.1;//0.002;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 1;
maxDeltaT 1;
functions
(
probes
{
type probes;
// Where to load it from
functionObjectLibs ( "libsampling.so" );
// Name of the directory for probe data
name probes;
probeLocations
(
(0.05 0.05 -0.099)
(0.05 0.05 1.099)
);
// Fields to be probed
fields ( p T);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
}
/*
// simpleFunctionObjects
heatFlux
{
type patchHeatFlux;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
fields // name of temp field
(
T
);
cp 1007; // cp in [J/(kg*K)]
factor 1.188; // density for incomp solvers!
}
massFlux
{
type patchMassFlow;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
factor 1.188; // density for incomp solvers!
}
pressureDrop
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
fields
(
p
);
factor 1;
}
T
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
fields // name of temp field
(
T
);
factor 1;
}*/
);
// ************************************************************************* //

View File

@ -43,7 +43,14 @@ manualCoeffs
distributed no;
roots ( );
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //

View File

@ -29,7 +29,7 @@ gradSchemes
divSchemes
{
default Gauss linear;
default Gauss linear;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
@ -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 limitedLinear 1;
div(phi,T) Gauss upwind; //limitedLinear 1;
}
laplacianSchemes

View File

@ -78,6 +78,6 @@ compute_modify thermo_temp dynamic yes
#insert the first particles so that dump is not empty
run 1
dump dmp all custom 10000 ../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 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]
run 1

View File

@ -85,6 +85,7 @@ 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