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`.
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.
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,31 +43,44 @@ 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)
// type of insertion region
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
{
// Coordinates of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05);
p1 (-0.15 0.24 0.05);
// radius of cylinder (m)
radius 0.035;
// Coordinates of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05);
p1 (-0.15 0.24 0.05);
// 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).
@ -73,36 +90,37 @@ materials (lightMat heavyMat wallMat);
// density of materials [kg/m3]
densities (1000 1500 2500);
/*
/*
Property (lightMat-lightMat lightMat-heavyMat lightMat-wallMat
heavyMat-heavyMat heavyMat-wallMat
wallMat-wallMat );
*/
// Young modulus [Pa]
*/
// Young modulus [Pa]
Yeff (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
0.8e6 0.8e6
0.8e6);
// Poisson's ratio [-]
// Poisson's ratio [-]
nu (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
0.97 0.85
1.00);
// dynamic friction
// dynamic friction
mu (0.65 0.65 0.35
0.65 0.35
0.35);
// rolling friction
// rolling friction
mur (0.1 0.1 0.1
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,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.
```C++
motionModel rotatingAxis;
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
{
// first point for the axis of rotation
p1 (-0.1974 0.2269 0);
// second point for the axis of rotation
p2 (-0.1974 0.2269 0.1);
// rotation speed (rad/s) => 15 rpm
omega 2.38733;
// Start time of Geometry Rotating
startTime 2;
// End time of Geometry Rotating
endTime 9.5;
p1 (-0.1974 0.2269 0);
// second point for the axis of rotation
p2 (-0.1974 0.2269 0.1);
// rotation speed (rad/s) => 15 rpm
omega 2.38733;
// Start time of Geometry Rotating
startTime 2;
// End time of Geometry Rotating
endTime 9.5;
}
}
```
## 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.
Enter `geometryPhasicFlow` command to create the Geometry.
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;
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,78 +6,78 @@ objectName particleInsertion;
objectType dicrionary;
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
*/
layerrightregion // Right Layer Region
right_region
{
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
{
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
{
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
{
smallSphere 1; // mixture composition of inserted particles
smallSphere 1; // mixture composition of inserted particles
}
}
layerleftregion // Left Layer Region
left_region
{
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
{
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
{
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
{
largeSphere 1; // only heavySphere
largeSphere 1; // only heavySphere
}
}

View File

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

View File

@ -6,42 +6,44 @@ objectName domainDict;
objectType dictionary;
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
{
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

@ -2,80 +2,81 @@
| phasicFlow File |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName geometryDict;
objectType dictionary;
objectName geometryDict;
objectType dictionary;
fileFormat ASCII;
/*---------------------------------------------------------------------------*/
motionModel rotatingAxis;
rotatingAxisInfo
{
rotAxis
{
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
omega 2.38733; // rotation speed (rad/s) => 15 rpm
startTime 2; // Start time of Geometry Rotating
endTime 9.5; // End time of Geometry Rotating
}
{
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
omega 2.38733; // rotation speed (rad/s) => 15 rpm
startTime 2; // Start time of Geometry Rotating
endTime 9.5; // End time of Geometry Rotating
}
}
surfaces
{
body
{
type stlWall; // type of the wall
file Body.stl; // file name in stl folder
material wallMat; // material name of this wall
motion rotAxis; // motion component name
}
body
{
type stlWall; // type of the wall
file Body.stl; // file name in stl folder
material wallMat; // material name of this wall
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
{
type cylinderWall; // type of the wall
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
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
rearEnd
{
type cylinderWall; // type of the wall
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
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
/*
This a cylinder Wall at the front of Cylinder
*/
/*
This a cylinder Wall at the front of Cylinder
*/
frontEnd
{
type cylinderWall; // type of the wall
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
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
frontEnd
{
type cylinderWall; // type of the wall
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
radius1 0.0001; // Radius of p1
radius2 0.12; // Radius of p2
material wallMat; // material name of the wall
motion rotAxis; // motion component name
}
}

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
{
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 |
| copyright: www.cemf.ir |
\* ------------------------------------------------------------------------- */
objectName settingsDict;
objectType dictionary;
objectName settingsDict;
objectType dictionary;
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);
// 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