Showing posts with label PCG. Show all posts
Showing posts with label PCG. Show all posts

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!