

This simulation implements the Affine Particle in Cell (APIC) Method. This implementation is based on Jiang et. al [2015].
- expanded on Bridson’s PIC/FLIP starter code
- updated from the grid
- calculated the velocity field in the x and y dimensions and billinearly interpolated the four points around the current position (p) in the MAC grid
- computed the gradient by multiplying the velocities by the new weights and designating them as vector components of p
- transferred velocity data from the particles to the grid
- using equations 12 and 13, computed the weights for each of the four surrounding points of p and multiplied each with the dot product of p's distance from the current position and vector
- the new value is added to each surrounding point in the MAC grid so that the particles can iteratively be transferred back to the grid with updated positions
- scripted in C++