Merge branch 'PhasicFlow:main' into main

This commit is contained in:
Simboy 2025-03-07 01:20:31 +08:00 committed by GitHub
commit 3ff4ad1469
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 145 additions and 206 deletions

View File

@ -1,5 +1,5 @@
# Problem Definition # Problem Definition (v-1.0)
The problem is to simulate a rotating drum with the diameter **0.24 m**, the length **0.1 m** and **6** Baffles, rotating at **15 rpm**. This drum is filled with **20000** Particles.The timestep for integration is **0.00001 s**. There are 2 types of Particles in this drum each are being inserted during 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 +15,10 @@ The problem is to simulate a rotating drum with the diameter **0.24 m**, the len
</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 sotred in three folders: `caseSetup`, `setting` and `stl` (see the above folders). 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/sphereShape` 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);
@ -30,7 +30,7 @@ materials (lightMat heavyMat);
## Particle Insertion ## Particle Insertion
In this case we have two region for inserting our particles. In the both region we define rate of insertion, start and end time of insertion, information for the volume of the space throught which particles are being inserted. The insertion phase in the simulation is performed between times 0 and 1 seconds. 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.
<div align="center"> <div align="center">
@ -43,7 +43,8 @@ in <b>caseSetup/particleInsertion</b> file
layerrightregion layerrightregion
{ {
// type of insertion region // type of insertion region
type cylinderRegion; timeControl simulationTime;
regionType cylinder;
// insertion rate (particles/s) // insertion rate (particles/s)
rate 12500; rate 12500;
// Start time of LightParticles insertion (s) // Start time of LightParticles insertion (s)
@ -51,9 +52,9 @@ layerrightregion
// End time of LightParticles insertion (s) // End time of LightParticles insertion (s)
endTime 1; endTime 1;
// Time Interval of LightParticles insertion (s) // Time Interval of LightParticles insertion (s)
interval 0.025; insertionInterval 0.025;
cylinderRegionInfo 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);
@ -64,7 +65,7 @@ layerrightregion
} }
``` ```
## Interaction between particles and walls ## Interaction between particles and walls
In `caseSetup/interaction` file, material names and properties and interaction parameters are defined: interaction between the particles and the shell of rotating drum. Since we are defining 3 materials for simulation, the interaction matrix is 3x3, while we are only required to enter upper-triangle elements (interactions are symetric). 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).
```C++ ```C++
// a list of materials names // a list of materials names
@ -93,10 +94,6 @@ densities (1000 1500 2500);
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);
// coefficient of tangential restitution
et (1.0 1.0 1.0
1.0 1.0
1.0);
// 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
@ -166,7 +163,8 @@ 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++
rotatingAxisMotionInfo motionModel rotatingAxis;
rotatingAxisInfo
{ {
rotAxis rotAxis
{ {
@ -184,9 +182,9 @@ rotatingAxisMotionInfo
} }
``` ```
## Performing Simulation ## Performing Simulation
To perform simulations, enter the following commands one after another in the terminal. 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 storred in ./VTK folder. After finishing the simulation, you can use `pFlowtoVTK` to convert the results into vtk format stored in ./VTK folder.

View File

@ -53,10 +53,6 @@ model
0.97 0.85 0.97 0.85
1.00); // coefficient of normal restitution 1.00); // coefficient of normal restitution
et (1.0 1.0 1.0
1.0 1.0
1.0); // coefficient of tangential restitution
mu (0.65 0.65 0.35 mu (0.65 0.65 0.35
0.65 0.35 0.65 0.35
0.35); // dynamic friction 0.35); // dynamic friction

View File

@ -8,8 +8,6 @@ fileFormat ASCII;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
active Yes; // is insertion active -> Yes or No active Yes; // is insertion active -> Yes or No
checkForCollision No; // is checked -> 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
*/ */
@ -31,8 +29,7 @@ layerrightregion // Right Layer Region
cylinderInfo cylinderInfo
{ {
p2 (-0.15 0.25 0.05); // Top of cylinderRegion (m,m,m)
p2 (-0.15 0.25 0.05); //
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)

View File

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

View File

@ -13,25 +13,8 @@ globalBox // Simulation domain: every par
max (-0.068 0.355 0.125); // upper corner point of the box max (-0.068 0.355 0.125); // upper corner point of the box
} }
decomposition
{
direction z;
}
boundaries 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 left
{ {
type exit; // other options: periodic, reflective type exit; // other options: periodic, reflective

View File

@ -79,4 +79,3 @@ surfaces
motion rotAxis; // motion component name motion rotAxis; // motion component name
} }
} }

View File

@ -52,27 +52,7 @@ setFields
positionParticles // positions particles positionParticles // positions particles
{ {
method ordered; // other options: random and empty method empty; // other options: random and ordered
mortonSorting Yes; // perform initial sorting based on morton code?
orderedInfo
{
diameter 0.005; // minimum space between centers of particles
numPoints 20000; // 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 0.2); // upper corner point of the box
}
} }

View File

@ -20,7 +20,8 @@ timePrecision 6; // maximum number of digits for time
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 // save necessary (i.e., required) data on disk
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);
@ -31,4 +32,4 @@ writeFormat ascii; // data writting format (ascii or binary
timersReport Yes; // report timers (Yes or No) timersReport Yes; // report timers (Yes or No)
timersReportInterval 0.01; // time interval for reporting timers timersReportInterval 0.1; // time interval for reporting timers