You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have figured out the reason. at each iteration of the simulation, a particle can have multiple collisions. This results in the velocities being updated incorrectly. I modified the code to allow for only one collision for a particle and resolved the issue.
Code at: guoci@5db3e7c
I printed out the sum of squares of velocities in the simulation and observed the total energy varies over time.
https://github.com/lukepolson/youtube_channel/blob/main/Python%20GPU/multibody_boltzmann.ipynb
The text was updated successfully, but these errors were encountered: