{ "metadata": { "name": "", "signature": "sha256:3decae47d4f6b9719477ef0d353ab055e5a195aa36b854cf14deb90fe52caa6a" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Diffusion in 2D\n", "==\n", "\n", "$$\\frac{\\partial u}{\\partial t} = \\nabla\\cdot D\\nabla x$$" ] }, { "cell_type": "code", "collapsed": false, "input": [ "%matplotlib inline\n", "from pylab import *\n", "from numpy import *" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "#dimensions of the square computational domain:\n", "maxx = 10.\n", "maxt = 1.\n", "\n", "#difffusivity\n", "D = 0.5" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "code", "collapsed": false, "input": [ "#discretization parameters\n", "nx = 100 # number of unknown grid points in spatial direction\n", "SC = 1.0 # stability criterion SC = 2*D*dt/dx^2, for FTCS should be SC <= 1\n", "\n", "def diffusion_init(maxx, maxt, D, nx, SC, stride=1):\n", " #choose time step according to CFL condition\n", " dx = maxx/(nx+1)\n", " dt = SC*dx**2/(4*D)\n", " nt = int(maxt/dt)+1\n", " \n", " #define array for storing the solution\n", " U = zeros((int(nt/stride), nx+2, nx+2))\n", " \n", " x = arange(nx+2)*dx\n", " t = arange(nt)*dt\n", " return U, dx, dt, x, t" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [ "def diffusion_solve(U, dx, dt, nx, nt, D, stride=1):\n", " Ui = U[0,:,:]\n", " for it in range(0,nt-1):\n", " Ui[1:-1, 1:-1] = Ui[1:-1, 1:-1] + D*dt/dx**2*(Ui[2:, 1:-1] - 2*Ui[1:-1, 1:-1] + Ui[0:-2, 1:-1])\\\n", " + D*dt/dx**2*(Ui[1:-1,2:] - 2*Ui[1:-1, 1:-1] + Ui[1:-1, 0:-2])\n", " if it%stride == 0:\n", " U[(it+1)/stride, :, :] = Ui" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 4 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let's try to propagate a square initial condition" ] }, { "cell_type": "code", "collapsed": false, "input": [ "U, dx, dt, x, t = diffusion_init(maxx, maxt, D, nx, SC=0.9)\n", "X, Y = meshgrid(x, x)\n", "U[0, :, :] = 0.\n", "U[0, (Xmaxx*0.2) & (Ymaxx*0.2) ] = 1.\n", "pcolormesh(U[0,:,:], rasterized=True, vmin=-1, vmax=1)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 5, "text": [ "" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAD3tJREFUeJzt3H+sX3V9x/Hna6040Y2uMSlIm9vO2QhEjWQi2zRetbrO\nmMJfCJmkKvMfdaJ/ONsaBiGBKMaoycIfUyHVDBamhEBCsl6Rb3GZ8UdEhpSusKwKml6c+HOJsch7\nf3wP+PXu9kLP99t7e7+f5yNpcs7nnM+573f6zet+es73NFWFJGm6/d5KFyBJOvEMe0lqgGEvSQ0w\n7CWpAYa9JDXAsJekBiwZ9kluSDKf5P6RsY8neTDJfUluTXLayLHdSR5KcjDJm09k4ZKkZ++ZVvY3\nAtsXjO0DzqmqVwCHgN0ASc4G3gac3c25Pon/cpCkk8CSYVxVXwV+smBsrqqe7Ha/Dmzsti8Abq6q\no1V1GHgYOG+y5UqS+hh35f0u4M5u+0XAoyPHHgXOHPP6kqQJ6B32ST4C/LqqblriNP8vBkk6Cazt\nMynJO4C3AG8cGf4BsGlkf2M3tnCuvwAkqYeqSt+5x72yT7Id+BBwQVX9auTQ7cDFSU5JsgV4CfCN\nxa5RVVP758orr1zxGuzP/lrsb5p7qxp/jbzkyj7JzcDrgBcmeQS4kuG3b04B5pIAfK2q3lNVB5Lc\nAhwAngD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AT4dVXdtMRpS/a3nGH/A2DTyP4mfvc306qU5DkM\ng/4LVXVbNzyf5PTu+BnAYytV3xj+HNiR5L+Bm4E3JPkC09EbDD97j1bVN7v9LzIM/yNT0t+fAv9e\nVT+uqieAW4E/Y3r6e8qxPo8L82ZjN7bqJHkHw9upfz0yfNz9LWfYfwt4SZLNSU5h+HDh9mX8+ROX\nJMDngANV9amRQ7cDO7vtncBtC+ee7KpqT1VtqqotDB/sfaWqLmUKeoPh8xbgkSRbu6FtwAPAHUxB\nfwwfNp+f5Hnd53Qbwwft09LfU471ebwduDjJKUm2AC9h+JLnqpJkO8NbqRdU1a9GDh1/f1W1bH+A\nv2L4hu3DwO7l/NknqJ/XMLyf/R3g3u7PdmA98GWGT8/3AetWutYx+3wdcHu3PTW9Aa8Avgncx3Dl\ne9qU9fd3DH+B3c/w4eVzVnN/DP+F+UPg1wyf/71zqX6APV3WHAT+cqXr79Hfu4CHgO+N5Mv1ffvz\npSpJasDJ/r1TSdIEGPaS1ADDXpIaYNhLUgMMe0lqgGEvSQ0w7CWpAYa9JDXg/wCtJdzDkCpM8AAA\nAABJRU5ErkJggg==\n", "text": [ "" ] } ], "prompt_number": 5 }, { "cell_type": "code", "collapsed": false, "input": [ "diffusion_solve(U, dx, dt, nx, len(t), D)\n", "pcolormesh(U[:, 30, :], rasterized=True, vmin=-1, vmax=1)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 7, "text": [ "" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAGOxJREFUeJzt3X2sZHV9x/HPp3NZUnzaEJuFhbVLCiSuaQXTUltbmbSE\nrk0D+A8PqQ2txpho1fpHW1cT3W1Somm0NmnwjwqG2EJLfCBLoikr9QLGKNoCossWSFjLIixatWJj\nZe/w7R9z5u7v3p1zZ+bM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\n", "text": [ "" ] } ], "prompt_number": 7 }, { "cell_type": "markdown", "metadata": {}, "source": [ "The time step limit seems to be to strict, let's try increasing the time step twice" ] }, { "cell_type": "code", "collapsed": false, "input": [ "U, dx, dt, x, t = diffusion_init(maxx, maxt, D, nx, SC=1.1)\n", "X, Y = meshgrid(x, x)\n", "U[0, :, :] = 0.\n", "U[0, (Xmaxx*0.2) & (Ymaxx*0.2) ] = 1." ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 8 }, { "cell_type": "code", "collapsed": false, "input": [ "diffusion_solve(U, dx, dt, nx, len(t), D)\n", "pcolormesh(U[:, 30, :], rasterized=True, vmin=-1, vmax=1)" ], "language": "python", "metadata": {}, "outputs": [ { "metadata": {}, "output_type": "pyout", "prompt_number": 9, "text": [ "" ] }, { "metadata": {}, "output_type": "display_data", "png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEACAYAAABS29YJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXm8HUWV+L/HXAgEWWQLBIJhDGGIogQYQJYkSAQEAVkU\nUARBGPiAgLixKe89BvgBjiAoOowKMsimbMKIsoyERVlkHTAgMBAgLGHfTIQk1O+P7q46N6/73Xvf\nu3277+3z/Xze551Xr6tPVd3u0+eeqjotzjkMwzCM3uYDRTfAMAzDyB8z9oZhGBXAjL1hGEYFMGNv\nGIZRAczYG4ZhVAAz9oZhGBVgSGMvIuNF5GYR+auIPCwiR8TlK4rIjSLymIjcICIrqDrHisjjIvKo\niGybdwcMwzCMxshQ6+xFZDVgNefcAyLyQeBe4HPA/sArzrnTReRo4EPOuWNEZDJwMfAvwBrATcAk\n59z7eXfEMAzDyGZIz94596Jz7oFYfgd4hMiI7wxcEB92AdEDAGAX4BLn3ALn3GzgCWCTHNptGIZh\ntEDTMXsRmQBMAe4Cxjrn5sb/mguMjeVxwBxVbQ7Rw8EwDMMokKaMfRzCuQI40jn3tv6fi+JAQ+Vc\nsHwMhmE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C\n", "text": [ "" ] } ], "prompt_number": 9 }, { "cell_type": "code", "collapsed": false, "input": [ "from scipy.sparse import dia_matrix, eye, kron\n", "from scipy.sparse.linalg import factorized\n", "def d2matrix(nelem):\n", " elements = ones((3,nelem))\n", " elements[1,:] *= -2\n", " return dia_matrix((elements, [-1,0,1]), shape=(nelem,nelem)).tocsc()\n", "\n", "def diffusion_solve_implicit(U, dx, dt, nx, nt, D):\n", " alpha = D*dt/dx**2\n", " mat2D = kron(d2matrix(nx), eye(nx)) + kron(eye(nx), d2matrix(nx))\n", " M = eye(nx*nx)-mat2D*alpha\n", " LU = factorized(M.tocsc())\n", " for it in range(0,nt-1):\n", " U[it+1,1:-1, 1:-1] = LU(U[it,1:-1, 1:-1].ravel()).reshape(nx, nx)\n" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "U, dx, dt, x, t = diffusion_init(maxx, maxt, D, nx, SC=10)\n", "X, Y = meshgrid(x, x)\n", "U[0, :, :] = 0.\n", "U[0, (Xmaxx*0.2) & (Ymaxx*0.2) ] = 1." ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "diffusion_solve_implicit(U, dx, dt, nx, len(t), D)\n", "pcolormesh(U[:, 30, :], rasterized=True, vmin=-1, vmax=1)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Again, Crank-Nicolson follows:" ] }, { "cell_type": "code", "collapsed": false, "input": [ "def diffusion_solve_CN(U, dx, dt, nx, nt, D):\n", " alpha2 = D*dt/dx**2*0.5\n", " mat2D = kron(d2matrix(nx), eye(nx)) + kron(eye(nx), d2matrix(nx))\n", " M1 = eye(nx*nx)-mat2D*alpha2\n", " M2 = eye(nx*nx)+mat2D*alpha2\n", " LU = factorized(M1.tocsc())\n", " for it in range(0,nt-1):\n", " U[it+1,1:-1, 1:-1] = LU(M2.dot(U[it,1:-1, 1:-1].ravel())).reshape(nx, nx)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "diffusion_solve_CN(U, dx, dt, nx, len(t), D)\n", "pcolormesh(U[:, 30, :], rasterized=True, vmin=-1, vmax=1)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Neumann BC" ] }, { "cell_type": "code", "collapsed": false, "input": [ "def diffusion_solve_CN_neumann_zero(U, dx, dt, nx, nt, D):\n", " alpha = D*dt/dx**2\n", " d2x = d2matrix(nx+2)\n", " d2x[0, 1] += 1\n", " d2x[-1, -2] += 1\n", " mat2D = kron(d2x, eye(nx+2)) + kron(eye(nx+2), d2x)\n", " M1 = eye((nx+2)**2)-mat2D*alpha/2\n", " M2 = eye((nx+2)**2)+mat2D*alpha/2\n", " LU = factorized(M1.tocsc())\n", " for it in range(0,nt-1):\n", " # U[it, boundary] -= alpha*dx*(NBC[it]+NBC[it+1])\n", " U[it+1,:, :] = LU(M2.dot(U[it,:, :].ravel())).reshape(nx+2, nx+2)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "U, dx, dt, x, t = diffusion_init(maxx, maxt*50, D, nx, SC=50)\n", "X, Y = meshgrid(x, x)\n", "U[0, :, :] = 0.\n", "U[0, (Xmaxx*0.2) & (Ymaxx*0.2) ] = 1." ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "diffusion_solve_CN_neumann_zero(U, dx, dt, nx, len(t), D)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "pcolormesh(U[:, 30, :], rasterized=True, vmin=0, vmax=.1)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "# constants taken from http://en.wikipedia.org/wiki/File:Brusselator_space.gif\n", "#initial field values\n", "U0 = 1.\n", "V0 = 1.\n", "noise = 2.\n", "\n", "#diffusion coefficients\n", "DU = 0.2\n", "DV = 0.02\n", "\n", "#constant concentrations\n", "A = 1\n", "B = 3\n", "\n", "def RHS(U, V):\n", " fV = B*U - U**2*V\n", " fU = A - fV - U\n", " return fU, fV\n", "\n", "maxt = 100.\n", "maxx = 100.\n", "\n", "U, dx, dt, x, t = diffusion_init(maxx, maxt, max((DU, DV)), nx, SC=.05)\n", "V, dx, dt, x, t = diffusion_init(maxx, maxt, max((DU, DV)), nx, SC=.05)\n", "X, Y = meshgrid(x, x)\n", "U[0, :, :] = U0 + noise*randn(nx+2, nx+2)\n", "V[0, :, :] = V0 + noise*randn(nx+2, nx+2)\n", "#for i in range(10):\n", "# U[0, randint(0, nx), randint(0, nx)] = 10\n", "# V[0, randint(0, nx), randint(0, nx)] = 10" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "def brusselator(U, V, dx, dt, nx, nt, DU, DV):\n", " alphaU = DU*dt/dx**2\n", " alphaV = DV*dt/dx**2\n", " d2x = d2matrix(nx+2)\n", " d2x[0, 1] += 1\n", " d2x[-1, -2] += 1\n", " mat2D = kron(d2x, eye(nx+2)) + kron(eye(nx+2), d2x)\n", " M1U = eye((nx+2)**2)-mat2D*alphaU/2\n", " M2U = eye((nx+2)**2)+mat2D*alphaU/2\n", " M1V = eye((nx+2)**2)-mat2D*alphaV/2\n", " M2V = eye((nx+2)**2)+mat2D*alphaV/2\n", " LUU = factorized(M1U.tocsc())\n", " LUV = factorized(M1V.tocsc())\n", " for it in range(10):\n", " U[0] = M2V.dot(U[it,:, :].ravel()).reshape(nx+2, nx+2)\n", " for it in range(0,nt-1):\n", " # U[it, boundary] -= alpha*dx*(NBC[it]+NBC[it+1])\n", " # diffusion operator\n", " U[it+1,:, :] = LUU(M2U.dot(U[it,:, :].ravel())).reshape(nx+2, nx+2)\n", " V[it+1,:, :] = LUV(M2V.dot(V[it,:, :].ravel())).reshape(nx+2, nx+2)\n", " \n", " fU, fV = RHS(U[it+1], V[it+1])\n", " U[it+1] += fU*dt\n", " V[it+1] += fV*dt" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "brusselator(U, V, dx, dt, nx, len(t), DU, DV)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [ "figure(figsize=(12,12))\n", "subplot(221)\n", "pcolormesh(U[:, 30, :], rasterized=True, vmin=0, vmax=5)\n", "subplot(223)\n", "pcolormesh(V[:, 30, :], rasterized=True, vmin=0, vmax=5)\n", "subplot(222)\n", "pcolormesh(U[1400, :-2, :-2], rasterized=True, vmin=0, vmax=5)\n", "subplot(224)\n", "pcolormesh(V[1400, :-2, :-2], rasterized=True, vmin=0, vmax=5)" ], "language": "python", "metadata": {}, "outputs": [] }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }