Vic2d is a multithreaded two-dimensional fluid simulator. It uses a vortex-in-cell velocity solver with a 4th-order semi-Lagrangian method-of-characterstics and 4th-order interpolation scheme for advection. A similar method was mentioned in a 1969 paper, but does not appear to have been used since then. Unlike Stam's stable fluids method, it is not unconditionally stable, but it does have the ability to take large time steps with very little numerical diffusion and subsequent loss of energy (which can't be said of the popular "Stable Fluids" method). Vic2d is a collection of C and Fortran files and requires only gcc, gfortran, and the PNG libraries to compile. I wrote the base code in 2004 and have been using and updating it since then.
You should get the current version of vic2d from the github page. You will need a C compiler and a Fortran compiler. If you are not using gcc and gfortran (because you are building on OSX or using MinGW), you will need to edit Makefile accordingly. On most Unixes, the following is all that should be necessary:
% git clone https://github.com/markstock/vic2d.git
% cd vic2d
% make
% vic2d -help
Vic2d supports the following options (and more):
12GB of RAM will allow you to run vic2d on domains up to 12288 x 12288 or 16384 x 9216 with full-color scalar tracking. Reynolds numbers can exceed 1B and Courant Numbers can exceed 20 easily.
Simple random vorticity, runs with CN~=12
Vertical-to-horizontal instability, Re=1M
Square RTI in B/W, showing simple buoyancy, Re=100M
Flow over cylinder at Re=9500
Flow over cylinder at Re=1000
Flow over cylinder at Re=140
Flow over DLA at Re=10k
Gravity-driven flow in horizontal channel, Re=100k
Buoyant simulation, RTI-like, very high resolution, Re=100MFuture versions of vic2d may include the following:
Please e-mail me if you'd like to see some particular feature in vic2d, or if you use it to make something creative.
Vic2d is being used to generate Povray image maps for gas giant planets for the open-source space game Oolite.
Gas giant texture created with vic2d and rendered in Povray by A. Bramble.I would like to thank John Adams, Paul Swarztrauber and Roland Sweet for FISHPACK 4.0, John Adams for MUDPACK 5.0, all the developers of libpng, and N. Bin Zafar for countless discussions.