**cfd_barba**,
a Python code which
implements the "12 Steps to Navier-Stokes" presentation
by Lorena Barba.

These codes have been modified and simplified, to run in a standard Python environment. Some of the notes and comments in the original iPython notebooks have been retained.

- 1D linear convection
- 1D nonlinear convection
- 1D diffusion
- 1D Burgers equation
- 2D linear convection
- 2D nonlinear convection
- 2D diffusion
- 2D Burgers equation
- 2D Laplace equation
- 2D Poisson convection
- 2D Navier-Stokes cavity flow convection
- 2D Navier-Stokes channel flow.

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

**cfd_barba** is available in
a Python version

- cfd_barba.sh, runs all the tests.

- step01.py, set up and solve the 1D linear convection equation.
- step01_initial.png, a plot of the initial condition.
- step01_final.png, a plot of the final solution.
- step02.py, set up and solve the 1D nonlinear convection equation.
- step02_final.png, a plot of the final solution.
- step03.py, set up and solve the 1D diffusion equation.
- step03_final.png, a plot of the final solution.
- step04.py, set up and solve the 1D Burgers equation.
- step04_initial.png, a plot of the initial condition.
- step04_final.png, a plot of the final computed and exact solutions.
- step05.py, set up and solve the 2D linear convection equation.
- step05_initial.png, a plot of the initial condition.
- step05_final1.png, a plot of the final computed solution using nested for loops.
- step05_final2.png, a plot of the final computed solution using array operations.
- step06.py, set up and solve the 2D nonlinear convection equation.
- step06_initial_u.png, a plot of the initial condition for u.
- step06_initial_v.png, a plot of the initial condition for v.
- step06_final_u.png, a plot of the final computed solution for u.
- step06_final_v.png, a plot of the final computed solution for v.
- step07.py, set up and solve the 2D diffusion equation.
- step07_initial.png, a plot of the initial condition.
- step07_10.png, a plot of the solution after 10 steps.
- step07_14.png, a plot of the solution after 14 steps.
- step07_50.png, a plot of the solution after 50 steps.
- step08.py, set up and solve the 2D Burgers equation.
- step08_initial.png, a plot of the initial condition.
- step08_final.png, a plot of the final solutions.
- step09.py, set up and solve the 2D Laplace equation.
- step09_initial.png, a plot of the initial condition.
- step09_final.png, a plot of the final solutions.
- step10.py, set up and solve the 2D Poisson equation.
- step10_final.png, a plot of the final solutions.
- step11.py, set up and solve the 2D Navier-Stokes equations for the driven cavity.
- step11_100.png, a plot of the solution after 100 time steps.
- step11_700.png, a plot of the solution after 700 time steps.
- step12.py, set up and solve the 2D Navier-Stokes equations for the channel.
- step12_trimmed.png, a plot of the solution using 1/3 of the data in each direction.
- step12_all.png, a plot of the solution using all the data.