Work in progress · CFD benchmark · solver comparison · HPC
Lid-Driven Cavity Solver Comparison
A work-in-progress multi-language CFD benchmark for the 2D incompressible lid-driven cavity problem across MATLAB/Octave, Python, C, C++, OpenMP, MPI, and a CUDA prototype.
Problem
The lid-driven cavity is a compact benchmark for incompressible flow, pressure-velocity coupling, convection-scheme behavior, mesh effects, and comparison with published centerline velocity data. The challenge is to keep the physical and numerical setup traceable across several languages and parallelization approaches.
Current benchmark setup
Physics
2D incompressible cavity with a moving top lid, no-slip side and bottom walls, and Reynolds-number-based cases.
Study matrix
N = 32, 64, 128; Re = 100, 400, 1000; upwind and central convection schemes; RBGS and RBSOR pressure solvers.
Implementations
MATLAB/Octave, Python/NumPy, C, C++, OpenMP, MPI, and a CUDA prototype with CSV-oriented comparison outputs.
My contribution
- Structured the work as a multi-language solver benchmark rather than one isolated CFD code.
- Matched cases by grid size, Reynolds number, convection scheme, and pressure solver.
- Separated serial baselines, OpenMP implementations, MPI case-level distribution, and CUDA prototype work.
- Prepared scripts and figures for runtime, residuals, validation metrics, and execution status.
- Kept incomplete solver groups and current limitations visible.
How to read the current numbers
An execution-complete case reached the end of its configured run; this does not automatically prove residual convergence. The current runtime table is therefore an interim computational comparison, not a final time-to-convergence ranking.
- Eight CPU solver groups executed the current 36-case configuration.
c_openmp_t4currently has the lowest reported median runtime at 236.76 s.cpp_openmp_t4currently follows at 284.40 s.- MPI currently represents case-level parameter-study distribution, not spatial domain decomposition.
- Convergence, validation status, iteration count, and hardware metadata are being separated more clearly.
Why this project matters
The project connects physics, numerical methods, implementation, automation, HPC execution, validation logic, and performance measurement. Its value is the transparent comparison process, including the parts that are not final yet.
Roadmap before completion
- Separate execution status, residual convergence, and validation status in every summary.
- Add repeated timing runs and variability statistics.
- Record compiler, hardware, thread, rank, and commit metadata.
- Improve high-Reynolds-number convergence behavior.
- Define one final cross-language benchmark protocol.
- Review numerical equivalence of the CUDA prototype.