Sie sind auf Seite 1von 7

EDEM API Tutorial:

Plug-in Contact Model


Note this tutorial uses the EDEM v1.1 legacy API

Revision 2.2/1
EDEM API Tutorial: Plug-in Contact Model

Introduction
This tutorial describes how to create a new cohesion contact model, based on an
existing contact model supplied with EDEM. The cohesion model is modified to
include time-dependent particle-to-particle and particle-to-geometry cohesion.
NOTE : This tutorial uses Microsoft Visual C++ 2008 Express Edition to compile the
contact models. See http://www.microsoft.com/express/download/ .

1. Open cohesion.cpp with Microsoft Visual C++ or a text editor.


2. Select a working directory on the local machine (e.g. C:\New_Cohesion ) then
save the file as variable_cohesion.cpp .
3. If necessary, update the #include paths as appropriate.

4. Copy the following files from the EDEM\src folder to your working directory:
contactModelInterface_V1_0_0.h
sharedTypes.h
5. Copy the following tutorial files to your working directory:
cohesion.h
cohesion_prefs.txt

Page 2 of 7
EDEM API Tutorial: Plug-in Contact Model

Create the New Cohesion Model


Step 1: Add Time Factor
1. Cohesion is calculated from the energy density values (nCohesiveFactor)
multiplied by the overlap area (nArea). Locate the Cohesion section in the source
file:

2. Add in a multiplying factor of *nTime to the F_cohesive equation. This will linearly
increase the cohesive factor with time:

3. Save the file and exit.

Step 2: Create the .dll Library File


1. Start the compiler ’ s command prompt:
Start > All Programs > Visual C++ 9.0 Express Edition > Visual Studio Tools >
Visual Studio 2008 Command Prompt
2. Browse to your working directory using the cd command. For example:
cd C:\New_Cohesion

3. Compile using the following command:


cl /O2 /D “WIN32” /LD variable_cohesion.cpp
The file variable_cohesion.dll is created in your working directory.

Page 3 of 7
EDEM API Tutorial: Plug-in Contact Model

Using the New Cohesion Model


Step 1: Load the New Contact Model
1. Start EDEM then open the cohesion tutorial simulation.
2. Load your new contact model into EDEM. Select Options > File Locations >
Contact Models then navigate to the location of your newly created dll.
3. Select Particle to Particle from the Interaction pulldown in the Physics section.
4. Click the + button then select your variable_cohesion contact model.
5. If your contact model includes Hertz-Mindlin, remove the built-in Hertz-Mindlin (no
slip) contact model from the list.

6. Select Particle to Geometry from the Interaction pulldown in the Physics section.
7. Click the + button then select your variable_cohesion contact model.
8. If your contact model includes Hertz-Mindlin, remove the built-in Hertz-Mindlin (no
slip) contact model from the list.
9. Click the Geometry tab.
10. Be sure the periodic boundary is enabled in the Y axis.
11. Select File > Save.

Step 2: Run the Simulation


The particles have already been created in this simulation and the model has been
simulated until a steady state was achieved.
1. Click on the Simulator button.
2. Click the Start progress button to start processing the simulation.

Page 4 of 7
EDEM API Tutorial: Plug-in Contact Model

EDEM Analyst: Analyzing Your Results


Step 1: Visualizing the Results
Run through the simulation to verify the changing behavior of the particles over time.

0s to 1s: Simulation behavior has not changed significantly from steady state:

2s to 3s: Particle clumping occurs as the particles are thrown from the mill lifters:

4s to 5s: The particle cohesion is high enough to prevent the particles from
separating in the mill; the particles act as a single mass:

Page 5 of 7
EDEM API Tutorial: Plug-in Contact Model

Step 2: Plotting Contact Graphs


Plot some contact graphs to see how the contact behavior changes with the
increasing cohesion.
1. Click the Analyst button on the toolbar then click the Graph icon.
2. Select the Line Graph tab then set the element and x-axis details as follows:

3. Click the Y-Axis tab then select Number of Contacts as the Attribute to plot:

4. Click the Create Graph button to plot the graph.

The particle-to-particle contact graph shows the number of contacts increasing


with time until a saturation point is reached.

Page 6 of 7
EDEM API Tutorial: Plug-in Contact Model

5. Change the Type 2 option from particle to mill then create a new graph:

The graph shows that the number of particles in contact with the geometry decreases
over time; the particle flow has change from individual particles that impact on the
geometry to a single mass that rolls in the mill. This single mass has reduced impact
on the mill geometry when compared to the individual particles.

Page 7 of 7

Das könnte Ihnen auch gefallen