SFML community forums

General => SFML projects => Topic started by: stuart88 on February 02, 2017, 10:44:34 pm

Title: Second project complete - 2D fluid flow simulator
Post by: stuart88 on February 02, 2017, 10:44:34 pm
Quite pleased with this one - https://github.com/Stuart88/Flow-sim/blob/master/Flow%20Sim.rar (https://github.com/Stuart88/Flow-sim/blob/master/Flow%20Sim.rar)

As with my previous creation, it isn't actually game, it's a simulator for those with an interest in physics or engineering.

This one models fluid in an open chamber with basic flows, with interactivity enabled for changing flow speed, rotation speed and other things.

Code (on GitHub) is a bit messy again but that's all part of the learning process I guess. First go at using vertex arrays and I had to jump in at the deep end with classes too.

Enjoy  :D - https://github.com/Stuart88/Flow-sim/blob/master/Flow%20Sim.rar (https://github.com/Stuart88/Flow-sim/blob/master/Flow%20Sim.rar)

(http://i65.tinypic.com/s6ua39.png)
Title: Re: Second project complete - 2D fluid flow simulator
Post by: JayhawkZombie on February 05, 2017, 05:31:26 am
That's pretty cool, dude.  I wonder how it would look combined with something resembling a liquid.

Have you seen this paper? http://www.dgp.toronto.edu/people/stam/reality/Research/pdf/GDC03.pdf
I thought it had some good insights into fluid simulation. He talks about some 3D, but the concepts can collapse to 2D.