This Python module is intended as an aid for the participants of AST3310 at the University of Oslo.
It provides an easy way of dealing with a less educational, but rather time consuming aspect of writing a fluid simulation; the saving and visualisation of calculated data.
- Run your simulation for a given amount of time and save the resulting data to binary files.
- Read data previously saved by the module.
- Add more simulation data to existing files.
- Show a 1D or 2D animation of a quantity that can be derived from the stored data.
- Save the animation as an mp4 file.
- Plot the time evolution of the average value of a quantity (useful for checking if something is conserved).
All these actions can be done with just a few function calls in your main program.
Download FVis3.py (if you are using Python 3.x) or FVis2.py (if you are using Python 2.x) to your working directory and you are good to go. (In the linked page, click 'Raw' and then right-click => Save as..)
Check out the User guide for instructions on how to use the module.
1D shock tube test:
Sound waves in a uniform medium:
Solar convection cell: