Beruflich Dokumente
Kultur Dokumente
Once installed you will need to register the product but this is free and there is no expiry on the
product.
4. Select ,DLL?
5. Select ,Empty Project?
6. Press Finish
The source code files are packaged in a zip file which contains the following files:
Source files:
CHertzHindlin.cpp
CHertzMindlin.h
Helpers.h
HertzMindlin.cpp
Plus an example simulation (HertzMindlin.dem)
1. Copy the source files to your newly created project folder, Visual Studio will have already
created other files in the folder.
(In this demonstration C:\test\HM_demo\My_Hertz_Mindlin)
4. The example source code files have now been added but other EDEM header files are needed
before the contact model will compile to a DLL. The additional header files required are
installed on your system by the EDEM installer and will be at the following location:
C:\Program Files\DEM Solutions\EDEM 2.4\src\Api
From the ,Core? folder copy the following files to your project:
ApiIds.h
ApiTypes.h
IApi.h
IApiManager_1_0.h
ICustomPropertyDataApi_1_0
ICustomPropertyManagerApi_1_0
PluginConstants.h
From the ,ContactModels? folder copy the following files to your project:
IPluginContactModel.h
IPluginContactModelV2_1_0.h
PluginContactModelCore.h
(Note:- there are additional header files in each folder but they aren?t required for thi s project. If
you aren?t sure which header files you need then add all of them to your project, the compiler
will simply ignore any files it doesn?t need)
If successful, the Output window at the bottom of Visual Studio will confirm “ Build: 1 succeeded ”
will also give you the location of the newly created *.DLL.
(Note:- If the build fails you will also be given useful information in this window as to why it has failed.
Always start with the first error message in the list as this is also likely to be the cause of many of the
following errors)
(Note:- The release build of your library will be created in a different location to the debug version so
make sure to check the output window for details.)
b. Select the plug-in from Interaction in the Physics section of the Creator
The red point indicates the breakpoint while the yellow arrow indicates the next line to be
executed when F10 is pushed.
4. It is possible to see the value contained by a variable. To do that, right click on it and click on “ Add
to watch ” (You can also see the value of a variable by hovering it with your mo use).
Here hertzForce is in red because the value has just been updated by the previous instruction on line
245 of the previous picture.
5. If you Press F5, the simulation will run until the breakpoint is hit again, in other word when another
computation of the contact force is required.
2. Press F5
All the watched variables are in red here. Indeed, time has changed this it was the condition to have
the break point effective. The equivalent mass nEquivMass has changed because the particles in
contact are different than previously, hence a different equivalent mass and hertzForce is worth zero
since it has not been calculated yet.