A rotating drum with two particle sizes is randomly filled and let it rotate to see the segregation of particles. The focus of this tutorial is to show how to use the pre-processing tool, particlesPhasicFlow
, to create the initial mixture of small and large particles.
Note: It is supposed that you have reviewed simulating a rotating drum tutorial before starting this tutorial.
PhasicFlow simulation case setup is based on the text-based files that we provide in two folders located in the simulation case folder: settings
and caseSetup
. Here we will have a look at some important files and the rest can be found in the tutorial folder of this case setup.
Simulation case setup files can be found in tutorials/sphereGranFlow folder.
In file caseSetup/sphereShape
, two particle types with names smallSphere
and largeSphere
and diameters 3 and 5 mm are defined.
In dictionary positionParticles
located in file settings/particlesDict
, 30000 particles are located in a cylindrical region. These particles are positioned in order along z
, x
and then y
axis with 0.005 m distance between their centers.
In dictionary setFields
located in file settings/particlesDict
, you define the initial velocity
, acceleration
, rotVelocity
, and shapeName
fields for all 30000 particles in the simulation. In selectors
dictionary, you can select subsets of particles and set the field value for these subsets. In shapeAssigne
sub-dictionary, the selectRange
selector is defined. It defines a range with begin
(begin index), end
(end index) and stride
to select particles. And in fieldValue
sub-dictionary, the fields values for selected particles are set (any number of field values can be set here).
Note: Other selectors are: selectBox
that selects particles inside a box and randomSelect
that selects particles randomly from a given index range.
Enter the following command in terminal:
> geometryPhasicFlow
> particlesPhasicFlow
> sphereGranFlow
Each executable in PhasicFlow comes with some command line options that you can see them by using flag -h
in front of that command.
> particlesPhasicFlow -h
prints out the following output:
so, with flag --setFields-only
, you can execute the setFields
part of particlesDict
. Now suppose that you have a simulation case which proceeded up to 2 seconds and for any reason you want to change some field value at time 3 s and continue the simulation from 3 s. To this end, you need to change startTime
in settings dictionary to 3, execute particlesPhasicFlow --setFields-only
, and start the simulation.