diameter->distance, update in tutorials, v-Blender readme.md

This commit is contained in:
Hamidreza
2025-04-25 16:14:16 +03:30
parent 7c3b90a22d
commit 2593e2acf1
23 changed files with 556 additions and 298 deletions

View File

@ -0,0 +1,250 @@
# 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;">
<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;
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;
contactSearch
{
method NBS; // method for broad search
method NBS;
updateInterval 10;
@ -33,22 +34,22 @@ model
Yeff (1.0e6 1.0e6
1.0e6); // Young modulus [Pa]
1.0e6); // Young modulus [Pa]
Geff (0.8e6 0.8e6
0.8e6); // Shear modulus [Pa]
0.8e6); // Shear modulus [Pa]
nu (0.25 0.25
0.25); // Poisson's ratio [-]
0.25); // Poisson's ratio [-]
en (0.97 0.85
0.97); // coefficient of normal restitution
0.97); // coefficient of normal restitution
mu (0.65 0.35
0.65); // dynamic friction
0.65); // dynamic friction
mur (0.1 0.1
0.1); // rolling friction
0.1); // rolling friction
}

View File

@ -6,9 +6,10 @@ objectName particleInsertion;
objectType dicrionary;
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
@ -18,15 +19,15 @@ rightregion
{
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
{
@ -37,17 +38,17 @@ rightregion
p2 (0.1150615 0.12 0.4811585);
radius 0.1; // radius of cylinder (m)
radius 0.1; // radius of cylinder (m)
}
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
{
smallSphere 1; // first layer of inserted particles
smallSphere 1; // first layer of inserted particles
}
}
@ -55,35 +56,34 @@ leftregion
{
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
{
/* coordinates of center of both ends of the insertion
cylinder on the left side of the V-blender (m,m,m) */
p1 ( 0.7562545 0.12 0.50079);
p2 ( 0.7362545 0.12 0.48079);
radius 0.1; // radius of cylinder (m)
radius 0.1;
}
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
{
largeSphere 1; // second layer of inserted particles
largeSphere 1; // second layer of inserted particles
}
}

View File

@ -7,8 +7,8 @@ objectType sphereShape;
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
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
@ -20,31 +20,31 @@ boundaries
left
{
type exit; // other options: periodic, reflective
type exit; // other options: periodic, reflective
}
right
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
bottom
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
top
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
rear
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
front
{
type exit; // other options: periodict, reflective
type exit; // other options: periodic, reflective
}
}

View File

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

View File

@ -2,38 +2,38 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
objectName particlesDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical 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)
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
{}
{}
}
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 |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
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
@ -28,12 +28,12 @@ excludeObjects ();
// include the objects to be saved in the time folders
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