Merge with develop.

This commit is contained in:
Thomas Lichtenegger
2018-11-13 15:42:56 +01:00
488 changed files with 60561 additions and 6010 deletions

View File

@ -0,0 +1,22 @@
#!/bin/bash
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
#- clean up case
echo "deleting data at: $casePath :\n"
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.*
touch $casePath/DEM/post/.gitignore
rm -r $casePath/CFD/0
rm $casePath/log*
echo "Remove restart file?"
echo "Enter: yes, Ctrl + C: no"
read
rm $casePath/DEM/post/restart/*.*
rm $casePath/DEM/post/restart/liggghts.restartCFDEM*

View File

@ -0,0 +1,35 @@
#!/bin/bash
#===================================================================#
# Allrun script for cfdemSolverMultiphase
#===================================================================#
#- define variables
postProcessing=false #true
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
# check if mesh was built
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
echo "mesh was built before - using old mesh"
else
echo "mesh needs to be built"
cd $casePath/CFD
blockMesh
fi
cd $casePath/CFD
cp -r 0.org 0
setFields
if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then
echo "LIGGGHTS init was run before - using existing restart file"
else
#- run DEM in new terminal
$casePath/parDEMrun.sh
fi
bash $casePath/parCFDDEMrun.sh
if [ "$postProcessing" = true ]; then
bash $casePath/postrun.sh
fi

View File

@ -0,0 +1,47 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object Ksl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
//type fixedValue;
//value uniform 0;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
atmosphere
{
type fixedValue;
value uniform (0 0 0);
}
/* frontAndBack
{
type empty;
}
outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
*/
walls
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- 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 volVectorField;
location "0";
object Us;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
//type fixedValue;
//value uniform (1 0 0);
}
/* outlet
{
type zeroGradient;
//type fixedValue;
//value uniform (1 0 0);;
}
*/
atmosphere
{
type zeroGradient;
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,59 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
);
value uniform 0;
}
atmosphere
{
type alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
);
value uniform 0;
}
/* outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,47 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient; //fixedValue;
//value uniform 0;
}
}
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,52 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.003;
boundaryField
{
walls
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.003;
}
outlet
{
type inletOutlet;
inletValue uniform 0.003;
value uniform 0.003;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type fixedValue;
value uniform 0.003;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
walls
{
type kqRWallFunction;
value uniform 0.001;
}
outlet
{
type inletOutlet;
inletValue uniform 0.001;
value uniform 0.001;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type fixedValue;
value uniform 0.001;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type nutWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type fixedFluxPressure;
value uniform 0;
}
/* outlet
{
type fixedValue;
value uniform 0;
}
*/
atmosphere
{
type fixedValue;
value uniform 0;
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 sSmoothField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 vSmoothField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object voidfraction;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type fixedValue;
value uniform 1;
}
*/
atmosphere
{
type zeroGradient; //fixedValue;
//value uniform 1;
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,281 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 50;
voidFractionModel divided;//centre;//
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; //off;// localPSizeDiffSmoothing;// constDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
gradPForce
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "turbulenceProperties"; //"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 5e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
}
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;
scaleUpVol 1.0;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_run";
}
surfaceTensionForceProps
{
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 -9.81 );
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 liggghtsCommands;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
liggghtsCommandModels
(
runLiggghts
writeLiggghts
);
// ************************************************************************* //
/*runLiggghtsProps
{
preNo false;
}*/
writeLiggghtsProps
{
writeLast off;
writeName "post/restart/liggghts.restartCFDEM";
overwrite on;
}

View File

@ -0,0 +1,21 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 4.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object motionProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
movingFvMesh staticFvMesh;
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases
(
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
}
/*
oil
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 500;
}
*/
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1; //100;
// nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
// rho rho [ 1 -3 0 0 0 0 0 ] 1;
}
);
sigmas
(
// (water oil) 0.07
(air water) 0.07
// (air oil) 0.07
);
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- 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 "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5e-04;
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

@ -0,0 +1,30 @@
/*--------------------------------*- 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 "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; //RAS;
RAS
{
RASModel laminar;
turbulence off;
printCoeffs on;
}
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// ************************************
meshGenApp blockMesh;
convertToMeters 0.01;
//64 mm column diameter
//15 cm length
//Width of middle square section
//how many cells in the square section
//how many cells from square section to perimeter
// how many cells from top to bottom
vertices
(
(0 0 0)
(20 0 0)
(20 10 0)
(0 10 0)
(0 0 30)
(20 0 30)
(20 10 30)
(0 10 30)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (40 20 60) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
atmosphere
{
type patch;
faces
(
(4 5 6 7)
);
}
/* frontAndBack
{
type empty;
faces
(
(0 1 5 4)
(4 5 9 8)
(8 9 13 12)
(3 7 6 2)
(7 11 10 6)
(11 15 14 10)
);
}
outlet
{
type patch;
faces
(
(5 6 10 9)
);
}
*/
walls
{
type wall;
faces
(
(0 3 2 1)
(0 4 7 3)
(3 7 6 2)
(1 2 6 5)
(0 1 5 4)
);
}
);
mergePatchPairs
(
);

View File

@ -0,0 +1,55 @@
/*--------------------------------*- 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 1.5;
deltaT 0.0005;
writeControl adjustableRunTime;
writeInterval 0.1;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
// ************************************************************************* //

View File

@ -0,0 +1,117 @@
/*--------------------------------*- 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 0.1;//0.01;
deltaT 0.001;
writeControl adjustableRunTime;
writeInterval 0.001;//0.01;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
libs ("libOpenFOAM.so" "libgroovyBC.so");
functions
(
probes
{
type probes;
// Where to load it from
functionObjectLibs ( "libsampling.so" );
// Name of the directory for probe data
name probes;
probeLocations
(
(0 0 0.0001)
(0 0 0.0026)
(0 0 0.0051)
(0 0 0.0076)
(0 0 0.0101)
(0 0 0.0126)
(0 0 0.0151)
(0 0 0.0176)
(0 0 0.0201)
(0 0 0.0226)
(0 0 0.0251)
(0 0 0.0276)
(0 0 0.0301)
(0 0 0.0326)
(0 0 0.0351)
(0 0 0.0375)
(0 0 0.0401)
(0 0 0.0426)
(0 0 0.0451)
(0 0 0.0476)
(0 0 0.0529)
);
// Fields to be probed
fields ( p U voidfraction volAverage_voidfraction);
// Write at same frequency as fields
outputControl timeStep;//outputTime;
outputInterval 1;
}
/*pressureDrop
{
type patchAverage;
functionObjectLibs
(
"libsimpleFunctionObjects.so"
);
verbose true;
patches
(
inlet
outlet
);
fields
(
p
);
factor 1;
}*/
);
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
//method scotch;
// method hierarchical;
method simple;
// method metis;
// method manual;
simpleCoeffs
{
n (2 2 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (2 2 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //

View File

@ -0,0 +1,33 @@
FoamFile
{
version 2.0;
format ascii;
root "/.automount/werner/Werner/bgschaid/bgschaid-foamStuff/DepositionTests";
case "neutralTest";
instance "system";
local "";
class dictionary;
object funkySetFieldsDict;
}
expressions
(
init
{
field voidfraction;
expression "1";
valuePatches 2(inlet outlet); // set value 1 at those patches
}
setGamma
{
field voidfraction;
expression "0.43";
//condition "pow(pow(pos().x-0.2,2) + pow(pos().y-0,2)+ pow(pos().z-0,2),0.5) < 0.04";
condition "pos().z < 0.01467 && pos().z > 0.0";
keepPatches true;
//valuePatches 1(inlet); // set value 1 at those patches
}
);

View File

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(gamma) Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
div((viscousTerm*dev2(grad(U).T()))) Gauss linear;
div(((grad(U)*rho)*dev(grad(U).T()))) Gauss linear;
div(((dev(grad(U).T())*rho)*dev(grad(U).T()))) Gauss linear;
div((((((alpha.water*rho)*nu.water)|(alpha.water*rho))*rho)*dev(grad(U).T()))) Gauss linear;
div(((nu*rho)*dev(grad(U).T()))) Gauss linear;
default Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
pcorr;
p_rgh;
"alpha.*";
}
// ************************************************************************* //

View File

@ -0,0 +1,76 @@
/*--------------------------------*- 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 fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}
divSchemes
{
default Gauss linear;
div(phi,U) Gauss limitedLinearV 1;
div(phi,k) Gauss limitedLinear 1;
div(phi,epsilon) Gauss limitedLinear 1;
div(phi,R) Gauss limitedLinear 1;
div(R) Gauss linear;
div(phi,nuTilda) Gauss limitedLinear 1;
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
{
default Gauss linear corrected;
laplacian(viscousTerm,U) Gauss linear corrected;
laplacian(nu,U) Gauss linear corrected;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian((voidfraction2|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}
interpolationSchemes
{
default linear;
interpolate(U) linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
p ;
}
// ************************************************************************* //

View File

@ -0,0 +1,138 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-05;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-05;
relTol 0;
maxIter 100;
}
p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0.05;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
p_rghFinal
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}
"(k|epsilon|R|nuTilda)"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-9;
relTol 0;
nSweeps 1;
}
"(voidfraction|Us|Ksl|sSmoothField|vSmoothField|UsNext|voidfractionNext)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-08;
relTol 0.1;
nSweeps 1;
}
UFinal
{
$U;
tolerance 1e-08;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,62 @@
/*--------------------------------*- 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 fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"(p)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0.1;
}
pFinal
{
solver PCG;
preconditioner DIC;
tolerance 1e-06;
relTol 0;
}
"(U|k|epsilon|R|nuTilda)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-05;
relTol 0;
}
"(voidfraction|Us|Ksl|dSmoothing|UsNext|voidfractionNext)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0;
}
}
PISO
{
nCorrectors 4;
nNonOrthogonalCorrectors 1;
pRefCell 0;
pRefValue 0;
}
// ************************************************************************* //

View File

@ -0,0 +1,41 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.air 1
volScalarFieldValue alpha.water 0
// volScalarFieldValue alpha.oil 0
// volScalarFieldValue alpha.mercury 0
volVectorFieldValue U ( 0 0 0 )
);
regions
(
boxToCell
{
box ( 0.15 0 0 ) ( 0.2 0.1 0.1 );
fieldValues
(
volScalarFieldValue alpha.water 1
volScalarFieldValue alpha.air 0
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,71 @@
# Pour granular particles into chute container, then induce flow
echo both
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
region reg block 0 0.2 0 0.1 0 0.3 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
# Material properties required for granular pair styles
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 #0.9
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5 #0.3
# 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 0.0 -1.0
# walls
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 0.3
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.2
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.1
fix xwalls3 all wall/gran model hertz tangential history primitive type 1 xplane 0.15
#fix cfdmesh all mesh/surface file ../CFD/mesh.stl type 1
#fix walls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cfdmesh
# particle distributions and insertion
#region bc block -0.05 0.05 -0.0025 0.0025 0.05 0.1 units box
region bc block 0.15 0.2 0 0.1 0 0.1 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.00135
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. -1.0 insert_every once overlapcheck yes particles_in_region 3883 region bc
# 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
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 500 post/dump*.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]
run 30000 upto
write_restart post/restart/liggghts.restart

View File

@ -0,0 +1,74 @@
# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.0005 bin
neigh_modify delay 0
# Material properties required for granular pair styles
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 #0.9
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5 #0.3
# 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 0.0 -1.0
# walls
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 0.3
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.2
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.1
#fix cfdmesh all mesh/surface file ../CFD/mesh.stl type 1
#fix walls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cfdmesh
# change the particles density
set group all density 2500
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force/implicit
#fix cfd2 all couple/cfd/force/accumulator RongDrag 10 1.5e-3
#fix cfd2 all couple/cfd/force/implicit/accumulated #CrankNicolson 0.5
# 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 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 10000 ../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 dmpStl all mesh/stl 500 ../DEM/post/dump*.stl
run 1

View File

@ -0,0 +1,29 @@
#!/bin/bash
#===================================================================#
# allrun script for testcase as part of test routine
# run damBreak CFD part
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_PROJECT_DIR/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath=$casePath
headerText="run_parallel_cfdemSolverMultiphase_test"
logfileName="log_$headerText"
solverName="cfdemSolverMultiphase"
nrProcs="4"
machineFileName="none" # yourMachinefileName | none
debugMode="off" # on | off| strict
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
#--------------------------------------------------------------------------------#
#- call function to run a parallel CFD-DEM case
parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

View File

@ -0,0 +1,29 @@
#!/bin/bash
#===================================================================#
# DEMrun script for damBreak testcase
# init damBreak
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_PROJECT_DIR/etc/functions.sh
echo "starting DEM run in parallel..."
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs=4
machineFileName="none"
debugMode="off"
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

View File

@ -0,0 +1,14 @@
#!/bin/bash
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
#- get VTK data from liggghts dump file
cd $casePath/DEM/post
python $CFDEM_LPP_DIR/lpp.py dump*.liggghts_run
#- get VTK data from CFD sim
cd $casePath/CFD
reconstructPar
foamToVTK

View File

@ -0,0 +1,9 @@
#!/bin/bash
pushd CFD
cp -r 0.org 0
setFields
popd

View File

@ -0,0 +1,19 @@
{
"type" : "CFDEMcoupling",
"runs" : [
{
"name" : "liggghts-init",
"input_script" : "DEM/in.liggghts_init",
"type" : "liggghts/serial"
},
{
"name" : "cfdemrun",
"depends_on" : "liggghts-init",
"solver" : "cfdemSolverMultiphase",
"type" : "CFDEMcoupling/mpi",
"nprocs" : 4,
"pre_scripts" : ["prerun.sh"],
"post_scripts" : ["postrun.sh"]
}
]
}

View File

@ -0,0 +1,22 @@
#!/bin/bash
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
#- clean up case
echo "deleting data at: $casePath :\n"
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
cleanCase
rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.*
touch $casePath/DEM/post/.gitignore
rm -r $casePath/CFD/0
rm $casePath/log*
echo "Remove restart file?"
echo "Enter: yes, Ctrl + C: no"
read
rm $casePath/DEM/post/restart/*.*
rm $casePath/DEM/post/restart/liggghts.restartCFDEM*

View File

@ -0,0 +1,35 @@
#!/bin/bash
#===================================================================#
# Allrun script for cfdemSolverMultiphase
#===================================================================#
#- define variables
postProcessing=true
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
# check if mesh was built
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
echo "mesh was built before - using old mesh"
else
echo "mesh needs to be built"
cd $casePath/CFD
blockMesh
fi
cd $casePath/CFD
cp -r 0.org 0
setFields
if [ -f "$casePath/DEM/post/restart/liggghts.restart" ]; then
echo "LIGGGHTS init was run before - using existing restart file"
else
#- run DEM in new terminal
$casePath/parDEMrun.sh
fi
bash $casePath/parCFDDEMrun.sh
if [ "$postProcessing" = true ]; then
bash $casePath/postrun.sh
fi

View File

@ -0,0 +1,47 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object Ksl;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -3 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
//type fixedValue;
//value uniform 0;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.x |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "0";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
atmosphere
{
type inletOutlet; //fixedValue;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
/* frontAndBack
{
type empty;
}
outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
*/
walls
{
type fixedValue;
value uniform (0 0 0);
}
}
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- 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 volVectorField;
location "0";
object Us;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -1 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
//type fixedValue;
//value uniform (1 0 0);
}
/* outlet
{
type zeroGradient;
//type fixedValue;
//value uniform (1 0 0);;
}
*/
atmosphere
{
type zeroGradient;
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,55 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type alphaContactAngle;
thetaProperties
(
( water air ) 90 0 0 0
);
value uniform 0;
}
atmosphere
{
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
/* outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform 1;
value uniform 1;
}
frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
//type zeroGradient;
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type inletOutlet;
inletValue uniform 0;
value uniform 0;
}
}
// ************************************************************************* //

View File

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

View File

@ -0,0 +1,52 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object epsilon;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -3 0 0 0 0];
internalField uniform 0.003;
boundaryField
{
walls
{
type epsilonWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0.003;
}
outlet
{
type inletOutlet;
inletValue uniform 0.003;
value uniform 0.003;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type fixedValue;
value uniform 0.003;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -2 0 0 0 0];
internalField uniform 0.001;
boundaryField
{
walls
{
type kqRWallFunction;
value uniform 0.001;
}
outlet
{
type inletOutlet;
inletValue uniform 0.001;
value uniform 0.001;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type fixedValue;
value uniform 0.001;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,51 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object nut;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 2 -1 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type nutWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
outlet
{
type calculated;
value uniform 0;
}
/* frontAndBack
{
type empty;
}
*/
atmosphere
{
type calculated;
value uniform 0;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,56 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [1 -1 -2 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient; //fixedFluxPressure;
//value uniform 0;
}
/* outlet
{
type fixedValue;
value uniform 0;
}
*/
atmosphere
{
type fixedValue;
value uniform 0;
/* type totalPressure;
p0 uniform 0;
U U;
phi phi;
rho rho;
psi none;
gamma 1;
value uniform 0;*/
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 sSmoothField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform 0;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,45 @@
/*--------------------------------*- 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 vSmoothField;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 0 0 0 0 0];
internalField uniform (0 0 0);
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type zeroGradient;
}
frontAndBack
{
type empty;
}
*/
atmosphere
{
type zeroGradient;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,48 @@
/*--------------------------------*- 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 volScalarField;
location "0";
object voidfraction;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 0 0 0 0 0 0];
internalField uniform 1;
boundaryField
{
walls
{
type zeroGradient;
}
/* outlet
{
type fixedValue;
value uniform 1;
}
*/
atmosphere
{
type fixedValue;
value uniform 1;
}
/* frontAndBack
{
type empty;
}
*/
}
// ************************************************************************* //

View File

@ -0,0 +1,281 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 10;
voidFractionModel divided;//centre;//
locateModel engine;//turboEngineM2M;//
meshMotionModel noMeshMotion;
regionModel allRegion;
IOModel basicIO;
probeModel off;
dataExchangeModel twoWayMPI;//twoWayFiles;//twoWayM2M;//oneWayVTK;//
averagingModel dense;//dilute;//
clockModel standardClock;//off;
smoothingModel constDiffSmoothing; // off;// localPSizeDiffSmoothing; //
forceModels
(
//GidaspowDrag
//BeetstraDrag
//DiFeliceDrag
gradPForce
viscForce
KochHillDrag
//interface
//DEMbasedDrag
//RongDrag
//Archimedes
//volWeightedAverage
//totalMomentumExchange
//particleCellVolume
//fieldTimeAverage
surfaceTensionForce
);
momCoupleModels
(
implicitCouple
);
turbulenceModelType "turbulenceProperties"; //"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 1.5e-3;
}
implicitCoupleProps
{
velFieldName "U";
granVelFieldName "Us";
voidfractionFieldName "voidfraction";
}
ArchimedesProps
{
gravityFieldName "g";
}
gradPForceProps
{
pFieldName "p";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
interpolation true;
}
viscForceProps
{
velocityFieldName "U";
interpolation false;
verbose false;
}
volWeightedAverageProps
{
scalarFieldNames
(
voidfraction
);
vectorFieldNames
(
);
upperThreshold 0.999;
lowerThreshold 0;
verbose true;
}
totalMomentumExchangeProps
{
implicitMomExFieldName "Ksl";
explicitMomExFieldName "none";
fluidVelFieldName "U";
granVelFieldName "Us";
}
GidaspowDragProps
{
verbose false;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation true;
phi 1;
granVelFieldName "Us";
}
DEMbasedDragProps
{
velFieldName "U";
voidfractionFieldName "voidfraction";
}
DiFeliceDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
granVelFieldName "Us";
interpolation true;
}
KochHillDragProps
{
//verbose true;
velFieldName "U";
voidfractionFieldName "voidfraction";
interpolation false;
//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.3;
//scaleUpVol 1.0;
}
twoWayMPIProps
{
liggghtsPath "../DEM/in.liggghts_run";
}
twoWayM2MProps
{
maxNumberOfParticles 10100;
liggghtsPath "../DEM/in.liggghts_run";
}
surfaceTensionForceProps
{
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 -9.8 );
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 liggghtsCommands;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
liggghtsCommandModels
(
runLiggghts
writeLiggghts
);
// ************************************************************************* //
/*runLiggghtsProps
{
preNo false;
}*/
writeLiggghtsProps
{
writeLast off;
writeName "post/restart/liggghts.restartCFDEM";
overwrite on;
}

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
phases
(
water
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 1000;
}
/*
oil
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-06;
rho rho [ 1 -3 0 0 0 0 0 ] 500;
}
*/
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1; //100;
// nu nu [ 0 2 -1 0 0 0 0 ] 1.48e-05;
// rho rho [ 1 -3 0 0 0 0 0 ] 1;
}
);
sigmas
(
// (water oil) 0.07
(air water) 0.07
// (air oil) 0.07
);
// ************************************************************************* //

View File

@ -0,0 +1,37 @@
/*--------------------------------*- 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 "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5e-04;
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

@ -0,0 +1,21 @@
/*--------------------------------*- 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 "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar; //RASModel;
// ************************************************************************* //

View File

@ -0,0 +1,110 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.0 |
| \\ / A nd | Web: http://www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// ************************************
meshGenApp blockMesh;
convertToMeters 0.01;
//64 mm column diameter
//15 cm length
//Width of middle square section
//how many cells in the square section
//how many cells from square section to perimeter
// how many cells from top to bottom
vertices
(
(0 0 0)
(5 0 0)
(5 5 0)
(0 5 0)
(0 0 20)
(5 0 20)
(5 5 20)
(0 5 20)
);
blocks
(
hex (0 1 2 3 4 5 6 7) (16 16 64) simpleGrading (1 1 1)
);
edges
(
);
boundary
(
atmosphere
{
type patch;
faces
(
(4 5 6 7)
);
}
/* frontAndBack
{
type empty;
faces
(
(0 1 5 4)
(4 5 9 8)
(8 9 13 12)
(3 7 6 2)
(7 11 10 6)
(11 15 14 10)
);
}
outlet
{
type patch;
faces
(
(5 6 10 9)
);
}
*/
walls
{
type wall;
faces
(
(0 3 2 1)
(0 4 7 3)
(3 7 6 2)
(1 2 6 5)
(0 1 5 4)
);
}
);
mergePatchPairs
(
);

View File

@ -0,0 +1,74 @@
/*--------------------------------*- 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 1.0;
deltaT 0.0001;
writeControl adjustableRunTime;
writeInterval 0.01;
purgeWrite 0;
writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
adjustTimeStep no;
maxCo 0.1;
maxAlphaCo 0.1;
/*
libs (
"libOpenFOAM.so"
"libsimpleSwakFunctionObjects.so"
"libswakFunctionObjects.so"
);
functions
{
volFlow
{
type swakExpression;
valueType patch;
patchName atmosphere;
verbose true;
expression "U&Sf()";
accumulations ( sum );
outputInterval 500;
}
}
*/
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
//method scotch;
// method hierarchical;
method simple;
// method metis;
// method manual;
simpleCoeffs
{
n (2 2 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (2 2 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //

View File

@ -0,0 +1,69 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(gamma) Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss upwind;
div((interpolate(rho)*phi),U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
div((viscousTerm*dev2(grad(U).T()))) Gauss linear;
div(((grad(U)*rho)*dev(grad(U).T()))) Gauss linear;
div(((dev(grad(U).T())*rho)*dev(grad(U).T()))) Gauss linear;
div((((((alpha.water*rho)*nu.water)|(alpha.water*rho))*rho)*dev(grad(U).T()))) Gauss linear;
div(((nu*rho)*dev(grad(U).T()))) Gauss linear;
default Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
pcorr;
p_rgh;
"alpha.*";
}
// ************************************************************************* //

View File

@ -0,0 +1,138 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-05;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-05;
relTol 0;
maxIter 100;
}
p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0.05;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
p_rghFinal
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}
"(k|epsilon|R|nuTilda)"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-9;
relTol 0;
nSweeps 1;
}
"(voidfraction|Us|Ksl|sSmoothField|vSmoothField|UsNext|voidfractionNext)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-08;
relTol 0.1;
nSweeps 1;
}
UFinal
{
$U;
tolerance 1e-08;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,36 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
interpolationScheme cellPoint;
setFormat raw;
sets
(
data
{
type uniform;
axis z;
start (0.025 0.025 0.2);
end (0.025 0.025 0);
nPoints 1000;
}
);
fields (alpha.air);
// ************************************************************************* //

View File

@ -0,0 +1,50 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.air 1
volScalarFieldValue alpha.water 0
// volScalarFieldValue alpha.oil 0
// volScalarFieldValue alpha.mercury 0
volVectorFieldValue U ( 0 0 0 )
);
regions
(
boxToCell
{
box ( 0 0 0 ) ( 0.05 0.05 0.05 );
fieldValues
(
volScalarFieldValue alpha.water 1
volScalarFieldValue alpha.air 0
);
}
/* boxToCell
{
box ( 0.005 0.005 0.05 ) ( 0.045 0.045 0.1 );
fieldValues
(
volScalarFieldValue voidfraction 0.35
);
}
*/
);
// ************************************************************************* //

View File

@ -0,0 +1,72 @@
# Pour granular particles into chute container, then induce flow
echo both
atom_style granular
atom_modify map array
communicate single vel yes
boundary f f f
newton off
units si
region reg block 0 0.05 0 0.05 0 0.2 units box
create_box 1 reg
neighbor 0.001 bin
neigh_modify delay 0
# Material properties required for granular pair styles
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 #0.9
fix m4 all property/global coefficientFriction peratomtypepair 1 0.5 #0.3
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.8 vector 0.0 0.0 -1.0
# walls
fix zwalls1 all wall/gran model hertz tangential history primitive type 1 zplane 0.05
fix zwalls2 all wall/gran model hertz tangential history primitive type 1 zplane 0.2
fix xwalls1 all wall/gran model hertz tangential history primitive type 1 xplane 0.005
fix xwalls2 all wall/gran model hertz tangential history primitive type 1 xplane 0.045
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0.005
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.045
#fix cfdmesh all mesh/surface file ../CFD/mesh.stl type 1
#fix walls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cfdmesh
# particle distributions and insertion
#region bc block -0.05 0.05 -0.0025 0.0025 0.05 0.1 units box
region bc block 0.005 0.045 0.005 0.045 0.05 0.15 units box
fix pts1 all particletemplate/sphere 1 atom_type 1 density constant 2500 radius constant 0.001
fix pdd1 all particledistribution/discrete 1 1 pts1 1.0
fix ins all insert/pack seed 100001 distributiontemplate pdd1 vel constant 0. 0. 0. insert_every once overlapcheck yes particles_in_region 10000 region bc
# apply nve integration to all particles that are inserted as single particles
fix integr all nve/sphere
# screen output
compute rke all erotate/sphere
#compute mp all property/atom mass
#compute mpA all reduce ave c_mp
thermo_style custom step atoms ke c_rke vol #c_mpA
thermo 1000
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
# insert the first particles so that dump is not empty
run 1
dump dmp all custom 500 post/dump*.liggghts_init id type x y z ix iy iz vx vy vz fx fy fz omegax omegay omegaz radius
#force : f_couple_cfd[0] f_couple_cfd[1] f_couple_cfd[2]
#node : f_couple_cfd[6]
#cell id : f_couple_cfd[7]
run 35000 upto
write_restart post/restart/liggghts.restart

View File

@ -0,0 +1,76 @@
# Pour granular particles into chute container, then induce flow
log ../DEM/log.liggghts
thermo_log ../DEM/post/thermo.txt
atom_style granular
atom_modify map array
communicate single vel yes
boundary m m m
newton off
units si
processors 2 2 1
# read the restart file
read_restart ../DEM/post/restart/liggghts.restart
neighbor 0.005 bin
neigh_modify delay 0
# Material properties required for granular pair styles
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
# pair style
pair_style gran model hertz tangential history # Hertzian without cohesion
pair_coeff * *
# timestep, gravity
timestep 0.00001
fix gravi all gravity 9.8 vector 0.0 0.0 -1.0
# walls
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 0.2
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.05
fix ywalls1 all wall/gran model hertz tangential history primitive type 1 yplane 0
fix ywalls2 all wall/gran model hertz tangential history primitive type 1 yplane 0.05
#fix cfdmesh all mesh/surface file ../CFD/mesh.stl type 1
#fix walls all wall/gran model hertz tangential history mesh n_meshes 1 meshes cfdmesh
# change the particles density
set group all density 2500
# cfd coupling
fix cfd all couple/cfd couple_every 100 mpi
fix cfd2 all couple/cfd/force/implicit
#fix cfd2 all couple/cfd/force/accumulator RongDrag 10 1.5e-3
#fix cfd2 all couple/cfd/force/implicit/accumulated #CrankNicolson 0.5
# 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
compute mp all property/atom diameter
compute particleMassTotal all reduce ave c_mp
thermo_style custom step atoms ke c_rke vol c_centerOfMass[3] c_dragtotal[1] c_dragtotal[2] c_dragtotal[3] c_particleMassTotal
thermo 10
thermo_modify lost ignore norm no
compute_modify thermo_temp dynamic yes
dump dmp all custom 1000 ../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 dmpStl all mesh/stl 500 ../DEM/post/dump*.stl
run 1

View File

@ -0,0 +1,29 @@
#!/bin/bash
#===================================================================#
# allrun script for testcase as part of test routine
# run particlesWaterEntry CFD part
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_PROJECT_DIR/etc/functions.sh
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath=$casePath
headerText="run_parallel_cfdemSolverMultiphase_test"
logfileName="log_$headerText"
solverName="cfdemSolverMultiphase"
nrProcs="4"
machineFileName="none" # yourMachinefileName | none
debugMode="off" # on | off| strict
testHarnessPath="$CFDEM_TEST_HARNESS_PATH"
#--------------------------------------------------------------------------------#
#- call function to run a parallel CFD-DEM case
parCFDDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

View File

@ -0,0 +1,29 @@
#!/bin/bash
#===================================================================#
# DEMrun script for particlesWaterEntry testcase
# init particlesWaterEntry
#===================================================================#
#- source CFDEM env vars
. ~/.bashrc
#- include functions
source $CFDEM_PROJECT_DIR/etc/functions.sh
echo "starting DEM run in parallel..."
#--------------------------------------------------------------------------------#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
logpath="$casePath"
headerText="run_liggghts_init_DEM"
logfileName="log_$headerText"
solverName="in.liggghts_init"
nrProcs=4
machineFileName="none"
debugMode="off"
#--------------------------------------------------------------------------------#
#- call function to run DEM case
parDEMrun $logpath $logfileName $casePath $headerText $solverName $nrProcs $machineFileName $debugMode

View File

@ -0,0 +1,14 @@
#!/bin/bash
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
#- get VTK data from liggghts dump file
cd $casePath/DEM/post
python $CFDEM_LPP_DIR/lpp.py dump*.liggghts_run
#- get VTK data from CFD sim
cd $casePath/CFD
reconstructPar
foamToVTK

View File

@ -0,0 +1,9 @@
#!/bin/bash
pushd CFD
cp -r 0.org 0
setFields
popd

View File

@ -0,0 +1,19 @@
{
"type" : "CFDEMcoupling",
"runs" : [
{
"name" : "liggghts-init",
"input_script" : "DEM/in.liggghts_init",
"type" : "liggghts/serial"
},
{
"name" : "cfdemrun",
"depends_on" : "liggghts-init",
"solver" : "cfdemSolverMultiphase",
"type" : "CFDEMcoupling/mpi",
"nprocs" : 4,
"pre_scripts" : ["prerun.sh"],
"post_scripts" : ["postrun.sh"]
}
]
}

View File

@ -0,0 +1,26 @@
#!/bin/bash
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
#- clean up case
echo "deleting data at: $casePath :\n"
source $WM_PROJECT_DIR/bin/tools/CleanFunctions
cd $casePath/CFD
mv 1.org ..
cleanCase
mv ../1.org .
rm -r $casePath/CFD/clockData
rm $casePath/DEM/post/*.*
touch $casePath/DEM/post/.gitignore
rm $casePath/log*
rm $casePath/DEM/log*
#rm -r $casePath/CFD/0
#echo "Remove restart files?"
#echo "Enter: yes, Ctrl + C: no"
#read
#rm $casePath/DEM/post/restart/*.*

View File

@ -0,0 +1,28 @@
#!/bin/bash
#===================================================================#
# This tutorial runs a drainage simulation of a small-scale blast
# furnace hearth from an initial state generated from ../init
#===================================================================#
#- define variables
casePath="$(dirname "$(readlink -f ${BASH_SOURCE[0]})")"
nrProcs=4;
# check if mesh was built
if [ -f "$casePath/CFD/constant/polyMesh/points" ]; then
echo "mesh was built before - using old mesh"
else
echo "mesh needs to be built"
cd $casePath/CFD
./mesh.sh
fi
#run the drainage simulation
cd $casePath
cp -r ./CFD/1.org ./CFD/1
./parCFDDEMrun.sh
# generate files for post processing
cd $casePath
./postrun.sh

View File

@ -0,0 +1,25 @@
/*--------------------------------*- 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 "constant";
object RASProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
RASModel laminar;
turbulence off;
printCoeffs on;
// ************************************************************************* //

View File

@ -0,0 +1,314 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 "turbulenceProperties"; //"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_rgh";
voidfractionFieldName "voidfraction";
velocityFieldName "U";
smoothingModel "temporalSmoothing";
temporalSmoothingProps
{
lowerLimit 0.1;
upperLimit 1e10;
refField "p_rgh";
gamma 0.01;
}
}
}
// ************************************************************************* //

View File

@ -0,0 +1,22 @@
/*--------------------------------*- 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 uniformDimensionedVectorField;
location "constant";
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions [0 1 -2 0 0 0 0];
value ( 0 0 -9.81 );
// ************************************************************************* //

View File

@ -0,0 +1,43 @@
/*---------------------------------------------------------------------------*\
| ========= | |
| \\ / 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 liggghtsCommands;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
liggghtsCommandModels
(
runLiggghts
writeLiggghts
);
// ************************************************************************* //
/*runLiggghtsProps
{
preNo false;
}*/
writeLiggghtsProps
{
writeLast on;
writeName "post/restart/liggghts.restartCFDEM";
overwrite on;
}

View File

@ -0,0 +1,146 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// User-defined parameters
convertToMeters 1;
//degrees from x-axis
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Derived parameters
vertices
(
(-0.05 0.05 0) //Square 11 o'clock,bottom //0
(0.05 0.05 0) //Square 1 o'clock,bottom //1
(0.05 -0.05 0) //Square 5 o'clock,bottom //2
(-0.05 -0.05 0) //Square 7 o'clock,bottom //3
(-0.0707106781186548 0.0707106781186548 0) //Cyl 11 o'clock,bottom //4
(0.0707106781186548 0.0707106781186548 0) //Cyl 1 o'clock,bottom //5
(0.0707106781186548 -0.0707106781186548 0) //Cyl 5 o'clock,bottom //6
(-0.0707106781186548 -0.0707106781186548 0) //Cyl 7 o'clock,bottom //7
(-0.05 0.05 0.08) //Square 11 o'clock,top //8
(0.05 0.05 0.08) //Square 1 o'clock,top //9
(0.05 -0.05 0.08) //Square 5 o'clock,top //10
(-0.05 -0.05 0.08) //Square 7 o'clock,top //11
(-0.0707106781186548 0.0707106781186548 0.08) //Cyl 11 o'clock,top //12
(0.0707106781186548 0.0707106781186548 0.08) //Cyl 1 o'clock,top //13
(0.0707106781186548 -0.0707106781186548 0.08) //Cyl 5 o'clock,top //14
(-0.0707106781186548 -0.0707106781186548 0.08) //Cyl 7 o'clock,top //15
);
blocks
(
hex (3 2 1 0 11 10 9 8) (8 8 6) simpleGrading (1 1 1) //Mid-block
hex (7 3 0 4 15 11 8 12) (3 8 6) simpleGrading (1 1 1) //west-block
hex (0 1 5 4 8 9 13 12) (8 3 6) simpleGrading (1 1 1) //north-block
hex (2 6 5 1 10 14 13 9) (3 8 6) simpleGrading (1 1 1) //east-block
hex (7 6 2 3 15 14 10 11) (8 3 6) simpleGrading (1 1 1) //south-block
);
edges
(
arc 7 4 (-0.1 0 0) //west,bottom
arc 4 5 (0 0.1 0) //north,bottom
arc 5 6 (0.1 0 0) //east,bottom
arc 6 7 (0 -0.1 0) //south,bottom
arc 15 12 (-0.1 0 0.08) //west,top
arc 12 13 (0 0.1 0.08) //north,top
arc 13 14 (0.1 0 0.08) //east,top
arc 14 15 (0 -0.1 0.08) //south,top
);
boundary
(
atmosphere
{
type patch;
faces
(
(8 11 10 9)
(8 12 15 11)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
);
}
walls
{
type wall;
faces
(
//Bottom
(0 1 2 3)
(0 3 7 4)
(4 5 1 0)
(2 1 5 6)
(2 6 7 3)
//West
(15 12 4 7)
//North
(12 13 5 4)
//East
(13 14 6 5)
//South
(14 15 7 6)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,148 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros
changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// User-defined parameters
convertToMeters 1;
define(cylRadius, 0.1)
define(cylHeight, 0.08)
define(sqSide, 0.1)
define(outletSize, 0.02)
define(outletStartZ, 0.04)
define(outletAngularPos, 2.5) //degrees from x-axis
define(sqCells1D, 8)
define(cylCellsRadial, 3)
define(cellsZ, 6)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Derived parameters
define(sqHalf, calc(sqSide/2))
define(sq11x, calc(-sqHalf))
define(sq11y, calc(sqHalf))
define(sq1x, calc(sqHalf))
define(sq1y, calc(sqHalf))
define(sq5x, calc(sqHalf))
define(sq5y, calc(-sqHalf))
define(sq7x, calc(-sqHalf))
define(sq7y, calc(-sqHalf))
define(c11x, calc(-cylRadius*cos(pi/4)))
define(c11y, calc(cylRadius*sin(pi/4)))
define(c1x, calc(cylRadius*cos(pi/4)))
define(c1y, calc(cylRadius*sin(pi/4)))
define(c5x, calc(cylRadius*cos(pi/4)))
define(c5y, calc(-cylRadius*sin(pi/4)))
define(c7x, calc(-cylRadius*cos(pi/4)))
define(c7y, calc(-cylRadius*sin(pi/4)))
define(ipNy, calc(cylRadius))
define(ipSy, calc(-cylRadius))
define(ipWx, calc(-cylRadius))
define(ipEx, calc(cylRadius))
vertices
(
(sq11x sq11y 0) //Square 11 o'clock,bottom //0
(sq1x sq1y 0) //Square 1 o'clock,bottom //1
(sq5x sq5y 0) //Square 5 o'clock,bottom //2
(sq7x sq7y 0) //Square 7 o'clock,bottom //3
(c11x c11y 0) //Cyl 11 o'clock,bottom //4
(c1x c1y 0) //Cyl 1 o'clock,bottom //5
(c5x c5y 0) //Cyl 5 o'clock,bottom //6
(c7x c7y 0) //Cyl 7 o'clock,bottom //7
(sq11x sq11y cylHeight) //Square 11 o'clock,top //8
(sq1x sq1y cylHeight) //Square 1 o'clock,top //9
(sq5x sq5y cylHeight) //Square 5 o'clock,top //10
(sq7x sq7y cylHeight) //Square 7 o'clock,top //11
(c11x c11y cylHeight) //Cyl 11 o'clock,top //12
(c1x c1y cylHeight) //Cyl 1 o'clock,top //13
(c5x c5y cylHeight) //Cyl 5 o'clock,top //14
(c7x c7y cylHeight) //Cyl 7 o'clock,top //15
);
blocks
(
hex (3 2 1 0 11 10 9 8) (sqCells1D sqCells1D cellsZ) simpleGrading (1 1 1) //Mid-block
hex (7 3 0 4 15 11 8 12) (cylCellsRadial sqCells1D cellsZ) simpleGrading (1 1 1) //west-block
hex (0 1 5 4 8 9 13 12) (sqCells1D cylCellsRadial cellsZ) simpleGrading (1 1 1) //north-block
hex (2 6 5 1 10 14 13 9) (cylCellsRadial sqCells1D cellsZ) simpleGrading (1 1 1) //east-block
hex (7 6 2 3 15 14 10 11) (sqCells1D cylCellsRadial cellsZ) simpleGrading (1 1 1) //south-block
);
edges
(
arc 7 4 (ipWx 0 0) //west,bottom
arc 4 5 (0 ipNy 0) //north,bottom
arc 5 6 (ipEx 0 0) //east,bottom
arc 6 7 (0 ipSy 0) //south,bottom
arc 15 12 (ipWx 0 cylHeight) //west,top
arc 12 13 (0 ipNy cylHeight) //north,top
arc 13 14 (ipEx 0 cylHeight) //east,top
arc 14 15 (0 ipSy cylHeight) //south,top
);
boundary
(
atmosphere
{
type patch;
faces
(
(8 11 10 9)
(8 12 15 11)
(8 9 13 12)
(9 10 14 13)
(10 11 15 14)
);
}
walls
{
type wall;
faces
(
//Bottom
(0 1 2 3)
(0 3 7 4)
(4 5 1 0)
(2 1 5 6)
(2 6 7 3)
//West
(15 12 4 7)
//North
(12 13 5 4)
//East
(13 14 6 5)
//South
(14 15 7 6)
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "constant";
object transportProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
//Properties from https://www.jstage.jst.go.jp/article/tetsutohagane/100/8/100_925/_pdf
phases
(
iron
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5e-07;
rho rho [ 1 -3 0 0 0 0 0 ] 6700;
}
slag
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.5e-04;
rho rho [ 1 -3 0 0 0 0 0 ] 2600;
}
air
{
transportModel Newtonian;
nu nu [ 0 2 -1 0 0 0 0 ] 1.3e-05;
rho rho [ 1 -3 0 0 0 0 0 ] 1.5;
}
);
sigmas
(
(iron slag) 0.07 //??
(iron air) 0.07 //??
(slag air) 0.07 //??
);
// ************************************************************************* //

View File

@ -0,0 +1,21 @@
/*--------------------------------*- 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 "constant";
object turbulenceProperties;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
simulationType laminar;
// ************************************************************************* //

View File

@ -0,0 +1,7 @@
#!/bin/bash
m4 constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict
m4 system/topoSetDict.m4 > system/topoSetDict
blockMesh
topoSet
createPatch -overwrite

View File

@ -0,0 +1,70 @@
/*--------------------------------*- 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 1;
stopAt endTime;
endTime 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

@ -0,0 +1,32 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object createPatchDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
pointSync false;
patches
(
{
name outlet;
patchInfo
{
type patch;
}
constructFrom set;
set outlet;
}
);
// ************************************************************************* //

View File

@ -0,0 +1,86 @@
/*-------------------------------*- C++ -*---------------------------------*\
| ========= |
| \\ / OpenFOAM |
| \\ / |
| \\ / The Open Source CFD Toolbox |
| \\/ http://www.OpenFOAM.org |
\*-------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
note "mesh decomposition control dictionary";
location "system";
object decomposeParDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
numberOfSubdomains 4;
//- Keep owner and neighbour on same processor for faces in zones:
// preserveFaceZones (heater solid1 solid3);
//method scotch;
// method hierarchical;
method simple;
// method metis;
// method manual;
simpleCoeffs
{
n (2 2 1);
delta 0.001;
}
hierarchicalCoeffs
{
n (2 2 1);
delta 0.001;
order xyz;
}
metisCoeffs
{
/*
processorWeights
(
1
1
1
1
);
*/
}
scotchCoeffs
{
//processorWeights
//(
// 1
// 1
// 1
// 1
//);
//writeGraph true;
//strategy "b";
}
manualCoeffs
{
dataFile "decompositionData";
}
//// Is the case distributed
//distributed yes;
//// Per slave (so nProcs-1 entries) the directory above the case.
//roots
//(
// "/tmp"
// "/tmp"
//);
// ************************************************************************* //

View File

@ -0,0 +1,52 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object funkySetFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
initVariables
(
"initIronLevel=0.04;"
"initSlagLevel=0.07;"
);
expressions
(
initAir
{
variables $initVariables;
field alpha.air;
expression "1";
condition "pos().z > initSlagLevel";
keepPatches 1; //keep boundary conditions
}
initIron
{
variables $initVariables;
field alpha.iron;
expression "1";
condition "pos().z <= initIronLevel";
keepPatches 1; //keep boundary conditions
}
initSlag
{
variables $initVariables;
field alpha.slag;
expression "1";
condition "pos().z > initIronLevel && pos().z <= initSlagLevel";
keepPatches 1; //keep boundary conditions
}
);
// ************************************************** *********************** //

View File

@ -0,0 +1,68 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
ddtSchemes
{
default Euler;
}
gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(gamma) Gauss linear;
}
divSchemes
{
div(rhoPhi,U) Gauss upwind;
div(phi,alpha) Gauss vanLeer;
div(phirb,alpha) Gauss linear;
div((muEff*dev(T(grad(U))))) Gauss linear;
div((viscousTerm*dev2(grad(U).T()))) Gauss linear;
div(((grad(U)*rho)*dev(grad(U).T()))) Gauss linear;
div(((dev(grad(U).T())*rho)*dev(grad(U).T()))) Gauss linear;
div((((((alpha.water*rho)*nu.water)|(alpha.water*rho))*rho)*dev(grad(U).T()))) Gauss linear;
div(((nu*rho)*dev(grad(U).T()))) Gauss linear;
default Gauss linear;
}
laplacianSchemes
{
default Gauss linear corrected;
}
interpolationSchemes
{
default linear;
}
snGradSchemes
{
default corrected;
}
fluxRequired
{
default no;
pcorr;
p_rgh;
"alpha.*";
}
// ************************************************************************* //

View File

@ -0,0 +1,138 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
solvers
{
"alpha.*"
{
nAlphaSubCycles 1;
cAlpha 1;
}
pcorr
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-05;
relTol 0;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-05;
relTol 0;
maxIter 100;
}
p_rgh
{
solver GAMG;
tolerance 1e-07;
relTol 0.05;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
"(p_rghFinal|pSmoothFinal)"
{
solver PCG;
preconditioner
{
preconditioner GAMG;
tolerance 1e-07;
relTol 0;
nVcycles 2;
smoother GaussSeidel;
nPreSweeps 0;
nPostSweeps 2;
nFinestSweeps 2;
cacheAgglomeration on;
nCellsInCoarsestLevel 10;
agglomerator faceAreaPair;
mergeLevels 1;
}
tolerance 1e-07;
relTol 0;
maxIter 20;
}
"(k|epsilon|R|nuTilda)"
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-9;
relTol 0;
nSweeps 1;
}
"(voidfraction|Us|Ksl|vSmoothField|sSmoothField|UsNext|voidfractionNext|pSmooth)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-05;
relTol 0;
}
U
{
solver smoothSolver;
smoother GaussSeidel;
tolerance 1e-08;
relTol 0.1;
nSweeps 1;
}
UFinal
{
$U;
tolerance 1e-08;
relTol 0;
}
}
PIMPLE
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
}
relaxationFactors
{
fields
{
}
equations
{
"U.*" 1;
}
}
// ************************************************************************* //

View File

@ -0,0 +1,53 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
defaultFieldValues
(
volScalarFieldValue alpha.air 1
volScalarFieldValue alpha.iron 0
volScalarFieldValue alpha.slag 0
);
regions
(
cylinderToCell
{
p1 (0 0 0); //center point, min
p2 (0 0 0.04); //center point, max
radius 0.1;
fieldValues
(
volScalarFieldValue alpha.iron 1
volScalarFieldValue alpha.air 0
);
}
cylinderToCell
{
p1 (0 0 0.04); //center point, min
p2 (0 0 0.07); //center point, max
radius 0.1;
fieldValues
(
volScalarFieldValue alpha.slag 1
volScalarFieldValue alpha.air 0
);
}
);
// ************************************************************************* //

View File

@ -0,0 +1,75 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// User-defined parameters
//degrees from x-axis
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Derived parameters
actions
(
{
name c_out;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (0.0899048221581858 -0.0056380612634664 0.04)(0.109904822158186 0.0143619387365336 0.06);
}
}
{
name outlet;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "wall";
}
}
{
name outlet;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set c_out;
option all;
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,77 @@
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2.3.0 |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object topoSetDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// General m4 macros
changecom(//)changequote([,]) dnl>
define(calc, [esyscmd(perl -e 'use Math::Trig; print ($1)')]) dnl>
define(VCOUNT, 0)
define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))])
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// User-defined parameters
define(cylRadius, 0.1)
define(cylHeight, 0.08)
define(sqSide, 0.1)
define(outletSize, 0.02)
define(outletStartZ, 0.04)
define(outletAngularPos, 2.5) //degrees from x-axis
define(sqCells1D, 8)
define(cylCellsRadial, 3)
define(cellsZ, 6)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Derived parameters
define(midPointX, calc(cylRadius*cos(outletAngularPos*pi/180)))
define(midPointY, calc(cylRadius*sin(outletAngularPos*pi/180)))
actions
(
{
name c_out;
type cellSet;
action new;
source boxToCell;
sourceInfo
{
box (calc(midPointX-0.5*outletSize) calc(midPointY-0.5*outletSize) outletStartZ)(calc(midPointX+0.5*outletSize) calc(midPointY+0.5*outletSize) calc(outletStartZ+1.0*outletSize));
}
}
{
name outlet;
type faceSet;
action new;
source patchToFace;
sourceInfo
{
name "wall";
}
}
{
name outlet;
type faceSet;
action subset;
source cellToFace;
sourceInfo
{
set c_out;
option all;
}
}
);
// ************************************************************************* //

View File

@ -0,0 +1,142 @@
###############################################
#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 wall
#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/liggghts.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

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More