Saturday, January 2, 2016

FluidSim 3D Initial Development

These are the best video clips from throughout the development of FluidSim 3D. I wrote FluidSim 2D in the spring of 2015 and I started 3D in July. It, like 2D, is written in C++ entirely by me. It uses a combination of voxel based and particle based algorithms to compute the aerodynamic properties of complex 3D shapes as well as rendering its results. As the video progresses, you can see the addition of more and more features, including .stl loading, dynamic wall coloring based on force and perspective rendering.

One of the biggest parts of development was the 3D renderer. For a number of reasons, I opted not to use OpenGL for rendering, but to write my own renderer instead. It is obviously not as efficient as a 3rd party library (it only currently supports CPU rendering) but it gets the job done and it integrates nicely with the rest of my code (including my voxel data renderer, which had to be custom written to work with my data structure). All of the 3D objects in this video were rendered using my renderer.

One of the biggest goals of FluidSim 3D is to accurately calculate the drag of complex 3D shapes. While I'm not quite there, I'm getting close. I have all of the tools necessary to find drag, I think its just a matter of calibration. FluidSim knows that a sphere is more aerodynamic then a cube but the exact numbers aren't perfect yet. There are a lot of settings (like force of pressure, brownian motion, etc) that need to be set correctly for any given fluid or gas. Also, there still may be a few simple but key features yet to be added to accurately simulate the real world.

I anticipate this to be just one of many videos showcasing FluidSim, but it may be a while before another one. I am about to get back into robotics but I will return to FluidSim.