Dispersed Bubble Simulator

// //

With Xiaoyan (Zia) Zhu.

This simulator was Zia and I's final project final project for Physically Based Animation.  We implemented directly from A Practial Simulation for Dispersed Bubble Flow from Doyub Kim and Oh-Young Song at Seoul National University and Hyeoung-Seok Ko at Sejong University.

The main idea behind this algorithm is to simulate the gas-fluid flow on a grid, and then project that simulation onto the bubble particles.  This allows you to skip explicitly calculate the interactions between the two different media.  This grid is referred to as a fraction field in the paper.  You initialize each grid cell to have a volume of 1 (pure water), and then subtract each bubble's volume from the cell that contains it.  Then you advect the velocity field of the grid and project those velocities onto the bubbles.  This advection naturally creates buoyancy and swirl effects due to the fractional densities in each cell.

To add some interesting behavior, you can add stochastic behavior by jittering each bubble's velocity based on some user inputs and local bubble cluster densities.  You can also add a "break up" term that breaks large bubbles into smaller clusters based on some frequency.


It's a pretty simple paper, all things considered.  Zia also added in geometric sources, which involved converting polygonal meshes to a level set, and then spawning bubbles from within the level set.




We also did some quick temperature comparisons to see how that affected the bubbles' behavior.




As for rendering, I ported the bubbles to Maya and rendered them using Mitsuba (and another one of my projects).


The simulation is pretty slow, and I've been debating porting it to the GPU (as the original authors did), but I can never seem to find the time.

A full video of our results can be seen here: