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

@ -1,4 +1,5 @@
# 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.
* **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.
@ -15,10 +16,13 @@ The problem is to simulate a rotating drum with a diameter of 0.24 m, a length o
</html>
# 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`.
## 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.
```C++
// names of shapes
names (smallSphere largeSphere);
@ -28,8 +32,8 @@ diameters (0.004 0.005);
materials (lightMat heavyMat);
```
## 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.
For example, for the insertion region for inserting light particles is shown below.
@ -39,19 +43,20 @@ in <b>caseSetup/particleInsertion</b> file
```C++
// Right Layer Region
layerrightregion
// Right Region
right_region
{
// type of insertion region
timeControl simulationTime;
regionType cylinder;
// insertion rate (particles/s)
rate 12500;
// Start time of LightParticles insertion (s)
timeControl simulationTime;
// Start time of insertion (s)
startTime 0;
// End time of LightParticles insertion (s)
// End time of insertion (s)
endTime 1;
// Time Interval of LightParticles insertion (s)
// Time Interval of insertion (s)
insertionInterval 0.025;
cylinderInfo
@ -62,8 +67,20 @@ layerrightregion
// radius of cylinder (m)
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
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).
@ -103,6 +120,7 @@ densities (1000 1500 2500);
0.1 0.1
0.1);
```
## Settings
### 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.
@ -163,7 +181,9 @@ 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.
```C++
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
@ -181,7 +201,9 @@ rotatingAxisInfo
}
}
```
## Performing Simulation
To run simulations, type the following commands in the terminal one at a time.
Enter `particlesPhasicFlow` command to create the initial fields for particles.

View File

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

View File

@ -6,14 +6,14 @@ objectName particleInsertion;
objectType dicrionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No
/*
Two layers of particles are packed one-by-one using 1 insertion steps
*/
layerrightregion // Right Layer Region
right_region
{
timeControl simulationTime;
@ -21,11 +21,11 @@ layerrightregion // Right Layer Region
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
{
@ -47,7 +47,7 @@ layerrightregion // Right Layer Region
}
}
layerleftregion // Left Layer Region
left_region
{
timeControl simulationTime;
@ -55,11 +55,11 @@ layerleftregion // Left Layer Region
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
{

View File

@ -6,6 +6,7 @@ objectName sphereDict;
objectType sphereShape;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
names (smallSphere largeSphere); // names of shapes
diameters (0.004 0.005); // diameter of shapes (m)

View File

@ -6,7 +6,9 @@ objectName domainDict;
objectType dictionary;
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.328 0.095 -0.025); // lower corner point of the box
@ -22,26 +24,26 @@ boundaries
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;
rotatingAxisInfo

View File

@ -10,9 +10,7 @@ setFields
{
/*
Default value for fields defined for particles
These fields should always be defined for simulations with
spherical particles.
*/
@ -29,30 +27,13 @@ setFields
selectors
{
shapeAssigne
}
}
positionParticles
{
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
{
method empty; // other options: random and ordered
method empty; // other options: random, file and ordered
}

View File

@ -20,14 +20,16 @@ timePrecision 6; // maximum number of digits for time
g (0 -9.8 0); // gravity vector (m/s2)
// save necessary (i.e., required) data on disk
// save necessary data on disk
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 pStructPosition.dy1 pStructVelocity.dy1);
excludeObjects ();
integrationMethod AdamsBashforth2; // integration method
integrationHistory off; // to sace space on disk
writeFormat ascii; // data writting format (ascii or binary)
timersReport Yes; // report timers (Yes or No)

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

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
/*
Two layers of particles are packed one-by-one using tho insertion steps
@ -69,12 +70,11 @@ leftregion
{
/* 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

View File

@ -25,26 +25,26 @@ boundaries
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@ -26,7 +26,6 @@ feeder
boxInfo
{
min ( -0.15 0.34 0.01); // (m,m,m)
max ( 0.15 0.36 0.15); // (m,m,m)
}

View File

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

View File

@ -13,8 +13,6 @@ 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

View File

@ -26,15 +26,13 @@ writeFormat binary; // field files will be saved in binary format
// A list of options: AB2, AB3, AB4, AB5
integrationMethod AdamsBashforth4; // integration method
integrationHistory off;
// overrides the default behavior
includeObjects (diameter);
// exclude unnecessary data from saving on disk
excludeObjects (rVelocity.dy1 rVelocity.dy2 rVelocity.dy3
pStructPosition.dy1 pStructPosition.dy2 pStructPosition.dy3
pStructVelocity.dy1 pStructVelocity.dy2 pStructVelocity.dy3);
excludeObjects ();
timersReport Yes; // report timers?

View File

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

View File

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