tutorials-1 after diameter->distance

This commit is contained in:
Hamidreza 2025-04-25 14:17:09 +03:30
parent a545acb374
commit 7c3b90a22d
52 changed files with 1100 additions and 908 deletions

View File

@ -44,8 +44,8 @@ positionParticles
orderedInfo orderedInfo
{ {
// minimum space between centers of particles // minimum distance between particles centers
diameter 0.001; distance 0.001;
// number of particles in the simulation // number of particles in the simulation
numPoints 50000; numPoints 50000;

View File

@ -24,7 +24,7 @@ positionParticles
positionOrderedInfo positionOrderedInfo
{ {
diameter 0.005; // minimum space between centers of particles distance 0.005; // minimum distance between particles centers
numPoints 30000; // number of particles in the simulation numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles axisOrder (z x y); // axis order for filling the space with particles
} }
@ -41,7 +41,7 @@ setFields
{ {
velocity realx3 (0 0 0); // linear velocity (m/s) velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2) acceleration realx3 (0 0 0); // linear acceleration (m/s2)
r Velocity realx3 (0 0 0); // rotational velocity (rad/s) rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word smallSphere; // name of the particle shape shapeName word smallSphere; // name of the particle shape
} }
@ -54,6 +54,7 @@ setFields
{ {
begin 0; // begin index of points begin 0; // begin index of points
end 29999; // end index of points end 29999; // end index of points
number 10000; // number of points to be selected
} }
fieldValue // fields that the selector is applied to fieldValue // fields that the selector is applied to
{ {

View File

@ -6,8 +6,8 @@ objectName particleInsertion;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (sphere); // names of shapes names (sphere); // names of shapes
diameters (0.005); // diameter of shapes diameters (0.005); // diameter of shapes
materials (sphereMat); // material names for shapes materials (sphereMat); // material names for shapes

View File

@ -0,0 +1,7 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
ls | grep -P "^(([0-9]+\.?[0-9]*)|(\.[0-9]+))$" | xargs -d"\n" rm -rf
rm -rf VTK
#------------------------------------------------------------------------------

View File

@ -0,0 +1,21 @@
#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
echo "\n<--------------------------------------------------------------------->"
echo "1) Creating particles"
echo "<--------------------------------------------------------------------->\n"
particlesPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "2) Creating geometry"
echo "<--------------------------------------------------------------------->\n"
geometryPhasicFlow
echo "\n<--------------------------------------------------------------------->"
echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
#------------------------------------------------------------------------------

View File

@ -2,46 +2,48 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName domainDict; objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (0.397538 0.178212 0.00);
max (0.725537 0.600214 0.06); // Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (0.397538 0.178212 0.00);
max (0.725537 0.600214 0.06);
} }
boundaries boundaries
{ {
left left
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
right right
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
bottom bottom
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
top top
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
rear rear
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
front front
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
} }

View File

@ -2,50 +2,50 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model: rotating object around an axis motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxisMotion motion model rotatingAxisInfo // information for rotatingAxisMotion motion model
{ {
rotAxis rotAxis
{ {
p1 (0.561547 0.372714 0.000); // first point for the axis of rotation p1 (0.561547 0.372714 0.000); // first point for the axis of rotation
p2 (0.561547 0.372714 0.010); // second point for the axis of rotation p2 (0.561547 0.372714 0.010); // second point for the axis of rotation
omega 2.1; // rotation speed (rad/s) omega 2.1; // rotation speed (rad/s)
startTime 1.25; // Start time of Geometry Rotating (s) startTime 1.25; // Start time of Geometry Rotating (s)
endTime 7; // End time of Geometry Rotating (s) endTime 7; // End time of Geometry Rotating (s)
} }
} }
surfaces surfaces
{ {
gear gear
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file gear.stl; // file name in stl folder file gear.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
surfaces surfaces
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file surfaces.stl; // file name in stl folder file surfaces.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
motion none; // motion component name motion none; // motion component name
} }
} }

View File

@ -2,8 +2,8 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particlesDict; objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -2,8 +2,8 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -25,10 +25,12 @@ g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter mass); includeObjects (diameter mass);
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects ();
integrationMethod AdamsBashforth2; integrationMethod AdamsBashforth2;
integrationHistory off;
writeFormat ascii; // data writting format (ascii or binary) writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers: Yes or No timersReport Yes; // report timers: Yes or No

View File

@ -47,9 +47,9 @@ positionParticles
method ordered; // other options: random or empty method ordered; // other options: random or empty
orderedInfo orderedInfo
{ {
diameter 0.005; // minimum space between centers of particles distance 0.005; // minimum space between centers of particles
numPoints 30000; // number of particles in the simulation numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles axisOrder (z x y); // axis order for filling the space with particles
} }
regionType cylinder; // other options: box and sphere regionType cylinder; // other options: box and sphere

View File

View File

@ -1,49 +1,49 @@
/* -------------------------------*- C++ -*--------------------------------- *\ /* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName domainDict; objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
// Simulation domain: every particles that goes outside this domain will be deleted
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox globalBox
{ {
min (-0.12 -0.12 0); min (-0.12 -0.12 0);
max (0.12 0.12 0.1); max (0.12 0.12 0.1);
} }
boundaries boundaries
{ {
left left
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
right right
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
bottom bottom
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
top top
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
rear rear
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
front front
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
} }

View File

@ -2,84 +2,82 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model can be rotatingAxis or stationary or vibrating motionModel rotatingAxis; // motion model can be rotatingAxis or stationary or vibrating
rotatingAxisInfo // information for rotatingAxis motion model rotatingAxisInfo // information for rotatingAxis motion model
{ {
rotAxis rotAxis
{ {
p1 (0.0 0.0 0.0); // first point for the axis of rotation p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.214; // rotation speed (rad/s) omega 1.214; // rotation speed (rad/s)
} }
} }
surfaces surfaces
{ {
cylinder cylinder
{ {
type cylinderWall; // other options: cuboidWall and planeWall type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 0.0); // begin point of cylinder axis p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.1); // end point of cylinder axis p2 (0.0 0.0 0.1); // end point of cylinder axis
radius1 0.12; // radius at p1 radius1 0.12; // radius at p1
radius2 0.12; // radius at p2 radius2 0.12; // radius at p2
resolution 24; // number of divisions resolution 24; // number of divisions
material prop1; // material name of this wall material prop1; // material name of this wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
/* /*
This is a plane wall at the rear end of cylinder This is a plane wall at the rear end of cylinder
*/ */
wall1
{
type planeWall; // other options: cuboidWall and cylinderWall
wall1 p1 (-0.12 -0.12 0.0); // first point of the wall
{
type planeWall; // other options: cuboidWall and cylinderWall
p1 (-0.12 -0.12 0.0); // first point of the wall p2 (0.12 -0.12 0.0); // second point of the wall
p2 (0.12 -0.12 0.0); // second point of the wall p3 (0.12 0.12 0.0); // third point of the wall
p3 (0.12 0.12 0.0); // third point of the wall p4 (-0.12 0.12 0.0); // fourth point of the wall
p4 (-0.12 0.12 0.0); // fourth point of the wall material prop1; // material name of the wall
material prop1; // material name of the wall motion rotAxis; // motion component name
}
motion rotAxis; // motion component name /*
} This is a plane wall at the front end of cylinder
*/
wall2
{
type planeWall; // other options: cuboidWall and cylinderWall
/* p1 (-0.12 -0.12 0.1); // first point of the wall
This is a plane wall at the front end of cylinder
*/
wall2 p2 (0.12 -0.12 0.1); // second point of the wall
{
type planeWall; // other options: cuboidWall and cylinderWall
p1 (-0.12 -0.12 0.1); // first point of the wall p3 (0.12 0.12 0.1); // third point of the wall
p2 (0.12 -0.12 0.1); // second point of the wall p4 (-0.12 0.12 0.1); // fourth point of the wall
p3 (0.12 0.12 0.1); // third point of the wall material prop1; // material name of the wall
p4 (-0.12 0.12 0.1); // fourth point of the wall motion rotAxis; // motion component name
}
material prop1; // material name of the wall
motion rotAxis; // motion component name
}
} }

View File

@ -2,73 +2,74 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particlesDict; objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
setFields setFields
{ {
/* /*
Default value for fields defined for particles: Default value for fields defined for particles:
These fields should always be defined for simulations with spherical particles These fields should always be defined for simulations with spherical particles
*/ */
defaultValue defaultValue
{ {
velocity realx3 (0 0 0); // linear velocity (m/s) velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2) acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s) rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word smallSphere; // name of the particle shape shapeName word smallSphere; // name of the particle shape
} }
selectors selectors
{ {
shapeAssigne shapeAssigne
{ {
selector stridedRange; // other options: box, cylinder, sphere, randomPoints selector stridedRange; // other options: box, cylinder, sphere, randomPoints
stridedRangeInfo stridedRangeInfo
{ {
begin 0; // begin index of points begin 0; // begin index of points
end 30000; // end index of points end 30000; // end index of points
stride 3; // stride for selector stride 3; // stride for selector
} }
fieldValue // fields that the selector is applied to fieldValue // fields that the selector is applied to
{ {
shapeName word largeSphere; // sets shapeName of the selected points to largeSphere shapeName word largeSphere; // sets shapeName of the selected points to largeSphere
} }
} }
} }
} }
positionParticles // positions particles positionParticles // positions particles
{ {
method ordered; // other options: random and empty method ordered; // other options: random and empty
orderedInfo orderedInfo
{ {
diameter 0.005; // diameter of particles distance 0.005; // minimum distance between particles centers
numPoints 30000; // number of particles in the simulation numPoints 30000; // number of particles in the simulation
axisOrder (z x y); // axis order for filling the space with particles axisOrder (z x y); // axis order for filling the space with particles
} }
regionType cylinder; // other options: box and sphere regionType cylinder; // other options: box and sphere
cylinderInfo // cylinder information for positioning particles cylinderInfo // cylinder information for positioning particles
{ {
p1 (0.0 0.0 0.003); // begin point of cylinder axis p1 (0.0 0.0 0.003); // begin point of cylinder axis
p2 (0.0 0.0 0.097); // end point of cylinder axis p2 (0.0 0.0 0.097); // end point of cylinder axis
radius 0.117; // radius of cylinder radius 0.117; // radius of cylinder
} }
} }

View File

@ -2,37 +2,37 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName settingsDict; objectName settingsDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
run binarySystemofParticles; run binarySystemofParticles;
dt 0.00001; // time step for integration (seconds) dt 0.00001; // time step for integration (seconds)
startTime 0.0; // start time for simulation startTime 0.0; // start time for simulation
endTime 10.0; // end time for simulation endTime 10.0; // end time for simulation
saveInterval 0.1; // time interval for saving the simulation saveInterval 0.1; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2) g (0 -9.8 0); // gravity vector (m/s2)
// save necessary (i.e., required) data on disk // save necessary (i.e., required) data on disk
includeObjects (diameter); includeObjects (diameter);
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects ();
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); integrationMethod AdamsBashforth2; // integration method
integrationMethod AdamsBashforth2; // integration method integrationHistory off; // do not keep integration history on disk (saves space)
writeFormat ascii; // data writting format (ascii or binary) writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers timersReport Yes; // report timers
timersReportInterval 0.1; // time interval for reporting timers timersReportInterval 0.1; // time interval for reporting timers

View File

@ -6,46 +6,46 @@ objectName particleInsertion;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> yes or no
checkForCollision No; // is checked -> yes or no active Yes; // is insertion active -> yes or no
checkForCollision No; // is checked -> yes or no
/* /*
one layers of particles are packed one layer of particles are packed
*/ */
layer0 layer0
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 15000; // insertion rate (particles/s) rate 15000; // insertion rate (particles/s)
startTime 0; // (s) startTime 0; // (s)
endTime 0.5; // (s) endTime 0.5; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; // radius of cylinder (m) radius 0.09; // radius of cylinder (m)
p1 ( 0.0 0.0 0.1 ); // (m,m,m) p1 ( 0.0 0.0 0.1 ); // (m,m,m)
p2 ( 0.0 0.0 0.11); // (m,m,m) p2 ( 0.0 0.0 0.11); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
} }
mixture mixture
{ {
lightSphere 1; // mixture composition of inserted particles lightSphere 1; // mixture composition of inserted particles
} }
} }

View File

@ -2,14 +2,15 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName sphereDict; objectName sphereDict;
objectType sphereShape; objectType sphereShape;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (lightSphere heavySphere); // names of shapes
diameters (0.007 0.007); // diameter of shapes names (lightSphere heavySphere); // names of shapes
materials (lightMat heavyMat); // material names for shapes diameters (0.007 0.007); // diameter of shapes
materials (lightMat heavyMat); // material names for shapes

View File

@ -2,64 +2,62 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName domainDict; objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.11 -0.11 -0.41);
max ( 0.33 0.11 0.41); // Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.11 -0.11 -0.41);
max ( 0.33 0.11 0.41);
} }
boundaries boundaries
{ {
// Determines how often (how many iterations) do you want to // Determines how often (how many iterations) do you want to
// rebuild the list of particles in the neighbor list
// of all boundaries in the simulation domain
// rebuild the list of particles in the neighbor list neighborListUpdateInterval 30;
// of all boundaries in the simulation domain // Determines how often do you want to update the new changes in the boundary
updateInterval 10;
neighborListUpdateInterval 30; // The distance from the boundary plane within which particles are marked to be in the boundary list
neighborLength 0.004;
// Determines how often do you want to update the new changes in the boundary left
{
type exit; // other options: periodict, reflective
}
updateInterval 10; right
{
type exit; // other options: periodict, reflective
}
// The distance from the boundary plane within which particles are marked to be in the boundary list bottom
{
type exit; // other options: periodict, reflective
}
neighborLength 0.004; top
{
type exit; // other options: periodict, reflective
}
left rear
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
right front
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodict, reflective
} }
bottom
{
type exit; // other options: periodict, reflective
}
top
{
type exit; // other options: periodict, reflective
}
rear
{
type exit; // other options: periodict, reflective
}
front
{
type exit; // other options: periodict, reflective
}
} }

View File

@ -2,11 +2,13 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
motionModel conveyorBelt; // motion model can be rotatingAxis or stationary or vibrating
// motion model can be rotatingAxis or stationary or vibrating
motionModel conveyorBelt;
conveyorBeltInfo conveyorBeltInfo
{ {
@ -18,63 +20,58 @@ conveyorBeltInfo
surfaces surfaces
{ {
cylinderShell cylinderShell
{ {
type cylinderWall; // other options: cuboidWall and planeWall type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 0.0); // begin point of cylinder axis p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.4); // end point of cylinder axis p2 (0.0 0.0 0.4); // end point of cylinder axis
radius1 0.1; // radius at p1 radius1 0.1; // radius at p1
radius2 0.1; // radius at p2 radius2 0.1; // radius at p2
resolution 36; // number of divisions resolution 36; // number of divisions
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
coneShell coneShell
{ {
type cylinderWall; // other options: cuboidWall and planeWall type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 -0.1); // begin point of cylinder axis p1 (0.0 0.0 -0.1); // begin point of cylinder axis
p2 (0.0 0.0 0.0); // end point of cylinder axis p2 (0.0 0.0 0.0); // end point of cylinder axis
radius1 0.02; // radius at p1 radius1 0.02; // radius at p1
radius2 0.1; // radius at p2 radius2 0.1; // radius at p2
resolution 36; // number of divisions resolution 36; // number of divisions
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
belt belt
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file belt.stl; // file name in stl folder file belt.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
motion conveyorBelt1; // motion component name motion conveyorBelt1; // motion component name
} }
box box
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file box.stl; // file name in stl folder file box.stl; // file name in stl folder
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
} }

View File

@ -6,16 +6,14 @@ objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
setFields setFields
{ {
/* /*
Default value for fields defined for particles Default value for fields defined for particles
These fields should always be defined for simulations with These fields should always be defined for simulations with
spherical particles. spherical particles.
*/ */
defaultValue defaultValue
{ {
velocity realx3 (0 0 0); // linear velocity (m/s) velocity realx3 (0 0 0); // linear velocity (m/s)
@ -31,17 +29,8 @@ setFields
{} {}
} }
positionParticles // positions particles positionParticles
{ {
method empty; // other options: ordered and random method empty; // other options: file, ordered and random
regionType box; // other options: cylinder and sphere
boxInfo // box region for positioning particles
{
min (-0.08 -0.08 0.015); // lower corner point of the box
max ( 0.08 0.08 0.098); // upper corner point of the box
}
} }

View File

@ -2,41 +2,39 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName settingsDict; objectName settingsDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
run layerdSiloFilling;
dt 0.00005; // time step for integration (s) run conveyorBelt;
startTime 0.0; // start time for simulation dt 0.00005; // time step for integration (s)
endTime 5.0; // end time for simulation startTime 0.0; // start time for simulation
saveInterval 0.05; // time interval for saving the simulation endTime 5.0; // end time for simulation
timePrecision 6; // maximum number of digits for time folder saveInterval 0.05; // time interval for saving the simulation
g (0 0 -9.8); // gravity vector (m/s2) timePrecision 6; // maximum number of digits for time folder
g (0 0 -9.8); // gravity vector (m/s2)
// save data objects that are not automatically saved on disk. // save data objects that are not automatically saved on disk.
// overrides the default behavior // overrides the default behavior
includeObjects (diameter); includeObjects (diameter);
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary) writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers timersReport Yes; // report timers
timersReportInterval 0.01; // time interval for reporting timers timersReportInterval 0.01; // time interval for reporting timers

View File

@ -72,7 +72,7 @@ boundaries
## Running the Case ## Running the Case
The solver for this simulation is `sphereGranFlow`. Enter the following commands in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete. The solver for this simulation is `sphereGranFlow`. Enter the following commands in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete.
```sh ```
geometryPhasicFlow geometryPhasicFlow
particlesPhasicFlow particlesPhasicFlow
sphereGranFlow sphereGranFlow
@ -81,6 +81,6 @@ sphereGranFlow
## Post Processing ## Post Processing
After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, just enter the following command in the terminal. This will convert all the results (particles and geometry) to VTK format and store them in the `VTK/` folder. After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, just enter the following command in the terminal. This will convert all the results (particles and geometry) to VTK format and store them in the `VTK/` folder.
```sh ```
pFlowToVTK --binary pFlowToVTK --binary
``` ```

View File

@ -2,12 +2,12 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName sphereDict; objectName sphereDict;
objectType sphereShape; objectType sphereShape;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (sphere1); // names of shapes names (sphere1); // names of shapes
diameters (0.004); // diameter of shapes diameters (0.004); // diameter of shapes
materials (prop1); // material names for shapes materials (prop1); // material names for shapes

View File

@ -2,8 +2,8 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View File

@ -2,33 +2,33 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particlesDict; objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
setFields setFields
{ {
/* /*
Default value for fields defined for particles Default value for fields defined for particles
These fields should always be defined for simulations with These fields should always be defined for simulations with
spherical particles. spherical particles.
*/ */
defaultValue defaultValue
{ {
velocity realx3 (0 0 0); // linear velocity (m/s) velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2) acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s) rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word sphere1; // name of the particle shape shapeName word sphere1; // name of the particle shape
} }
selectors selectors
{} {}
} }
positionParticles positionParticles
{ {
method empty; // no particle at the start of simulation method empty; // no particle at the start of simulation
} }

View File

@ -24,18 +24,12 @@ g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 excludeObjects ();
rVelocity.dy2
rVelocity.dy3
pStructPosition.dy1
pStructPosition.dy2
pStructPosition.dy3
pStructVelocity.dy1
pStructVelocity.dy2
pStructVelocity.dy3);
integrationMethod AdamsBashforth4; // integration method integrationMethod AdamsBashforth4; // integration method
integrationHistory off; // to save space on disk
writeFormat ascii; // data writting format (ascii or binary) writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers (Yes or No) timersReport Yes; // report timers (Yes or No)

View File

@ -3,7 +3,7 @@
## Problem ## Problem
A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system carries particles from the exit and re-enters them from the top. Here, we use a `periodic` boundary to simulate the action of the pneumatic conveyor system for circulating particles. Particles exiting from the bottom are re-entered from the top using this boundary (`periodic`). A homogenization silo is used to mix particles inside a silo using the circulation of particles. A pneumatic conveying system carries particles from the exit and re-enters them from the top. Here, we use a `periodic` boundary to simulate the action of the pneumatic conveyor system for circulating particles. Particles exiting from the bottom are re-entered from the top using this boundary (`periodic`).
The simulation case setup is essentially similar to the [`layeredSiloFilling`](https://github.com/PhasicFlow/phasicFlow/tree/main/tutorials/sphereGranFlow/layeredSiloFilling) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details). The simulation case setup is essentially similar to the [`layeredSiloFilling`](../layeredSiloFilling/) tutorial. There is also another change with regard to `layeredSiloFilling`. The exit gate is opened after the filling phase of the silo (see `settings/geometryDict` for more details).
<div align ="center"> <div align ="center">
<img src="./homoSilo.jpeg" style="width: 400px;"> <img src="./homoSilo.jpeg" style="width: 400px;">

View File

@ -37,7 +37,6 @@ model
heavyMat-heavyMat heavyMat-wallMat heavyMat-heavyMat heavyMat-wallMat
wallMat-wallMat ); wallMat-wallMat );
*/ */
Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa] Yeff (1.0e6 1.0e6 1.0e6 // Young modulus [Pa]
1.0e6 1.0e6 1.0e6 1.0e6
1.0e6); 1.0e6);

View File

@ -26,189 +26,185 @@ layer0
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; // radius of cylinder (m) radius 0.09; // radius of cylinder (m)
p1 (0.0 0.0 0.1); // (m,m,m) p1 (0.0 0.0 0.1); // (m,m,m)
p2 (0.0 0.0 0.11); // (m,m,m) p2 (0.0 0.0 0.11); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles velocity realx3 (0.0 0.0 -0.6); // initial velocity of inserted particles
} }
mixture mixture
{ {
parType1 1; // mixture composition of inserted particles parType1 1; // mixture composition of inserted particles
} }
} }
layer1 layer1
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s) rate 5100; // insertion rate (particles/s)
startTime 0.7; // (s) startTime 0.7; // (s)
endTime 1.2; // (s) endTime 1.2; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; radius 0.09;
p1 (0.0 0.0 0.16 ); // (m,m,m) p1 (0.0 0.0 0.16 ); // (m,m,m)
p2 (0.0 0.0 0.17); // (m,m,m) p2 (0.0 0.0 0.17); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); velocity realx3 (0.0 0.0 -0.6);
} }
mixture mixture
{ {
parType2 1; // only parType2 parType2 1; // only parType2
} }
} }
layer2 layer2
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s) rate 5100; // insertion rate (particles/s)
startTime 1.4; // (s) startTime 1.4; // (s)
endTime 1.9; // (s) endTime 1.9; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; radius 0.09;
p1 ( 0.0 0.0 0.2 ); // (m,m,m) p1 ( 0.0 0.0 0.2 ); // (m,m,m)
p2 ( 0.0 0.0 0.21); // (m,m,m) p2 ( 0.0 0.0 0.21); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); velocity realx3 (0.0 0.0 -0.6);
} }
mixture mixture
{ {
parType1 1; // only parType1 parType1 1; // only parType1
}
}
} }
layer3 layer3
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s) rate 5100; // insertion rate (particles/s)
startTime 2.1; // (s) startTime 2.1; // (s)
endTime 2.6; // (s) endTime 2.6; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; radius 0.09;
p1 ( 0.0 0.0 0.28 ); // (m,m,m) p1 ( 0.0 0.0 0.28 ); // (m,m,m)
p2 ( 0.0 0.0 0.29); // (m,m,m) p2 ( 0.0 0.0 0.29); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); velocity realx3 (0.0 0.0 -0.6);
} }
mixture mixture
{ {
parType2 1; parType2 1;
}
}
} }
layer4 layer4
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s) rate 5100; // insertion rate (particles/s)
startTime 2.8; // (s) startTime 2.8; // (s)
endTime 3.3; // (s) endTime 3.3; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; radius 0.09;
p1 ( 0.0 0.0 0.37 ); // (m,m,m) p1 ( 0.0 0.0 0.37 ); // (m,m,m)
p2 ( 0.0 0.0 0.38); // (m,m,m) p2 ( 0.0 0.0 0.38); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); velocity realx3 (0.0 0.0 -0.6);
} }
mixture mixture
{ {
parType1 1; parType1 1;
}
}
} }
layer5 layer5
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 5100; // insertion rate (particles/s) rate 5100; // insertion rate (particles/s)
startTime 3.4; // (s) startTime 3.4; // (s)
endTime 3.9; // (s) endTime 3.9; // (s)
insertionInterval 0.025; // s insertionInterval 0.025; // s
cylinderInfo cylinderInfo
{ {
radius 0.09; radius 0.09;
p1 ( 0.0 0.0 0.38 ); // (m,m,m) p1 ( 0.0 0.0 0.38 ); // (m,m,m)
p2 ( 0.0 0.0 0.39); // (m,m,m) p2 ( 0.0 0.0 0.39); // (m,m,m)
} }
setFields setFields
{ {
velocity realx3 (0.0 0.0 -0.6); velocity realx3 (0.0 0.0 -0.6);
} }
mixture mixture
{ {
parType2 1; parType2 1;
}
}
} }

View File

@ -2,51 +2,51 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName domainDict; objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
// Simulation domain: every particles that goes outside this domain will be deleted // Simulation domain: every particles that goes outside this domain will be deleted
globalBox globalBox
{ {
min (-0.11 -0.11 -0.15); min (-0.11 -0.11 -0.15);
max ( 0.11 0.11 0.4); max ( 0.11 0.11 0.4);
} }
boundaries boundaries
{ {
left left
{ {
type exit; type exit;
} }
right right
{ {
type exit; type exit;
} }
bottom bottom
{ {
type exit; type exit;
} }
top top
{ {
type exit; type exit;
} }
rear rear // z-
{ {
type periodic; type periodic;
} }
front front // z+
{ {
type periodic; type periodic;
} }
} }

View File

@ -2,8 +2,8 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName geometryDict; objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
@ -11,73 +11,72 @@ motionModel rotatingAxis;
rotatingAxisInfo rotatingAxisInfo
{ {
// for opening the gate of silo between time 4.1 and 5.1 s // for opening the gate of silo between time 4.1 and 5.1 s
gateMotion gateMotion
{ {
p1 (-0.04 -0.04 -0.1); p1 (-0.04 -0.04 -0.1);
p2 (-0.04 -0.04 0.0); p2 (-0.04 -0.04 0.0);
omega 3.14; omega 3.14;
startTime 4.1; startTime 4.1;
endTime 5.1; endTime 5.1;
} }
} }
surfaces surfaces
{ {
cylinderShell cylinderShell
{ {
type cylinderWall; // other options: cuboidWall and planeWall type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 0.0); // begin point of cylinder axis p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.4); // end point of cylinder axis p2 (0.0 0.0 0.4); // end point of cylinder axis
radius1 0.1; // radius at p1 radius1 0.1; // radius at p1
radius2 0.1; // radius at p2 radius2 0.1; // radius at p2
resolution 36; // number of divisions resolution 36; // number of divisions
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
coneShell coneShell
{ {
type cylinderWall; // other options: cuboidWall and planeWall type cylinderWall; // other options: cuboidWall and planeWall
p1 (0.0 0.0 -0.1); // begin point of cylinder axis p1 (0.0 0.0 -0.1); // begin point of cylinder axis
p2 (0.0 0.0 0.0); // end point of cylinder axis p2 (0.0 0.0 0.0); // end point of cylinder axis
radius1 0.04; // radius at p1 radius1 0.04; // radius at p1
radius2 0.1; // radius at p2 radius2 0.1; // radius at p2
resolution 36; // number of divisions resolution 36; // number of divisions
material wallMat; // material name of this wall material wallMat; // material name of this wall
} }
/* /*
This is a plane wall at the exit of silo This is a plane wall at the exit of silo
*/ */
exitGate
{
type planeWall; // other options: cuboidWall and cylinderWall
exitGate p1 (-0.04 -0.04 -0.1); // first point of the wall
{
type planeWall; // other options: cuboidWall and cylinderWall
p1 (-0.04 -0.04 -0.1); // first point of the wall p2 ( 0.04 -0.04 -0.1); // second point of the wall
p2 ( 0.04 -0.04 -0.1); // second point of the wall p3 ( 0.04 0.04 -0.1); // third point of the wall
p3 ( 0.04 0.04 -0.1); // third point of the wall p4 (-0.04 0.04 -0.1); // fourth point of the wall
p4 (-0.04 0.04 -0.1); // fourth point of the wall material wallMat; // material name of the wall
material wallMat; // material name of the wall motion gateMotion;
}
motion gateMotion;
}
} }

View File

@ -2,35 +2,34 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particlesDict; objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
setFields setFields
{ {
/* /*
Default value for fields defined for particles Default value for fields defined for particles
These fields should always be defined for simulations with These fields should always be defined for simulations with
spherical particles. spherical particles.
*/ */
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
defaultValue acceleration realx3 (0 0 0); // linear acceleration (m/s2)
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2) rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s) shapeName word parType1; // name of the particle shape
}
shapeName word parType1; // name of the particle shape selectors
} {}
selectors
{}
} }
positionParticles positionParticles
{ {
method empty; // empty simulation method empty; // empty simulation
} }

View File

@ -2,40 +2,40 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName settingsDict; objectName settingsDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
run homogenizationSilo; run homogenizationSilo;
dt 0.00001; // time step for integration (s) dt 0.00001; // time step for integration (s)
startTime 0.0; // start time for simulation startTime 0.0; // start time for simulation
endTime 20; // end time for simulation endTime 20; // end time for simulation
saveInterval 0.05; // time interval for saving the simulation saveInterval 0.05; // time interval for saving the simulation
timePrecision 4; // maximum number of digits for time folder timePrecision 4; // maximum number of digits for time folder
g (0 0 -9.8); // gravity vector (m/s2) g (0 0 -9.8); // gravity vector (m/s2)
// overrides the default behavior // overrides the default behavior
includeObjects (diameter); includeObjects (diameter);
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3 excludeObjects ();
pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3
pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3);
integrationMethod AdamsBashforth4; // integration method integrationMethod AdamsBashforth4; // integration method
writeFormat binary; // data writting format (ascii or binary) integrationHistory off; // to save space on disk
timersReport Yes; // report timers writeFormat binary; // data writting format (ascii or binary)
timersReportInterval 0.1; // time interval for reporting timers timersReport Yes; // report timers
timersReportInterval 0.1; // time interval for reporting timers

View File

@ -2,14 +2,14 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName sphereDict; objectName sphereDict;
objectType sphereShape; objectType sphereShape;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (lightSphere heavySphere); // names of shapes names (lightSphere heavySphere); // names of shapes
diameters (0.007 0.007); // diameter of shapes diameters (0.007 0.007); // diameter of shapes
materials (lightMat heavyMat); // material names for shapes materials (lightMat heavyMat); // material names for shapes

View File

@ -13,7 +13,6 @@ setFields
These fields should always be defined for simulations with These fields should always be defined for simulations with
spherical particles. spherical particles.
*/ */
defaultValue defaultValue
{ {
velocity realx3 (0 0 0); // linear velocity (m/s) velocity realx3 (0 0 0); // linear velocity (m/s)

View File

@ -25,10 +25,12 @@ g (0 0 -9.8); // gravity vector (m/s^2)
includeObjects (diameter mass); includeObjects (diameter mass);
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects ();
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method
integrationHistory off;
writeFormat ascii; // data writing format (ascii or binary) writeFormat ascii; // data writing format (ascii or binary)
timersReport Yes; // report timers timersReport Yes; // report timers

View File

@ -0,0 +1,161 @@
# Simulating a Medium-Scale Rotating Drum (v-1.0)
## Problem Definition
This tutorial demonstrates the simulation of a medium-sized rotating drum with a diameter of 0.24 m and a length of 0.36 m. The drum is filled with 250,000 spherical glass beads with a diameter of 3 mm. The drum rotates at a constant speed, and the simulation captures the flow behavior and mixing of the particles.
<div align="center">
<b>
A view of the rotating drum simulation
</b>
</div>
***
## Setting up the Case
PhasicFlow simulation case setup is based on text-based scripts provided in two folders located in the simulation case folder: `settings` and `caseSetup`. All commands should be entered in the terminal while the current working directory is the simulation case folder.
### Creating Particles
In the file `settings/particlesDict`, two dictionaries, `positionParticles` and `setFields`, define how particles are positioned and what field values they have initially.
The `positionParticles` dictionary specifies the ordered positioning method to place 250,000 particles within a cylindrical region:
```C++
positionParticles
{
method ordered; // other options: random and empty
orderedInfo
{
distance 0.003; // minimum distance between particles centers
numPoints 250000; // number of particles in the simulation
axisOrder (z y x); // axis order for filling the space with particles
}
regionType cylinder; // other options: box and sphere
cylinderInfo
{
p1 (0.0 0.0 0.003); // begin point of cylinder axis
p2 (0.0 0.0 0.357); // end point of cylinder axis
radius 0.117; // radius of cylinder
}
}
```
The `setFields` dictionary defines the initial values for particle fields:
```C++
setFields
{
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
shapeName word glassBead; // name of the particle shape
}
}
```
To create the particles based on these settings, enter the following command in the terminal:
```
> particlesPhasicFlow
```
### Creating Geometry
In the file `settings/geometryDict`, you can find information for creating the rotating drum geometry. The simulation uses the `rotatingAxis` motion model to define rotation around a fixed axis.
The surfaces of the drum are defined in the `surfaces` dictionary, including the cylindrical shell and end walls.
To create the geometry based on these settings, enter the following command in the terminal:
```
> geometryPhasicFlow
```
### Defining Properties and Interactions
In the file `caseSetup/shapes`, the particle shape, diameter, and material are defined:
```C++
names (glassBead); // names of shapes
diameters (0.003); // diameter of shapes
materials (glassMat); // material names for shapes
```
In the file `caseSetup/interaction`, the material properties and interaction models are defined:
```C++
materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3]
model
{
contactForceModel nonLinearLimited;
rollingFrictionModel normal;
/*
Property (glassMat-glassMat glassMat-wallMat
wallMat-wallMat);
*/
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
en (0.97 0.85
1.00); // coefficient of normal restitution
mu (0.65 0.65
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}
```
The contact search settings are also defined in this file, including the method, update interval, and other parameters.
## Running the Simulation
To run the simulation, follow these steps in order:
1. Create the initial particle fields:
```
> particlesPhasicFlow
```
2. Create the geometry:
```
> geometryPhasicFlow
```
3. Start the simulation:
```
> sphereGranFlow
```
The simulation will run according to the settings defined in `settings/settingsDict`, including the time step, start/end times, and gravity vector.
## Post-Processing
After the simulation is complete, you can visualize the results using ParaView. To convert the simulation results to VTK format, use the following command:
```
> pFlowToVTK --binary
```
This will create VTK files in the `VTK/` folder that can be opened in ParaView for visualization and analysis.

View File

@ -6,6 +6,7 @@ objectName interaction;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
materials (glassMat wallMat); // a list of materials names materials (glassMat wallMat); // a list of materials names
densities (2500.0 2500); // density of materials [kg/m3] densities (2500.0 2500); // density of materials [kg/m3]

View File

@ -1,10 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active No; // is checked -> Yes or No

View File

@ -6,7 +6,9 @@ objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{ {
min (-0.12 -0.12 0); min (-0.12 -0.12 0);

View File

@ -6,6 +6,7 @@ objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model: rotating object around an axis motionModel rotatingAxis; // motion model: rotating object around an axis

View File

@ -36,7 +36,7 @@ positionParticles // positions particles
orderedInfo orderedInfo
{ {
diameter 0.003; // minimum space between centers of particles distance 0.003; // minimum distance between particles centers
numPoints 250000; // number of particles in the simulation numPoints 250000; // number of particles in the simulation

View File

@ -23,7 +23,7 @@ g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects ();
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method

View File

@ -1,60 +1,62 @@
# Simularing a rotating drum (v-1.0) # Simulating a Rotating Drum (v-1.0)
## Problem definition
The problem is to simulate a rotating drum with the diameter 0.24 m and the length 0.1 m rotating at 11.6 rpm. It is filled with 30,000 4-mm spherical particles. The timestep for integration is 0.00001 s. ## Problem Definition
The problem is to simulate a rotating drum with a diameter of 0.24 m and a length of 0.1 m, rotating at 11.6 rpm. It is filled with 30,000 spherical particles, each with a diameter of 4 mm. The timestep for integration is 0.00001 s. This tutorial demonstrates the basic setup for creating a rotation-based simulation using built-in geometry in PhasicFlow.
<div align="center"> <div align="center">
<b> <b>
A view of the rotating drum
A view of rotating drum
</b> </b>
<b> <div>
<img src="https://github.com/PhasicFlow/phasicFlow/blob/media/media/rotating-drum-s.png" width="600px">
![](https://github.com/PhasicFlow/phasicFlow/blob/media/media/rotating-drum-s.png) </div>
</div>
</b></div>
*** ***
## Setting up the case ## Setting up the Case
PhasicFlow simulation case setup is based on the text-based scripts that we provide in two folders located in the simulation case folder: `settings` and `caseSetup` (You can find the case setup files in the above folders.
All the commands should be entered in the terminal while the current working directory is the simulation case folder (at the top of the `caseSetup` and `settings`).
PhasicFlow simulation case setup is based on text-based scripts provided in two folders located in the simulation case folder: `settings` and `caseSetup`. All commands should be entered in the terminal while the current working directory is the simulation case folder (at the top level of `caseSetup` and `settings`).
### Creating particles ### Creating Particles
Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields` position particles and set the field values for the particles. In the file `settings/particlesDict`, two dictionaries, `positionParticles` and `setFields`, position particles and set the field values for the particles.
In dictionary `positionParticles`, the positioning `method` is `ordered`, which position particles in order in the space defined by `box`. `box` space is defined by two corner points `min` and `max`. In dictionary `orderedInfo`, `numPoints` defines number of particles; `diameter`, the distance between two adjacent particles, and `axisOrder` defines the axis order for filling the space by particles.
The `positionParticles` dictionary uses the `ordered` method to position particles in a space defined by `box`. The box space is defined by two corner points: `min` and `max`. In the `orderedInfo` sub-dictionary, `numPoints` defines the number of particles (30,000), `distance` defines the spacing between adjacent particles (4 mm), and `axisOrder` defines the axis order for filling the space with particles.
<div align="center"> <div align="center">
in <b>settings/particlesDict</b> file in <b>settings/particlesDict</b> file
</div> </div>
```C++ ```C++
positionParticles // positions particles positionParticles
{ {
method ordered; // other options: random and empty method ordered; // other options: random and empty
mortonSorting Yes; // perform initial sorting based on morton code? mortonSorting Yes; // perform initial sorting based on morton code?
orderedInfo orderedInfo
{ {
diameter 0.004; // minimum space between centers of particles distance 0.004; // minimum space between centers of particles
numPoints 30000; // number of particles in the simulation numPoints 30000; // number of particles in the simulation
axisOrder (z y x); // axis order for filling the space with particles axisOrder (z y x); // axis order for filling the space with particles
} }
regionType box; // other options: cylinder and sphere regionType box; // other options: cylinder and sphere
boxInfo // box information for positioning particles boxInfo // box information for positioning particles
{ {
min (-0.08 -0.08 0.015); // lower corner point of the box min (-0.08 -0.08 0.015); // lower corner point of the box
max ( 0.08 0.08 0.098); // upper corner point of the box max ( 0.08 0.08 0.098); // upper corner point of the box
} }
} }
``` ```
In dictionary `setFields`, dictionary `defaultValue` defines the initial value for particle fields (here, `velocity`, `acceleration`, `rotVelocity`, and `shapeName`). Note that `shapeName` field should be consistent with the name of shape that you later set for shapes (here one shape with name `sphere1`).
In the `setFields` dictionary, the `defaultValue` sub-dictionary defines the initial values for particle fields (velocity, acceleration, rotational velocity, and shape name). The shape name field should be consistent with the name defined in the shapes file (here, "sphere1").
<div align="center"> <div align="center">
in <b>settings/particlesDict</b> file in <b>settings/particlesDict</b> file
@ -76,17 +78,20 @@ setFields
selectors selectors
{ {
// Selectors can be used to modify properties for specific particle groups
} }
} }
``` ```
Enter the following command in the terminal to create the particles and store them in `0` folder. To create the particles and store them in the `0` folder, enter the following command:
`> particlesPhasicFlow` ```
particlesPhasicFlow
```
### Creating geometry ### Creating Geometry
In file `settings/geometryDict` , you can provide information for creating geometry. Each simulation should have a `motionModel` that defines a model for moving the surfaces in the simulation. `rotatingAxis` model defines a fixed axis which rotates around itself. The dictionary `rotAxis` defines an motion component with `p1` and `p2` as the end points of the axis and `omega` as the rotation speed in rad/s. You can define more than one motion component in a simulation.
In the file `settings/geometryDict`, you define the motion model and geometry for the simulation. The `rotatingAxis` motion model defines a fixed axis which rotates around itself. The `rotAxis` dictionary specifies the axis endpoints and rotation speed.
<div align="center"> <div align="center">
in <b>settings/geometryDict</b> file in <b>settings/geometryDict</b> file
@ -95,19 +100,23 @@ in <b>settings/geometryDict</b> file
```C++ ```C++
motionModel rotatingAxis; motionModel rotatingAxis;
rotatingAxisInfo // information for rotatingAxisMotion motion model rotatingAxisInfo
{ {
rotAxis rotAxis
{ {
p1 (0.0 0.0 0.0); // first point for the axis of rotation p1 (0.0 0.0 0.0); // first point for the axis of rotation
p2 (0.0 0.0 1.0); // second point for the axis of rotation p2 (0.0 0.0 1.0); // second point for the axis of rotation
omega 1.214; // rotation speed (rad/s) omega 1.214; // rotation speed (rad/s)
} }
} }
``` ```
In the dictionary `surfaces` you can define all the surfaces (walls) in the simulation. Two main options are available: built-in geometries in PhasicFlow, and providing surfaces with stl file. Here we use built-in geometries. In `cylinder` dictionary, a cylindrical shell with end radii, `radius1` and `radius2`, axis end points `p1` and `p2`, `material` name `prop1`, `motion` component `rotAxis` is defined. `resolution` sets number of division for the cylinder shell. `wall1` and `wall2` define two plane walls at two ends of cylindrical shell with coplanar corner points `p1`, `p2`, `p3`, and `p4`, `material` name `prop1` and `motion` component `rotAxis`.
The `surfaces` dictionary defines all the walls in the simulation. This tutorial uses built-in geometries provided by PhasicFlow. The geometry consists of:
1. A `cylinder` dictionary defining a cylindrical shell with end radii (`radius1` and `radius2`), axis endpoints (`p1` and `p2`), material name (`prop1`), and motion component (`rotAxis`).
2. Two plane walls (`wall1` and `wall2`) at the ends of the cylindrical shell, each defined with four coplanar corner points, the same material name, and the same motion component.
<div align="center"> <div align="center">
in <b>settings/geometryDict</b> file in <b>settings/geometryDict</b> file
@ -119,113 +128,118 @@ surfaces
/* /*
A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1) A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1)
*/ */
cylinder cylinder
{ {
type cylinderWall; // type of the wall type cylinderWall; // type of the wall
p1 (0.0 0.0 0.0); // begin point of cylinder axis p1 (0.0 0.0 0.0); // begin point of cylinder axis
p2 (0.0 0.0 0.1); // end point of cylinder axis p2 (0.0 0.0 0.1); // end point of cylinder axis
radius1 0.12; // radius at p1 radius1 0.12; // radius at p1
radius2 0.12; // radius at p2 radius2 0.12; // radius at p2
resolution 24; // number of divisions resolution 24; // number of divisions
material prop1; // material name of this wall material prop1; // material name of this wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
/* /*
This is a plane wall at the rear end of cylinder This is a plane wall at the rear end of cylinder
*/ */
wall1 wall1
{ {
type planeWall; // type of the wall type planeWall; // type of the wall
p1 (-0.12 -0.12 0.0); // first point of the wall p1 (-0.12 -0.12 0.0); // first point of the wall
p2 ( 0.12 -0.12 0.0); // second point p2 ( 0.12 -0.12 0.0); // second point
p3 ( 0.12 0.12 0.0); // third point p3 ( 0.12 0.12 0.0); // third point
p4 (-0.12 0.12 0.0); // fourth point p4 (-0.12 0.12 0.0); // fourth point
material prop1; // material name of the wall material prop1; // material name of the wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
/* /*
This is a plane wall at the front end of cylinder This is a plane wall at the front end of cylinder
*/ */
wall2 wall2
{ {
type planeWall; // type of the wall type planeWall; // type of the wall
p1 (-0.12 -0.12 0.1); // first point of the wall p1 (-0.12 -0.12 0.1); // first point of the wall
p2 ( 0.12 -0.12 0.1); // second point p2 ( 0.12 -0.12 0.1); // second point
p3 ( 0.12 0.12 0.1); // third point p3 ( 0.12 0.12 0.1); // third point
p4 (-0.12 0.12 0.1); // fourth point p4 (-0.12 0.12 0.1); // fourth point
material prop1; // material name of the wall material prop1; // material name of the wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
} }
``` ```
Enter the following command in the terminal to create the geometry and store it in `0/geometry` folder.
`> geometryPhasicFlow` To create the geometry and store it in the `0/geometry` folder, enter:
### Defining properties and interactions ```
In the file `caseSetup/interaction` , you find properties of materials. `materials` defines a list of material names in the simulation and `densities` sets the corresponding density of each material name. model dictionary defines the interaction model for particle-particle and particle-wall interactions. `contactForceModel` selects the model for mechanical contacts (here nonlinear model with limited tangential displacement) and `rollingFrictionModel` selects the model for calculating rolling friction. Other required prosperities should be defined in this dictionary. geometryPhasicFlow
```
### Defining Properties and Interactions
In the file `caseSetup/interaction`, you define properties of materials and their interactions. The `materials` entry lists material names, and `densities` sets the corresponding densities. The `model` dictionary defines the contact force and rolling friction models, along with other required properties.
<div align="center"> <div align="center">
in <b>caseSetup/interaction</b> file in <b>caseSetup/interaction</b> file
</div> </div>
```C++ ```C++
materials (prop1); // a list of materials names materials (prop1); // a list of materials names
densities (1000.0); // density of materials [kg/m3]
. densities (1000.0); // density of materials [kg/m3]
.
. contactListType sortedContactList;
model model
{ {
contactForceModel nonLinearNonLimited; contactForceModel nonLinearNonLimited;
rollingFrictionModel normal;
Yeff (1.0e6); // Young modulus [Pa] rollingFrictionModel normal;
Geff (0.8e6); // Shear modulus [Pa]
nu (0.25); // Poisson's ratio [-] Yeff (1.0e6); // Young modulus [Pa]
en (0.7); // coefficient of normal restitution
mu (0.3); // dynamic friction Geff (0.8e6); // Shear modulus [Pa]
mur (0.1); // rolling friction
nu (0.25); // Poisson's ratio [-]
en (0.7); // coefficient of normal restitution
mu (0.3); // dynamic friction
mur (0.1); // rolling friction
} }
``` ```
Dictionary `contactSearch` sets the methods for particle-particle and particle-wall contact search. `method` specifies the algorithm for finding neighbor list for particle-particle contacts. `updateInterval` sets the number of iterations between each occurance of updating neighbor list and `sizeRatio` sets the size of enlarged cells (with respect to particle diameter) for finding neighbor list. Larger `sizeRatio` include more particles in the neighbor list and you require to update it less frequent. The `contactSearch` dictionary specifies the algorithm and parameters for finding particle-particle contacts. The `method` determines the broad search algorithm, `updateInterval` sets how often to update the neighbor list, and `sizeRatio` controls the enlarged cell size for finding neighbors.
<div align="center"> <div align="center">
in <b>caseSetup/interaction</b> file in <b>caseSetup/interaction</b> file
</div> </div>
```C++ ```C++
contactListType sortedContactList;
contactSearch contactSearch
{ {
method NBS;
method NBS; // method for broad search
updateInterval 10; updateInterval 10;
@ -235,57 +249,25 @@ contactSearch
adjustableBox Yes; adjustableBox Yes;
} }
``` ```
In the file `caseSetup/shape`, you can define a list of `names` for shapes (`shapeName` in particle field), a list of diameters for shapes and their `properties` names. In the file `caseSetup/shapes`, you define particle shapes, including their names, diameters, and material properties:
<div align="center"> <div align="center">
in <b>caseSetup/shape</b> file in <b>caseSetup/shapes</b> file
</div> </div>
```C++ ```C++
names (sphere1); // names of shapes names (sphere1); // names of shapes
diameters (0.004); // diameter of shapes
materials (prop1); // material names for shapes diameters (0.004); // diameter of shapes
materials (prop1); // material names for shapes
``` ```
Other settings for the simulation can be set in file `settings/settingsDict`. ### Simulation Domain and Boundaries
<div align="center"> The file `settings/domainDict` defines a rectangular bounding box with boundaries. Particles that exit this box are automatically deleted.
in <b>settings/settingsDict</b> file
</div>
```C++
run rotatingDrumSmall;
dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation
endTime 10; // end time for simulation
saveInterval 0.1; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.01; // time interval for reporting timers
```
The dictionary `settings/domainDict` defines the a rectangular bounding box with two corner points for the simulation. Each particle that gets out of this box, will be deleted automatically.
<div align="center"> <div align="center">
in <b>settings/domainDict</b> file in <b>settings/domainDict</b> file
@ -295,52 +277,116 @@ in <b>settings/domainDict</b> file
// Simulation domain: every particles that goes outside this domain will be deleted // Simulation domain: every particles that goes outside this domain will be deleted
globalBox globalBox
{ {
min (-0.12 -0.12 0.00); // lower corner point of the box min (-0.12 -0.12 0.00); // lower corner point of the box
max (0.12 0.12 0.11); // upper corner point of the box max (0.12 0.12 0.11); // upper corner point of the box
} }
boundaries boundaries
{ {
left left
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
right right
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
bottom bottom
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
top top
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
rear rear
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
front front
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective
} }
} }
``` ```
### Other Settings
## Running the case Additional parameters for the simulation are set in `settings/settingsDict`, including timestep, start and end times, saving intervals, and gravity:
The solver for this simulation is `sphereGranFlow`. Enter the following command in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete.
`> sphereGranFlow` <div align="center">
in <b>settings/settingsDict</b> file
</div>
## Post processing ```C++
After finishing the simulation, you can render the results in Paraview. To convert the results to VTK format, just enter the following command in the terminal. This will converts all the results (particles and geometry) to VTK format and store them in folder `VTK/`. dt 0.00001; // time step for integration (s)
`> pFlowToVTK --binary` startTime 0; // start time for simulation
endTime 10; // end time for simulation
saveInterval 0.1; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk
excludeObjects ();
integrationMethod AdamsBashforth2; // integration method
integrationHistory off; // to save space on disk
writeFormat ascii; // data writing format (ascii or binary)
timersReport Yes; // report timers (Yes or No)
```
## Running the Case
To execute the simulation, follow these steps in order:
1. Create the geometry:
```
geometryPhasicFlow
```
2. Create the initial particle fields:
```
particlesPhasicFlow
```
3. Run the simulation:
```
sphereGranFlow
```
Depending on your computational resources, the simulation may take from a few minutes to several hours to complete.
## Post Processing
After the simulation completes, you can visualize the results in ParaView by converting them to VTK format:
```
pFlowToVTK --binary
```
This command converts all simulation results (particles and geometry) to VTK format and stores them in a `VTK/` folder. You can then open these files in ParaView for detailed analysis and visualization.
For more specific field output, you can specify fields:
```
pFlowToVTK --binary --fields diameter velocity id
```

View File

@ -6,6 +6,7 @@ objectName interaction;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
materials (prop1); // a list of materials names materials (prop1); // a list of materials names
densities (1000.0); // density of materials [kg/m3] densities (1000.0); // density of materials [kg/m3]
@ -15,33 +16,33 @@ contactListType sortedContactList;
contactSearch contactSearch
{ {
method NBS; // method for broad search method NBS; // method for broad search
updateInterval 10; updateInterval 10;
sizeRatio 1.1; sizeRatio 1.1;
cellExtent 0.55; cellExtent 0.55;
adjustableBox Yes; adjustableBox Yes;
} }
model model
{ {
contactForceModel nonLinearNonLimited; contactForceModel nonLinearNonLimited;
rollingFrictionModel normal; rollingFrictionModel normal;
Yeff (1.0e6); // Young modulus [Pa] Yeff (1.0e6); // Young modulus [Pa]
Geff (0.8e6); // Shear modulus [Pa] Geff (0.8e6); // Shear modulus [Pa]
nu (0.25); // Poisson's ratio [-] nu (0.25); // Poisson's ratio [-]
en (0.7); // coefficient of normal restitution en (0.7); // coefficient of normal restitution
mu (0.3); // dynamic friction mu (0.3); // dynamic friction
mur (0.1); // rolling friction mur (0.1); // rolling friction
} }

View File

@ -1,13 +0,0 @@
/* -------------------------------*- C++ -*--------------------------------- *\
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active No; // is insertion active -> Yes or No
collisionCheck No; // is checked -> Yes or No

View File

@ -2,12 +2,12 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName sphereDict; objectName sphereDict;
objectType sphereShape; objectType sphereShape;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (sphere1); // names of shapes names (sphere1); // names of shapes
diameters (0.004); // diameter of shapes diameters (0.004); // diameter of shapes
materials (prop1); // material names for shapes materials (prop1); // material names for shapes

View File

@ -2,46 +2,48 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName domainDict; objectName domainDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (-0.12 -0.12 0.00); // lower corner point of the box
max (0.12 0.12 0.11); // upper corner point of the box // Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.12 -0.12 0.00); // lower corner point of the box
max (0.12 0.12 0.11); // upper corner point of the box
} }
boundaries boundaries
{ {
left left
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
right right
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
bottom bottom
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
top top
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
rear rear
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
front front
{ {
type exit; // other options: periodict, reflective type exit; // other options: periodic, reflective
} }
} }

View File

@ -6,6 +6,7 @@ objectName geometryDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
motionModel rotatingAxis; motionModel rotatingAxis;
rotatingAxisInfo // information for rotatingAxisMotion motion model rotatingAxisInfo // information for rotatingAxisMotion motion model
@ -25,7 +26,6 @@ surfaces
/* /*
A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1) A cylinder with begin and end radii 0.12 m and axis points at (0 0 0) and (0 0 0.1)
*/ */
cylinder cylinder
{ {
type cylinderWall; // type of the wall type cylinderWall; // type of the wall
@ -48,7 +48,6 @@ surfaces
/* /*
This is a plane wall at the rear end of cylinder This is a plane wall at the rear end of cylinder
*/ */
wall1 wall1
{ {
type planeWall; // type of the wall type planeWall; // type of the wall
@ -69,7 +68,6 @@ surfaces
/* /*
This is a plane wall at the front end of cylinder This is a plane wall at the front end of cylinder
*/ */
wall2 wall2
{ {
type planeWall; // type of the wall type planeWall; // type of the wall

View File

@ -2,58 +2,55 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particlesDict; objectName particlesDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
setFields setFields
{ {
/* /*
Default value for fields defined for particles Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
defaultValue
{
velocity realx3 (0 0 0); // linear velocity (m/s)
These fields should always be defined for simulations with acceleration realx3 (0 0 0); // linear acceleration (m/s2)
spherical particles. rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
*/
defaultValue shapeName word sphere1; // name of the particle shape
{ }
velocity realx3 (0 0 0); // linear velocity (m/s)
acceleration realx3 (0 0 0); // linear acceleration (m/s2) selectors
{
rVelocity realx3 (0 0 0); // rotational velocity (rad/s) }
shapeName word sphere1; // name of the particle shape
}
selectors
{
}
} }
positionParticles // positions particles positionParticles // positions particles
{ {
method ordered; // other options: random and empty method ordered; // other options: random and empty
mortonSorting Yes; // perform initial sorting based on morton code? mortonSorting Yes; // perform initial sorting based on morton code?
orderedInfo orderedInfo
{ {
diameter 0.004; // minimum space between centers of particles distance 0.004; // minimum distance between particles centers
numPoints 30000; // number of particles in the simulation numPoints 30000; // number of particles in the simulation
axisOrder (z y x); // axis order for filling the space with particles axisOrder (z y x); // axis order for filling the space with particles
} }
regionType box; // other options: cylinder and sphere regionType box; // other options: cylinder and sphere
boxInfo // box information for positioning particles boxInfo // box information for positioning particles
{ {
min (-0.08 -0.08 0.015); // lower corner point of the box min (-0.08 -0.08 0.015); // lower corner point of the box
max ( 0.08 0.08 0.098); // upper corner point of the box max ( 0.08 0.08 0.098); // upper corner point of the box
} }
} }

View File

@ -2,33 +2,36 @@
| phasicFlow File | | phasicFlow File |
| copyright: www.cemf.ir | | copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName settingsDict; objectName settingsDict;
objectType dictionary; objectType dictionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
run rotatingDrumSmall; run rotatingDrumSmall;
dt 0.00001; // time step for integration (s) dt 0.00001; // time step for integration (s)
startTime 0; // start time for simulation startTime 0; // start time for simulation
endTime 10; // end time for simulation endTime 10; // end time for simulation
saveInterval 0.1; // time interval for saving the simulation saveInterval 0.1; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder timePrecision 6; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2) g (0 -9.8 0); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk includeObjects (diameter); // save necessary (i.e., required) data on disk
// exclude unnecessary data from saving on disk // exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary) integrationHistory off;
timersReport Yes; // report timers (Yes or No) writeFormat ascii; // data writting format (ascii or binary)
timersReportInterval 0.01; // time interval for reporting timers timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.01; // time interval for reporting timers

View File

@ -38,7 +38,7 @@ positionParticles
orderedInfo orderedInfo
{ {
diameter 0.005; // minimum space between centers of particles distance 0.005; // minimum distance between particles centers
numPoints 24000; // number of particles in the simulation numPoints 24000; // number of particles in the simulation