This program implements a Riemann solver for the two-dimensional Euler equations on an unstructured triangular mesh using the finite volume method. The HLLC fluxes are computed by solving the x-split Riemann problem at each face, taking advantage of the rotational invariance of the flux vectors. The solver employs an explicit multi-stage Runge-Kutta temporal discretisation, along with a multi-slope MUSCL gradient reconstruction and van Albada limiter to ensure stability and accuracy, especially near discontinuities.
root/
│
├── data/ # saved data folder
│ ├── cp.png # pressure coefficient plot
│ └── mach.mp4 # mach number animation
│
├── mesh/ # mesh folder
│ ├── body.txt # body coordinates (user input)
│ ├── body.py # generates body.txt
│ ├── geo.py # generates mesh.geo from body.txt
│ ├── su2.py # generates mesh.su2 from mesh.geo
│ └── mesh.f90 # generates mesh.txt from mesh.su2
│
├── mods/ # modules folder
│ ├── mod_mesh.f90 # mesh type and procedures
│ ├── mod_config.f90 # configuration type and procedures
│ ├── mod_solve.f90 # solver procedures
│ ├── mod_flux.f90 # HLLC flux procedures
│ └── mod_utils.f90 # utility procedures
│
├── run.sh # script to run program
├── main.f90 # script to run solver
├── read.py # script to read and plot saved data
├── config.txt # configuration for solver (user input)
└── requirements.txt # dependencies for solver
Clone repository:
git clone https://github.com/obdwinston/Compressible-Flow.git && cd Compressible-Flow
Execute program (for macOS users):
chmod +x run.sh && ./run.sh
For Windows users, you need to modify run.sh
accordingly before executing the program. For custom bodies, coordinates in mesh/body.txt
should be x y
space-delimited and in clockwise order, with no repeated points or intersecting lines.
Half-Angle | Mach Number | Angle of Attack |
---|---|---|
15° | 2 | 0° |
mach.mp4
NACA Designation | Mach Number | Angle of Attack |
---|---|---|
0012 | 0.8 | 1.25° |
animation.mp4
[1] Toro (2009). Riemann Solvers and Numerical Methods for Fluid Dynamics: A Practical Introduction.
[2] Blazek (2015). Computational Fluid Dynamics: Principles and Applications.
[3] Hou et al. (2015). An Efficient Unstructured MUSCL Scheme for Solving the 2D Shallow Water Equations.
[4] Curcic (2021). Modern Fortran: Building Efficient Parallel Applications.
[5] Anderson (2020). Modern Compressible Flow with Historical Perspective.
[6] Pulliam (1986). Artificial Dissipation Models for the Euler Equations.