Error when using Energy Loss API in EDEM
Hello,
I am working on fluidized particules bed.
I am trying to record energy losses due to collisions on a surface and I would like to use the API with customs modification of the energy loss property.
When I select the API as a plugin model and I run my model, I get the following error when I want to plot the energy loss for every collision in the analyst :
"WARNING : User Defined Properties : Too much data in file for property: Previous Forces Discarding excess."
I get the same message for all variables used in the API file. (Previous Velocity, Previous Torque, Energy Loss...)
I don't understand how to overcome this error and to be able to read those data in EDEM ( Analyst -> normal energy loss) or with edem py.
Sincerly,
Max.
Find more posts tagged with
Hi Stephen,
I am using EDEM 2025 with the API found online on the community.
In addition to that I tried to modified it and recompile a .dll file with the headears available, but but I get lots off errors, and not due to the file I modified.
help on that would be great too, here is my modified API. (I modified the energy loss calculation to ony get loading, and the normal force to get only elastic component.)
Regards
Hi Max,
It maybe related to the specific simulation file you are using. If you open the file and go to the Analyst at t=0 s and then go to File > Export > Simulation Deck. Select a file name and when you see the option below make sure 'Export Custom Properties' is not selected.
Then try opening this new file and loading the model in again. This process saves the file with no properties so you can load them in again.

What errors did you see when compiling?
Regards
Stephen
Hi,
Thanks for your answer, I will try that.
For the .dll I get syntax error a lot and error about "NApiCm".
It is my first time using dll, I might just make begginer mistakes, but I have mainly done copy paste for EDEM files.
Here is the library i have been trying to compile.
Hi,
To edit/compile you shouldn't need any files added other than the 3 for the custom model:

In the project > Properties you can add links to the directories that include the relavent EDEM files:

I did have a look at your project but it did give an error I didn't recognise, however setting up the project again works for me. I'd recommend following the process outlined here for setting up visual studio:
Typically if you create a new, empty project and ensure this is set to create a .dll you can add the EDEM files and links to this.
Regards
Stephen
Hi Max,
Just to check if you are using the latest EDEM 2025 version?
Regards
Stephen