Merge pull request #214 from PhasicFlow/postprocessPhasicFlow

readme.md files update
This commit is contained in:
PhasicFlow
2025-04-25 16:42:06 +03:30
committed by GitHub
76 changed files with 1697 additions and 1206 deletions

40
tutorials/README.md Normal file
View File

@ -0,0 +1,40 @@
# phasicFlow Tutorials
This directory contains various tutorial examples to help you learn how to use phasicFlow for different particle simulation scenarios. Each tutorial provides a complete working example with configuration files and instructions.
## 1. Sphere DEM Simulations (`sphereGranFlow`)
The most comprehensive collection of tutorials using spherical particles for DEM simulations:
- [Rotating Drum (Small)](./sphereGranFlow/rotatingDrumSmall/) - Simple rotating drum simulation with 30,000 spherical particles (4 mm diameter)
- [Rotating Drum (Medium)](./sphereGranFlow/rotatingDrumMedium/) - Medium-sized rotating drum simulation
- [Rotating Drum with Baffles](./sphereGranFlow/RotatingDrumWithBaffles/) - Rotating drum with internal baffles and binary particle mixture
- [Rotating Drum with Periodic Boundaries](./sphereGranFlow/drum-PeriodicBoundary/) - Simulates an "infinite length" drum using periodic boundaries
- [V-blender](./sphereGranFlow/V-blender/) - V-shaped blender simulation for particle mixing
- [Tote Blender](./sphereGranFlow/toteBlender/) - Double pedestal tote blender simulation with 24,000 particles
- [Binary System of Particles](./sphereGranFlow/binarySystemOfParticles/) - Demonstrates particle segregation in a rotating drum with two particle sizes
- [Screw Conveyor](./sphereGranFlow/screwConveyor/) - Simulates particle transport using a screw conveyor
- [Conveyor Belt](./sphereGranFlow/conveyorBelt/) - Simulates particles on a moving conveyor belt
- [Rotary Air Lock Valve](./sphereGranFlow/RotaryAirLockValve/) - Simulates a rotary air lock valve with particle insertion
- [Layered Silo Filling](./sphereGranFlow/layeredSiloFilling/) - Demonstrates filling a silo with layers of particles
- [Homogenization Silo (Periodic Boundaries)](./sphereGranFlow/homogenizationSilo-PeriodicBoundary/) - Simulates homogenization in a silo with periodic boundaries
## 2. Course-grained (Grain) DEM Simulations (`grainGranFlow`)
Tutorials for simulations with non-spherical (grain-shaped) particles:
- [Rotating Drum](./grainGranFlow/rotatingDrum/) - Demonstrates non-spherical grain particles in a rotating drum
## 3. Geometry Iteration (`iterateGeometry`)
Tutorials focused on geometry handling and visualization:
- [Inclined Screw Conveyor](./iterateGeometry/inclinedScrewConveyor/) - Visualizes the geometry of an inclined screw conveyor without particles
## 4. Post-processing (`postprocessPhasicFlow`)
Tutorials focused on post-processing and analysis:
- [Segregation Analysis](./postprocessPhasicFlow/segregation/) - Demonstrates how to analyze particle segregation in simulation results

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
} }
@ -53,7 +53,8 @@ setFields
selectRandomInfo selectRandomInfo
{ {
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
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{ {
min (0.397538 0.178212 0.00); min (0.397538 0.178212 0.00);
max (0.725537 0.600214 0.06); 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

@ -1,4 +1,5 @@
# Problem Definition (v-1.0) # Problem Definition (v-1.0)
The problem is to simulate a rotating drum with a diameter of 0.24 m, a length of 0.1 m and 6 baffles rotating at 15 rpm. This drum is filled with 20000 particles, the integration time step is 0.00001 s. There are 2 types of particles in this drum, each of which is inserted during the simulation to fill the drum. The problem is to simulate a rotating drum with a diameter of 0.24 m, a length of 0.1 m and 6 baffles rotating at 15 rpm. This drum is filled with 20000 particles, the integration time step is 0.00001 s. There are 2 types of particles in this drum, each of which is inserted during the simulation to fill the drum.
* **12500** Particles with **4 mm** diameter, at the rate of 12500 particles/s for 1 sec. * **12500** Particles with **4 mm** diameter, at the rate of 12500 particles/s for 1 sec.
* **7500** Particles with **5mm** diameter, at the rate of 7500 particles/s for 1 sec. * **7500** Particles with **5mm** diameter, at the rate of 7500 particles/s for 1 sec.
@ -15,10 +16,13 @@ The problem is to simulate a rotating drum with a diameter of 0.24 m, a length o
</html> </html>
# Setting up the Case # Setting up the Case
As it has been explained in the previous cases, the simulation case setup is based on text-based scripts. Here, the simulation case setup are sorted in three folders: `caseSetup`, `setting` and `stl`.
As it has been explained in the previous cases, the simulation case setup is based on text-based scripts. Here, the simulation case setup are sorted in three folders: `caseSetup`, `setting` and `stl`.
## Defining small and large particles ## Defining small and large particles
Then in the `caseSetup/shapes` the diameter and the material name of the particles are defined. Two sizes are defined: 4 and 5 mm.
Then in the `caseSetup/shapes` the diameter and the material name of the particles are defined. Two sizes are defined: 4 and 5 mm.
```C++ ```C++
// names of shapes // names of shapes
names (smallSphere largeSphere); names (smallSphere largeSphere);
@ -28,8 +32,8 @@ diameters (0.004 0.005);
materials (lightMat heavyMat); materials (lightMat heavyMat);
``` ```
## Particle Insertion ## Particle Insertion
In this case we have two regions for inserting the particles. In both regions we define the insertion rate, the start and end time of the insertion, information about the volume of space through which the particles are inserted. The insertion phase in the simulation is performed between times 0 and 1 second. In this case we have two regions for inserting the particles. In both regions we define the insertion rate, the start and end time of the insertion, information about the volume of space through which the particles are inserted. The insertion phase in the simulation is performed between times 0 and 1 second.
For example, for the insertion region for inserting light particles is shown below. For example, for the insertion region for inserting light particles is shown below.
@ -39,31 +43,44 @@ in <b>caseSetup/particleInsertion</b> file
```C++ ```C++
// Right Layer Region // Right Region
layerrightregion right_region
{ {
// type of insertion region // type of insertion region
timeControl simulationTime; regionType cylinder;
regionType cylinder; // insertion rate (particles/s)
// insertion rate (particles/s)
rate 12500; rate 12500;
// Start time of LightParticles insertion (s)
timeControl simulationTime;
// Start time of insertion (s)
startTime 0; startTime 0;
// End time of LightParticles insertion (s) // End time of insertion (s)
endTime 1; endTime 1;
// Time Interval of LightParticles insertion (s) // Time Interval of insertion (s)
insertionInterval 0.025; insertionInterval 0.025;
cylinderInfo cylinderInfo
{ {
// Coordinates of cylinderRegion (m,m,m) // Coordinates of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05); p2 (-0.15 0.25 0.05);
p1 (-0.15 0.24 0.05); p1 (-0.15 0.24 0.05);
// radius of cylinder (m) // radius of cylinder (m)
radius 0.035; radius 0.035;
}
setFields
{
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
}
mixture
{
smallSphere 1; // mixture composition of inserted particles
} }
} }
``` ```
## Interaction between particles and walls ## Interaction between particles and walls
The `caseSetup/interaction` file defines the material names and properties as well as the interaction parameters: the interaction between the particles and the shell of the rotating drum. Since we define 3 materials for simulation, the interaction matrix is 3x3, while we only need to enter upper triangle elements (interactions are symmetric). The `caseSetup/interaction` file defines the material names and properties as well as the interaction parameters: the interaction between the particles and the shell of the rotating drum. Since we define 3 materials for simulation, the interaction matrix is 3x3, while we only need to enter upper triangle elements (interactions are symmetric).
@ -73,36 +90,37 @@ materials (lightMat heavyMat wallMat);
// density of materials [kg/m3] // density of materials [kg/m3]
densities (1000 1500 2500); densities (1000 1500 2500);
/* /*
Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat
heavyMat-heavyMat heavyMat-wallMat heavyMat-heavyMat heavyMat-wallMat
wallMat-wallMat ); wallMat-wallMat );
*/ */
// Young modulus [Pa] // Young modulus [Pa]
Yeff (1.0e6 1.0e6 1.0e6 Yeff (1.0e6 1.0e6 1.0e6
1.0e6 1.0e6 1.0e6 1.0e6
1.0e6); 1.0e6);
// Shear modulus [Pa] // Shear modulus [Pa]
Geff (0.8e6 0.8e6 0.8e6 Geff (0.8e6 0.8e6 0.8e6
0.8e6 0.8e6 0.8e6 0.8e6
0.8e6); 0.8e6);
// Poisson's ratio [-] // Poisson's ratio [-]
nu (0.25 0.25 0.25 nu (0.25 0.25 0.25
0.25 0.25 0.25 0.25
0.25); 0.25);
// coefficient of normal restitution // coefficient of normal restitution
en (0.97 0.97 0.85 en (0.97 0.97 0.85
0.97 0.85 0.97 0.85
1.00); 1.00);
// dynamic friction // dynamic friction
mu (0.65 0.65 0.35 mu (0.65 0.65 0.35
0.65 0.35 0.65 0.35
0.35); 0.35);
// rolling friction // rolling friction
mur (0.1 0.1 0.1 mur (0.1 0.1 0.1
0.1 0.1 0.1 0.1
0.1); 0.1);
``` ```
## Settings ## Settings
### Geometry ### Geometry
In the `settings/geometryDict` file, the geometry and axis of rotation is defined for the drum. The geometry is composed of a body, front and rear ends. In the `settings/geometryDict` file, the geometry and axis of rotation is defined for the drum. The geometry is composed of a body, front and rear ends.
@ -163,28 +181,32 @@ surfaces
In this part of `geometryDict` the information of rotating axis and speed of rotation are defined. The start of rotation is at 2 s. The first 2 seconds of simulation is for allowing particles to settle donw in the drum. In this part of `geometryDict` the information of rotating axis and speed of rotation are defined. The start of rotation is at 2 s. The first 2 seconds of simulation is for allowing particles to settle donw in the drum.
```C++ ```C++
motionModel rotatingAxis;
motionModel rotatingAxis;
rotatingAxisInfo rotatingAxisInfo
{ {
rotAxis rotAxis
{ {
// first point for the axis of rotation // first point for the axis of rotation
p1 (-0.1974 0.2269 0); p1 (-0.1974 0.2269 0);
// second point for the axis of rotation // second point for the axis of rotation
p2 (-0.1974 0.2269 0.1); p2 (-0.1974 0.2269 0.1);
// rotation speed (rad/s) => 15 rpm // rotation speed (rad/s) => 15 rpm
omega 2.38733; omega 2.38733;
// Start time of Geometry Rotating // Start time of Geometry Rotating
startTime 2; startTime 2;
// End time of Geometry Rotating // End time of Geometry Rotating
endTime 9.5; endTime 9.5;
} }
} }
``` ```
## Performing Simulation ## Performing Simulation
To run simulations, type the following commands in the terminal one at a time. To run simulations, type the following commands in the terminal one at a time.
Enter `particlesPhasicFlow` command to create the initial fields for particles. Enter `particlesPhasicFlow` command to create the initial fields for particles.
Enter `geometryPhasicFlow` command to create the Geometry. Enter `geometryPhasicFlow` command to create the Geometry.
At last, enter `sphereGranFlow` command to start the simulation. At last, enter `sphereGranFlow` command to start the simulation.
After finishing the simulation, you can use `pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder. After finishing the simulation, you can use `pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.

View File

@ -6,6 +6,7 @@ objectName interaction;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
materials (lightMat heavyMat wallMat); // a list of materials names materials (lightMat heavyMat wallMat); // a list of materials names
densities (1000 1500 2500); // density of materials [kg/m3] densities (1000 1500 2500); // density of materials [kg/m3]
@ -14,7 +15,7 @@ contactListType sortedContactList;
contactSearch contactSearch
{ {
method NBS; // method for broad search method NBS;
updateInterval 10; updateInterval 10;

View File

@ -6,78 +6,78 @@ objectName particleInsertion;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
active Yes; // is insertion active -> Yes or No
/* /*
Two layers of particles are packed one-by-one using 1 insertion steps Two layers of particles are packed one-by-one using 1 insertion steps
*/ */
right_region
layerrightregion // Right Layer Region
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 12500; // Right Region Particles Insertion Rate (particles/s) rate 12500; // Right Region Particles Insertion Rate (particles/s)
startTime 0; // Start time of LightParticles insertion (s) startTime 0; // Start time of insertion (s)
endTime 1; // End time of LightParticles insertion (s) endTime 1; // End time of insertion (s)
insertionInterval 0.025; // Time Interval of LightParticles insertion (s) insertionInterval 0.025; // Time Interval of particles insertion (s)
cylinderInfo cylinderInfo
{ {
p2 (-0.15 0.25 0.05); // Top of cylinderRegion (m,m,m) p2 (-0.15 0.25 0.05); // Top of cylinderRegion (m,m,m)
p1 (-0.15 0.24 0.05); // Bottom of cylinderRegion (m,m,m) p1 (-0.15 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
radius 0.035; // radius of cylinder (m) radius 0.035; // radius of cylinder (m)
} }
setFields setFields
{ {
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
} }
mixture mixture
{ {
smallSphere 1; // mixture composition of inserted particles smallSphere 1; // mixture composition of inserted particles
} }
} }
layerleftregion // Left Layer Region left_region
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 7500; // Left Region Particles Insertion Rate (particles/s) rate 7500; // Left Region Particles Insertion Rate (particles/s)
startTime 0; // Start time of LightParticles insertion (s) startTime 0; // Start time of insertion (s)
endTime 1; // End time of LightParticles insertion (s) endTime 1; // End time of insertion (s)
insertionInterval 0.025; // Time Interval of LightParticles insertion (s) insertionInterval 0.025; // Time Interval of insertion (s)
cylinderInfo cylinderInfo
{ {
p2 (-0.23 0.25 0.05); // Top of cylinderRegion (m,m,m) p2 (-0.23 0.25 0.05); // Top of cylinderRegion (m,m,m)
p1 (-0.23 0.24 0.05); // Bottom of cylinderRegion (m,m,m) p1 (-0.23 0.24 0.05); // Bottom of cylinderRegion (m,m,m)
radius 0.035; // radius of cylinder (m) radius 0.035; // radius of cylinder (m)
} }
setFields setFields
{ {
velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles velocity realx3 (0.0 -0.6 0.0); // initial velocity of inserted particles
} }
mixture mixture
{ {
largeSphere 1; // only heavySphere largeSphere 1; // only heavySphere
} }
} }

View File

@ -2,12 +2,13 @@
| 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 (smallSphere largeSphere); // names of shapes
names (smallSphere largeSphere); // names of shapes
diameters (0.004 0.005); // diameter of shapes (m)
diameters (0.004 0.005); // diameter of shapes (m)
materials (lightMat heavyMat); // material names for shapes
materials (lightMat heavyMat); // material names for shapes

View File

@ -6,42 +6,44 @@ 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.328 0.095 -0.025); // lower corner point of the box
max (-0.068 0.355 0.125); // upper corner point of the box // Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{
min (-0.328 0.095 -0.025); // lower corner point of the box
max (-0.068 0.355 0.125); // 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: 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

@ -2,80 +2,81 @@
| 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; motionModel rotatingAxis;
rotatingAxisInfo rotatingAxisInfo
{ {
rotAxis rotAxis
{ {
p1 (-0.1974 0.2269 0); // first point for the axis of rotation p1 (-0.1974 0.2269 0); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.1); // second point for the axis of rotation p2 (-0.1974 0.2269 0.1); // second point for the axis of rotation
omega 2.38733; // rotation speed (rad/s) => 15 rpm omega 2.38733; // rotation speed (rad/s) => 15 rpm
startTime 2; // Start time of Geometry Rotating startTime 2; // Start time of Geometry Rotating
endTime 9.5; // End time of Geometry Rotating endTime 9.5; // End time of Geometry Rotating
} }
} }
surfaces surfaces
{ {
body body
{ {
type stlWall; // type of the wall type stlWall; // type of the wall
file Body.stl; // file name in stl folder file Body.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
} }
/* /*
This is a Cylinder Wall at the rear of cylinder This is a Cylinder Wall at the rear of cylinder
*/ */
rearEnd rearEnd
{ {
type cylinderWall; // type of the wall type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 -0.001); // first point for the axis of rotation p1 (-0.1974 0.2269 -0.001); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0); // second point for the axis of rotation p2 (-0.1974 0.2269 0.0); // second point for the axis of rotation
radius1 0.0001; // Radius of p1 radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2 radius2 0.12; // Radius of p2
material wallMat; // material name of the wall material wallMat; // material name of the wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
/* /*
This a cylinder Wall at the front of Cylinder This a cylinder Wall at the front of Cylinder
*/ */
frontEnd frontEnd
{ {
type cylinderWall; // type of the wall type cylinderWall; // type of the wall
p1 (-0.1974 0.2269 0.0989); // first point for the axis of rotation p1 (-0.1974 0.2269 0.0989); // first point for the axis of rotation
p2 (-0.1974 0.2269 0.0990); // second point for the axis of rotation p2 (-0.1974 0.2269 0.0990); // second point for the axis of rotation
radius1 0.0001; // Radius of p1 radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2 radius2 0.12; // Radius of p2
material wallMat; // material name of the wall material wallMat; // material name of the wall
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
} }

View File

@ -10,9 +10,7 @@ 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.
*/ */
@ -29,30 +27,13 @@ setFields
selectors selectors
{ {
shapeAssigne
{
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
stridedRangeInfo
{
begin 0; // begin index of points
end 20000; // end index of points
stride 3; // stride for selector
}
fieldValue // fields that the selector is applied to
{
shapeName word sphere1; // sets shapeName of the selected points to largeSphere
}
}
} }
} }
positionParticles // positions particles positionParticles
{ {
method empty; // other options: random and ordered method empty; // other options: random, file and ordered
} }

View File

@ -2,34 +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 RotatingDrumwithBaffles; run RotatingDrumwithBaffles;
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.05; // time interval for saving the simulation saveInterval 0.05; // 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 data on disk
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 ();
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary) integrationHistory off; // to sace space on disk
timersReport Yes; // report timers (Yes or No) writeFormat ascii; // data writting format (ascii or binary)
timersReportInterval 0.1; // time interval for reporting timers timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.1; // time interval for reporting timers

View File

@ -0,0 +1,251 @@
# V-blender Simulation (phasicFlow v-1.0)
This tutorial demonstrates the simulation of a V-blender, a common mixing device used in pharmaceutical and powder processing industries. The V-blender consists of a V-shaped vessel that rotates around a horizontal axis, allowing for efficient mixing of particulate materials.
<div align ="center">
<img src="./v-blender.png" style="width: 400px;">
</div>
<div align ="center">
<b>
V-blender simulation with two layers of particles
</b>
</div>
## Problem Definition
The simulation represents a V-blender with the following characteristics:
- The blender is initially empty and is filled with two different particle types in sequence
- First layer: Small particles (10 mm diameter) are inserted from the right side
- Second layer: Slightly larger particles (10.1 mm diameter) are inserted from the left side
- The blender begins rotation at t = 3.0 s and continues until t = 10.0 s
- The rotation speed is set to 3.14 rad/s (approximately 0.5 Hz or 30 RPM)
- The simulation runs for a total of 10 seconds
## Case Setup
The simulation case setup files are organized in the `settings/` and `caseSetup/` folders.
### Particles Definition
Two particle types are defined in the `caseSetup/shapes` file:
```C++
names (smallSphere largeSphere); // names of particles
diameters (0.01 0.0101); // diameter of particles (m)
materials (lightMat lightMat); // material names for particles
```
Both particle types share the same material properties but differ slightly in size to allow for visual distinction during mixing.
### Particle Insertion
Particles are inserted in two sequential phases, as defined in `caseSetup/particleInsertion`:
```C++
active Yes; // is insertion active -> Yes or No
rightregion
{
timeControl simulationTime; // Controls insertion based on simulation time
regionType cylinder; // Defines a cylindrical insertion region
rate 10000; // Inserts 10,000 particles per second
startTime 0.0; // Starts inserting at t = 0s (beginning of simulation)
endTime 1.0; // Stops inserting at t = 1s
insertionInterval 0.025; // Inserts particles every 0.025s
// (40 insertion events during the 1s period)
cylinderInfo {
// Defines cylinder endpoints and radius
p1 (0.0950615 0.12 0.5011585); // First endpoint coordinates (x,y,z) in meters
p2 (0.1150615 0.12 0.4811585); // Second endpoint coordinates (x,y,z) in meters
radius 0.1; // Cylinder radius in meters
}
setFields {
// Initial properties for inserted particles
velocity realx3 (1.2 0.0 -1.2); // Initial velocity vector (x,y,z) in m/s
// Particles move to the right and downward
}
mixture {
// Particle type distribution
smallSphere 1; // 100% of inserted particles are "smallSphere" type
}
}
leftregion
{
timeControl simulationTime; // Controls insertion based on simulation time
regionType cylinder; // Defines a cylindrical insertion region
rate 10000; // Inserts 10,000 particles per second
startTime 1.5; // Starts inserting at t = 1.5s
// (after the first insertion phase)
endTime 2.5; // Stops inserting at t = 2.5s
insertionInterval 0.025; // Inserts particles every 0.025s
// (40 insertion events during the 1s period)
cylinderInfo {
// Defines cylinder endpoints and radius
p1 (0.7562545 0.12 0.50079); // First endpoint coordinates (x,y,z) in meters
p2 (0.7362545 0.12 0.48079); // Second endpoint coordinates (x,y,z) in meters
radius 0.1; // Cylinder radius in meters
}
setFields {
// Initial properties for inserted particles
velocity realx3 (-1.2 0.0 -1.2); // Initial velocity vector (x,y,z) in m/s
// Particles move to the left and downward
}
mixture {
// Particle type distribution
largeSphere 1; // 100% of inserted particles are "largeSphere" type
}
}
```
#### Detailed Explanation of Insertion Parameters
1. **`rightregion` Dictionary**:
- Creates a cylindrical insertion region on the right side of the V-blender
- Active during t=0s to t=1s at the beginning of the simulation
- Particles are inserted from randomly generated positions within the cylinder
- Inserts "smallSphere" particles with 10mm diameter
- Initial velocity (1.2, 0.0, -1.2) m/s directs particles toward the center and bottom of the blender
- 40 insertion events occur (every 0.025s), each adding approximately 250 particles
2. **`leftregion` Dictionary**:
- Creates a symmetrical cylindrical insertion region on the left side of the V-blender
- Active during t=1.5s to t=2.5s, after the first batch of particles has settled
- Inserts "largeSphere" particles with 10.1mm diameter
- Initial velocity (-1.2, 0.0, -1.2) m/s directs particles toward the center and bottom of the blender
- Mirror image of the first insertion but with slightly larger particles
3. **Insertion Region Selection**:
- Cylindrical insertion regions are positioned above each arm of the V-blender
- This arrangement ensures particles fall naturally into the V-blender without initial overlap
4. **Timing Strategy**:
- Sequential insertion with a 0.5s gap between phases allows the first batch to settle
- All particles settle for 0.5s after the second insertion (t=2.5s to t=3.0s)
- Blender rotation begins after all particles have settled (t=3.0s)
### Geometry and Motion
The V-blender geometry is defined in `settings/geometryDict` using an STL file:
```C++
motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxis motion model
{
rotAxis
{
p1 (0.128228 0.116446 0.297901); // first point for the axis of rotation
p2 (0.722596 0.116459 0.297901); // second point for the axis of rotation
omega 3.14; // rotation speed (rad/s)
startTime 3; // start time of rotation
endTime 10; // end time of rotation
}
}
```
The blender starts rotating at t = 3.0 s, after both particle types have been inserted and allowed to settle.
### Simulation Domain and Boundaries
The simulation domain is defined in `settings/domainDict`:
```C++
globalBox
{
min (-0.1 -0.4 0); // lower corner point of the box
max (0.86 0.6 0.6); // upper corner point of the box
}
```
All boundaries are set to "exit" type, meaning particles that go outside the domain will be deleted.
### Particle Interaction Properties
Material properties and interaction parameters are defined in `caseSetup/interaction`:
```C++
materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3]
// Contact force models
model
{
contactForceModel nonLinearNonLimited;
rollingFrictionModel normal;
// Material properties
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
0.97); // coefficient of normal restitution
mu (0.65 0.35
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
}
```
## Running the Simulation
To run this simulation, execute the following commands in sequence:
1. First, create the geometry:
```
geometryPhasicFlow
```
2. Next, initialize the particle system (note: starts with zero particles):
```
particlesPhasicFlow
```
3. Finally, run the simulation:
```
sphereGranFlow
```
The simulation will automatically insert particles according to the defined schedule and begin rotating the V-blender at the specified time.
## Visualizing Results
After the simulation completes, you can convert the results to VTK format for visualization:
```
pFlowToVTK --binary
```
The VTK files will be stored in a new directory called `./VTK` and can be visualized using tools like ParaView or VisIt.
## Expected Behavior
During the simulation, you should observe:
1. Initial filling with small particles from the right side (0-1s)
2. A brief settling period (1-1.5s)
3. Filling with large particles from the left side (1.5-2.5s)
4. Another settling period (2.5-3s)
5. Rotation of the V-blender causing mixing of the two particle types (3-10s)

View File

@ -6,15 +6,16 @@ objectName interaction;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3] materials (wallMat lightMat); // a list of materials names
densities (1000 1000); // density of materials [kg/m3]
contactListType sortedContactList; contactListType sortedContactList;
contactSearch contactSearch
{ {
method NBS; // method for broad search method NBS;
updateInterval 10; updateInterval 10;
@ -33,22 +34,22 @@ model
Yeff (1.0e6 1.0e6 Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa] 1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6 Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa] 0.8e6); // Shear modulus [Pa]
nu (0.25 0.25 nu (0.25 0.25
0.25); // Poisson's ratio [-] 0.25); // Poisson's ratio [-]
en (0.97 0.85 en (0.97 0.85
0.97); // coefficient of normal restitution 0.97); // coefficient of normal restitution
mu (0.65 0.35 mu (0.65 0.35
0.65); // dynamic friction 0.65); // dynamic friction
mur (0.1 0.1 mur (0.1 0.1
0.1); // rolling friction 0.1); // rolling friction
} }

View File

@ -6,9 +6,10 @@ objectName particleInsertion;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
checkForCollision Yes; // is checked -> Yes or No
active Yes; // is insertion active -> Yes or No
/* /*
Two layers of particles are packed one-by-one using tho insertion steps Two layers of particles are packed one-by-one using tho insertion steps
@ -18,15 +19,15 @@ rightregion
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 10000; // Particles Insertion Rate (particles/s) rate 10000; // Particles Insertion Rate (particles/s)
startTime 0.0; // start time of small particles insertion (s) startTime 0.0; // start time of small particles insertion (s)
endTime 1; // end time of small particles insertion (s) endTime 1; // end time of small particles insertion (s)
insertionInterval 0.025; // time interval of small particles insertion (s) insertionInterval 0.025; // time interval of small particles insertion (s)
cylinderInfo cylinderInfo
{ {
@ -37,17 +38,17 @@ rightregion
p2 (0.1150615 0.12 0.4811585); p2 (0.1150615 0.12 0.4811585);
radius 0.1; // radius of cylinder (m) radius 0.1; // radius of cylinder (m)
} }
setFields setFields
{ {
velocity realx3 (1.2 0.0 -1.2); // initial velocity of inserted particles velocity realx3 (1.2 0.0 -1.2); // initial velocity of inserted particles
} }
mixture mixture
{ {
smallSphere 1; // first layer of inserted particles smallSphere 1; // first layer of inserted particles
} }
} }
@ -55,35 +56,34 @@ leftregion
{ {
timeControl simulationTime; timeControl simulationTime;
regionType cylinder; // type of insertion region regionType cylinder; // type of insertion region
rate 10000; // Particles Insertion Rate (particles/s) rate 10000; // Particles Insertion Rate (particles/s)
startTime 1.5; // start time of large particles insertion (s) startTime 1.5; // start time of large particles insertion (s)
endTime 2.5; // end time of large particles insertion (s) endTime 2.5; // end time of large particles insertion (s)
insertionInterval 0.025; // time interval of large particles insertion (s) insertionInterval 0.025; // time interval of large particles insertion (s)
cylinderInfo cylinderInfo
{ {
/* coordinates of center of both ends of the insertion /* coordinates of center of both ends of the insertion
cylinder on the left side of the V-blender (m,m,m) */ cylinder on the left side of the V-blender (m,m,m) */
p1 ( 0.7562545 0.12 0.50079); p1 ( 0.7562545 0.12 0.50079);
p2 ( 0.7362545 0.12 0.48079); p2 ( 0.7362545 0.12 0.48079);
radius 0.1; // radius of cylinder (m) radius 0.1;
} }
setFields setFields
{ {
velocity realx3 (-1.2 0.0 -1.2); // initial velocity of inserted particles velocity realx3 (-1.2 0.0 -1.2); // initial velocity of inserted particles
} }
mixture mixture
{ {
largeSphere 1; // second layer of inserted particles largeSphere 1; // second layer of inserted particles
} }
} }

View File

@ -7,8 +7,8 @@ objectType sphereShape;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
names (smallSphere largeSphere); // names of particles names (smallSphere largeSphere); // names of particles
diameters (0.01 0.0101); // diameter of particles diameters (0.01 0.0101); // diameter of particles
materials (lightMat lightMat); // material names for particles materials (lightMat lightMat); // material names for particles

View File

@ -10,9 +10,9 @@ 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.1 -0.4 0); // lower corner point of the box min (-0.1 -0.4 0); // lower corner point of the box
max (0.86 0.6 0.6); // upper corner point of the box max (0.86 0.6 0.6); // upper corner point of the box
} }
boundaries boundaries
@ -20,31 +20,31 @@ boundaries
left left
{ {
type exit; // other options: periodic, 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; // motion model: rotating object around an axis motionModel rotatingAxis; // motion model: rotating object around an axis
rotatingAxisInfo // information for rotatingAxis motion model rotatingAxisInfo // information for rotatingAxis motion model

View File

@ -2,38 +2,38 @@
| 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 smallSphere; // name of the particle shape shapeName word smallSphere; // 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
mortonSorting Yes; // perform initial sorting based on morton code? mortonSorting Yes; // perform initial sorting based on morton code?
} }

View File

@ -2,23 +2,23 @@
| 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 rotatingVblender; run rotatingVblender;
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.05; // time interval for saving the simulation saveInterval 0.05; // 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 0 -9.8); // gravity vector (m/s2) g (0 0 -9.8); // gravity vector (m/s2)
includeObjects (diameter); // save necessary (i.e., required) data on disk includeObjects (diameter); // save necessary (i.e., required) data on disk
@ -28,12 +28,12 @@ excludeObjects ();
// include the objects to be saved in the time folders // include the objects to be saved in the time folders
includeObject (); includeObject ();
integrationMethod AdamsBashforth2; // integration method integrationMethod AdamsBashforth2; // integration method
integrationHistory off; // Do not save integration history on the disk integrationHistory off; // Do not save integration history on the 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)
timersReportInterval 0.05; // time interval for reporting timers timersReportInterval 0.05; // time interval for reporting timers

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

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
// Simulation domain: every particles that goes outside this domain will be deleted
globalBox
{ {
min (-0.11 -0.11 -0.41); min (-0.11 -0.11 -0.41);
max ( 0.33 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;
// Determines how often do you want to update the new changes in the boundary
updateInterval 10;
// of all boundaries in the simulation domain // The distance from the boundary plane within which particles are marked to be in the boundary list
neighborLength 0.004;
neighborListUpdateInterval 30; left
{
// Determines how often do you want to update the new changes in the boundary 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,17 +24,11 @@ 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)

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; {
p1 ( 0.0 0.0 0.28 ); // (m,m,m) radius 0.09;
p2 ( 0.0 0.0 0.29); // (m,m,m) p1 ( 0.0 0.0 0.28 ); // (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
material wallMat; // material name of the wall
p4 (-0.04 0.04 -0.1); // fourth point of the wall motion gateMotion;
}
material wallMat; // material name of the wall
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,114 +128,119 @@ 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;
sizeRatio 1.1; sizeRatio 1.1;
@ -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;
sizeRatio 1.1; updateInterval 10;
cellExtent 0.55; sizeRatio 1.1;
adjustableBox Yes; cellExtent 0.55;
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

@ -4,45 +4,44 @@
\* ------------------------------------------------------------------------- */ \* ------------------------------------------------------------------------- */
objectName particleInsertion; objectName particleInsertion;
objectType dicrionary; objectType dicrionary;
fileFormat ASCII; fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
active yes; // is insertion active? active yes; // is insertion active?
feeder feeder
{ {
rate 2800; // insertion rate (particles/s) rate 2800; // insertion rate (particles/s)
timeControl simulationTime;
startTime 0; timeControl simulationTime;
endTime 100;
insertionInterval 0.04; //s
regionType box;
boxInfo startTime 0;
{
min ( -0.15 0.34 0.01); // (m,m,m) endTime 100;
max ( 0.15 0.36 0.15); // (m,m,m)
} insertionInterval 0.04; //s
// initial velocity of inserted particles regionType box;
setFields
{ boxInfo
velocity realx3 (0.0 -0.65 0); {
} min ( -0.15 0.34 0.01); // (m,m,m)
max ( 0.15 0.36 0.15); // (m,m,m)
// mixture composition of inserted particles }
mixture
{ // initial velocity of inserted particles
sphere1 2; setFields
sphere2 1; {
} velocity realx3 (0.0 -0.65 0);
}
// mixture composition of inserted particles
mixture
{
sphere1 2;
sphere2 1;
}
} }

View File

@ -40,7 +40,6 @@ surfaces
material prop1; // material name of this wall material prop1; // material name of this wall
motion none; // this surface is not moving ==> none motion none; // this surface is not moving ==> none
} }
} }

View File

@ -13,8 +13,6 @@ positionParticles
{ {
// A list of options are: ordered, random // A list of options are: ordered, random
method empty; // creates the required fields with zero particles (empty). method empty; // creates the required fields with zero particles (empty).
mortonSorting Yes; // perform initial sorting based on morton
} }
setFields setFields

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 screwConveyor; run screwConveyor;
dt 0.00002; // time step for integration (s) dt 0.00002; // time step for integration (s)
startTime 0; // start time for simulation startTime 0; // start time for simulation
endTime 20; // end time for simulation endTime 20; // end time for simulation
saveInterval 0.025; // time interval for saving the simulation saveInterval 0.025; // 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 -9.8 0); // gravity vector (m/s2) g (0 -9.8 0); // gravity vector (m/s2)
writeFormat binary; // field files will be saved in binary format writeFormat binary; // field files will be saved in binary format
// A list of options: AB2, AB3, AB4, AB5 // A list of options: AB2, AB3, AB4, AB5
integrationMethod AdamsBashforth4; // integration method integrationMethod AdamsBashforth4; // integration method
integrationHistory off;
// 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);
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

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

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

View File

@ -24,10 +24,12 @@ g (0 0 -9.8); // gravity vector (m/s2)
// include/exclude fields for saving on disk // include/exclude fields for saving on disk
includeObjects (diameter); includeObjects (diameter);
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1); excludeObjects ();
integrationMethod AdamsBashforth2; integrationMethod AdamsBashforth2;
integrationHistory off;
writeFormat ascii; writeFormat ascii;
timersReport Yes; timersReport Yes;