N Body simulation with OpenCL, Galaxy Collision

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,922
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jun 29, 2010

After some days of hard work, I finally made OpenCL work. For now it's a straight port of gravity nbody simulation, involving O(0.5N²) complexité. I'll see later to compute complex data structure to implement Barnes-Hut quadtree algorithm.

The gain is really impressive, at least a factor 3 with a GForce 285 GTX compared to a quadcore Intel 3.2Ghz. There's much room to improve in my implementation, but first of all I'll concentrate on improving my OpenCL class, to have something very small, with the fewest calls possible.
I can't wait to implement SPH on GPU.

Anyway, here's the log :
~~~~~~~~~~~~~
| VIDEO LOG |
~~~~~~~~~~~~~
Number of particles : 20000

Max tree depth : 256
Gravitational approximation : 0.10

Gravity : 0.000100
Gravity smoothing : 0.100000

Lowest acceleration : 0.000000.3
Highest acceleration : 0.100000.3

Time step : 0.010s
Simulation time : 1h 11m 47s
Simulated time : 2m 30s

Video time : 30s
Playback time scale : 5.00x
Simulation factor : 0.034827
Frame per seconds : 3.5fps

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (2)

Sign In or Sign Up now to post a comment!
  • @anujkaliaiitd thank you. particles' position and velocity are set by the program, you just have to define where the center of each galaxy lies, and their radii, and particles are computed accordingly.

  • hi!

    this is impressive...i've implemented n-body simulation on a virtex6 FPGA.

    where did you get the particle data from? or did you generate it yourself?

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more