File Exchange

## CFD101: 2D Lid Driven Cavity Flow

version 1.2.0 (46.5 MB) by michio

### michio (view profile)

This repository provides MATLAB code for the lid-driven cavity flow where incompressible Navier Stokes equation is numerically solved using

Updated 30 Apr 2020

This provides a MATLAB example code for the lid-driven cavity flow where incompressible Navier Stokes equation is numerically solved using a simple 2nd order finite difference scheme on a staggered grid system. (日本語ドキュメントもあります)

Part 1: Getting Started with the Cavity Flow
The numerical scheme is kept primitive; the explicit treatment of viscous term (the solution diverges at low Reynolds number), and the time integration is Euler.
まずは単純な手法でキャビティ流れのシミュレーションを実施します。

Part 2: Implicit Scheme for the Viscous Terms
The implicit treatments for viscous terms are implemented, namely the Crank-Nicolson method. For better stability for non-linear terms, Adams-Bashforth, and 3 steps-Runge-Kutta is also implemented.

Part 3: Performance Comparison of the Implicit Methods
The implicit treatment for viscous terms results in solving the discretized Helmholtz equation at every time step. We compare the performance of five methods.

Next to come:
The plan is to allow arbitrary boundary conditions for more fun simulations.

### Cite As

michio (2020). CFD101: 2D Lid Driven Cavity Flow (https://github.com/mathworks/2D-Lid-Driven-Cavity-Flow-Incompressible-Navier-Stokes-Solver), GitHub. Retrieved .

Kenta

E. Cheynet

### E. Cheynet (view profile)

 16 Apr 2020 1.2.0 Added part 3: Performance Comparison of the Implicit Methods 18 Mar 2020 1.1.1 Updated Description 17 Mar 2020 1.1.0 Added part 2 documentation. Crank-Nicolson and Adams-Bashforth, 3 steps Runge-Kutta are implemented. 12 Mar 2020 1.0.4 Update solvePoissonEquation_direct.m, eliminate re-creating A matrix by the use of persistent variable 11 Mar 2020 1.0.3 Update GitHub URL 10 Mar 2020 1.0.2 Update the thumbnail GIF 10 Mar 2020 1.0.1 Changed the title
##### MATLAB Release Compatibility
Created with R2019b
Compatible with any release
##### Platform Compatibility
Windows macOS Linux