Sunday, February 20, 2011

Basic SPH Simulation


This week I finished stripping down and integrating the SPH simulation into my renderer/framework, and found some good initial constants to play with as well as added some fun debugging stuff like hot/cold color ramping for different particle attributes like pressure, current velocity, temperature, etc. This will be useful for future debugging.

The simulation I am using is pretty basic and uses the standard kernels from "Particle-Based Fluid Simulation for Interactive Applications" with viscous error correction (not technically the same thing we want to use, as the viscous error correction value is constant throughout the simulation and only meant to counter numerical instability, without this term the simulation quickly blows up within its own containment box). However it does not take into account particle forces at the fluid boundaries such as surface tension, which would be something interesting to implement.


The next steps in the next couple following days will be to add the "real" viscoscity stress tensor which will have a large effect on the viscoelastic nature of this fluid, and then couple it to the temperature (eventually I want to have the temperature time-variate according to the heat equation ). I will be starting off by implementing it as described in "Particle-based non-Newtonian fluid animation for melting objects" which describes the formulation of not only the stress tensor, but the viscocity function and the heat equation.

1 comment:

  1. What particular attribute are the colors representing in these screencaps?

    ReplyDelete