A program storage device readable by machine, tangibly embodying a program of instructions executable by the machine to perform method steps for performing computer graphic simulation of an incompressible fluid in motion, the method comprising:
- providing to a simulator module input data that includes a scalar field that defines a physical property of the fluid or of matter suspended therein and a sequence of target scalar fields that define a desired temporal evolution of the scalar field;
- simulating fluid motion by calculating a velocity vector u of the fluid at a plurality of points in the simulated fluid, at a plurality of time intervals, wherein said calculation is performed by solving an equation:
- ut=−u·∇u−∇p+f*+F
- where:
- p=hydrostatic pressure,
- f*=combination of forces acting on the fluid;
- F=a computed driving force that is defined by a predetermined function having closed-form terms based on an instantaneous state of the simulation at each simulation time step and that propels the fluid in such a manner that the resulting flow carries the scalar field towards the next target scalar field in said sequence thus avoiding any need for non-linear optimization;
- ut=is the vector of time derivatives of the velocity field u;
- using said velocity values at each time interval to advect the scalar field;
- sending the scalar field to a renderer module for producing a sequence of animation frames;
- and;
- storing the sequence of animation frames for subsequent display.