EDEM API - Contact Model Example: Collision Memory

Renan
Renan
Altair Employee
edited August 2023 in Altair Exchange

Overview

Please find attached a custom contact model allowing you to keep in memory the first element that has been in contact with a particle thanks to a custom property.
You can specify any number of particle-particle or particle-geometry pairs along with a CollisionIndex that will be recorded as soon as the two elements are in contact.

This model is also compatible with GPU.

For example, in the following picture, we’ll name p1 the 1 sphere particle and p2 the 2 spheres particle.
The coloring then correspond to the following collisions :

blue : no collision
green : p1 + upper plane
yellow : p2 + cylinder
red : p1 + p1
black : p1 + p2

In the attached .zip, you will find :
– the source code (src folder),
– a brief guide (HowToUse.txt),
– An example deck with its preference file (collisionExample.dem & collision_pref.txt)
– The compiled .dll and the .cl file for GPU

 

Please take a look at the code for your own project and remember to come back and post up any modifications or code snippets which will help other users along the way. Feel free to use this forum for asking questions about this contact model.

Usage/Installation Instructions

tbd