Skip to content

Blade in a Silo

This tutorial sets up a blade going down into a silo filled with polyhedra.

Blade

As in the hexapod tutorial, the simulation has three steps, one input file each:

  1. particle generation (generator.msp);
  2. stabilization of the deposit (wait.msp);
  3. addition of the blade and motion (run.msp).

The files are in example/tutorial/blade. The STL files are in the exaDEM-Data repository: the input files read the STL/SHP files from an exaDEM-Data folder copied in the run directory.

Step 1: generation

Drivers

Particles are generated in a cylinder of axis \(Oz\), closed by a base. Both are drivers, registered in setup_drivers:

setup_drivers:
  - register_stl_mesh:
     id: 0
     filename: exaDEM-Data/stl_files/mod_base.shp
     state: {center: [0, 0, -20]}
     params: { motion_type: STATIONARY }
     minkowski: 0.01
  - register_cylinder:
     id: 1
     state: {radius: 25, center: [0, 0, 0], axis: [1, 1, 0]}
     params: { motion_type: STATIONARY }

The base mod_base is the large shape below:

Base

Particles

The polyhedron used in this simulation is defined in shape.shp:

Polyhedron

It is read in input_data, and the particles are created with the lattice operator:

input_data:
  - read_shape_file:
     filename: shape.shp
  - init_rcb_grid
  - lattice:
      structure: SC
      types: [ PolyBig5 ]
      size: [ 4.0 m, 4.0 m, 4.0 m ]
      region: CYL1 and BOX
  - init_fields

Domain

The domain can grow later if needed (expandable: true, along the non-periodic directions). cell_size, grid_dims and bounds must be consistent.

1
2
3
4
5
6
domain:
  cell_size: 5.0 m
  periodic: [false, false, false]
  grid_dims: [10, 10, 8]
  bounds: [[-25 m, -25 m, 0 m], [25 m, 25 m, 40 m]]
  expandable: true

Generation area

The particles are generated in an area that fits the cylinder, intersection of two regions:

1
2
3
4
5
6
7
8
9
particle_regions:
  - CYL1:
      quadric:
        shape: cylz
        transform:
          - scale: [ 23 m, 23 m, 5 m ]
          - translate: [ 0 m, 0 m, 50 m ]
  - BOX:
      bounds: [ [ -25, -25, 35 m ], [ 25 m, 25 m, 40 m ] ]

Generator

New polyhedra are generated every 25,000 steps. This needs the frequency, in global:

global:
  simulation_generator_frequency: 25000

and the operators creating and initializing the particles, in add_generated_particles:

init_fields:
  - radius_from_shape
  - set_rand_velocity:
     var: 0.0001
     mean: [0.0, 0.0, -0.5]
     region: CYL1 and BOX
  - set_rand_vrot_arot:
     region: CYL1 and BOX
  - set_quaternion:
     random: true
     region: CYL1 and BOX
  - set_homothety:
     region: CYL1 and BOX
  - set_density:
     density: 0.0026
     region: CYL1 and BOX
  - update_inertia:
     region: CYL1 and BOX

add_generated_particles:
  - lattice:
      structure: SC
      types: [ PolyBig5 ]
      size: [ 4.0 m, 4.0 m, 4.0 m ]
      region: CYL1 and BOX
  - init_fields

Force field

The contact law parameters and gravity are defined in compute_force:

1
2
3
4
5
6
compute_force:
  - gravity_force:
     gravity: [0, 0, -0.00981]
  - contact_polyhedron:
     config: { kn: 1.257, kt: 1.077, kr: 0.0, mu: 0.0, damp_rate: 0.999 }
     config_driver: { kn: 12.57, kt: 10.77, kr: 0.0, mu: 0.0, damp_rate: 0.999 }

Note

During the deposit, the friction is 0. It is changed when the blade moves, in step 3.

Global parameters

The time step, the number of steps, the Verlet radius (rcut_inc) and the frequencies of the checkpoints and of the ParaView outputs:

1
2
3
4
5
6
7
8
9
global:
  simulation_dump_frequency: 100000
  simulation_end_iteration: 1400000
  simulation_log_frequency: 1000
  simulation_paraview_frequency: 5000
  simulation_load_balance_frequency: -1
  dt: 0.0005 s
  rcut_inc: 0.5 m
  simulation_generator_frequency: 25000

Performance

A larger Verlet radius means less frequent updates of the interaction lists, but longer lists. Find a good trade-off between both.

Run

./exaDEM generator.msp --omp_num_threads 12

After 1,400,000 steps, you reach the configuration below. The deposit is not finished yet: step 2 waits for it to stabilize.

Step 1

Step 2: deposit

The simulation restarts from where it stopped, without the generator. All the stored elements (drivers, shapes, particles) are in ExaDEMOutputDir/CheckpointFiles/: the drivers are included from the .msp file written for this purpose, and the shapes and particles (with the active interactions) are read in input_data:

includes:
  - config_polyhedra.msp
  - ExaDEMOutputDir/CheckpointFiles/driver_0001400000.msp

input_data:
  - read_shape_file:
     filename: ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
  - read_dump_particle_interaction:
     filename: ExaDEMOutputDir/CheckpointFiles/exadem_0001400000.dump
  - radius_from_shape

Warning

Call radius_from_shape, otherwise the interactions are not defined.

Tip

The restart operator now does the same in one line.

After 100,000 steps (step 1,500,000):

Step 2

Step 3: blade motion

Now that the deposit has settled, the blade is set in motion. The simulation restarts from the checkpoint of step 2 as before (drivers, shapes and particles), and the "palefine" STL mesh driver is added with a LINEAR_MOTION type: it goes down along \(-z\) while rotating around the axis of the cylinder. The friction is also enabled: it was kept at 0 during the deposit so that the bed settles without resistance, and is now set to its final value (mu: 0.1 particle-particle, mu: 0.3 particle-driver) so that the blade drags and compacts the grains as it turns.

includes:
  - config_polyhedra.msp
  - ExaDEMOutputDir/CheckpointFiles/driver_0001500000.msp

setup_drivers:
  - register_stl_mesh:
     id: 0
     filename: mod_base.shp
     state: {center: [0, 0, -20]}
     minkowski: 0.01
  - register_stl_mesh:
     id: 2
     filename: exaDEM-Data/stl_files/palefine.stl
     minkowski: 0.05 m
     state: {vrot: [0, 0, -0.004], center: [0, 0, 1.5]}
     params: { motion_type: LINEAR_MOTION, motion_vector: [0, 0, -1], const_vel: 0.0174 }
  - register_cylinder:
     id: 1
     state: {radius: 25, center: [0, 0, 0], axis: [1, 1, 0]}
     params: { motion_type: STATIONARY }

input_data:
  - read_shape_file:
     filename: ExaDEMOutputDir/CheckpointFiles/RestartShapeFile.shp
  - read_dump_particle_interaction:
     filename: ExaDEMOutputDir/CheckpointFiles/exadem_0001500000.dump
  - radius_from_shape

compute_force:
  - gravity_force:
     gravity: [0, 0, -0.00981]
  - contact_polyhedron:
     config: { kn: 1.257, kt: 1.077, kr: 0.0, mu: 0.1, damp_rate: 0.999 }
     config_driver: { kn: 1.257, kt: 1.077, kr: 0.0, mu: 0.3, damp_rate: 0.999 }

Note

driver_0001500000.msp (included above) already registers the base and the cylinder of the deposit step; only the "palefine" blade is new. Since this driver checkpoint is loaded through includes rather than with the restart operator, it follows the legacy driver restart mechanism, see Driver Input / Output.

Step 3