Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

conservation of energy in multibody boltzmann simulation #12

Open
guoci opened this issue Sep 8, 2023 · 1 comment
Open

conservation of energy in multibody boltzmann simulation #12

guoci opened this issue Sep 8, 2023 · 1 comment

Comments

@guoci
Copy link

guoci commented Sep 8, 2023

I printed out the sum of squares of velocities in the simulation and observed the total energy varies over time.
image
https://github.com/lukepolson/youtube_channel/blob/main/Python%20GPU/multibody_boltzmann.ipynb

@guoci
Copy link
Author

guoci commented Sep 19, 2023

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
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant