{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "In this post, we'll aim at solving the heat equation in the case of a two-dimensional volume, in cylindrical coordinates. A good primer on the subject can be found here: [http://www.ewp.rpi.edu/hartford/~ernesto/S2006/CHT/Notes/ch03.pdf](http://www.ewp.rpi.edu/hartford/~ernesto/S2006/CHT/Notes/ch03.pdf)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# The heat equation " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The heat equation is [written in the following way](https://en.wikipedia.org/wiki/Heat_equation):\n", "\n", "$$\n", "\\rho c_p \\frac{\\partial T}{\\partial t} - \\nabla \\cdot \\left( k \\nabla T \\right) = Q \n", "$$\n", "\n", "Assuming there are no sources and that the conductivity $k$ is constant, it becomes:\n", "\n", "$$\n", "\\frac{\\partial T}{\\partial t} - \\alpha \\nabla^2 T=0 \n", "$$\n", "\n", "Where $\\alpha = \\frac{k}{\\rho c_p}$.\n", "\n", "In cylindrical coordinates, the [Laplace operator](https://en.wikipedia.org/wiki/Laplace_operator) takes the following form:\n", "\n", "$$ \\Delta f = {1 \\over r} {\\partial \\over \\partial r}\n", " \\left( r {\\partial f \\over \\partial r} \\right) \n", "+ {1 \\over r^2} {\\partial^2 f \\over \\partial \\theta^2}\\\\$$\n", "\n", "Assuming our problem is invariant as a function of $\\theta$, the heat equation becomes:\n", "\n", "$$\n", "\\frac{\\partial T}{\\partial t} - \\alpha {1 \\over r} {\\partial \\over \\partial r}\n", " \\left( r {\\partial T \\over \\partial r} \\right)=0 \n", "$$\n", "\n", "Let's assume the boundary conditions are fixed at $r=r_{min}$ with a given temperature and at $r=r_{max}$.\n", "\n", "How do we solve this?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Separation of variables " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can apply the separation of variables method to solve this differential equation.\n", "\n", "Let's suppose the solution can be written as:\n", "\n", "$$\n", "T(r, t) = T(t) X(r)\n", "$$\n", "\n", "Then the equation results in the following one:\n", "\n", "$$\n", "{1 \\over \\alpha} \\frac{T'}{T} = X'' + {1 \\over r} X'\n", "$$\n", "\n", "The left hand side is a function of $t$ only, while the right hand side is a function of $r$ only. Thus, we can say that the expressions on both sides are equal to a constant, which we will denote by $\\lambda$.\n", "\n", "Solving the time equation yields:\n", "\n", "$$\n", "T = c_0 \\exp^{\\lambda \\alpha t}\n", "$$\n", "\n", "Solving the space equation (with the help of Wolfram alpha) yields:\n", "\n", "$$\n", "X = c_1 \\ln r + \\lambda {r^2 \\over 4} + c_2\n", "$$\n", "\n", "We now still need to write the boundary and initial conditions for the problem before finishing the derivation of the solution. In fact, we can note that we have three unknown constants in our solution so far: $c_0$, $c_1$ and $c_2$ and two boundary conditions in $r$ as well as an initial condition. So we should be able to finish the derivation with this." ] }, { "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.5.1" } }, "nbformat": 4, "nbformat_minor": 0 }