Script for writing in geometry motion from tabular data in EDEM using EDEMpy


Overview

This Python script allows you to automate the addition of motion kinematics to a geometry in EDEM using EDEMpy. 

The script reads .csv data, as shown in Figure 1 and adds translational and rotational velocities to a specified geometry. Please note that the input for translation velocities is in m/s and in rad/s for rotational velocities.  

 

Figure 1. Kinematic Input .csv file

The script adds the translational and rotational velocities to an existing geometry in the EDEM deck, for which the name can be specified in the 14th line of the Python script, as shown in Figure 2. 

Figure 2. Geometry Name Specification

The script skips over kinematics of the name format "translation_{x,y,z}_{start time}" and "rotation_{x,y,z}_{start time}" if they already exist in the deck at time 0. Therefore, to update the kinematics, all instances should be deleted at time 0, within the EDEM GUI and the deck saved. 

Figure 3 shows the completed simulation with the kinematics defined in Figure 1.

Figure 3. EDEM Example Simulation with Kinematics

The script along with the example EDEM deck and .csv file can be downloaded here.

Pre-Requisite

EDEM 2022.3

Usage/Installation Instructions

Run the script from an external instance, as new kinematics cannot be added with the deck open.