{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Poisson equation\n", "\n", "For a general coordinate system, the metric is given by \n", "\n", "\\begin{equation}\n", "ds^2 = \\sum h_{ij} dx_i dx_j\\,.\n", "\\end{equation}\n", "\n", "For a coordinate system with orthogonal axes, $h_{ij}=\\delta^{\\rm K}_{ij}h_{\\rm i}^2$. In this case the differential vector is\n", "\n", "\\begin{equation}\n", "d\\vec{x} = \\sum \\frac{\\partial \\vec{x}}{\\partial q_i} dq_i\n", "\\end{equation}\n", "\n", "The unit directional vectors will be\n", "\n", "\\begin{equation}\n", "\\hat{e}_i = \\frac{1}{h_i} \\frac{\\partial \\vec{x}}{\\partial q_i}\\,.\n", "\\end{equation}\n", "\n", "\n", "The volume elements transform with the Jacobian,\n", "\n", "\\begin{equation}\n", "d^3\\vec{x} = \\prod h_i dq_i\\,.\n", "\\end{equation}\n", "\n", "The gradient is given by\n", "\n", "\\begin{equation}\n", "\\vec\\nabla \\Phi = \\sum \\frac{1}{h_i} \\frac{\\partial \\Phi}{\\partial q_i}\\hat{e}_i\n", "\\end{equation}\n", "\n", "The divergence is given by\n", "\n", "\\begin{equation}\n", "\\vec\\nabla. \\vec{A} = \\frac{1}{h_1h_2h_3} \\left[ \\sum_{\\rm cyclic} \\frac{\\partial (h_2h_3 A_1)}{\\partial q_1} \\right]\n", "\\end{equation}\n", "\n", "The curl is given by\n", "\n", "\\begin{equation}\n", "\\left.\\vec\\nabla \\times \\vec{A}\\right|_3 = \\frac{1}{h_1h_2} \\left[ \\frac{\\partial (h_2A_2)}{\\partial q_1} - \\frac{\\partial (h_1A_1)}{\\partial q_2} \\right]\n", "\\end{equation}\n", "\n", "The Laplacian is given by\n", "\n", "\\begin{equation}\n", "\\nabla^2\\Phi = \\frac{1}{h_1h_2h_3} \\left[ \\sum_{\\rm cyclic} \\frac{\\partial }{\\partial q_1} \\left(\\frac{h_2h_3}{h_1}\\frac{\\partial\\psi}{\\partial q_1}\\right) \\right]\n", "\\end{equation}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Spherical coordinate system\n", "\n", "The metric for the spherical coordinate system is given by\n", "\\begin{equation}\n", "ds^2 = dr^2 + r^2 d\\theta^2 + r^2 \\sin^2 \\theta d\\phi^2\n", "\\end{equation}\n", "\n", "Thus, we have\n", "\n", "\\begin{equation}\n", "h_1 = 1 ; \\,\\,\\, h_2 = r ;\\,\\,\\, h_3 = r \\sin \\theta \\,.\n", "\\end{equation}\n", "\n", "The Laplacian is then given by\n", "\n", "\\begin{equation}\n", "\\nabla^2\\Phi = \\frac{1}{r^2}\\frac{\\partial }{\\partial r} \\left(r^2\\frac{\\partial \\Phi}{\\partial r}\\right) + \\frac{1}{r^2\\sin\\theta}\\frac{\\partial}{\\partial \\theta} \\left[ \\sin \\theta \\frac{\\partial \\Phi}{\\partial \\theta}\\right] + \\frac{1}{r^2\\sin^2\\theta}\\frac{\\partial^2 \\Phi}{\\partial \\phi^2}\n", "\\end{equation}" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Cylindrical coordinate system\n", "\n", "For the cylindrical coordinate system, the metric is given by\n", "\n", "\\begin{equation}\n", "ds^2 = dR^2 + R^2 d\\phi^2 + dz^2\n", "\\end{equation}\n", "\n", "such that\n", "\n", "\\begin{equation}\n", "h_1 = 1 ; \\,\\,\\, h_2 = R ;\\,\\,\\, h_3 = 1 \\,.\n", "\\end{equation}\n", "\n", "The Laplacian is given by\n", "\n", "\\begin{equation}\n", "\\nabla^2\\Phi = \\frac{1}{R}\\frac{\\partial }{\\partial R} \\left(R\\frac{\\partial \\Phi}{\\partial R}\\right) + \\frac{1}{R^2}\\frac{\\partial^2}{\\partial \\phi^2} \\Phi + \\frac{\\partial^2 \\Phi}{\\partial z^2}\n", "\\end{equation}" ] } ], "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.7.6" } }, "nbformat": 4, "nbformat_minor": 2 }