This is a Fortran implementation of the vortex method, a numerical technique for simulating fluid flow. The code solves the two-dimensional incompressible Euler and Navier-Stokes equations using a Lagrangian particle-based approach, where the fluid is represented by a collection of discrete vortices.
To run this program, you need a Fortran 77 compiler (tested with GNU Fortran, Intel, PGI, and HPE/Cray) and make.
By default, the program uses GNU Fortran. To build the program, run:
$ (cd lib && make) $ (cd example/gauss && make) $ (cd example/omegaI && make)
Edit the conf.mk file to use a different Fortran compiler,
Navigate to the example/unit directory and run the following command (you will need to have gnuplot installed)
$ make $ ./make_box.gp data/points
This will create a box for paritcles in data/points
To run the program, navigate to one of the example directories and run the main executable. Here are two examples:
Elliptic Lamb–Oseen vortex:
$ cd example/gauss $ ./main initial number of Particles 60025 Particles : 60025 Time : 0.3405 ...
Melander, McWilliams, and Zabusky vortex:
$ cd example/omegaI $ ./main initial number of Particles 672400 Particles : 672400 Time : 12.1381 ...
You can use the tool/heat.awk script to generate a heatmap from the simulation data. Here's an example:
$ awk -f tool/heat.awk example/gauss/w.00000001.dat > heat.ppm $ convert heat.ppm heat.png
Cottet, G. H., & Koumoutsakos, P. D. (2000). Vortex methods: theory
and practice (Vol. 8). Cambridge: Cambridge university press.