{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "-Iprhun-rS_u" }, "source": [ "$$\\newcommand{\\arr}[1]{\\underline{\\underline{#1}}}$$ \n", "$$\\newcommand{\\vec}[1]{\\underline{#1}}$$ \n", "$$\\require{mhchem}$$\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Fourier Coefficients!" ] }, { "cell_type": "markdown", "metadata": { "id": "aEYZbX79TDIv" }, "source": [ "## Recap on PDEs from last lecture\n", "\n", "* PDE's are more complicated than ODE's\n", "* You need to analyze each independent variable (x, y, t, etc), determine the order, and then determine the number of boundary / initial conditions you need\n", "* Many PDE's that are important in chemical engineering are linear and second order\n", " * $u_t=c^2u_{xx}$\n", " * $u_{tt}=c^2u_{xx}$\n", " * $\\nabla^2u=0$\n", "\n", "* Separation of variables for linear PDEs:\n", " 1. Assume $u(x,t)=X(x)T(t)$\n", " 2. Plug in to PDE, separate, set equal to a constant to yield multiple ODE's\n", " 3. Solve each ODE\n", " 4. Get general solution\n", " 5. Apply boundary conditions to constrain the problem\n", " 6. Initial conditions require a linear combination of the possible solutions with coefficients $c_n$ that we talked about last time. \n", " " ] }, { "cell_type": "markdown", "metadata": { "id": "qQllBtfOXhid" }, "source": [ "## Reminder: constant temperature initial condition for heated bar\n", "\n", "\n", "Solving a problem with a bar that has a sin temperature profile is not very interesting. How would you make a bar like that? I have no idea.\n", "\n", "Let's do a more reasonable set of initial conditions $f(x)=T_0=5$, that is, we immerse the bar in a water bath 5 K warmer than our hands, then take it out and hold it out on both sides. We don't have time to show how to solve this equation right now (we'll do that next class). The magic $c_n$ that specify this are \n", "\\begin{align*}\n", "c_n&=\n", "\\begin{cases} \n", " \\frac{4T_0}{n\\pi} & n\\text{ odd} \\\\\n", " 0 & n\\text{ even}\n", " \\end{cases}\n", "\\end{align*}\n", "That makes our final solution\n", "\\begin{align*}\n", "T(x,t)&=\\sum_{n=1}^{\\infty} c_ne^{-\\lambda_n t} \\sin\\left(\\frac{n\\pi x}{L}\\right)\\\\\n", "T(x,t)&=\\sum_{n=1}^{\\infty} \\frac{20L}{n\\pi}e^{-\\lambda_n t} \\sin\\left(\\frac{n\\pi x}{L}\\right) \\text{ if n odd}\n", "\\end{align*}\n", "\n", "with \n", "\\begin{align*}\n", "\\lambda_n=\\alpha\\left(\\frac{n\\pi}{L}\\right)^2\n", "\\end{align*}" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "colab": { "base_uri": "https://localhost:8080/", "height": 386 }, "executionInfo": { "elapsed": 11295, "status": "ok", "timestamp": 1619698822132, "user": { "displayName": "Zachary Ulissi", "photoUrl": "", "userId": "07633171379186475882" }, "user_tz": 240 }, "id": "4_MFnl5dXqtR", "outputId": "6b3214d7-edac-4ce4-daed-4397f1ff7f4c" }, "outputs": [ { "data": { "text/html": [ "\n", "\n", "\n", "\n", "\n", "\n", "