EDEM API
Hi,
I am writing a code for detecting particle aggloemrates based on contacts. I read all the contact pairs in particle contact force main function, put those pairs in a vector and wrote a function to process them into aggloemrate information.
However, I find it difficult to find a place for this process function. I want this process function to run only once at the end of every timestep, or run only once after calculating contact force in a timestep cycle. Currently I put this process function in particle factory main function. However it always runs at the next timestep because particle factory runs before contact force. This will cause some problems since I also want to remove some particles.
Is there a way for solving that problem?
Regards,
Jason
Best Answer
-
Hi Jason,
I would look at using the 'config for timestep' function. This is an additional option you can add on to the model and is called once per time-step, typically used for resetting custom properties however you can use it for other code also.
The wear model with deformation uses this function:
Wear modeling in EDEM - Archard Abrasive Wear Model with Geometry Deformation
Regards
Stephen
1
Answers
-
Hi Jason,
I would look at using the 'config for timestep' function. This is an additional option you can add on to the model and is called once per time-step, typically used for resetting custom properties however you can use it for other code also.
The wear model with deformation uses this function:
Wear modeling in EDEM - Archard Abrasive Wear Model with Geometry Deformation
Regards
Stephen
1 -
Hi Jason,
You could also do this analysis in psot-pro using the EDEMpy library of Python functions.
EDEMpy gives you access to all contact data in a saved time step (among other things) and you can use this to identify the agglomerates. It may be computationally cheaper and easier to implement than using the EDEM API but it will only give you results for the saved time steps.
Here is a getting started article on EDEMpy:
Best regards,
Stefan
0