This project is a small 3D CFD code in C++ built on a structured Cartesian mesh.
The current simulation path is a transient lid-driven cavity solver advanced in time step by step. The solver stores velocity and pressure at cell centers and uses a projection-style update to enforce incompressibility.
The code is split into a few small modules. Each module has its own manual.
-
Mesh
Defines the structured 3D grid, geometric spacing, flat indexing, cell centers, and boundary checks. -
Field3D
Defines scalar storage on the mesh and the memory layout used by the solver. -
FlowState
Groups the flow unknownsu,v,w, andpinto one state object. -
Solver
Defines the time-marching algorithm, lid-driven cavity boundary conditions, pressure projection, and divergence monitor.
mkdir -p build
cd build
cmake ..
cmake --build .