Merge branch 'main' of github.com:ramin1728/phasicFlow into main
This commit is contained in:
commit
0032f7f9bc
|
@ -1,5 +1,6 @@
|
|||
# Problem Definition
|
||||
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 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..
|
||||
* **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.
|
||||
|
||||
|
@ -20,18 +21,20 @@ As it has been explained in the previous cases, the simulation case setup is bas
|
|||
## 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.
|
||||
```C++
|
||||
// names of shapes
|
||||
names (smallSphere largeSphere);
|
||||
// diameter of shapes (m)
|
||||
diameters (0.004 0.005);
|
||||
// material names for shapes
|
||||
materials (lightMat heavyMat);
|
||||
|
||||
names (smallSphere largeSphere); // names of shapes
|
||||
|
||||
diameters (0.004 0.005); // diameter of shapes (m)
|
||||
|
||||
materials (lightMat heavyMat); // material names for shapes
|
||||
```
|
||||
|
||||
|
||||
## 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.
|
||||
For example, for the insertion region for inserting light particles is shown below.
|
||||
|
||||
In this case we have two regions for inserting our 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, the insertion region for inserting light particles is shown below.
|
||||
|
||||
<div align="center">
|
||||
in <b>caseSetup/particleInsertion</b> file
|
||||
|
@ -42,29 +45,47 @@ in <b>caseSetup/particleInsertion</b> file
|
|||
// Right Layer Region
|
||||
layerrightregion
|
||||
{
|
||||
// type of insertion region
|
||||
type cylinderRegion;
|
||||
// insertion rate (particles/s)
|
||||
rate 12500;
|
||||
// Start time of LightParticles insertion (s)
|
||||
startTime 0;
|
||||
// End time of LightParticles insertion (s)
|
||||
endTime 1;
|
||||
// Time Interval of LightParticles insertion (s)
|
||||
interval 0.025;
|
||||
regionType cylinder; // type of insertion region
|
||||
|
||||
cylinderRegionInfo
|
||||
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 center of both ends of the insertion cylinder on
|
||||
the right side of the RotatingDrumWithBaffles(m,m,m)
|
||||
*/
|
||||
|
||||
p2 (-0.15 0.25 0.05); // (m,m,m)
|
||||
|
||||
p1 (-0.15 0.24 0.05); // (m,m,m)
|
||||
|
||||
radius 0.035; // radius of cylinder (m)
|
||||
}
|
||||
|
||||
timeControl simulationTime;
|
||||
|
||||
insertionInterval 0.03; // seconds
|
||||
|
||||
rate 12500; // insertion rate (particles/s)
|
||||
|
||||
startTime 0; // Start time of LightParticles insertion (s)
|
||||
|
||||
endTime 1; // End time of LightParticles insertion (s)
|
||||
|
||||
interval 0.025; // Time Interval of LightParticles insertion (s)
|
||||
|
||||
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
|
||||
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++
|
||||
// a list of materials names
|
||||
|
@ -163,6 +184,7 @@ surfaces
|
|||
}
|
||||
```
|
||||
### Rotating Axis Info
|
||||
|
||||
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++
|
||||
|
@ -184,6 +206,7 @@ rotatingAxisMotionInfo
|
|||
}
|
||||
```
|
||||
## Performing Simulation
|
||||
|
||||
To perform simulations, enter the following commands one after another in the terminal.
|
||||
|
||||
Enter `$ particlesPhasicFlow` command to create the initial fields for particles.
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# Simulating a small rotating drum {#rotatingDrumSmall}
|
||||
## Problem definition
|
||||
|
||||
The problem is to simulate a rotating drum with the diameter 0.24 m and the length 0.1 m rotating at 11.6 rpm. 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
|
||||
|
@ -10,14 +11,15 @@ a view of rotating drum
|
|||
***
|
||||
|
||||
## 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`).
|
||||
|
||||
The 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 commands should be entered in the terminal with the current working directory being the simulation case folder (at the top of the `caseSetup` and `settings` folders).
|
||||
|
||||
|
||||
### 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 field values for the particles.
|
||||
In the dictionary `positionParticles`, the positioning method is `positionOrdered`, which positions particles in order in the space defined by `box`. The `box` space is defined by two corner points `min` and `max`. In the dictionary `positionOrderedInfo`, `numPoints` defines the number of particles, `diameter` the distance between two adjacent particles, and `axisOrder` the axis order for filling the space with particles.
|
||||
|
||||
<div align="center">
|
||||
in <b>settings/particlesDict</b> file
|
||||
|
@ -26,25 +28,26 @@ in <b>settings/particlesDict</b> file
|
|||
```C++
|
||||
positionParticles
|
||||
{
|
||||
method positionOrdered; // ordered positioning
|
||||
maxNumberOfParticles 40000; // maximum number of particles in the simulation
|
||||
mortonSorting Yes; // perform initial sorting based on morton code?
|
||||
method ordered; // other options: random and empty
|
||||
|
||||
box // box for positioning particles
|
||||
orderedInfo
|
||||
{
|
||||
min (-0.08 -0.08 0.015); // lower corner point of the box
|
||||
diameter 0.004; // minimum space between centers of particles
|
||||
numPoints 30000; // 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 for positioning particles
|
||||
{
|
||||
min (-0.08 -0.08 0.015); // lower corner point of the box
|
||||
|
||||
max ( 0.08 0.08 0.098); // upper corner point of the box
|
||||
}
|
||||
|
||||
positionOrderedInfo
|
||||
{
|
||||
diameter 0.004; // minimum space between centers of particles
|
||||
numPoints 30000; // number of particles in the simulation
|
||||
axisOrder (z y x); // axis order for filling the space with particles
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
In dictionary `setFields`, dictionary `defaultValue` defines the initial value for particle fields (here, `velocity`, `acceleration`, `rotVelocity`, and `shapeName`). Note that `shapeName` field should be consistent with the name of shape that you later set for shapes (here one shape with name `sphere1`).
|
||||
In the `setFields` dictionary, the `defaultValue` dictionary defines the initial value for particle fields (here `velocity`, `acceleration`, `rotVelocity` and `shapeName`). Note that the `shapeName` field should match the name of the shape that you will later set for shapes (here a shape named `sphere1`).
|
||||
|
||||
<div align="center">
|
||||
in <b>settings/particlesDict</b> file
|
||||
|
@ -55,10 +58,10 @@ setFields
|
|||
{
|
||||
defaultValue
|
||||
{
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word sphere1; // name of the particle shape
|
||||
velocity realx3 (0 0 0); // linear velocity (m/s)
|
||||
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
|
||||
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
|
||||
shapeName word sphere1; // name of the particle shape
|
||||
}
|
||||
selectors
|
||||
{}
|
||||
|
@ -70,6 +73,7 @@ Enter the following command in the terminal to create the particles and store th
|
|||
`> 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.
|
||||
|
||||
<div align="center">
|
||||
|
@ -77,21 +81,21 @@ in <b>settings/geometryDict</b> file
|
|||
</div>
|
||||
|
||||
```C++
|
||||
motionModel rotatingAxisMotion;
|
||||
motionModel rotatingAxis;
|
||||
.
|
||||
.
|
||||
.
|
||||
rotatingAxisMotionInfo
|
||||
rotatingAxisInfo
|
||||
{
|
||||
rotAxis
|
||||
{
|
||||
p1 (0.0 0.0 0.0); // first point for the axis of rotation
|
||||
p2 (0.0 0.0 1.0); // second point for the axis of rotation
|
||||
omega 1.214; // rotation speed (rad/s)
|
||||
omega 1.214; // rotation speed (rad/s)
|
||||
}
|
||||
}
|
||||
```
|
||||
In the dictionary `surfaces` you can define all the surfaces (walls) 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 radii, `radius1` and `radius2`, axis end points `p1` and `p2`, `material` name `prop1`, `motion` component `rotAxis` is defined. `resolution` sets number of division for the cylinder shell. `wall1` and `wall2` define two plane walls at two ends of cylindrical shell with coplanar corner points `p1`, `p2`, `p3`, and `p4`, `material` name `prop1` and `motion` component `rotAxis`.
|
||||
The `surfaces` dictionary allows you to define all surfaces (walls) in the simulation. There are two main options: built-in geometries in PhasicFlow and providing surfaces with stl file. Here we will use built-in geometries. In the `cylinder` dictionary a cylindrical shell with end radii `radius1` and `radius2`, axis end points `p1` and `p2`, material name `prop1`, motion component `rotAxis` is defined. `resolution` sets the resolution of the cylinder hull. wall1` and `wall2` define two plane walls at two ends of the cylindrical shell with coplanar vertices `p1`, `p2`, `p3` and `p4`, `material` name `prop1` and `motion` component `rotAxis`.
|
||||
|
||||
<div align="center">
|
||||
in <b>settings/geometryDict</b> file
|
||||
|
@ -138,7 +142,8 @@ Enter the following command in the terminal to create the geometry and store it
|
|||
`> 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.
|
||||
|
||||
The `caseSetup/interaction' file contains material properties. `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 the calculation of rolling friction. Other required properties should be defined in this dictionary.
|
||||
|
||||
<div align="center">
|
||||
in <b>caseSetup/interaction</b> file
|
||||
|
@ -165,7 +170,7 @@ model
|
|||
}
|
||||
```
|
||||
|
||||
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.
|
||||
Dictionary `contactSearch` sets the methods for particle-particle and particle-wall contact search. method' specifies the algorithm for finding the neighbor list for particle-particle contacts and `wallMapping' specifies how particles are mapped to walls for finding the neighbor list for particle-wall contacts. `updateFrequency` specifies the frequency for updating the neighbor list and `sizeRatio` specifies the size of enlarged cells (with respect to particle diameter) for neighbor list search. Larger `sizeRatio` includes more particles in the neighbor list and you need to update it less frequently.
|
||||
|
||||
<div align="center">
|
||||
in <b>caseSetup/interaction</b> file
|
||||
|
@ -174,22 +179,17 @@ in <b>caseSetup/interaction</b> file
|
|||
```C++
|
||||
contactSearch
|
||||
{
|
||||
method NBS; // method for broad search particle-particle
|
||||
wallMapping cellsSimple; // method for broad search particle-wall
|
||||
method NBS; // method for broad search particle-particle
|
||||
|
||||
updateInterval 10;
|
||||
|
||||
NBSInfo
|
||||
{
|
||||
updateFrequency 20; // each 20 timesteps, update neighbor list
|
||||
sizeRatio 1.1; // bounding box size to particle diameter (max)
|
||||
}
|
||||
sizeRatio 1.1;
|
||||
|
||||
cellsSimpleInfo
|
||||
{
|
||||
updateFrequency 20; // each 20 timesteps, update neighbor list
|
||||
cellExtent 0.7; // bounding box for particle-wall search (> 0.5)
|
||||
}
|
||||
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.
|
||||
|
|
Loading…
Reference in New Issue