{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "Notebook to solve idealized wave problem. Barotropic current interacting with a step." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": true }, "outputs": [], "source": [ "import numpy as np\n", "import matplotlib.pyplot as plt\n", "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Solving this equation:\n", "\n", " $-\\sigma^2\\nabla^2\\psi + N^2\\frac{\\partial^2}{\\partial x^2}\\psi = 0 $ or \n", "\n", "$\\frac{\\partial^2}{\\partial z^2}\\psi - \\frac{N^2-\\sigma^2}{\\sigma^2}\\frac{\\partial^2}{\\partial x^2}\\psi = 0 $\n", "\n", "Boundary conditiions are no flow through sloid boundaries so $\\psi=0$.\n", "\n", "Assume $\\psi = \\psi_b + \\psi'$ barotopic and baroclinic parts.\n", "\n", "Set $\\psi_b = zc\\sin(kx)$\n", "\n", "where $c = \\sqrt{gh}$ and $k=\\sigma/c$. Then the differentatial equation simplifies to:\n", "\n", "$\\frac{\\partial^2}{\\partial z^2}\\psi' -\\frac{N^2 -\\sigma^2}{\\sigma^2}\\frac{\\partial^2}{\\partial x^2}\\psi' = \n", "\\frac{N^2 -\\sigma^2}{\\sigma^2}\\frac{\\partial^2}{\\partial x^2}\\psi_b$.\n", "\n", "We can subsitute these expressions for the derivaives of $\\psi_b$\n", "\n", "$\\frac{\\partial^2}{\\partial x^2}\\psi_b = - zck^2\\sin(kx)$ \n", "\n", "\n", "So, further simplication gives\n", "$\\frac{\\partial^2}{\\partial z^2}\\psi' -\\frac{N^2 -\\sigma^2}{\\sigma^2}\\frac{\\partial^2}{\\partial x^2}\\psi' = \n", "-k^2\\frac{N^2 -\\sigma^2}{\\sigma^2}\\psi_b$.\n", "\n", "Note that the domain depth $h$ is piecewise constant and so $\\psi_b, c, k$ are piecewise too.\n", "\n", "Setting up constants:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "collapsed": false }, "outputs": [], "source": [ "L = 20e3 #units m\n", "H = 50 # units m\n", "h0 = 25 #units m\n", "N2 = 0.001 #units 1/s^2\n", "g = 10 #units m/s^2\n", "\n", "Nx = 100\n", "Nz = 50\n", "dx = L/Nx\n", "dz = H/Nz\n", "\n", "sigma = 2*np.pi/(12*3600) #units 1/s\n", "\n", "x = np.arange(0, L,dx)\n", "z = np.arange(0, H,dz)\n", "\n", "#meshgrid\n", "xx ,zz = np.meshgrid(x,z)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Set up topography and currents..." ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "collapsed": false }, "outputs": [], "source": [ "x0 = L/2\n", "h = h0*(xx=x0)\n", "\n", "c= np.sqrt(g*h)\n", "k = sigma/c\n", "\n", "psi_b = zz*c*np.sin(k*xx)\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Initialize $\\psi'$ = - $\\psi_b$" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[0, 20000.0, 50, 0]" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWMAAAEACAYAAABmohcVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXuwXVWd5z8/khAQH5jCITzSBpyggtoC3dEZxQ4zxMae\nFqS6BWmHYdTpssRXzUwpD5026bHxUTO2TXVpO612IzWgmUEQBrUJNpfRKjGtREVClKCZMkECKigI\n5Obe/OaPs0/uvidrn7Wf9+y97/dTtSv7rLXXY+978rv7fn/r91vm7gghhJgsh0x6AkIIIWSMhRCi\nFcgYCyFEC5AxFkKIFiBjLIQQLUDGWAghWkAlY2xmZ5vZdjO7z8wurWtSQggxCSZp06zsOmMzWwL8\nEDgL2A38E3Chu99b3/SEEGJhmLRNq/JmvBbY4e473X0f8Hng3HqmJYQQC85EbVoVY3wc8NPU511J\nmRBCdJGJ2rQqxlhx1EKIPjFRm7a0Qtvd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jyD57I7OU+X7252\n5o1Rx73vSrX5raSvpcCzfH6iqlbj7g95AvBpBt8N6PmzSKLNrgeucfcbk2J9L3LQhDH+NrDGzFab\n2aEMRPabGhhnopjZ08zsGcn5EcCrGeQ2vQm4OLnsYmD4hbwJeIOZHZqs3V4DbHH3B4Ffm9nLzMyA\ni1JtukYd9/6lQF9/DHxtIW6gLhKjM+Q8Bt8N6PGzSOb9GWCbu388VaXvRR6a8Aoy+LP9hwwE+csn\n7aVs6B5PYOAJ/i7wg+F9MkjGeBvwIwbRikem2lyRPJPtwO+nyk9n8J91B3DVpO8t5/1fBzwATDPQ\n8N5U570z2IZ1E3AfcCewetL3XOBZvJmB0+n7wPcYGJ+j+/4sgFcC+5P/E1uT4+zF+r0oeijoQwgh\nWoD2wBNCiBYgYyyEEC1AxlgIIVqAjLEQQrQAGWMhhGgBMsZCCNECZIyFEKIFyBgLIUQL+P/9Cfbr\n4s7frgAAAABJRU5ErkJggg==\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "psi_c = -psi_b\n", "plt.pcolormesh(xx,zz,psi_c)\n", "plt.colorbar()\n", "plt.axis([0,L, H,0])\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Numerical integration" ] }, { "cell_type": "code", "execution_count": 5, "metadata": { "collapsed": false }, "outputs": [], "source": [ "def integrate(psi):\n", " \n", " for i in np.arange(2, Nx-1):\n", " for j in np.arange(1,Nz-1):\n", " if zz[j,i+1] > h[j,i+1]:\n", " psi[j,i+1] = -psi_b[j,i+1]\n", " else: \n", " psi[j, i+1] = 2*psi[j,i] - psi[j,i-1] + \\\n", " dx**2/dz**2*sigma**2/(N2-sigma**2)*(psi[j-1,i] - 2*psi[j,i] + psi[j+1, i]) + \\\n", " k[j,i]**2*dx**2*psi_b[j,i]\n", "\n", " \n", " return psi" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/plain": [ "[0, 20000.0, 50, 0]" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" }, { "data": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWMAAAEACAYAAABmohcVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnX+wXVWV5z/LJATEH0jhEH6kDThBBbUFuqPVih16iI09\nLUh1A9IOw6jTZYm/amZK+aHTJj0O/qgZx6a6dJxWu5Ea0MwgCIPaBJtHa42YVqIiIUrQTJkgARUU\nhOTlvaz5456bd97NPneffX68e+5930/VqZy79z5773PezXrnfddea5u7I4QQYrQ8bdQTEEIIIWMs\nhBCdQMZYCCE6gIyxEEJ0ABljIYToADLGQgjRAWoZYzM728y2mdn9ZnZZU5MSQohRMEqbZlXXGZvZ\nEuCHwFnALuCfgIvc/b7mpieEEAvDqG1anTfjNcB2d9/h7vuAzwPnNjMtIYRYcEZq0+oY4+OAn+Y+\n78zKhBBiHBmpTatjjBVHLYSYJEZq05bWuHYXsDL3eSW93yQHMDMZbCFEadzdql5bxd4MjBe1aW1S\nxxh/G1htZquAB4ELgYsGG62vMcAkcQdw5qgn0RH0LOZY7M/iA7kFBGaV7fABPpjQ9v0HF5WyaW1R\n2Ri7+4yZvQP4e2AJ8BmtpBBCjJJlNa4dtU2r82aMu38F+EpDcxFCiFrUMmiM1qbVnfuioImH9PyG\n+qlCnbeFNngBcFjFa8f9Czv4s3gpcOQoJlKDLv8Mqn6vukCXn+tEceKoJ9Ahnj/qCXSI1aOewITR\ntRePFGSMhRATwzgbtHGeuxBCzENvxiOm7Zto+wes+Zdn3O9lIYzFJNxDVcbZoI3z3IUQYh5d/kUR\nQ8ZYCDExyBgLIUQH0NK2BaDuROv+xtT4ox0/z6jnMu7PctTjt8nYGLQAYzH3UX95NH53GPWzmKRn\nOYl0+RdFDH03hBATwzgbtHGeuxBCzENvxkII0QHG2aB1bu5VJpTy23Dc+68yVlf7r3JdyvMd9/6r\njjVJ3/GujtMGnTPGQghRFS1tE0KIDjD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/0dX4TvoTrZoAAAAASUVORK5C\nYII=\n", "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "psi_int = integrate(psi_c)\n", "plt.pcolormesh(xx,zz,psi_int)\n", "plt.colorbar()\n", "plt.axis([0,L, H,0])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "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.4.3" } }, "nbformat": 4, "nbformat_minor": 0 }