Galaxy simulation, 500 000 particles
Loading...
7,263
Loading...
Uploader Comments (VelRyphon)
see all
All Comments (24)
-
just PMed u
-
@VelRyphon Ah, I see - so there's not really proper self-gravity or hydrodynamics. I was wondering how you were able to run it so fast!
-
@davespitvalve This is the trick to simulate arms-like clusters : each particle has an initial velocity which is the perfect circular orbital velocity according to the most massive particles at the center, but the few other massfull particles seeded randomly in the disk perturbate this circular orbit and produces the effect wanted. It is the most simple way to simulate a galaxy without handling collision and density through SPH scheme.
-
Those rings at the beginning shouldn't be there - your initial conditions aren't quite in equilibrium
Loading...
indeed, most of the SPH implementation are based on the "particles" in CUDA SDK. Ideally, it would be great if we can just use tree-code so that both adaptive smoothing length in SPH and the N-body code can be done. hmm..need to get my hands dirty on the GPU^^.
tclyue 1 month ago
@tclyue That's why I do not code on GPU anymore : even with OpenCL it's still a pain in the *ss...true innovation will come with x86 GPU. You give your portable C++/OpenMP code to GPU-maker compiler, and you're done ! Sweet dynamic allocation handled natively, easy parallelization...I prefer to work on nice code that is readable and portable.
VelRyphon 1 month ago
great, so you've managed to do Barnes-Hut on a GPU. I'm now looking more or less a same problem. Not too familiar with N-body code myself. it would be interesting if I can take a peek at your code?
tclyue 1 month ago
@tclyue Sorry, I mixed up different simulations. In this simulation, it's done on GPU with direct particle-to-particle interaction, since it's faster than optimized Barnes-Hut on CPU. But as you pointed out, trees are not straight foward to implement on GPUs. I implemented SPH on GPU about 1 or 2 years ago. Difficulty comes from dynamic allocation of arrays, which is not possible on GPU. But with static allocation, you can get what you want.
VelRyphon 1 month ago
What physics is involved in this simulation? N-body(of course) and standard SPH?
tclyue 1 month ago
@tclyue In order to have real time performance it's only n-body gravition with Barnes-Hut optimization. SPh would lead to much more interesting result : with SPH and more precisely viscosity, no need to impulse particles with orbital velocity, friction would lead to rotation.
VelRyphon 1 month ago