CFD Python: the 12 steps to Navier-Stokes equations. Barba, L. & Forsyth, G. Journal of Open Source Education, 1(9):21, November, 2018.
CFD Python: the 12 steps to Navier-Stokes equations [link]Paper  doi  abstract   bibtex   
The CFD Python learning module is a set of Jupyter notebooks, consisting of 12 “core” lessons, 3 “bonus” lessons, and a “lesson zero” as a quick intro to Python for numerical computing. This practical module takes students through 12 steps, incrementally guiding them to program a solution to the two-dimensional Navier–Stokes equation, using finite differences. The steps are the following: - Steps 1–4 are in one dimension: (i) linear convection with a step-function initial condition (IC) and appropriate boundary conditions (BC); with the same IC/BCs: (ii) nonlinear convection, and (iii) diffusion only; (iv) Burgers’ equation, with a saw-tooth IC and periodic BCs. - Steps 5–10 are in two dimensions: (v) linear convection with a square function IC and appropriate BCs; with the same IC/BCs: (vi) nonlinear convection, and (vii) diffusion only; (viii) Burgers’ equation; (ix) Laplace equation, with zero IC and both Neumann and Dirichlet BCs; (x) Poisson equation in 2D. - Steps 11–12 solve the Navier–Stokes equation in 2D: (xi) cavity flow; (xii) channel flow. Students learn many valuable lessons as the module guides them through these steps (they should not skip any!). The incremental nature of the exercises means they get a sense of achievement at the end of each lesson, and they feel they are learning with low effort. As they progress, they naturally practice code re-use and they incrementally learn programming and plotting techniques. As they analyze their results, they learn about numerical diffusion, accuracy, and convergence. In about four weeks, they become moderately proficient programmers and are motivated to start discussing more theoretical matters.
@article{barba_cfd_2018,
	title = {{CFD} {Python}: the 12 steps to {Navier}-{Stokes} equations},
	volume = {1},
	issn = {2577-3569},
	shorttitle = {{CFD} {Python}},
	url = {https://jose.theoj.org/papers/10.21105/jose.00021},
	doi = {10.21105/jose.00021},
	abstract = {The CFD Python learning module is a set of Jupyter notebooks, consisting of 12 “core” lessons, 3 “bonus” lessons, and a “lesson zero” as a quick intro to Python for numerical computing. This practical module takes students through 12 steps, incrementally guiding them to program a solution to the two-dimensional Navier–Stokes equation, using finite differences. The steps are the following:

- Steps 1–4 are in one dimension: (i) linear convection with a step-function initial condition (IC) and appropriate boundary conditions (BC); with the same IC/BCs: (ii) nonlinear convection, and (iii) diffusion only; (iv) Burgers’ equation, with a saw-tooth IC and periodic BCs.

- Steps 5–10 are in two dimensions: (v) linear convection with a square function IC and appropriate BCs; with the same IC/BCs: (vi) nonlinear convection, and (vii) diffusion only; (viii) Burgers’ equation; (ix) Laplace equation, with zero IC and both Neumann and Dirichlet BCs; (x) Poisson equation in 2D.

- Steps 11–12 solve the Navier–Stokes equation in 2D: (xi) cavity flow; (xii) channel flow.

Students learn many valuable lessons as the module guides them through these steps (they should not skip any!). The incremental nature of the exercises means they get a sense of achievement at the end of each lesson, and they feel they are learning with low effort. As they progress, they naturally practice code re-use and they incrementally learn programming and plotting techniques. As they analyze their results, they learn about numerical diffusion, accuracy, and convergence. In about four weeks, they become moderately proficient programmers and are motivated to start discussing more theoretical matters.},
	number = {9},
	urldate = {2018-11-27},
	journal = {Journal of Open Source Education},
	author = {Barba, Lorena and Forsyth, Gilbert},
	month = nov,
	year = {2018},
	keywords = {Fluids dynamics, numerical methods, uses sympy},
	pages = {21},
}

Downloads: 0