Skip to content

Commit 012e386

Browse files
Merge pull request #88 from pedramyousefi/main
The fisrt Readme file added
2 parents 6103177 + 413f054 commit 012e386

File tree

1 file changed

+228
-0
lines changed
  • tutorials/sphereGranFlow/screwConveyor

1 file changed

+228
-0
lines changed
Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
# Simulating a screw conveyor {#screwConveyor}
2+
## Problem definition
3+
The problem is to simulate a screw conveyorwith the diameter 0.2 m and the length 1 m and 20 cm pitch. It is filled with 30,000 4-mm spherical particles. The timestep for integration is 0.00001 s.
4+
<div align="center"><b>
5+
a view of rotating drum
6+
7+
![]()
8+
</b></div>
9+
10+
***
11+
12+
## Setting up the case
13+
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.
14+
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`).
15+
16+
17+
### Creating particles
18+
19+
Open the file `settings/particlesDict`. Two dictionaries, `positionParticles` and `setFields` position particles and set the field values for the particles.
20+
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.
21+
22+
<div align="center">
23+
in <b>settings/particlesDict</b> file
24+
</div>
25+
26+
```C++
27+
positionParticles
28+
{
29+
method empty; // creates the required fields with zero particles (empty).
30+
31+
maxNumberOfParticles 50000; // maximum number of particles in the simulation
32+
mortonSorting Yes; // perform initial sorting based on morton code?
33+
34+
}
35+
```
36+
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`).
37+
38+
<div align="center">
39+
in <b>settings/particlesDict</b> file
40+
</div>
41+
42+
```C++
43+
setFields
44+
{
45+
defaultValue
46+
{
47+
velocity realx3 (0 0 0); // linear velocity (m/s)
48+
acceleration realx3 (0 0 0); // linear acceleration (m/s2)
49+
rotVelocity realx3 (0 0 0); // rotational velocity (rad/s)
50+
shapeName word lightSphere; // name of the particle shape
51+
}
52+
53+
selectors
54+
{}
55+
}
56+
```
57+
58+
Enter the following command in the terminal to create the particles and store them in `0` folder.
59+
60+
`> particlesPhasicFlow`
61+
62+
### Creating geometry
63+
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.
64+
65+
<div align="center">
66+
in <b>settings/geometryDict</b> file
67+
</div>
68+
69+
```C++
70+
motionModel rotatingAxisMotion;
71+
.
72+
.
73+
.
74+
rotatingAxisMotionInfo
75+
{
76+
rotAxis
77+
{
78+
p1 (1.09635 0.2010556 0.22313511); // first point for the axis of rotation
79+
p2 (0.0957492 0.201556 0.22313511); // second point for the axis of rotation
80+
omega 3; // rotation speed (rad/s)
81+
startTime 5;
82+
endTime 30;
83+
}
84+
}
85+
86+
```
87+
In the dictionary `surfaces` you can define all the surfaces (shell) 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 helix, `material` name `prop1`, `motion` component `none` is defined. `helix` define plane helix at center of cylindrical shell, `material` name `prop1` and `motion` component `rotAxis`.
88+
89+
<div align="center">
90+
in <b>settings/geometryDict</b> file
91+
</div>
92+
93+
```C++
94+
surfaces
95+
{
96+
helix
97+
{
98+
type stlWall; // type of the wall
99+
file helix.stl; // file name in stl folder
100+
material prop1; // material name of this wall
101+
motion rotAxis; // motion component name
102+
}
103+
104+
shell
105+
{
106+
type stlWall; // type of the wall
107+
file shell.stl; // file name in stl folder
108+
material prop1; // material name of this wall
109+
motion none; // motion component name
110+
}
111+
112+
}
113+
114+
```
115+
Enter the following command in the terminal to create the geometry and store it in `0/geometry` folder.
116+
117+
`> geometryPhasicFlow`
118+
119+
### Defining properties and interactions
120+
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.
121+
122+
<div align="center">
123+
in <b>caseSetup/interaction</b> file
124+
</div>
125+
126+
```C++
127+
materials (prop1); // a list of materials names
128+
densities (1000.0); // density of materials [kg/m3]
129+
130+
contactListType sortedContactList;
131+
132+
model
133+
{
134+
contactForceModel nonLinearNonLimited;
135+
rollingFrictionModel normal;
136+
137+
Yeff (1.0e6); // Young modulus [Pa]
138+
139+
Geff (0.8e6); // Shear modulus [Pa]
140+
141+
nu (0.25); // Poisson's ratio [-]
142+
143+
en (0.7); // coefficient of normal restitution
144+
145+
et (1.0); // coefficient of tangential restitution
146+
147+
mu (0.3); // dynamic friction
148+
149+
mur (0.1); // rolling friction
150+
151+
}
152+
```
153+
154+
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.
155+
156+
<div align="center">
157+
in <b>caseSetup/interaction</b> file
158+
</div>
159+
160+
```C++
161+
contactSearch
162+
{
163+
method NBS; // method for broad search particle-particle
164+
wallMapping cellMapping; // method for broad search particle-wall
165+
166+
NBSInfo
167+
{
168+
updateFrequency 10; // each 20 timesteps, update neighbor list
169+
sizeRatio 1.1; // bounding box size to particle diameter (max)
170+
}
171+
172+
cellMappingInfo
173+
{
174+
updateFrequency 10; // each 20 timesteps, update neighbor list
175+
cellExtent 0.6; // bounding box for particle-wall search (> 0.5)
176+
}
177+
178+
}
179+
```
180+
181+
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.
182+
183+
<div align="center">
184+
in <b>caseSetup/sphereShape</b> file
185+
</div>
186+
187+
```C++
188+
names (sphere1); // names of shapes
189+
diameters (0.01); // diameter of shapes
190+
materials (prop1); // material names for shapes
191+
```
192+
193+
Other settings for the simulation can be set in file `settings/settingsDict`. The dictionary `domain` defines the a rectangular bounding box with two corner points for the simulation. Each particle that gets out of this box, will be deleted automatically.
194+
195+
<div align="center">
196+
in <b>settings/settingsDict</b> file
197+
</div>
198+
199+
```C++
200+
dt 0.0001; // time step for integration (s)
201+
startTime 0; // start time for simulation
202+
endTime 20; // end time for simulation
203+
saveInterval 0.05; // time interval for saving the simulation
204+
timePrecision 6; // maximum number of digits for time folder
205+
g (0 -9.8 0); // gravity vector (m/s2)
206+
207+
domain
208+
{
209+
min (0.0 -0.06 0.001);
210+
max (1.2 1 0.5);
211+
}
212+
213+
integrationMethod AdamsBashforth3; // integration method
214+
215+
timersReport Yes; // report timers?
216+
217+
timersReportInterval 0.01; // time interval for reporting timers
218+
```
219+
220+
## Running the case
221+
The solver for this simulation is `sphereGranFlow`. Enter the following command in the terminal. Depending on the computational power, it may take a few minutes to a few hours to complete.
222+
223+
`> sphereGranFlow`
224+
225+
## Post processing
226+
After finishing the simulation, you can render the results in Paraview. To convert the results to VTK format, just enter the following command in the terminal. This will converts all the results (particles and geometry) to VTK format and store them in folder `VTK/`.
227+
228+
`> pFlowToVTK`

0 commit comments

Comments
 (0)