Physics

Projects I've done involving physical simulations.


  Old - Some content is 10+ years old, not representing my current thoughts  

Index


Machine Learning

Gopher
Image Recognition

Some of my code is available on my GitHub Account


Stable Fluids


This is a Navier-Stokes based fluid simulator using the "Stable Fluids" method introduced by Jos Stam. I also got several implementation details and ideas from the Ph.D. dissertation of Mark Harris (Real-Time Cloud Simulation and Rendering). The GUI of the simulator has been done with Shiny.

There's a demo available for download.

The GUI of the simulator with the 'Help / Info' dialog explaining it open. It shows a pressure and velocity field for the current state of the fluid. Also shown is a field with dye / smoke moving with the fluid. The user can control the parameters of the simulation and add impulses to it.
The paper Stable but Non-Dissipative Water contains a lot of clever improvements over Stam's original method. I thought of implementing their Continuous Interpolation Profile (CIP) based advection scheme, but got distracted by other things.

Cloth Simulation


This is a simple particle / Verlet integration based cloth simulator. The simulation is driven by gravity as its main external force, collision is handled by bounding spheres. Simulation parameters such as damping, stiffness, timestep etc. can be adjusted over a configuration file. A set of constraints on the cloth particles keeps them together as a surface. A second set prevents local self-intersections. This method is well-suited for a GPU implementation (see the 'Cloth Simulation' paper from NVIDIA's I3D 2005 Presentations). An interesting future project would be to integrate the cloth simulator with a 3D version of my fluid simulator. This could simulate the airflow around a falling piece of cloth as well as the turbulence created by it.

The test framework for the simulator. All rendering is done with OpenGL and GLSL.
On the left is a piece of cloth sliding down a sphere. Note how the cloth does not self-intersect. On the right is a piece of cloth resting on 5 spheres. How the cloth crumples can changed by adjusting the stiffness.
I tried improving the rendering of the cloth by tesselating the triangulated cloth surface / the quads formed by the cloth particle grid with N-Patches. I also tried several different ways of computing the normals to influence the N-Patches curvature. Nothing helped to remove the artifacts introduced by the coarse base mesh. A surface primitive with better continuity / smoothing than N-Patches would be required.

Advection


Work-in-progress project comparing different advection schemes, integration methods and flux limiters for their speed and precision in fluid simulations.

The testbed application in action. Shown here is a 5th order upwind scheme, with and without flux limiter.

 © 2002 - 2017 Tim C. Schröder Disclaimer