Script for computing the temporal evolution of particle momentum along a vector in EDEM
Overview
This python script computes the positive, negative, and total momentum of particles in a simulation, with reference to a specified vector. The script calculates the total, mean, standard deviation, minimum, and maximum magnitudes for each momentum type.
The scripts calculates the momentum by multiplying the mass of a particle by it's velocity vector and then calculating its scalar projection on to the user-defined reference vector. The momentum magnitude is then classified into positive values (particles moving in the direction of the user-defined vector) and negative values (particle moving opposite to the direction of the user-defined vector).
An example result from the script is shown in Figure 1 and can be reproduced by running the attached EDEM deck. On the left, the average momentum of each type is plotted against time and on the right, the total momentum for each type is plotted against time.
Figure 1. Temporal evolution of momentum with colliding particles
The settings of the script are contained in the Momentum_analyst_settings.txt and defined in Figure 2.
Figure 2. Input settings for the momentum script
Usage/Installation Instructions
The python file can be executed directly from the EDEM Analyst using the Run EDEMpy script feature (File->Run EDEMpy script). The EDEM deck files, edempy_momentums.py file and Momentum_analyst_settings.txt file should all be in the same folder.
Comments
-
Thanks for this.
But i would like to know based on what does the momentum reference is being defined please?
0 -
Tony Arthur said:
Thanks for this.
But i would like to know based on what does the momentum reference is being defined please?
Hello,
The momentum reference line is defined by the user in the Momentum_analyst_settings.txt configuration text file.
Figure 2 shows how you can change the numbers under Momentum Reference Vector [x,y,z] to define your own vector.
I hope that answers your question. Please let me know if you have any other questions.
Elis
0