Saturday, April 28, 2012

Boom, Progress!

After working on the simulation system today, we have some plausible explosion results! I modified a lot of different components of the system in order to improve our simulation quality, and the outcome seems to be pretty good. Here are some of the changes I made:
  • Stop drawing the smoke so that it is easier to see the particles
  • Increase the tolerance of the PCG algorithm by a ridiculously large amount so that it can handle the sudden divergence / velocity increase when the fuel particles initially explode and inject pressure into the system
  • Instead of creating only one soot particle at the exact same location as a fuel particle only when the fuel is depleted, we now create multiple soot particles while the fuel particle is burning. These are created with a position and velocity near the original fuel particle with slight perturbations. This allows more particles in the system, giving a better visual result.
  • Advect the soot particles based on the velocity field of the fluid, and also add a drag force to their movement
  • Stop adding in the force of gravity to the particles during the advection step. I realized doing this was redundant and greatly inhibiting the upward movement in the system because gravity is already accounted for in the buoyancy calculation of the fluid
  • Tweaking many of the constants to control the temperature increase due to fuel particles burning
The video shows two examples of our current progress. The first video shows an explosion with 1000 particles in a 30x60x5 grid, and the second is 10,000 particles in a 30x60x30 grid. Approximately 10 soot particles are generated per fuel particle, so the last video has roughly 100,000 particles involved in the entire simulation. I plan on rendering a larger high-resolution grid simulation with over a million particles.



Our next step is to continue tweaking the explosion system to make sure as many of the formulae are accounted for as correctly as possible, so that we can achieve the most visually appealing and physically correct output. Our largest piece of remaining work will be to transfer the simulation data into Maya for high quality renders.

Monday, April 16, 2012

Alpha Review



Check out the Alpha review video of our project. To view it on YouTube, use the following link

Thursday, April 12, 2012

Framework & Particles

Over the past week I was able to make some major improvements to start converting the smoke simulation framework into one that simulates explosions. To start, I created all of the necessary variables and data structures to store the particle information, constants, and divergence modifier. I also updated the divergence calculation to take into account the gas expansion caused by heat and force exerted from burning particles. After this was set up, I worked on creating and initializing the particles within the smoke system. This was accomplished after some initial difficulties associated with converting particle positions to match up within the fluid grid.

Once the particle positions, velocities, and temperature were initialized I added in the particle advection method to move the particles according to the fluid velocity by means of a drag force. This method also advects the particle temperature based on the surrounding fluid temperature, necessary to determine when an individual particle ignites. The particles need to be placed in the right spot of the fluid grid so that they do not simply drop the ground from gravitational forces, but after they are located near a strong velocity field they move along with the fluid. A picture illustrating this can be seen to the left. The particles are originally colored blue, then turn red once they are ignited. This happens after their temperature goes above a certain threshold. At this point, their mass begins burning off, making them much lighter and easier to propel along with the fluid velocity field. After their mass is entirely burned, they turn into a soot particle, which are rendered in gray and can be seen in the image.


I also created the framework and base code for all of the other particle to fluid interactions. This includes the updated temperature calculation within the fluid temperature advection step, a reciprocal negative drag force on the fluid exerted by the particles, increasing the fluid temperature when a particle is burning, and increasing the fluid divergence when a particle is burning. Unfortunately, this is where the majority of my progress was stopped, as enabling each of these modifications causes the PCG computation to not converge and the simulation to immediately halt. Although each of these methods was taken directly from our paper source, and I am not aware of any other methods that I left out, there is clearly a piece to the puzzle that we are missing. I tried isolating the problem by working with each method individually on a 2x2x1 grid with only 1 particle, but the same problem occurs with the PCG calculation of the pressure. It appears that any function that directly or indirectly modifies the fluid velocity field will cause this problem, but as this is a necessary component of the paper I am not sure how to proceed. Hopefully a solution will present itself in time!

Monday, April 2, 2012

First Post!

This blog will be dedicated to tracking the progress of our final project for CIS 563, Physically Based Animation, at the University of Pennsylvania. We are attempting to modify our smoke simulation framework from a previous assignment in order to create explosions. A brief overview of our approach, as seen in our project proposal, is below.


For this project we will implement the explosion techniques presented in the 2003 SIGGRAPH paper Animating Suspended Particle Explosions by Feldman et al. The core component of the system is semi-Lagrangian fluid simulation, so the project will be designed as an extension to the smoke simulator assignment.  Therefore, this project will also rely on Robert Bridson’s 2007 SIGGRAPH course notes on fluids as a primary source. We will also refer to the course slides on explosions, as well as various online resources from other universities, which provide additional detail on fluid particle systems and explosions. The main approach to creating an explosion system will be to use an incompressible fluid to determine the motion of fuel and soot particles while advecting density, temperature, heat, and combustion values. The modifications to the smoke simulation system will include adjusting the divergence field, changing the pressure computation to account for fluid expansion, creating and advecting fuel and soot particles, properly modeling heat transfer and combustion, and ensuring that all values are smoothly transferred between the fluid and particles. We also plan to research different rendering techniques to produce visually appealing images. The overall goal is to render reasonably realistic images and movies of a fireball-like explosion. The system will be implemented in C++ using Visual Studio 2010 and OpenGL, along with possible extensions in Maya.