fluid dynamics?
BlitzMax Forums/BlitzMax Programming/fluid dynamics?
| ||
hey. Is there anyone here that is experienced in the field of fluid dynamics? I am trying to write a fluid engine and I decided to throw together a quick test to test my ideas before I change the actual engine. So here it is so far. (it isnt optimized at all so dont expect the fastest engine) Here's how it works: the vars rad1,rad2,rad3 are 3 radiuses from the distance 0 to rad1, the particles repel eachother from the distance rad2 to rad3 the particles attract eachother so thats the basics but some problems that arose: The particles form grids that just look bad. The particles aren't bouncy enough and dont look fluid Has anyone made a fluid engine yet? or does anyone have solutions to the two problems I have. I am asking more for concepts than code :) Controls for the code above rightclick to switch gravity axis leftclick to add particles |
| ||
The Navier Stokes equations govern how fluids flow. They're nonlinear, so they can't be solved exactly, but if you google around you might find an explanation of how to model them in code. |
| ||
I am looking more for a particle based simulation. But ill look into Navier Stokes |
| ||
This is a great video of the kind of effect you are probably after, haven't followed the links but found it when I did a search on Verlet Integration, I've heard it mentioned regarding particles/physics and thought you might be interested in looking into it further... http://www.youtube.com/watch?v=0bL80G1HX9w |
| ||
oo thanks merx! I saw that once a long time ago but I never have been able to find it! I had just given up. hmm so now it tops out at 1000 particles with a few enhancements :) |