Hi there,
i am currently trying to port a working SPH - Smoothed Particle Hydrodynamics 2D implementation to Javascript with the simplest methods possible. Original code see here: http://www.opentk.com/node/377
After some days i got some results which moves particles but behaves really weird - Particles just pushes other particles away and does not behave correctly. The main problem is - SPH is based on heavy maths and i dont understand the details at all - Therefore fixing issues is really hard. Dont get me wrong, i have some experience with vector maths, collisions and response, see this demo: http://root.xenorate.com/final/physics/circles.html (Circle/Plane Collision with TOI handling and collision response)
Therefore i understand vector arithmetic a little, but SPH is just a little to hard to figure out myself. Also i made a fully working 3D Fluid Simulation in the past, but using PhysX as a Physics Engine: See this demo i made:
Now i wanted to try to make this myself, without using a physics engine at all.
Please have a look at my javascript SPH port: http://jsfiddle.net/gRUKg/1/
Currently my implementation does not handle every aspect from the original source, i use a diffent spatial grid technique and the viscosity and adjust distance code is disabled (Not required to get this working)
It would be really great if you can help me to get this thing working. I really want to understand the details behind it, for tuning the properties and improve it. Of course i read several SPH papers, but i cannot understand this at all.
Thanks in regards,
Final