A simple conditionaly stable 2D incompressible Navier-Stokes solver on a regular Cartesian quadrilateral grid, utilizing the Chorin projection/decomposition method.
The governing equations are:
We use the splitting method based on the Helmholtz-Hodge decomposition. For any arbitrary vector field
with:
Thus, the velocity field becomes:
Finite Difference (FD) form:
$$ \vec{u} - \vec{u}{\text{prev}} = \tau \cdot \nu \nabla^2 \vec{u}{prev} $$
FD form:
FD form:
Rewritten expression for iteartive Gauss-Seidel solver:
A test case involves lid-driven flow in a box cavity. All walls have zero Dirichlet velocity conditions, except for the top side, where a sliding velocity is defined. This velocity periodically changes its direction from left to right and vice versa. The magnitude of the velocity field is represented using ASCII art.