This Windows Forms/C#/VB/.NET 7 application uses the cell-centered finite volume method (FVM) to generate fluid flow simulations by solving the incompressible Navier-Stokes equations for a lid-cavity problem.
The application allows grids of different types to be generated (e.g. irregular triangles, equilateral triangles, rectangular) and uses the same grid-agnostic FVM solver for all grid types. A newly added feature allows grids to be transformed via 2D Conway tiling operations: kis, join, kis+join and trunc.
Stable solutions are much easier to find on regular grids (play around with mesh granularity, lid velocity, density and viscosity) than on irregular grids, and also on grids which tend to have consistent cell sizes. In its present state the solution does not account for numerical diffusion perpendicular to face normals, so solutions are difficult to achieve on grids that have cells with non-regular geometries.
The code is well commented, so it can be read easily if you are looking for help with building your own FVM methods. The solution to the pressure equation, in particular, will be useful as it is not often well covered in online materials.
Linear equations are solved step-by-step using the SIMPLE predictor-corrector method and central differencing. No matrix methods are used, but parallelization is used throughout.
The images show sample plots at Reynolds Number 80 on an equilateral triangle grid with kis and join tiling: