{ "cells": [ { "cell_type": "raw", "metadata": {}, "source": [ "Text provided under a Creative Commons Attribution license, CC-BY. All code is made available under the FSF-approved BSD-3 license. (c) Lorena A. Barba, Gilbert F. Forsyth 2017. Thanks to NSF for support via CAREER award #1149784." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[@LorenaABarba](https://twitter.com/LorenaABarba)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "12 steps to Navier–Stokes\n", "======\n", "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Hello! Welcome to the **12 steps to Navier–Stokes**. This is a practical module that is used in the beginning of an interactive Computational Fluid Dynamics (CFD) course taught by [Prof. Lorena Barba](http://lorenabarba.com) since Spring 2009 at Boston University. The course assumes only basic programming knowledge (in any language) and of course some foundation in partial differential equations and fluid mechanics. The practical module was inspired by the ideas of Dr. Rio Yokota, who was a post-doc in Barba's lab, and has been refined by Prof. Barba and her students over several semesters teaching the course. The course is taught entirely using Python and students who don't know Python just learn as we work through the module.\n", "\n", "This [Jupyter notebook](https://jupyter-notebook.readthedocs.io/en/stable/) will lead you through the first step of programming your own Navier–Stokes solver in Python from the ground up. We're going to dive right in. Don't worry if you don't understand everything that's happening at first, we'll cover it in detail as we move forward and you can support your learning with the videos of [Prof. Barba's lectures on YouTube](http://www.youtube.com/playlist?list=PL30F4C5ABCE62CB61).\n", "\n", "For best results, after you follow this notebook, prepare your own code for Step 1, either as a Python script or in a clean Jupyter notebook.\n", "\n", "To execute this Notebook, we assume you have invoked the notebook server using: jupyter notebook." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Step 1: 1-D Linear Convection\n", "-----\n", "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The 1-D Linear Convection equation is the simplest, most basic model that can be used to learn something about CFD. It is surprising that this little equation can teach us so much! Here it is:\n", "\n", "$$\\frac{\\partial u}{\\partial t} + c \\frac{\\partial u}{\\partial x} = 0$$\n", "\n", "With given initial conditions (understood as a *wave*), the equation represents the propagation of that initial *wave* with speed $c$, without change of shape. Let the initial condition be $u(x,0)=u_0(x)$. Then the exact solution of the equation is $u(x,t)=u_0(x-ct)$.\n", "\n", "We discretize this equation in both space and time, using the Forward Difference scheme for the time derivative and the Backward Difference scheme for the space derivative. Consider discretizing the spatial coordinate $x$ into points that we index from $i=0$ to $N$, and stepping in discrete time intervals of size $\\Delta t$.\n", "\n", "From the definition of a derivative (and simply removing the limit), we know that:\n", "\n", "$$\\frac{\\partial u}{\\partial x}\\approx \\frac{u(x+\\Delta x)-u(x)}{\\Delta x}$$\n", "\n", "Our discrete equation, then, is:\n", "\n", "$$\\frac{u_i^{n+1}-u_i^n}{\\Delta t} + c \\frac{u_i^n - u_{i-1}^n}{\\Delta x} = 0$$\n", "\n", "Where $n$ and $n+1$ are two consecutive steps in time, while $i-1$ and $i$ are two neighboring points of the discretized $x$ coordinate. If there are given initial conditions, then the only unknown in this discretization is $u_i^{n+1}$. We can solve for our unknown to get an equation that allows us to advance in time, as follows:\n", "\n", "$$u_i^{n+1} = u_i^n - c \\frac{\\Delta t}{\\Delta x}(u_i^n-u_{i-1}^n)$$\n", "\n", "Now let's try implementing this in Python. \n", "\n", "We'll start by importing a few libraries to help us out.\n", "\n", "* numpy is a library that provides a bunch of useful matrix operations akin to MATLAB\n", "* matplotlib is a 2D plotting library that we will use to plot our results\n", "* time and sys provide basic timing functions that we'll use to slow down animations for viewing" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Remember: comments in python are denoted by the pound sign\n", "import numpy #here we load numpy\n", "from matplotlib import pyplot #here we load matplotlib\n", "import time, sys #and load some utilities\n" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "#this makes matplotlib plots appear in the notebook (instead of a separate window)\n", "%matplotlib inline " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let's define a few variables; we want to define an evenly spaced grid of points within a spatial domain that is 2 units of length wide, i.e., $x_i\\in(0,2)$. We'll define a variable nx, which will be the number of grid points we want and dx will be the distance between any pair of adjacent grid points. " ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "nx = 41 # try changing this number from 41 to 81 and Run All ... what happens?\n", "dx = 2 / (nx-1)\n", "nt = 25 #nt is the number of timesteps we want to calculate\n", "dt = .025 #dt is the amount of time each timestep covers (delta t)\n", "c = 1 #assume wavespeed of c = 1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We also need to set up our initial conditions. The initial velocity $u_0$ is given as \n", "$u = 2$ in the interval $0.5 \\leq x \\leq 1$ and $u = 1$ everywhere else in $(0,2)$ (i.e., a hat function).\n", "\n", "Here, we use the function ones() defining a numpy array which is nx elements long with every value equal to 1." ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "[ 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 2. 2. 2. 2. 2. 2. 2. 2.\n", " 2. 2. 2. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1. 1.\n", " 1. 1. 1. 1. 1.]\n" ] } ], "source": [ "u = numpy.ones(nx) #numpy function ones()\n", "u[int(.5 / dx):int(1 / dx + 1)] = 2 #setting u = 2 between 0.5 and 1 as per our I.C.s\n", "print(u)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let's take a look at those initial conditions using a Matplotlib plot. We've imported the matplotlib plotting library pyplot and the plotting function is called plot, so we'll call pyplot.plot. To learn about the myriad possibilities of Matplotlib, explore the [Gallery](http://matplotlib.org/gallery.html) of example plots.\n", "\n", "Here, we use the syntax for a simple 2D plot: plot(x,y), where the x values are evenly distributed grid points:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t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onxF0vMR8eU5Hl/w8Vn6\ndk0UOHkqIh6zfZ3tlyVNSbql7DlyUeT1lPQntv9a0nFJRyV9qLmJ2832LkkdSetsH5S0TdKYODYX\nbNRrKY7LBbH9PkkflvSs7WfUv7rvHeq/s27RxycnQwFAxvj4PwDIGCEPABkj5AEgY4Q8AGSMkAeA\njBHyAJAxQh4AMkbIA0DG/g9WD4D/jFcM7gAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "pyplot.plot(numpy.linspace(0, 2, nx), u);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Why doesn't the hat function have perfectly straight sides? Think for a bit." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now it's time to implement the discretization of the convection equation using a finite-difference scheme. \n", "\n", "For every element of our array u, we need to perform the operation $u_i^{n+1} = u_i^n - c \\frac{\\Delta t}{\\Delta x}(u_i^n-u_{i-1}^n)$\n", "\n", "We'll store the result in a new (temporary) array un, which will be the solution $u$ for the next time-step. We will repeat this operation for as many time-steps as we specify and then we can see how far the wave has convected. \n", "\n", "We first initialize our placeholder array un to hold the values we calculate for the $n+1$ timestep, using once again the NumPy function ones().\n", "\n", "Then, we may think we have two iterative operations: one in space and one in time (we'll learn differently later), so we'll start by nesting one loop inside the other. Note the use of the nifty range() function. When we write: for i in range(1,nx) we will iterate through the u array, but we'll be skipping the first element (the zero-th element). *Why?*" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [], "source": [ "un = numpy.ones(nx) #initialize a temporary array\n", "\n", "for n in range(nt): #loop for values of n from 0 to nt, so it will run nt times\n", " un = u.copy() ##copy the existing values of u into un\n", " for i in range(1, nx): ## you can try commenting this line and...\n", " #for i in range(nx): ## ... uncommenting this line and see what happens!\n", " u[i] = un[i] - c * dt / dx * (un[i] - un[i-1])\n", " \n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Note**—We will learn later that the code as written above is quite inefficient, and there are better ways to write this, Python-style. But let's carry on.\n", "\n", "Now let's try plotting our u array after advancing in time." ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXkAAAEACAYAAABWLgY0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHLJJREFUeJzt3XuUVNWZxuHfh9wEFC9RFAXUKBIUB6IoCIMFMXIfLipI\nNBqMCWY0Q0YzGpPMyIxOIkk00aW5mFEczcJIuDZ3BC0RVIIXbFA0QUAIICpoECQDtHv+2IV2muqu\n6upTtatOvc9atazqOl31Wev0y67v7LOPOecQEZF4ahS6ABERyR+FvIhIjCnkRURiTCEvIhJjCnkR\nkRhTyIuIxFjGkDezk83sKTN7zcxWm9m/1LLdfWb2ZzNbZWZdoy9VRETqq3EW2xwAbnLOrTKzVsBL\nZrbIOffGwQ3MbCDweefcGWZ2AfBroEd+ShYRkWxlHMk7595xzq1K3d8NrAVOqrHZMODR1DYrgNZm\n1ibiWkVEpJ7q1ZM3s1OArsCKGk+dBGyu9ngLh/5DICIiBZZ1yKdaNVOB8akRvYiIFLlsevKYWWN8\nwD/mnJuVZpMtQLtqj09O/azm62ihHBGRHDjnLJffy3Yk/zDwunPu3lqerwCuBjCzHsCHzrnt6TZ0\nzukW0e32228PXkOcbvo89VkW660hMo7kzawXcCWw2sxeARzwfaCDz2z3oHNunpkNMrN1wB5gbIOq\nEhGRSGQMeefccuCwLLa7MZKKREQkMln15KU4JRKJ0CXESjl8ni+/DDNnQl0dgObN4etfhxNOyP19\nyuGzLBXW0H5Pvd7MzBXy/UTE27kTfvhDmD4drr0WDj+89m23boWpU+EHP4Abb4TGGgoGZ2a4HA+8\nKuRFYuyTT+Dhh33AX3op3HEHHHNM5t9buxa+/W149124/37o0yf/tUrtFPIicogXX4QbboDDDoMH\nHoBu3er3+875Ef3NN/uQ/+lP4cQT81Or1K0hIa9VKEViZscOuP56GDLE/3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pmP\nkM/m5Kma22xJs4142XyeAD1TX9/mmlnnwpQWS9o3o6X9Mgdmdgr+W9KKGk/Ve//U+jLx8BLQ3jn3\nsZkNBGbip7GKhKT9MgepE0mnAuNTI/oGycdIfgvQvtrjk1M/q7lNuwzbiJfx83TO7XbOfZy6Px9o\nYmbHFK7EWNG+GRHtl/WXWthxKvCYc25Wmk3qvX/mI+Q/PXnKzJriT56qqLFNBXA1fHpG7YfOue15\nqCUOMn6e1XtyZnY+fmqszlOonVF7r1j7Zv3U+llqv8zJw8Drzrl7a3m+3vtn5O0al8XJU865eWY2\nyMzWAXuAsVHXERfZfJ7AZWb2LWA/sBcYHa7i4mZmk4EEcKyZbQJuB5qifbPeMn2WaL+sFzPrBVwJ\nrDazV/Cr+34fP7Mu5/1TJ0OJiMSYLv8nIhJjCnkRkRhTyIuIxJhCXkQkxhTyIiIxppAXEYkxhbyI\nSIwp5EVEYuz/AYvongtzVccXAAAAAElFTkSuQmCC\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "pyplot.plot(numpy.linspace(0, 2, nx), u);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "OK! So our hat function has definitely moved to the right, but it's no longer a hat. **What's going on?**" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Learn More\n", "-----\n", "***" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For a more thorough explanation of the finite-difference method, including topics like the truncation error, order of convergence and other details, watch **Video Lessons 2 and 3** by Prof. Barba on YouTube." ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkz\nODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2MBERISGBUYLxoaL2NCOEJjY2NjY2NjY2Nj\nY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAENpNLfN9CHKMVttJHNlXaST4taTX3lSxEozjx7Ulrmt6A0EOSWtvryRRLE3Pbtlrny+O/1LFQl\nGKTfoy4gLDPHOolbXXFy3ZtRfC9NrfLf2M0JaM1OGqrIyc3JQcmlro5Pe/yA1AAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCQABBIAAAD//2Q==\n", "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('iz22_37mMkk')" ] }, { "cell_type": "code", "execution_count": 9, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/jpeg": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkz\nODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2MBERISGBUYLxoaL2NCOEJjY2NjY2NjY2Nj\nY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY//AABEIAWgB4AMBIgACEQED\nEQH/xAAaAAEAAwEBAQAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgkAQS\nAAAAAAAAAAAAAAAAAAAAAAAAAAIJAAAAAAAAAAAACCQAAAAAAAAAAAAgABlZxnnqQ5RXVpHFtPeN\nvftzBx4OI6RLPrZWU+VnHOQLyHOMcZfV4RR6JnObZPjCLO5woJP1YvOMdQLCuV9cb40ttTksrjh/\nMsXBRbpXZq6b3ZhVZajjrlNfqBeSAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAQCQAIJAEEgAAAB//Z\n", "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 9, "metadata": {}, "output_type": "execute_result" } ], "source": [ "YouTubeVideo('xq9YTcv-fQg')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "For a careful walk-through of the discretization of the linear convection equation with finite differences (and also the following steps, up to Step 4), watch **Video Lesson 4** by Prof. Barba on YouTube." ] }, { "cell_type": "code", "execution_count": 10, "metadata": { "collapsed": false }, "outputs": [ { "data": { "image/jpeg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x1MZRt\nSe5TeX1fUDtIJAEAkAQCQBAJAEAkAQCQBAJAEAkAAAAAAAAAAAAAAAgkgASQSABAAkEEgAQAJAAA\ngkgASAAAAAAAACAJAAAAAAABjqvytv0s0j8C9CmpTemtSWW4svH4V6AWAAAAAAAAAAEAACQAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAQCQBBIAEAkAAQAJAAAAAACAJBBIEAkAAAAAAAAAQCQAAAAAAAA\nAAAEAkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQCQAAAAAACCSABJBIAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACCSABJBIAAAAAAAAAAAAAAAAAAAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAIJIAZWcZ56kOSXVpFLKd7b3bcxcSi0qWfeys55XTnIG+SHOMcZf\nUw9lb62yfGEadzxFbvdTzjzA0M/aK+/7nd7/AKft6mmDlnoYS7QhrN0lKCxtT4b6Zf2YHUAAJAAA\nAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAJIJAAgk\nAAAB/9k=\n", "text/html": [ "\n", " \n", " " ], "text/plain": [ "" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "YouTubeVideo('y2WaK7_iMRI')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Last but not least" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Remember** to rewrite Step 1 as a fresh Python script or in *your own* Jupyter notebook and then experiment by changing the discretization parameters. Once you have done this, you will be ready for [Step 2](./02_Step_2.ipynb).\n", "\n", "\n", "***" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n" ], "text/plain": [ "" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.core.display import HTML\n", "def css_styling():\n", " styles = open(\"../styles/custom.css\", \"r\").read()\n", " return HTML(styles)\n", "css_styling()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "> (The cell above executes the style for this notebook. We modified a style we found on the GitHub of [CamDavidsonPilon](https://github.com/CamDavidsonPilon), [@Cmrn_DP](https://twitter.com/cmrn_dp).)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.5.2" } }, "nbformat": 4, "nbformat_minor": 0 }