A new screwConveyor tutorial

This commit is contained in:
HRN 2025-02-20 17:27:36 +03:30
parent 354daab7c5
commit 3954fcf4ab
16 changed files with 89919 additions and 18690 deletions

View File

@ -1,23 +1,24 @@
# Simulating a screw conveyor {#screwConveyor}
## Problem definition
The problem is to simulate a screw conveyorwith the diameter 0.2 m and the length 1 m and 20 cm pitch. It is filled with 30,000 4-mm spherical particles. The timestep for integration is 0.00001 s.
<div align="center"><b>
a view of rotating drum
# Simulating a Screw Conveyor
![]()
</b></div>
## Problem Definition
The problem is to simulate a screw conveyor with a diameter of 0.2 m and a length of 1 m with a variable pitch. It is filled with 10 mm and 9 mm spherical particles. The timestep for integration is 0.00002 s. Particles are inserted from the top of the feeder at a rate of 2800 particles/s. The number composition of large and small particles is 2:1.
<div align="center"><b>
A view of the screw conveyor simulation
</b>
<img src="./screw.jpeg" style="width: 400px;">
</div>
***
## 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`).
## Setting Up the Case
PhasicFlow simulation case setup is based on the 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 dictionary `positionParticles`, the positioning `method` is `positionOrdered`, which position particles in order in the space defined by `box`. `box` space is defined by two corner points `min` and `max`. In dictionary `positionOrderedInfo`, `numPoints` defines number of particles; `diameter`, the distance between two adjacent particles, and `axisOrder` defines the axis order for filling the space by particles.
Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields`, position particles and set the field values for the particles. In the dictionary `positionParticles`, the positioning `method` is `empty`, which means that there are no particles in the simulation at the start.
<div align="center">
in <b>settings/particlesDict</b> file
@ -26,20 +27,20 @@ in <b>settings/particlesDict</b> file
```C++
positionParticles
{
// A list of options are: ordered, random
method empty; // creates the required fields with zero particles (empty).
maxNumberOfParticles 50000; // maximum number of particles in the simulation
mortonSorting Yes; // perform initial sorting based on morton code?
mortonSorting Yes; // perform initial sorting based on morton
}
```
Enter the following command in the terminal to create the particles and store them in `0` folder.
Enter the following command in the terminal to create the particles and store them in the `0` folder:
`> particlesPhasicFlow`
### 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. `rotatingAxisMotion` 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.
### Creating Geometry
In the 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. The `rotatingAxis` model defines a fixed axis which rotates around itself. The dictionary `rotAxis` defines a motion component with `p1` and `p2` as the endpoints of the axis and `omega` as the rotation speed in rad/s. You can define more than one motion component in a simulation.
<div align="center">
in <b>settings/geometryDict</b> file
@ -54,16 +55,16 @@ rotatingAxisMotionInfo
{
rotAxis
{
p1 (1.09635 0.2010556 0.22313511); // first point for the axis of rotation
p2 (0.0957492 0.201556 0.22313511); // second point for the axis of rotation
omega 3; // rotation speed (rad/s)
startTime 5;
endTime 30;
p1 (0 0 0.0); // first point for the axis of rotation
p2 (0 0 1.0); // second point for the axis of rotation
omega 3.14; // rotation speed (rad/s)
startTime 1; // when t>1 s, rotation starts
endTime 30; // when t>30 s, rotation stops
}
}
```
In the dictionary `surfaces` you can define all the surfaces (shell) 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 helix, `material` name `prop1`, `motion` component `none` is defined. `helix` define plane helix at center of cylindrical shell, `material` name `prop1` and `motion` component `rotAxis`.'rotAxis' is use for helix because it is rotating and 'none' is use for shell because It is motionless.
In the dictionary `surfaces`, you can define all the surfaces in the simulation. Two main options are available: built-in geometries in PhasicFlow, and providing surfaces with an STL file (ASCII format). Here we use `stlWall` as a method to provide the surface information through STL files. In the `shell` dictionary, `material` is set to `prop1` and `motion` is set to `none` (meaning this surface is fixed). `helix` defines the screw at the center of the cylindrical part of the shell. For this surface, `material` is set to `prop1` and `motion` is set to `rotAxis`.
<div align="center">
in <b>settings/geometryDict</b> file
@ -75,7 +76,7 @@ surfaces
helix
{
type stlWall; // type of the wall
file helix.stl; // file name in stl folder
file screw.stl; // file name in stl folder
material prop1; // material name of this wall
motion rotAxis; // motion component name
}
@ -85,19 +86,18 @@ surfaces
type stlWall; // type of the wall
file shell.stl; // file name in stl folder
material prop1; // material name of this wall
motion none; // motion component name
motion none; // this surface is not moving ==> none
}
}
```
Enter the following command in the terminal to create the geometry and store it in `0/geometry` folder.
Enter the following command in the terminal to create the geometry and store it in the `0/geometry` folder:
`> geometryPhasicFlow`
### 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.
### Defining Properties and Interactions
In the file `caseSetup/interaction`, you will find properties of materials. `materials` defines a list of material names in the simulation and `densities` sets the corresponding density of each material name. The `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 properties should be defined in this dictionary.
<div align="center">
in <b>caseSetup/interaction</b> file
@ -105,13 +105,14 @@ in <b>caseSetup/interaction</b> file
```C++
materials (prop1); // a list of materials names
densities (1000.0); // density of materials [kg/m3]
densities (2300.0); // density of materials [kg/m3]
contactListType sortedContactList;
model
{
contactForceModel nonLinearNonLimited;
rollingFrictionModel normal;
Yeff (1.0e6); // Young modulus [Pa]
@ -120,18 +121,15 @@ model
nu (0.25); // Poisson's ratio [-]
en (0.7); // coefficient of normal restitution
et (1.0); // coefficient of tangential restitution
en (0.8); // coefficient of normal restitution
mu (0.3); // dynamic friction
mur (0.1); // rolling friction
mur (0.2); // 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 and `wallMapping` shows how particles are mapped onto walls for finding neighbor list for particle-wall contacts. `updateFrequency` sets the frequency for 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 dictionary `contactSearch` sets the methods for broad search. `method` specifies the algorithm for finding the neighbor list for particle-particle contacts. `updateInterval` sets the intervals (in terms of the number of iterations) between each occurrence of updating the neighbor list, and `sizeRatio` sets the size of enlarged cells (with respect to particle diameter) for finding the neighbor list. A larger `sizeRatio` includes more particles in the neighbor list, requiring less frequent updates.
<div align="center">
in <b>caseSetup/interaction</b> file
@ -140,69 +138,61 @@ in <b>caseSetup/interaction</b> file
```C++
contactSearch
{
method NBS; // method for broad search particle-particle
wallMapping cellMapping; // method for broad search particle-wall
method NBS; // method for broad search
NBSInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
sizeRatio 1.1; // bounding box size to particle diameter (max)
}
updateInterval 10;
cellMappingInfo
{
updateFrequency 10; // each 20 timesteps, update neighbor list
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
}
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
```
In the file `caseSetup/sphereShape`, 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 can define a list of `names` for shapes, a list of `diameters` for shapes, and their `materials` names.
<div align="center">
in <b>caseSetup/sphereShape</b> file
in <b>caseSetup/shapes</b> file
</div>
```C++
names (sphere1); // names of shapes
diameters (0.01); // diameter of shapes
materials (prop1); // material names for shapes
names (sphere1 sphere2); // names of shapes
diameters (0.01 0.009); // diameter of shapes
materials (prop1 prop1); // material names for shapes
```
Other settings for the simulation can be set in file `settings/settingsDict`. The dictionary `domain` 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.
Other settings for the simulation can be set in the file `settings/settingsDict`. The dictionary `domain` defines 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">
in <b>settings/settingsDict</b> file
</div>
```C++
dt 0.0001; // time step for integration (s)
dt 0.00002; // time step for integration (s)
startTime 0; // start time for simulation
endTime 20; // end time for simulation
saveInterval 0.05; // time interval for saving the simulation
timePrecision 6; // maximum number of digits for time folder
saveInterval 0.025; // time interval for saving the simulation
timePrecision 4; // maximum number of digits for time folder
g (0 -9.8 0); // gravity vector (m/s2)
domain
{
min (0.0 -0.06 0.001);
max (1.2 1 0.5);
}
integrationMethod AdamsBashforth3; // integration method
timersReport Yes; // report timers?
timersReportInterval 0.01; // time interval for reporting timers
writeFormat binary; // field files will be saved in binary format
...
```
## Running the case
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.
## Running the Case
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`
## 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 converts all the results (particles and geometry) to VTK format and store them in folder `VTK/`.
## Post Processing
`> pFlowToVTK`
After finishing the simulation, you can render the results in ParaView. To convert the results to VTK format, 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:
`> pFlowToVTK --binary -f diameter id velocity`

View File

@ -6,25 +6,12 @@ objectName interaction;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
materials (prop1); // a list of materials names
densities (1000.0); // density of materials [kg/m3]
materials (prop1); // a list of materials names
densities (2300.0); // density of materials [kg/m3]
contactListType sortedContactList;
contactSearch
{
method NBS; // method for broad search
updateInterval 10;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}
model
{
contactForceModel nonLinearNonLimited;
@ -37,14 +24,24 @@ model
nu (0.25); // Poisson's ratio [-]
en (0.7); // coefficient of normal restitution
et (1.0); // coefficient of tangential restitution
en (0.8); // coefficient of normal restitution
mu (0.3); // dynamic friction
mur (0.1); // rolling friction
mur (0.2); // rolling friction
}
contactSearch
{
method NBS; // method for broad search
updateInterval 10;
sizeRatio 1.1;
cellExtent 0.55;
adjustableBox Yes;
}

View File

@ -6,46 +6,42 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
checkForCollision No; // is checked -> Yes or No
active yes; // is insertion active?
/*
five layers of particles are packed one-by-one using 5 insertion steps
*/
layer0
feeder
{
rate 2800; // insertion rate (particles/s)
timeControl simulationTime;
regionType cylinder; // type of insertion region
startTime 0;
rate 5000; // Particles Insertion Rate (particles/s)
endTime 100;
startTime 0; // Start time of LightParticles insertion (s)
insertionInterval 0.04; //s
endTime 100; // End time of LightParticles insertion (s)
regionType box;
insertionInterval 0.03; // Time Interval of LightParticles insertion (s)
cylinderInfo
boxInfo
{
p1 (0.22 0.730 0.25); // Bottom of cylinderRegion(m,m,m)
p2 (0.22 0.742 0.25); // Top of cylinderRegion (m,m,m)
radius 0.09; // radius of cylinder (m)
min ( -0.15 0.34 0.01); // (m,m,m)
max ( 0.15 0.36 0.15); // (m,m,m)
}
// initial velocity of inserted particles
setFields
{
velocity realx3 (0.0 -0.6 -0); // initial velocity of inserted particles
velocity realx3 (0.0 -0.65 0);
}
// mixture composition of inserted particles
mixture
{
sphere1 1; // mixture composition of inserted particles
sphere1 2;
sphere2 1;
}
}

View File

@ -3,11 +3,10 @@
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName sphereDict;
objectType sphereShape;
objectType shapes;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (sphere1); // names of shapes
diameters (0.01); // diameter of shapes
materials (prop1); // material names for shapes
names (sphere1 sphere2); // names of shapes
diameters (0.01 0.009); // diameter of shapes
materials (prop1 prop1); // material names for shapes

View File

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

View File

@ -15,7 +15,10 @@ echo "3) Running the case"
echo "<--------------------------------------------------------------------->\n"
sphereGranFlow
echo "\n<--------------------------------------------------------------------->"
echo "4) Converting to VTK"
echo "<--------------------------------------------------------------------->\n"
pFlowToVTK -f diameter velocity id
#------------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 KiB

View File

@ -2,63 +2,49 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName domainDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
globalBox // Simulation domain: every particles that goes outside this domain will be deleted
{
min (0.0 -0.06 0.001); // lower corner point of the box
max (1.2 1 0.5); // upper corner point of the box
}
decomposition
// Simulation domain: every particle that goes outside this domain will be deleted
globalBox
{
direction z;
min (-0.2 -0.20 -0.01);
max ( 0.2 0.4 1.05);
}
boundaries
{
neighborListUpdateInterval 50; /* 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 */
updateInterval 10; // Determines how often do you want to update the new changes in the boundary
neighborLength 0.004; // The distance from the boundary plane within which particles are marked to be in the boundary list
left
{
type exit; // other options: periodic, reflective
type exit;
}
right
{
type exit; // other options: periodict, reflective
type exit;
}
bottom
{
type exit; // other options: periodict, reflective
type exit;
}
top
{
type exit; // other options: periodict, reflective
type exit;
}
rear
{
type exit; // other options: periodict, reflective
type exit;
}
front
{
type exit; // other options: periodict, reflective
type exit;
}
}

View File

@ -6,47 +6,41 @@ objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis; // motion model: rotating object around an axis
// motion model: rotating object around an axis
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
{
p1 (1.09635 0.2010556 0.22313511); // first point for the axis of rotation
p2 (0.0957492 0.201556 0.22313511); // second point for the axis of rotation
omega 3; // rotation speed (rad/s)
startTime 5; // Start time of Geometry Rotating
endTime 30; // End time of Geometry Rotating
p1 (0 0 0.0); // first point for the axis of rotation
p2 (0 0 1.0); // second point for the axis of rotation
omega 3.14; // rotation speed (rad/s)
startTime 1;
endTime 30;
}
}
surfaces
{
helix
{
type stlWall; // type of the wall
file helix.stl; // file name in stl folder
file screw.stl; // file name in stl folder
material prop1; // material name of this wall
motion rotAxis; // motion component name
}
shell
{
type stlWall; // type of the wall
file shell.stl; // file name in stl folder
material prop1; // material name of this wall
motion none; // motion component name
motion none; // this surface is not moving ==> none
}
}

View File

@ -6,72 +6,34 @@ objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
// positions particles
positionParticles
{
// A list of options are: ordered, random
method empty; // creates the required fields with zero particles (empty).
mortonSorting Yes; // perform initial sorting based on morton
}
setFields
{
/*
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)
// linear velocity (m/s)
velocity realx3 (0 0 0);
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
// linear acceleration (m/s2)
acceleration realx3 (0 0 0);
rVelocity realx3 (0 0 0); // rotational velocity (rad/s)
// rotational velocity (rad/s)
rVelocity realx3 (0 0 0);
shapeName word sphere1; // name of the particle shape
// name of the particle shape
shapeName word sphere1;
}
selectors
{
shapeAssigne
{
selector stridedRange; // other options: box, cylinder, sphere, randomPoints
stridedRangeInfo
{
begin 0; // begin index of points
end 5000; // 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
{
method ordered; // other options: random and empty
mortonSorting Yes; // perform initial sorting based on morton code?
orderedInfo
{
diameter 0.01; // minimum space between centers of particles
numPoints 5000; // number of particles in the simulation
axisOrder (z y x); // axis order for filling the space with particles
}
regionType box; // other options: cylinder and sphere
boxInfo // box information for positioning particles
{
min (-0.08 -0.08 0.015); // lower corner point of the box
max (0.08 0.08 1); // upper corner point of the box
}
}

View File

@ -6,29 +6,37 @@ objectName settingsDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
run screwConveyor;
dt 0.0001; // time step for integration (s)
dt 0.00002; // time step for integration (s)
startTime 0; // start time for simulation
endTime 20; // end time for simulation
saveInterval 0.05; // time interval for saving the simulation
saveInterval 0.025; // time interval for saving the simulation
timePrecision 6; // 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)
includeObjects (diameter); // save necessary (i.e., required) data on disk
writeFormat binary; // field files will be saved in binary format
// A list of options: AB2, AB3, AB4, AB5
integrationMethod AdamsBashforth4; // integration method
// overrides the default behavior
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3
pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3
pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3);
integrationMethod AdamsBashforth2; // integration method
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers?
timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.01; // time interval for reporting timers
timersReportInterval 0.1; // time interval for reporting timers

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5934
tutorials/sphereGranFlow/screwConveyor/stl/shell.stl Normal file → Executable file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff