Skip to main content

Jupyter Notebooks

[UPDATED Oct. 2017]

This course orbits around  sets of Jupyter Notebooks (formerly known as IPython Notebooks), created as learning objects, documents, discussion springboards,  artifacts for you to engage with the material. They are public, shareable and remixable (the real meaning of "open" on the internet), and they live in the course's GithHub repository.

How to work with the notebooks?

You can interact with the notebooks in a few ways. The simplest (but limited) is to read the notebooks as a webpage, rendered by the nbviewer server—follow the links below and you'll render each notebook.

The best way is to download them, and open them with your local Jupyter Notebook server. If you have a full Python installation, this is launched by typing in the terminal:

jupyter notebook

Read along, like a textbook, and take handwritten notes as you do. Follow the mathematical derivations, and look up things that you are confused with. Then execute the embedded code, play with it, change things and see what happens. Finally, write your own version of the codes, either in your own clean notebook or as a Python script.

List of Notebooks

Module 1—The phugoid model of glider flight.

    1. Phugoid motion
    2. Phugoid oscillation
    3. Full phugoid model
    4. Bonus! Second-order and multi-step methods

Screencast

Module 2—Space and time: Introduction to finite difference solutions of PDEs.

    1. 1D linear and nonlinear convection
    2. CFL condition
    3. 1D diffusion equation
    4. 1D Burgers' equation

Module 3—Riding the wave: convection problems.

    1. Conservation laws and the traffic-flow model
    2. Numerical schemes for convection
    3. A better flux model
    4. Finite volume and MUSCL methods
    5. AssignmentSod's shock-tube problem 

Module 4—Spreading out: parabolic PDEs

    1. Diffusion equation in 1D and boundary conditions
    2. Implicit schemes in 1D and boundary conditions
    3. 2D heat (diffusion) equation with explicit scheme
    4. 2D heat equation with implicit scheme, and applying boundary conditions
    5. Crank-Nicolson scheme and spatial & time convergence study
    6. AssignmentGray-Scott reaction-diffusion problem

Module 5—Relax and hold steady: elliptic problems.

    1. 2D Laplace equation with Jacobi iterations
    2. 2D Poisson equation with Jacobi, and algebraic convergence
    3. Gauss-Seidel, successive over-relaxation (SOR) and tuned SOR, introducing Numba
    4. The conjugate gradient method
    5. Assignment:  Stokes flow in vorticity-streamfunction formulation