Skip to content

Hexapods in a Rotating Drum

This tutorial generates hexapods in a rotating drum and then runs the simulation. The input files are in example/tutorial/hexa-rotating-drum. The simulation has three steps:

  1. generation of the hexapods in the cylinder (generator.msp);
  2. deposit of all the hexapods in the cylinder (wait.msp);
  3. rotation of the cylinder (run.msp).

Warning

The tutorial does not work with the example files of exaDEM version 1.0.2. Use a more recent version, or change the AREA region of generator.msp to bounds: [ [ 0, 0, 18 ], [ 20, 7.5, 20 ] ].

The ingredients of the generation step are:

  • the shape of the polyhedron;
  • the cylinder;
  • the contact law between the polyhedra;
  • a spatial area where particles are generated;
  • a generation frequency;
  • the initialization of the generated polyhedra.

Step 1: generation

Shape

The shape is a hexapod:

<
name alpha3
radius 0.237770037899799
preCompDone y
nv 6
0.475540075799599 0 0
-0.475540075799599 0 0
0 0.475540075799599 0
0 -0.475540075799599 0
0 0 0.475540075799599
0 0 -0.475540075799599
ne 3
0 1
2 3
4 5
nf 0
obb.extent 0.713310113699398 0.713310113699398 0.713310113699398
obb.e1 1 0 0
obb.e2 0 1 0
obb.e3 0 0 1
obb.center 0 0 0
volume 0.523598775598299
I/m 0.13266 0.13266 0.13266
>

A ParaView polydata is provided for this shape (alpha3.vtk): exaDEM does not display hexapods correctly since they have no face (otherwise, a your_shape.vtk file is written at initialization).

alpha3

Cylinder

The drum is an infinite cylinder centered at (10, 3.75, 10) with a radius of 16. The contacts with it are detected during the construction of the neighbor lists (nbh_polyhedron).

1
2
3
4
5
setup_drivers:
  - register_cylinder:
     id: 0
     state: {center: [10, 3.75, 10], axis: [1, 0, 1], radius: 16}
     params: { motion_type: STATIONARY }

Note

setup_drivers is part of the default execution graph of exaDEM, set to nop (no operation) by default.

Contact law

The contact law computes the forces between polyhedra and between the cylinder and the polyhedra. Gravity is applied everywhere.

1
2
3
4
5
compute_force:
  - gravity_force
  - contact_polyhedron:
     config: { kn: 10000, kt: 10000, kr: 0.0, mu: 0.1, damp_rate: 0.999 }
     config_driver: { kn: 10000, kt: 10000, kr: 0.0, mu: 0.1, damp_rate: 0.999 }

Generation area and domain

The particles are generated in the box between (0, 0, 18) and (20, 7.5, 20):

1
2
3
particle_regions:
  - AREA:
     bounds: [ [ 0, 0, 18 ], [ 20, 7.5, 20 ] ]

and the domain contains the region AREA:

1
2
3
4
5
6
domain:
  cell_size: 1.5 m
  periodic: [false, true, false]
  grid_dims: [14, 5, 14]
  bounds: [[0 m, 0 m, 0 m], [21 m, 7.5 m, 21 m]]
  expandable: true

Initialization

A lattice generator creates the first particles:

1
2
3
4
5
6
add_particles:
  - lattice:
     structure: SC
     types: [ 0 ]
     size: [ 1.5, 1.5, 1.5 ]
     region: AREA

The hexapods of this region are then initialized. The default density is 1; the volume used to compute the mass is stored in the shape.

1
2
3
4
5
6
7
8
9
init_new_particles:
  - set_fields:
     polyhedra: true
     type:           [    alpha3 ]
     group:          [         0 ]
     velocity:       [ [0,0,-10] ]
     sigma_velocity: [       0.1 ]
     density:        [         1 ]
     region: AREA

input_data chains these blocks. init_rcb_grid must come first: it builds the MPI domain decomposition used by every particle creation operator.

1
2
3
4
5
6
input_data:
  - init_rcb_grid
  - read_shape_file:
     filename: alpha3.shp
  - add_particles
  - init_new_particles

Generator

add_generated_particles (nop by default) is called every simulation_generator_frequency steps, set in the global block (simulation_generator_frequency: 40000, default -1):

1
2
3
add_generated_particles:
  - add_particles
  - init_new_particles

Run

About 11 minutes on 12 cores:

mpirun -n 2 ./exaDEM generator.msp --omp_num_threads 2

Note

alpha3.shp must be in the directory where the simulation is run.

Step 2: deposit

The second step waits for the end of the deposit, from step 1,200,000 (12 s) to 1,400,000 (14 s). The snapshot of step 1,200,000 is loaded and the generation is disabled. Do not forget to define the cutoff radius of the hexapods with radius_from_shape, used to build the Verlet lists.

1
2
3
4
5
6
7
8
9
input_data:
  - read_shape_file:
     filename: alpha3.shp
  - read_dump_particle_interaction:
     filename: ExaDEMOutputDir/CheckpointFiles/exadem_0001200000.dump
  - radius_from_shape

global:
  simulation_generator_frequency: -1

About 4 minutes on 12 cores:

mpirun -n 2 ./exaDEM wait.msp --omp_num_threads 2

At the end of the second step, the deposit is stable (no velocity):

End of step 2

Step 3: rotation

The rotating drum runs from step 1,400,000 (14 s) to 5,000,000 (50 s). The angular velocity is deduced from the Froude number \(Fr = \omega^2 R / g\), i.e. \(\omega = \sqrt{Fr\,g/R}\). For a cascading regime with \(Fr = 0.2\): \(\omega = \sqrt{0.2 \times 9.81 / 16} \approx 0.35\) rad/s.

      vrot: [0, 0.35, 0]

The contact network (normal forces) between the hexapods is also written:

global:
  enable_contact_network: true
mpirun -n 2 ./exaDEM run.msp --omp_num_threads 2