Cavity flow is simulated using the pressure correction method on a staggered grid using explicit differencing for the hyperbolic terms (CD, MacCormack and Richtmyer method) while both explicit and implicit methods are considered for the diffusive (parabolic) terms. For the implicit steps, preconditioned matrices are used using LU decomposition. The Pressure Poisson equation is also solved implicitly. Neumann boundary conditions are used for pressure and Dirichlet conditions for the velocity field
I tried to set simply (u,v) = (1,0) as a test for plausibility. The result seems incorrect, due to a strange recirculation in the upper right corner.
Seems to be caused by the projection step.
Do you know how to fix that?
Thank you for the code.
Is it possible to have documentation of code?
Especially, defining boundaries.
- why Dirichlet B.Cs should be like " bcT(:,1)=TS/dy^2 " ?
What is the highest Re number, this code can cope with?
The code is meant to be pedagogical in nature and has been made in line with the 12-steps to Navier-Stokes practical module, for which I would like to credit Lorena Barba and her online course on CFD.
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.