Coupling Interface Programming Guide

The Coupling Interface Programming Guide provides an overview of how to use the EDEM Coupling Interface to couple with a generic CFD code and/or Multi Body dynamics codes.

The EDEM Coupling Interface class, IEDEMCoupling.h contains programming implementation information for the interface. The EDEM Coupling Interface enables users to construct coupled fluid - particle simulations between CFD codes and EDEM, coupled simulation between rigid/Multi Body dynamics codes and EDEM or couple EDEM to programs that you have written. The Coupling Interface enables two independent programs to operate synchronously, sharing data to create a single ‘coupled’ simulation.

The EDEM Coupling Interface adopts the TCP/IP client–server architecture which uses messages to communicate between the two separate programs. Using the EDEM Coupling Interface, you may implement a new coupling with a Physics code using C++.
Note: When writing programs using the EDEM Coupling Interface, all units are SI.
The following diagram represents the communication between EDEM and a Physics code using the EDEM Coupling Interface.


Coupling Simulation Sequence

During a coupled EDEM simulation, EDEM and the coupled 3rd party code simulate in an alternating manner, with the 3rd party code first. The 3rd party code will simulate ahead in time and then pass any required data to EDEM for it to be allowed to simulate to the same point in time. This alternating pattern continues until the simulation time has reached the specified end time, shown in the following image. Due to the explicit time integration methods implemented in EDEM, it is common that multiple Time Steps are required to simulate the same time period as a single Time Step of either a CFD or Multi Body dynamics simulation. Therefore, Time Steps between the two solvers are potentially different, though the simulation-steps are the same.

The following diagram represents the alternating sequence of a coupled simulation.

Each time the EDEM Coupling Interface sends a message to EDEM, it blocks further messages from being sent until EDEM returns a response. This synchronous behavior effectively pauses the 3rd party code until EDEM has calculated the required simulation step.

EDEM Coupling Interface Packaging

The EDEM Coupling Interface comprises client and server components. The server component resides within EDEM, and the client component is to be used by the 3rd party code to interact with EDEM. The EDEM Coupling Client Interface class provides a number of methods for setup, simulation, and data control.

The following diagram represents an overview of the packaging of the EDEM Coupling Interface.

Custom Particle Property Unit Types

The following table lists the Unit Types, Identifiers, and SI Units for Custom Particle properties.
Unit Type Identifier SI Unit
Other 0 Unknown unit
None 1 Unitless
Acceleration 2 m/s2
Angle 3 Rad
Angular Acceleration 4 rad/s2
Angular Velocity 5 rad/s
Density 6 kg/m
Energy 7 J
Work Function 8 J
Force 9 N
Charge 10 C
Length 11 m
Mass 12 kg
Moment of Inertia 13 kg/m2
Shear Modulus 14 Pa
Time 15 s
Torque 16 Nm
Velocity 17 m/s
Volume 18 m3
Frequency 19 Hz
Temperature 20 K
Heat Flux 21 W
Stiffness 22 N/m
Stress 23 Pa
Mass Flow 24 kg/s
Stiffness per Unit Area 25 N/m3