Smoothed Particle Hydrodynamics

C++, Unity / C#


Smoothed Particle Hydrodynamics is a Lagrangian method which represents a fluid as a collection of molecules or particles which act upon each other with forces such as density, pressure, viscosity in a smoothed radius called kernel.


The functionality is programmed in C++ and then exported as a DLL (Dynamic-Link Library), deployed into Unity where the exported functions are called in a C# script. Particles are rendered as Unity GameObjects but inherit their position and behaviour from the C++ functions. The code is optimised to support up to 1300 particles at a steady frame rate.