Geometry Optimization - Removing & Adding geometries during processing with EDEM API

Ignacio Diez Alonso_21259
Ignacio Diez Alonso_21259
Altair Employee
edited August 2023 in Altair Exchange

Overview

This is an example of using the updated API in EDEM 2.6 for adding and removing geometry during processing. To determine when a geometry is to be removed the Coupling API combines with a Particle-Geometry contact model which tracks material passing through a bin.

Note this model has been setup and compiled for a Windows 64bit machine. This example only works with EDEM 2.6 onwards.

The purpose of this model is to show how EDEM can be used for automatic geometry optimization and how to combine different API models. In this case we are trying to edit the curvature of a pipe so that 95% of the particles flow into a bin.

 

Usage/Installation Instructions

At simulation time 1s:

image

 

 At simulation time 8s:

image

 

At simulation time 16s

image

 

To run:
1. Created a folder called C:CAD and place the simulation .dem files and CAD files here (or edit the code to allow for a different location)
2. Open replace_example_bin_tracker.dem and add ‘Tracker’ to the Particle-Geometry interaction
3. Go to Tools > EDEM Coupling Options > Show Coupling Server and Start the server
4. Run geometry_api.exe

What happens during the simulation process is:
• The material flows down the pipe and some (about 50%) enters the bin
• At the base of the bin there is a geometry plane called ‘Tracker’
• The API Geometry Tracker model records the amount of material passing through this plane over a set period of time
• Once the appropriate time period has passed (0.5 s) the API Geometry Tracker creates a file in C:CAD called ParticleFlowRate.txt
• In this file is the number of particles/s passing through the plane and some text which is edited to say “readme”
• During processing the geometry_api.exe is checking for this file. If it reads the string “readme” then it checks the number of particles/s value
• If particles/s value is less than 995 (factory is creating 1000 particles/s) then the geometry_api.exe removes pipe(n).stp and replaces it with pipe(n+1).stp
• geometry_api.exe then updates ParticleFlowRate.txt with the text “readfile” and the simulation continues

If the CAD file fails to import the simulation will automatically stop. You can see the process in the attached video and can either create more CAD files or update to code to work with iSight or other software that automatically creates CAD files.

 

--

 

This code has been updated for EDEM 2017.2. 

To use:

1. Unzip the attached geometry_optimization_2017.zip file and place the CAD folder in c:\

2. Open the C:\CAD\replace_example_bin_tracker.dem file, note under particle-geometry physics the Tracker.dll has been loaded.

3. Start the Coupling Server in EDEM

4. Run geometry_optimization.exe found in C:\CAD this will automatically start EDEM.

As the simulation is running Tracker.dll will check the amount of material passing through the tracker plane.  If it’s less than the required amount of particle the code removes geometry_x.stp and replaces it with geometry_x+1.stp until the required amount of material passes through the tracker plane. When this condition is hit the simulation stops.

For the latest version available (2017.2), download the attachment "geometry_optimization_2017.zip"