Computational Fluid Dynamics in 2D Game Environments
Independent thesis Advanced level (degree of Master (One Year)), 20 credits / 30 HE creditsStudent thesis
Games are becoming increasingly realistic. Real-time physics simulation were almost unimaginable just decades ago but are now a vital part of many games. Even dynamic physics simulation e.g. interactive fluids has found a place in game development.This paper investigates and evaluates three methods of simulating fluids with the purpose of testing these in a 2dgame environment. These methods are allLagrangian i.e. particlebased, Sph methods, and chosen because of their dierences but also their importance to the field of interactive fluid simulation. In order to integrate the methods, they will be implemented with use of the 2dmechanics engineBox2dwhich is a popular choice in 2d game development.To evaluate the methods, water is the flluid of choice. Water is the most abundant of fluids and is bound to be found in most games containing fluids. Water is almost incompressible, therefore, the methods ability to withhold incompressibility is tested. Also, the convergence properties of kinetic energy is tested in order to find out more about stability.The results showed that the method based on Muller et al.  demanded a prohibitively small time-step to be especially useful. The method from Clavet et al.  managed to keep a suficiently large time-step but failed in simulating incompressible low-viscosity fluids. However, it excelled in the simulation of highly viscous fluids like gel. Finally, the method based on Bodin et al.  showed impressive result in incompressibility but is more difficult to implement and requires a bit more resources and run-time.The paper concludes that if easy-to-implement cool effect is sought, then the method of Clavet et al.  could be used with great results. However, Bodin et al.  would be the best choice for games where physical accuracy is of greater importance. Also, Box2d is a good choice to extend with a fluid engine. However, it will never be as good as creating a physics engine with an integrated fluid engine.
Place, publisher, year, edition, pages
, UMNAD, 882
Engineering and Technology
IdentifiersURN: urn:nbn:se:umu:diva-48078OAI: oai:DiVA.org:umu-48078DiVA: diva2:446423
Master of Science Programme in Computing Science and Engineering