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. Programming implementation information for the interface is also provided and can be found in the EDEM Coupling Interface Class, IEDEMCoupling.h.
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 TCP/IP client – server architecture which uses messages for communication between the two separate programs. Users may implement a new coupling with a physics code, using C++, to program a solution utilizing the EDEM Coupling Interface.
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.
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 across 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 image below. 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, however the simulation-steps are the same.
The alternating sequence of a coupled simulation:
Each time the EDEM Coupling Interface sends a message to EDEM it blocks any 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.
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 users with a number of methods for setup, simulation and data control.
The following diagram represents an overview of the packaging of the EDEM Coupling Interface.
The EDEM Coupling Server options are accessible on the top-right corner of your EDEM window.
The left icon starts or stops the coupling server. The right icon provides the current status of the coupling: “Disabled”, “Awaiting incoming Connection” or “Connected”.
By default, EDEM will launch with the Coupling Server stopped and requires you to press the “Start” button before a coupled simulation can proceed. For running in batch mode or for making the process more automated EDEM can be launched with the Coupling Server already running by adding the ‘--cs’ switch to the command line.
(c) 2022 Altair Engineering Inc. All Rights Reserved. |
||