{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "collapsed": false }, "outputs": [ { "data": { "text/html": [ "\n" ], "text/plain": [ "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import theme\n", "theme.load_style()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Lesson 20: The Advection Diffusion Equation\n", "\n", "\n", "\n", "\"Creative\n", "\n", "This lecture by Tim Fuller is licensed under the\n", "Creative Commons Attribution 4.0 International License. All code examples are also licensed under the [MIT license](http://opensource.org/licenses/MIT)." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Topics\n", "\n", "- [Introduction](#intro)\n", "- [Advection-Diffusion, Strong Form](#strong)\n", "- [Advection-Diffusion, Weak Form](#weak)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Introduction\n", "\n", "The advection–diffusion equation, drift–diffusion equation, Smoluchowski equation , or 􏰍generic􏰎 scalar transport equation describe systems where some species is transported through a potential driven flux 􏰍diffusion􏰎 within a moving fluid. The time‐dependent response assuming an incompressible fluid, constant diffusion coefficient, and no sources/sinks is governed by:\n", "\n", "$$\n", "\\frac{\\partial c}{\\partial t} = D\\nabla^2 c -\n", "\\boldsymbol{v}\\nabla c\n", "$$\n", "\n", "Where $c$ is the concentration, $D$ is the diffusion coefficient, and $\\boldsymbol{v}$ is the flow velocity. We can visualize this for a steady flow with some species added at $t=􏰏0$, $x=􏰏0$. This could be poison added to the water supply or medicine injected in the blood stream, depending on your line of work.\n", "\n", "\n", "\n", "
\n", "In his 1905 publication on Brownian motion, Albert Einstein showed that the diffusion coefficient could be derived from a distribution of molecular velocities as a function of the Boltzmann constant and absolute temperature. This has led to an understanding of physical phenomena in diverse fields ranging from semi‐conductors to fish migration.\n", "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Advection-Diffusion, Strong Form\n", "\n", "\n", "\n", "For the diffusion process shown, $u(x)=c(x)$, the concentration $\\left(\\frac{\\text{moles}}{\\text{volume}}\\right)$ of some solute. The steady state mass balance on the solute is\n", "\n", "$$\n", "\\left(Avu\\right)_x-\\left(Avu\\right)_{x+\\Delta x} - \\left(Aq\\right)_{x+\\Delta x} + \\Delta x s_{x+\\Delta x/2}=0\n", "$$\n", "\n", "Dividing by $\\Delta x$ and taking the limit as $\\Delta x\\rightarrow 0$ and with a change in sign\n", "\n", "$$\n", "\\frac{d}{dx}\\left(Avu\\right) + \\frac{d}{dx}\\left(Aq\\right) - s = 0\n", "$$\n", "\n", "If the fluid is incompressible, $\\left(Av\\right)$ is constant (i.e. the volumetric flow rate is te same at every point)\n", "\n", "$$\n", "\\frac{d}{dx}\\left(Avu\\right)=\\left(Av\\frac{du}{dx} + u\\frac{d(Av)}{dx}\\right) = Av\\frac{du}{dx}\n", "$$\n", "\n", "Substituting gives\n", "\n", "$$\n", "Av\\frac{du}{dx}+\\frac{d}{dx}(Aq) - s = 0\n", "$$\n", "\n", "From Flick's law of diffusion, $q=-k\\frac{du}{dx}$, giving\n", "\n", "$$\n", "Av\\frac{du}{dx}-\\frac{d}{dx}\\left(Ak\\frac{du}{dx}\\right)-s=0\n", "$$" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Advection-Diffusion, Weak Form\n", "\n", "Starting with the strong form and a generalized expression for the boundary conditions, apply the three step process\n", "\n", "1. Multiply by a weight function and integrate over the problem domain\n", "\n", "$$\n", "\\int_{\\Omega}w\\left(\n", "Av\\frac{du}{dx}-\\frac{d}{dx}\\left(Ak\\frac{du}{dx}\\right)-s\n", "\\right)dx=0, \\quad \\forall w \\\\\n", "Aw\\left(kn\\frac{du}{dx}+\\overline{q}\\right)\\Bigg|_{\\Gamma_q}=0, \\quad \\forall w\n", "$$\n", "\n", "As" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": true }, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 2", "language": "python", "name": "python2" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 2 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython2", "version": "2.7.9" } }, "nbformat": 4, "nbformat_minor": 0 }