This repository is for the course High-Performance Computing: Fluid Mechanics with Python at the University of Freiburg in the summer semester 2022.
Contents
- Report
- Animation: Lid-Driven Cavity
- Setup
- Scaling Tests with Lid-Driven Cavity
- Milestones
- Report
- Reproducibility
- Tests
The final report can be found here: report/report.pdf
m6_x300_y300_v0.03_Re1000.webm
Details
The versioned video is located under report/media/m6_x300_y300_v0.03_Re1000.webm.
Install dependencies from PyPi using pip:
pip3 install -r requirements.txtIn order to run the parallelized code, you need some MPI implementation like OpenMPI.
A parametrizable implementation of the lid-driven cavity experiment can be run with the lid_driven_cavity.py script. Run
python3 lid_driven_cavity.py --helpfor a list of possible arguments.
Use mpiexec in order to run it in parallel, e.g.:
mpiexec -n 16 python3 lid_driven_cavity.py -x 300 -y 300 -w 1.7 -n 100000Implementation of the milestones is located in src/milestones. Use milestone.py in order to run a specific milestone. See
python3 milestone.py --helpfor usage information.
The final report is located at report/main.pdf.
Building the report:
cd report
make reportThis requires some LaTeX distribution (e.g. TeX Live) to be installed that includes lualatex and latexmk.
All plots with results from experiments in the report can be reproduced:
cd report
make plotsThe results of the scaling tests are versioned here: report/scaling/scaling.tar.gz.
In order to reproduce them, see report/scaling/README.md.
Run all unit tests in the test/ directory using the following command:
python3 -m unittestThe following naming conventions need to be applied in order for the test discovery to work:
- the directory must be named
test* - every (sub)directory need to be a package, i.e. they need a
__init__.pyfile - all filenames need to match
test*.pyand must be valid identifiers, e.g.test_foo.pybut nottest-foo.py - all classes must extend
unittest.TestCase - all test case method names must match
test*