This commit is contained in:
mathiasvangoe
2018-03-01 16:42:07 +01:00
parent 1a75b56f89
commit ae6b1a7209
15 changed files with 0 additions and 2080 deletions

View File

@ -1,41 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object gradPSmooth;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -2 -2 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,41 +0,0 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object refField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
outlet
{
type zeroGradient;
}
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -1,318 +0,0 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
syncMode false;
//verbose;
useDDTvoidfraction;
modelType "A"; // A or B
couplingInterval 100;
voidFractionModel divided; //bigParticle; //trilinear; //centre; //divided;
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off; //particleProbe; //off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; //off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
//gradPForce
gradPForceSmooth
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
//surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "RASProperties";//"LESProperties";//
//===========================================================================//
// sub-model properties
localPSizeDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
dSmoothingLength 1.5e-3;
Csmoothing 1.0;
}
constDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
smoothingLength 6e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
treatForceDEM true;
}
gradPForceProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation true;
}
viscForceProps
{
velocityFieldName "U";
//interpolation false;
verbose true;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose true;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
}
GidaspowDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
phi 1;
}
DEMbasedDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation true;
}
KochHillDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
//interpolation true;
//forceSubModels
//(
// ImExCorr
//);
implForceDEM true;
//implForceDEMaccumulated true;
//explicitCorr true;
}
BeetstraDragProps
{
velFieldName "U";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
interpolation ;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
// verbose true;
}
RongDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
implForceDEM true;
implForceDEMaccumulated true;
granVelFieldName "Us";
}
virtualMassForceProps
{
velFieldName "U";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
verbose true;
}
fieldStoreProps
{
scalarFieldNames
(
);
vectorFieldNames
(
"U"
);
}
oneWayVTKProps
{
couplingFilename "vtk_out%4.4d.vtk";
maxNumberOfParticles 30000;
}
twoWayFilesProps
{
maxNumberOfParticles 10100;
}
centreProps
{
alphaMin 0.1;
}
engineProps
{
treeSearch true;
}
turboEngineM2MProps
{
turboEngineProps
{
treeSearch true;
}
}
dividedProps
{
alphaMin 0.01;
// porosity 0.5;
//interpolation true;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_equilibrate";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_equilibrate";
}
surfaceTensionForceProps
{
}
trilinearProps
{
alphaMin 0.01;
}
bigParticleProps
{
alphaMin 0.01;
maxCellsPerParticle 1000;
porosity 100.0;
}
gradPForceSmoothProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
smoothingModel "temporalSmoothing";
//smoothingModel "constDiffSmoothing";
//interpolation true;
alpha 1000.0;
temporalSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
//referenceField "p";
referenceField "p_rgh";
alpha 0.01;
}
}
}
// ************************************************************************* //

View File

@ -1,318 +0,0 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
syncMode false;
//verbose;
useDDTvoidfraction;
modelType "A"; // A or B
couplingInterval 100;
voidFractionModel divided; //bigParticle; //trilinear; //centre; //divided;
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off; //particleProbe; //off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; //off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
//gradPForce
gradPForceSmooth
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
//surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "RASProperties";//"LESProperties";//
//===========================================================================//
// sub-model properties
localPSizeDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
dSmoothingLength 1.5e-3;
Csmoothing 1.0;
}
constDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
smoothingLength 6e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
treatForceDEM true;
}
gradPForceProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation true;
}
viscForceProps
{
velocityFieldName "U";
//interpolation false;
verbose true;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose true;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
}
GidaspowDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
phi 1;
}
DEMbasedDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation true;
}
KochHillDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
//interpolation true;
//forceSubModels
//(
// ImExCorr
//);
implForceDEM true;
//implForceDEMaccumulated true;
//explicitCorr true;
}
BeetstraDragProps
{
velFieldName "U";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
interpolation ;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
// verbose true;
}
RongDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
implForceDEM true;
implForceDEMaccumulated true;
granVelFieldName "Us";
}
virtualMassForceProps
{
velFieldName "U";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
verbose true;
}
fieldStoreProps
{
scalarFieldNames
(
);
vectorFieldNames
(
"U"
);
}
oneWayVTKProps
{
couplingFilename "vtk_out%4.4d.vtk";
maxNumberOfParticles 30000;
}
twoWayFilesProps
{
maxNumberOfParticles 10100;
}
centreProps
{
alphaMin 0.1;
}
engineProps
{
treeSearch true;
}
turboEngineM2MProps
{
turboEngineProps
{
treeSearch true;
}
}
dividedProps
{
alphaMin 0.01;
// porosity 0.5;
//interpolation true;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_run";
}
surfaceTensionForceProps
{
}
trilinearProps
{
alphaMin 0.01;
}
bigParticleProps
{
alphaMin 0.01;
maxCellsPerParticle 1000;
porosity 100.0;
}
gradPForceSmoothProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
smoothingModel "temporalSmoothing";
//smoothingModel "constDiffSmoothing";
//interpolation true;
alpha 1000.0;
temporalSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
//referenceField "p";
referenceField "p_rgh";
alpha 0.01;
}
}
}
// ************************************************************************* //

View File

@ -1,70 +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 pisoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5; //60
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
libs (
);
functions
{
}
// ************************************************************************* //

View File

@ -1,70 +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 pisoFoam;
startFrom startTime;
startTime 5;
stopAt endTime;
endTime 65;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
libs (
);
functions
{
}
// ************************************************************************* //

View File

@ -1,143 +0,0 @@
###############################################
#geometry
variable cylRadius equal 0.1
variable cylHeight equal 0.08
# Radiuses of servo wall for force calculation
variable r1 equal 0.02
variable r2 equal 0.04
variable r3 equal 0.06
variable r4 equal 0.08
variable r5 equal 0.1
#particle variables
variable rho equal 1500 # particle density
# time parameters
variable dt equal 0.00005 # Time step
variable outInterval equal 0.5 # Dump interval to be consistent with controlDict
# DEM-parameters
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.45 # Poisson ratio
variable rest equal 0.3 # coefficient of restitution
variable fric equal 0.5 # coefficient of friction
variable cV equal 0.1 # characteristic velocity
variable skin equal 0.001
# variables for the servo walls
#Pressure acting on the servo wall (Pa)
variable p1 equal 800
variable p2 equal 800
variable p3 equal 800
variable p4 equal 800
variable p5 equal 800
variable A1 equal PI*${r1}^2
variable A2 equal PI*(${r2}^2-${r1}^2)
variable A3 equal PI*(${r3}^2-${r2}^2)
variable A4 equal PI*(${r4}^2-${r3}^2)
variable A5 equal PI*(${r5}^2-${r4}^2)
variable ctrlForceR1 equal -${p1}*${A1} # target value of the force
variable ctrlForceR2 equal -${p2}*${A2} # target value of the force
variable ctrlForceR3 equal -${p3}*${A3} # target value of the force
variable ctrlForceR4 equal -${p4}*${A4} # target value of the force
variable ctrlForceR5 equal -${p5}*${A5} # target value of the force
variable maxVel equal 0.25*${skin}/${dt}
# controller parameter (servo wall)
variable ctrlKp equal 1e-2
variable ctrlKi equal 0.0
variable ctrlKd equal 0.0
# particle settling loop parameters
variable vthre equal 0.01
# calculated parameters
variable dumpInterval equal ${outInterval}/${dt}
###############################################
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/fill.restart
neighbor ${skin} bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep ${dt}
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix cylWall all wall/gran model hertz tangential history primitive type 1 zcylinder 0.1 0 0
fix botWall all wall/gran model hertz tangential history primitive type 1 zplane 0
fix servoR1 all mesh/surface/stress/servo file ../DEM/stls/r1.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR1} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR2 all mesh/surface/stress/servo file ../DEM/stls/r2.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR2} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR3 all mesh/surface/stress/servo file ../DEM/stls/r3.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR3} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR4 all mesh/surface/stress/servo file ../DEM/stls/r4.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR4} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR5 all mesh/surface/stress/servo file ../DEM/stls/r5.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR5} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix walls all wall/gran model hertz tangential history mesh n_meshes 5 meshes servoR1 servoR2 servoR3 servoR4 servoR5
# change the particles density
set group all density ${rho}
# cfd coupling
fix cfd all couple/cfd couple_every 100000000 mpi
fix cfd2 all couple/cfd/force/implicit
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# center of mass
compute centerOfMass all com
# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 100
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#compute position all property/atom x y z
fix ts_check all check/timestep/gran 100 0.1 0.1
dump dmp all custom ${dumpInterval} ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump servoWall all mesh/stl ${dumpInterval} ../DEM/post/dump*.servoWall.stl servoR1 servoR2 servoR3 servoR4 servoR5
run 1

View File

@ -1,31 +0,0 @@
#!/bin/bash
#===================================================================#
# allrun script for cfdemSolverMultiphase
#===================================================================#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
nrProcs=4;
#fill with the particles
cd $casePath/DEM
mpirun -np $nrProcs liggghts < in.liggghts_fill |& tee $casePath/log_init
#Run 5 seconds of coupled simulation with closed outlet to equilibrate the system
cd $casePath/CFD
cp -r 0.org 0
cp system/controlDict.init system/controlDict
cp constant/couplingProperties.init constant/couplingProperties
setFields
decomposePar -force
mpirun -np $nrProcs cfdemSolverMultiphase -parallel |& tee $casePath/log_equilibrate
reconstructPar -latestTime
mv 5 $casePath/DEM/post/restart/
#switch the outlet boundary conditions to open for the run simulation, easier done manually or by using groovyBC...
perl -0777 -i.original -pe 's/ outlet\n {\n type zeroGradient;/ outlet\n {\n type fixedValue;\n value uniform 0;/igs' $casePath/DEM/post/restart/5/p_rgh
perl -0777 -i.original -pe 's/ outlet\n {\n type fixedValue;/ outlet\n {\n type inletOutlet;\n inletValue uniform (0 0 0);/igs' $casePath/DEM/post/restart/5/U

View File

@ -1,318 +0,0 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
syncMode false;
//verbose;
useDDTvoidfraction;
modelType "A"; // A or B
couplingInterval 100;
voidFractionModel divided; //bigParticle; //trilinear; //centre; //divided;
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off; //particleProbe; //off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; //off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
//gradPForce
gradPForceSmooth
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
//surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "RASProperties";//"LESProperties";//
//===========================================================================//
// sub-model properties
localPSizeDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
dSmoothingLength 1.5e-3;
Csmoothing 1.0;
}
constDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
smoothingLength 6e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
treatForceDEM true;
}
gradPForceProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation true;
}
viscForceProps
{
velocityFieldName "U";
//interpolation false;
verbose true;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose true;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
}
GidaspowDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
phi 1;
}
DEMbasedDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation true;
}
KochHillDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
//interpolation true;
//forceSubModels
//(
// ImExCorr
//);
implForceDEM true;
//implForceDEMaccumulated true;
//explicitCorr true;
}
BeetstraDragProps
{
velFieldName "U";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
interpolation ;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
// verbose true;
}
RongDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
implForceDEM true;
implForceDEMaccumulated true;
granVelFieldName "Us";
}
virtualMassForceProps
{
velFieldName "U";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
verbose true;
}
fieldStoreProps
{
scalarFieldNames
(
);
vectorFieldNames
(
"U"
);
}
oneWayVTKProps
{
couplingFilename "vtk_out%4.4d.vtk";
maxNumberOfParticles 30000;
}
twoWayFilesProps
{
maxNumberOfParticles 10100;
}
centreProps
{
alphaMin 0.1;
}
engineProps
{
treeSearch true;
}
turboEngineM2MProps
{
turboEngineProps
{
treeSearch true;
}
}
dividedProps
{
alphaMin 0.01;
// porosity 0.5;
//interpolation true;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_equilibrate";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_equilibrate";
}
surfaceTensionForceProps
{
}
trilinearProps
{
alphaMin 0.01;
}
bigParticleProps
{
alphaMin 0.01;
maxCellsPerParticle 1000;
porosity 100.0;
}
gradPForceSmoothProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
smoothingModel "temporalSmoothing";
//smoothingModel "constDiffSmoothing";
//interpolation true;
alpha 1000.0;
temporalSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
//referenceField "p";
referenceField "p_rgh";
alpha 0.01;
}
}
}
// ************************************************************************* //

View File

@ -1,318 +0,0 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.4 |
| \\ / A nd | Web: http://www.openfoam.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
root "";
case "";
instance "";
local "";
class dictionary;
object couplingProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//===========================================================================//
// sub-models & settings
syncMode false;
//verbose;
useDDTvoidfraction;
modelType "A"; // A or B
couplingInterval 100;
voidFractionModel divided; //bigParticle; //trilinear; //centre; //divided;
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off; //particleProbe; //off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; //off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
//gradPForce
gradPForceSmooth
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
//surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "RASProperties";//"LESProperties";//
//===========================================================================//
// sub-model properties
localPSizeDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
dSmoothingLength 1.5e-3;
Csmoothing 1.0;
}
constDiffSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
smoothingLength 6e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
treatForceDEM true;
}
gradPForceProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
//interpolation true;
}
viscForceProps
{
velocityFieldName "U";
//interpolation false;
verbose true;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose true;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
}
GidaspowDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
phi 1;
}
DEMbasedDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation true;
}
KochHillDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
//interpolation true;
//forceSubModels
//(
// ImExCorr
//);
implForceDEM true;
//implForceDEMaccumulated true;
//explicitCorr true;
}
BeetstraDragProps
{
velFieldName "U";
gravityFieldName "g";
rhoParticle 2000.;
voidfractionFieldName "voidfraction";
interpolation ;
useFilteredDragModel ;
useParcelSizeDependentFilteredDrag ;
k 0.05;
aLimit 0.0;
// verbose true;
}
RongDragProps
{
verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
implForceDEM true;
implForceDEMaccumulated true;
granVelFieldName "Us";
}
virtualMassForceProps
{
velFieldName "U";
}
particleCellVolumeProps
{
upperThreshold 0.999;
lowerThreshold 0.;
verbose true;
}
fieldStoreProps
{
scalarFieldNames
(
);
vectorFieldNames
(
"U"
);
}
oneWayVTKProps
{
couplingFilename "vtk_out%4.4d.vtk";
maxNumberOfParticles 30000;
}
twoWayFilesProps
{
maxNumberOfParticles 10100;
}
centreProps
{
alphaMin 0.1;
}
engineProps
{
treeSearch true;
}
turboEngineM2MProps
{
turboEngineProps
{
treeSearch true;
}
}
dividedProps
{
alphaMin 0.01;
// porosity 0.5;
//interpolation true;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_run";
}
surfaceTensionForceProps
{
}
trilinearProps
{
alphaMin 0.01;
}
bigParticleProps
{
alphaMin 0.01;
maxCellsPerParticle 1000;
porosity 100.0;
}
gradPForceSmoothProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
smoothingModel "temporalSmoothing";
//smoothingModel "constDiffSmoothing";
//interpolation true;
alpha 1000.0;
temporalSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
//referenceField "p";
referenceField "p_rgh";
alpha 0.01;
}
}
}
// ************************************************************************* //

View File

@ -1,70 +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 pisoFoam;
startFrom startTime;
startTime 0;
stopAt endTime;
endTime 5; //60
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
libs (
);
functions
{
}
// ************************************************************************* //

View File

@ -1,70 +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 pisoFoam;
startFrom startTime;
startTime 5;
stopAt endTime;
endTime 65;
deltaT 0.005;
writeControl adjustableRunTime;
writeInterval 0.5;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
libs (
);
functions
{
}
// ************************************************************************* //

View File

@ -1,143 +0,0 @@
###############################################
#geometry
variable cylRadius equal 0.1
variable cylHeight equal 0.08
# Radiuses of servo wall for force calculation
variable r1 equal 0.02
variable r2 equal 0.04
variable r3 equal 0.06
variable r4 equal 0.08
variable r5 equal 0.1
#particle variables
variable rho equal 1500 # particle density
# time parameters
variable dt equal 0.00005 # Time step
variable outInterval equal 0.5 # Dump interval to be consistent with controlDict
# DEM-parameters
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.45 # Poisson ratio
variable rest equal 0.3 # coefficient of restitution
variable fric equal 0.5 # coefficient of friction
variable cV equal 0.1 # characteristic velocity
variable skin equal 0.001
# variables for the servo walls
#Pressure acting on the servo wall (Pa)
variable p1 equal 800
variable p2 equal 800
variable p3 equal 800
variable p4 equal 800
variable p5 equal 800
variable A1 equal PI*${r1}^2
variable A2 equal PI*(${r2}^2-${r1}^2)
variable A3 equal PI*(${r3}^2-${r2}^2)
variable A4 equal PI*(${r4}^2-${r3}^2)
variable A5 equal PI*(${r5}^2-${r4}^2)
variable ctrlForceR1 equal -${p1}*${A1} # target value of the force
variable ctrlForceR2 equal -${p2}*${A2} # target value of the force
variable ctrlForceR3 equal -${p3}*${A3} # target value of the force
variable ctrlForceR4 equal -${p4}*${A4} # target value of the force
variable ctrlForceR5 equal -${p5}*${A5} # target value of the force
variable maxVel equal 0.25*${skin}/${dt}
# controller parameter (servo wall)
variable ctrlKp equal 1e-2
variable ctrlKi equal 0.0
variable ctrlKd equal 0.0
# particle settling loop parameters
variable vthre equal 0.01
# calculated parameters
variable dumpInterval equal ${outInterval}/${dt}
###############################################
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/fill.restart
neighbor ${skin} bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep ${dt}
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix cylWall all wall/gran model hertz tangential history primitive type 1 zcylinder 0.1 0 0
fix botWall all wall/gran model hertz tangential history primitive type 1 zplane 0
fix servoR1 all mesh/surface/stress/servo file ../DEM/stls/r1.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR1} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR2 all mesh/surface/stress/servo file ../DEM/stls/r2.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR2} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR3 all mesh/surface/stress/servo file ../DEM/stls/r3.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR3} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR4 all mesh/surface/stress/servo file ../DEM/stls/r4.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR4} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix servoR5 all mesh/surface/stress/servo file ../DEM/stls/r5.stl type 1 scale 1. com 0 0 0 ctrlPV force axis 0. 0. 1. target_val ${ctrlForceR5} vel_max ${maxVel} kp ${ctrlKp} ki ${ctrlKi} kd ${ctrlKd} #verbose no move 0.0 0.0 7.8
fix walls all wall/gran model hertz tangential history mesh n_meshes 5 meshes servoR1 servoR2 servoR3 servoR4 servoR5
# change the particles density
set group all density ${rho}
# cfd coupling
fix cfd all couple/cfd couple_every 100000000 mpi
fix cfd2 all couple/cfd/force/implicit
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# center of mass
compute centerOfMass all com
# compute total dragforce
compute dragtotal all reduce sum f_dragforce[1] f_dragforce[2] f_dragforce[3]
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3]
thermo 100
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
#compute position all property/atom x y z
fix ts_check all check/timestep/gran 100 0.1 0.1
dump dmp all custom ${dumpInterval} ../DEM/post/dump*.liggghts_run id type x y z vx vy vz fx fy fz f_dragforce[1] f_dragforce[2] f_dragforce[3] radius
dump servoWall all mesh/stl ${dumpInterval} ../DEM/post/dump*.servoWall.stl servoR1 servoR2 servoR3 servoR4 servoR5
run 1

View File

@ -1,98 +0,0 @@
###############################################
#geometry
variable cylRadius equal 0.1
variable cylHeight equal 0.08
#particle variables
variable rho equal 2500 # particle density
variable radi equal 0.003 # particle radius
variable nParticles equal 17000
# time parameters
variable totTime equal 1.0 # Total runtime in seconds
variable dt equal 0.00001
variable outInterval equal 0.1 # Dump interval to be consistent with controlDict
# DEM-parameters
variable yM equal 5.e6 # Young's modulus
variable pR equal 0.45 # Poisson ratio
variable rest equal 0.3 # coefficient of restitution
variable fric equal 0.5 # coefficient of friction
variable cV equal 0.1 # characteristic velocity
variable skin equal 0.001
# calculated parameters
variable nrIterations equal ${totTime}/${dt}
variable dumpInterval equal ${outInterval}/${dt}
variable insRate equal 2*${nParticles}/${totTime}
###############################################
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
processors 2 2 1
region reg block -${cylRadius} ${cylRadius} -${cylRadius} ${cylRadius} 0 0.15 units box
create_box 1 reg
neighbor ${skin} bin
neigh_modify delay 0
# Material properties required for granular pair styles
fix m1 all property/global youngsModulus peratomtype ${yM}
fix m2 all property/global poissonsRatio peratomtype ${pR}
fix m3 all property/global coefficientRestitution peratomtypepair 1 ${rest}
fix m4 all property/global coefficientFriction peratomtypepair 1 ${fric}
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep ${dt}
fix gravi all gravity 9.81 vector 0.0 0.0 -1.0
# walls
fix cylWall all wall/gran model hertz tangential history primitive type 1 zcylinder 0.1 0 0
fix botWall all wall/gran model hertz tangential history primitive type 1 zplane 0
fix cone all mesh/surface file ../DEM/stls/cone.stl type 1
fix walls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cone
# particle distributions and insertion
region bc cylinder z 0 0 ${cylRadius} 0.07 0.12 #${cylHeight}
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant ${rho} radius constant ${radi}
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
fix ins all insert/rate/region seed 1001 distributiontemplate pdd1 nparticles ${nParticles} particlerate ${insRate} insert_every 1000 overlapcheck yes region bc ntry_mc 10000
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# screen output
compute rke all erotate/sphere
thermo_style custom step atoms ke c_rke vol
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
compute pos all property/atom x y z
# insert the first particles so that dump is not empty
run 1
dump dmp all custom ${dumpInterval} post/dump*.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius c_pos[1] c_pos[2] c_pos[3]
dump myStl1 all stl ${dumpInterval} ../DEM/post/dump.liggghts_init*.stl
run ${nrIterations} upto
region particleRm cylinder z 0 0 ${cylRadius} 0.08 0.15
delete_atoms region particleRm
write_restart post/restart/fill.restart

View File

@ -1,31 +0,0 @@
#!/bin/bash
#===================================================================#
# allrun script for cfdemSolverMultiphase
#===================================================================#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
nrProcs=4;
#fill with the particles
cd $casePath/DEM
mpirun -np $nrProcs liggghts < in.liggghts_fill |& tee $casePath/log_init
#Run 5 seconds of coupled simulation with closed outlet to equilibrate the system
cd $casePath/CFD
cp -r 0.org 0
cp system/controlDict.init system/controlDict
cp constant/couplingProperties.init constant/couplingProperties
setFields
decomposePar -force
mpirun -np $nrProcs cfdemSolverMultiphase -parallel |& tee $casePath/log_equilibrate
reconstructPar -latestTime
mv 5 $casePath/DEM/post/restart/
#switch the outlet boundary conditions to open for the run simulation, easier done manually or by using groovyBC...
perl -0777 -i.original -pe 's/ outlet\n {\n type zeroGradient;/ outlet\n {\n type fixedValue;\n value uniform 0;/igs' $casePath/DEM/post/restart/5/p_rgh
perl -0777 -i.original -pe 's/ outlet\n {\n type fixedValue;/ outlet\n {\n type inletOutlet;\n inletValue uniform (0 0 0);/igs' $casePath/DEM/post/restart/5/U