1 Million particles N-Body Simulation

preview_player
Показать описание
I finally got my Barnes-Hut program to a stage i can do big simulations in a reasonable time, so here it is. before this my biggest simulations were of around a quarter of a million particles, and with the brute force method i couldn't really go above that. This simulation does a million particles faster than my old program could do a quarter.

2^20 = 1048576 particles.
Calculated using the Barnes-Hut algorithm, which was programmed using c++ and Cuda.
Color in the simulation is based on speed.

The starting conditions are a disk spinning around a heavy particle in the middle.
The calculations and drawing took between 5.5 and 6.5 seconds per frame, coming to about ~10 hours for the whole video.
#simulation #programming #gravity
Рекомендации по теме
Комментарии
Автор

I really enjoy watching particle simulation. I'm going to sub and I hope you keep uploading simulations

jamie
Автор

Planet formation❌️
Galaxy formation✅️

mahdiyarrazavi-ijhh
Автор

Need add dispertion for particle's velocity to prevent formation of globuls.

mrgoodpeople
Автор

And I don't even get any credit from this...

ReaXTutorials
Автор

Have you tried to incorporate some dark matter hypothesis ? Or MOND gravity ? It would be interesting to see what fits the best with observations and what contributes to the quickest galaxy formatiib, to reflect latest James Webb observations

oliviergiroud
Автор

I wonder if gravity sims would be much faster if the underlying models were general relativity and not Newtonian. Classical integrators scale as N^2 right? Wouldn't a GR based sim only need to calculate the contribution of each particle to the spacetime geometry, which I think is O(N) and then step each particle forward along the updated geometry, again even more certain is O(N)? Just a fleeting thought. Could be totally off.

zdlax
Автор

What exactly are you doing on the GPU? Any stuff with building / modifying the tree itself?

thesquee
Автор

What is specifications of your computer/laptop

anujchavda
Автор

Do the particles have collision, and thus a way to lose momentum?

desepticon
Автор

Where is the code ! and also, with what do you generate the images? can it take hdf5 files as inputs?

franckmalers
Автор

Hello, why don't you implement your code in OpenSPH? In this way the code will work on multicore with collisions also

Francyrad
Автор

I hope when this goes viral I will be at top comments 😃

Baconman
Автор

Is that a 2D simulation or a 2D projection of 3D?

starpawsy
Автор

You are not doing this in normal specifications of the computer

anujchavda
Автор

I make simulation with only 20K particles, but with friction for gaseous component. It's show how spiral galaxy may turn to barred galaxy:

And in this video I show how the gas convert to the stars and vice versa:

mrgoodpeople
Автор

So it does not satisfy the 'Rotation Curves of Galaxies Problem"?
Try with a binary system that emits stars...

jonathanbaincosmologyvideo