EDEM API Contact Model | Not working correctly: Bonded-Particle Contact Model V3.1.0
Hi Everyone,
I have been trying to implement the Bonded-Particle contact model (v3.1.0) API provided by EDEM (from its previous EDEMSimulation forums), but no bonds form between the particles. In contrast, when I simply use the built-in Bonding V2 model against the same parameters as for API, then it works fine.
I have included the comparison videos, as well as test simulations (EDEM + API) data. It looks like that API is not correctly importing the data from the prefs file, and passing the variables as 0.
Any suggestions, what could be the potential issue with that?
Thank you.
Best regards,
MQ
P.S.
During compilation using VS2019-Community, I do get the following errors/warnings:
Warning C4244 'argument': conversion from 'time_t' to 'unsigned int', possible loss of data..
Error C4996 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead...
I disable the error by adding: #pragma warning(disable : 4996)
Best Answer
-
MQ said:
Hi,
A follow-up on this problem: How do I visualize the bonds formed between particles? Is there any method to do so for API based model?
I generated two different set of particles, and applied the bond to one. They are being formed correctly, as you can see in the attached image. However, apparently there is no information available in Analyst, when I click 'Display > Bonds > Apply all'. There is no information in the graph as well.
Thank you.
MQ
Hi MQ,
Bond Status can be visualized in contact as shown in below picture.
Bonding model output/field variables can be visualized in contact not in Bond.
Thanks,
Prasad A
1
Answers
-
Hi MQ,
reviewed the API bonded model, as per your setup it wont work because the bond is forming between particles in "bonded_particle_prefs.txt" is " Particle1:Particle1" whereas in EDEMAPI fiel the particle name is given as "TestParticle".
As in EDEM file particle name is not same as in preference file bond is not establishing.
if you rename the particle name in EDEM from "TestParticle" to "Particle1" then API works.
Thanks,
Prasad A
1 -
Thank you Prasad, it worked. Quite a silly overlook!
MQ
0 -
Hi,
A follow-up on this problem: How do I visualize the bonds formed between particles? Is there any method to do so for API based model?
I generated two different set of particles, and applied the bond to one. They are being formed correctly, as you can see in the attached image. However, apparently there is no information available in Analyst, when I click 'Display > Bonds > Apply all'. There is no information in the graph as well.
Thank you.
MQ
0 -
MQ said:
Hi,
A follow-up on this problem: How do I visualize the bonds formed between particles? Is there any method to do so for API based model?
I generated two different set of particles, and applied the bond to one. They are being formed correctly, as you can see in the attached image. However, apparently there is no information available in Analyst, when I click 'Display > Bonds > Apply all'. There is no information in the graph as well.
Thank you.
MQ
Hi MQ,
Bond Status can be visualized in contact as shown in below picture.
Bonding model output/field variables can be visualized in contact not in Bond.
Thanks,
Prasad A
1 -
Prasad Avilala_20558 said:
Hi MQ,
Bond Status can be visualized in contact as shown in below picture.
Bonding model output/field variables can be visualized in contact not in Bond.
Thanks,
Prasad A
Hi Prasad, thank you again for your help!
0 -
Hi Prasad,
Is there any way to hide the unbonded particles in Analyst (i.e., visualize only the bonded particles), or one must go for API based markForRemoval() route? Thanks!
Best regards,
MQ
0 -
MQ said:
Hi Prasad,
Is there any way to hide the unbonded particles in Analyst (i.e., visualize only the bonded particles), or one must go for API based markForRemoval() route? Thanks!
Best regards,
MQ
Hi MQ,
You can try the below option to display bonded particles only.
If particles are bonded the status is "1".
If particles are broken the status is "2"
you can display "Bondstatus" and provide the Minimum and Maximum value as shown in below picture and enable (Tick) "Hide out of Bonds" so that the range of values entered only will be displayed and other particles will be hidden from the display
Thanks,
Prasad A
0 -
Prasad Avilala_20558 said:
Hi MQ,
You can try the below option to display bonded particles only.
If particles are bonded the status is "1".
If particles are broken the status is "2"
you can display "Bondstatus" and provide the Minimum and Maximum value as shown in below picture and enable (Tick) "Hide out of Bonds" so that the range of values entered only will be displayed and other particles will be hidden from the display
Thanks,
Prasad A
Hi Prasad,
I tried this option earlier, but it only affect the bonds appearance, but the particles visibility is uneffected.
Best regards,
MQ
0 -
MQ said:
Hi Prasad,
I tried this option earlier, but it only affect the bonds appearance, but the particles visibility is uneffected.
Best regards,
MQ
Hi MQ,
if you want to visualize particles might not help the previous option. However you can check the velocity of the particles or other field variables and compare with bonded particles.
for example if the velocity of bonded particles is less than the velocity of particles which are broken. use previous discussion method i.e hide of bound for display.
or else you can write API to hide the particles.
for example extract the particle id of the particle whose bond broke and hide those particle from display.
Thanks,
Prasad A
0