Working Example
The complete deck gathers all the blocks of the previous pages. It is split in two files of
example/spheres/rotating-drum/: a common part shared by several rotating drum examples:
rotating-drum-common.msp grid_flavor : grid_flavor_dem
includes :
- config_spheres.msp
common_define_particles :
- particle_type :
type : [ Sphere1 ]
group : [ 0 ]
common_setup_particles :
- set_fields :
polyhedra : false
type : [ Sphere1 ]
group : [ 0 ]
radius : [ 0.5 ]
density : [ 0.02 ]
velocity : [ [ 0 , 0 , 0 ] ]
sigma_velocity : [ 0.1 ]
particle_regions :
- CYL1 :
quadric :
shape : cyly
transform :
- scale : [ 9.5 , 1 , 9.5 ]
- translate : [ 10 , 0 , 10 ]
compute_force :
- gravity_force
and the deck itself, which includes it and appends the contact law to compute_force with +compute_force:
rotating-drum-periodic.msp ## Define:
# config_spheres.msp
# common_define_particles
# common_setup_particles
# CYL1 area
# gravity
includes :
- rotating-drum-common.msp
io_tree :
- io_config :
dir_name : "RotatingDrumPeriodicDir"
input_data :
- init_rcb_grid
- common_define_particles
- lattice :
structure : SC
types : [ Sphere1 ]
size : [ 1.0 , 1.0 , 1.0 ]
region : CYL1
- common_setup_particles
setup_drivers :
- register_cylinder :
id : 0
state : { radius : 10 , center : [ 10 , 10 , 10 ], axis : [ 1 , 0 , 1 ], vrot : [ 0 , 0.5 , 0 ]}
params : { motion_type : STATIONARY }
+compute_force :
- contact_sphere :
config : { kn : 1000 , kt : 1000 , kr : 0.0 , mu : 0.1 , damp_rate : 0.999 }
config_driver : { kn : 1000 , kt : 800 , kr : 0.0 , mu : 0.3 , damp_rate : 0.999 }
domain :
cell_size : 4
periodic : [ false , true , false ]
grid_dims : [ 5 , 5 , 5 ]
bounds : [ [ 0 , 0 , 0 ] , [ 20 , 20 , 20 ]]
expandable : true
global :
simulation_dump_frequency : -1
simulation_end_iteration : 10000
simulation_log_frequency : 1000
simulation_paraview_frequency : 5000
dt : 0.0005 s
rcut_inc : 0.4
enable_contact_network : true
Run it from the build directory:
./exaDEM ../exaDEM/example/spheres/rotating-drum/rotating-drum-periodic.msp --omp_num_threads 4
# or a short test run
./exaDEM ../exaDEM/example/spheres/rotating-drum/rotating-drum-periodic.msp --set-global-simulation_end_iteration 100
The outputs are written in RotatingDrumPeriodicDir/, under the current directory: open
RotatingDrumPeriodicDir/ParaviewOutputFiles/ in ParaView.
More examples are described in Tutorials .