Skip to content
Permalink
98c7104a67
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
435 lines (435 sloc) 60.6 KB
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Computational Mechanics Project #01 - Heat Transfer in Forensic Science\n",
"\n",
"We can use our current skillset for a macabre application. We can predict the time of death based upon the current temperature and change in temperature of a corpse. \n",
"\n",
"Forensic scientists use Newton's law of cooling to determine the time elapsed since the loss of life, \n",
"\n",
"$\\frac{dT}{dt} = -K(T-T_a)$,\n",
"\n",
"where $T$ is the current temperature, $T_a$ is the ambient temperature, $t$ is the elapsed time in hours, and $K$ is an empirical constant. \n",
"\n",
"Suppose the temperature of the corpse is 85$^o$F at 11:00 am. Then, 2 hours later the temperature is 74$^{o}$F. \n",
"\n",
"Assume ambient temperature is a constant 65$^{o}$F.\n",
"\n",
"1. Use Python to calculate $K$ using a finite difference approximation, $\\frac{dT}{dt} \\approx \\frac{T(t+\\Delta t)-T(t)}{\\Delta t}$. "
]
},
{
"cell_type": "code",
"execution_count": 585,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"1. K = 0.275 1/hrs\n"
]
}
],
"source": [
"delta_T = 74-85\n",
"delta_t = 2\n",
"rate = delta_T/delta_t\n",
"k = -1*rate/(85-65)\n",
"print('1. K =',k, '1/hrs')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"2. Change your work from problem 1 to create a function that accepts the temperature at two times, ambient temperature, and the time elapsed to return $K$. "
]
},
{
"cell_type": "code",
"execution_count": 584,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2. K = 0.275 1/hrs\n"
]
}
],
"source": [
"def measure_K(Temp_t1,Temp_t2,Temp_ambient,delta_t):\n",
" ''' Determine the value of K based upon temperature of corpse \n",
" when discovered, Temp_t1\n",
" after time, delta_t, Temp_t2\n",
" with ambient temperature, Temp_ambient\n",
" \n",
" Arguments\n",
" ---------\n",
" Temp_t1: Temperature of corpse when discovered\n",
" Temp_t2: Temperature of corpse after elapsed time\n",
" Temp_ambient: Ambient temperature\n",
" delta_t: Change in time between Temp_t1 and Temp_t2\n",
" \n",
" Returns\n",
" -------\n",
" the emperical constant K\n",
" \n",
" '''\n",
" delta_T = Temp_t2 - Temp_t1\n",
" rate = delta_T/delta_t\n",
" k = -1*rate/(Temp_t1-Temp_ambient)\n",
" return k\n",
"\n",
"print('2. K =', measure_K(85,74,65,2), '1/hrs')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"3. A first-order thermal system has the following analytical solution, \n",
"\n",
" $T(t) =T_a+(T(0)-T_a)e^{-Kt}$\n",
"\n",
" where $T(0)$ is the temperature of the corpse at t=0 hours i.e. at the time of discovery and $T_a$ is a constant ambient temperature. \n",
"\n",
" a. Show that an Euler integration converges to the analytical solution as the time step is decreased. Use the constant $K$ derived above and the initial temperature, T(0) = 85$^o$F. \n",
"\n",
" b. What is the final temperature as t$\\rightarrow\\infty$?\n",
" \n",
" c. At what time was the corpse 98.6$^{o}$F? i.e. what was the time of death?"
]
},
{
"cell_type": "code",
"execution_count": 582,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3a. Time step of 0.045\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXxU9fX/8dcJO4jIZmULobbuLCpgq7ZqtZTaVlTU0k61ohC1tS61Km3cNf78Wr4Vqa0WRa3tFGtdu9m6ol93QVFB7KKSiCsgypIAAc7vj3sDk2QmmSRzZzIz7+fjkUdm7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+AY4CH3H19wu6RfV5mNo+gJ8oAM1sOXAp0SYgp6+dWmnFl/dxKM66sn1tpxgVZPrdCBwEnAq+Z2aJw2c8I/nBHfo5pygYRkSKTzzV+ERFpAyV+EZEio8QvIlJklPhFRIqMEr+ISJFR4peCZ2b9E2Zg/MDM3k14/kxEr7mvmd0SPr7MzH6S5n6PmFnfKGISqZe3/fhF0uXB6NUxECRhYJ27z4z4ZX8GXJXuxhZ0GDfgd8APgMqI4hLRFb8UNzNbF/4+1MyeMLO7zOzfZnaNBXPbvxDOyb5ruN1AM7vHzF4Mfw5KcszewCh3fyVh8V5mNt/M3jKzs8LtysL52H9NMJfNMODPBLNEikRGV/wi240G9iQYvv8WcIu7jw9vkvEj4BzgeuA6d3/KzEoJRk/u2eg4Y4HGN/7YAziMYO71f5nZjeHy3YGp7v6D+g3NrJuZ9feEeXZEMkmJX2S7F939fQAzexN4KFz+GkHSBjiC4Oq9fp8dzay3B3Oq1xsErGh07L+5+0Zgo5l9RDAlAECVB3OtJ/oIGAwo8UsklPhFttuY8HhrwvOtbP+/UgJ80d1rmzlOLdC9mWNvSTjeeprqHh5DJBKq8Yu0zkPAmfVPzGxMkm2WAp9ry8HDRt5dCG77JxIJJX6R1jkLGBve/Pp14PTGG7j7G0CfsJG3tfYHnnP3ze2MUyQlzc4pEgEzOxdY6+63tHK/64E/u/uj0UQmoit+kajcSMO6froWK+lL1HTFLyJSZHTFLyJSZJT4RUSKjBK/iEiRUeIXESkySvwiIkXm/wO/O86N+Ec+2wAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"N = 45\n",
"hours = 2\n",
"t = np.linspace(0,hours,N)\n",
"T_numerical = np.empty(N)\n",
"T_numerical[0]=85\n",
"T_analytical = np.empty(N)\n",
"exponent = np.exp(-0.275*t)\n",
"delta_t = np.diff(t)\n",
"\n",
"for i in range(1, len(t)):\n",
" T_numerical[i] = -0.275*(T_numerical[i-1]-65)*delta_t[i-1] + T_numerical[i-1] # Calculated numerical solution\n",
" T_analytical = (85-65)*exponent + 65 # Calculated analytical solution\n",
"\n",
"print('3a. Time step of', delta_t[0].round(3))\n",
"\n",
"import matplotlib.pyplot as plt\n",
"plt.plot(t, T_numerical, '-',color = 'orange', label = 'Numerical')\n",
"plt.plot(t, T_analytical,'o', color = 'Blue', label ='Analytical')\n",
"plt.xlabel('Time (hr)')\n",
"plt.ylabel('Temperature (F)')\n",
"plt.title('Corpse Temperature vs Time')\n",
"plt.legend();\n",
"\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 588,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3b. The final temperature as t approaches infinity is 65.0 degrees Fahrenheit\n",
"3c. Time of death is 9:07 am\n"
]
}
],
"source": [
"N = 45\n",
"hours = 5000\n",
"t = np.linspace(0,hours,N)\n",
"T_analytical = np.empty(N)\n",
"exponent = np.exp(-0.275*t)\n",
"\n",
"for i in range(0, len(t)-1):\n",
" T_analytical = (85-65)*exponent + 65 # Analytical solution for corpse temperature\n",
"\n",
"print('3b. The final temperature as t approaches infinity is', T_analytical[len(t)-1], 'degrees Fahrenheit')\n",
"t_0 = 85-65\n",
"num = 33.6/t_0\n",
"time_death = np.log(num)/-0.275 # Time of death calulation \n",
"print('3c. Time of death is 9:07 am')"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"4. Now that we have a working numerical model, we can look at the results if the\n",
"ambient temperature is not constant i.e. T_a=f(t). We can use the weather to improve our estimate for time of death. Consider the following Temperature for the day in question. \n",
"\n",
"|time| Temp ($^o$F)|\n",
"|---|---|\n",
"|8am|55|\n",
"|9am|58|\n",
"|10am|60|\n",
"|11am|65|\n",
"|noon|66|\n",
"|1pm|67|\n",
"\n",
" a. Create a function that returns the current temperature based upon the time (0 hours=11am, 65$^{o}$F) \n",
" *Plot the function $T_a$ vs time. Does it look correct? Is there a better way to get $T_a(t)$?\n",
"\n",
" b. Modify the Euler approximation solution to account for changes in temperature at each hour. \n",
" Compare the new nonlinear Euler approximation to the linear analytical model. \n",
" At what time was the corpse 98.6$^{o}$F? i.e. what was the time of death? \n",
" \n",
" "
]
},
{
"cell_type": "code",
"execution_count": 570,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAX4AAAEWCAYAAABhffzLAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd5wV5d3+8c/F0pGiNEVBRCl2RSQqasCe8otpGNsjMSYmMZroo7FEUzSamGiMJqZZosaSaCyPKTbsgtIUVBQwAiooZRFFkLq7398fMxuOCMth2dnZPed6v17ntWfmTLlmF77nPveZuUcRgZmZlY8WeQcwM7PG5cJvZlZmXPjNzMqMC7+ZWZlx4TczKzMu/GZmZcaF3zZK0huSDtvAawdJmtHYmazpkzRT0v5557CPc+EvYZKelPSepDZZ7SMinomIgQ2xrY28wZwgaVn6WCGppmB6WUPsv6mS9DdJF+Wdo5CkU+r4eywCiIgdI+K5vLPax7nwlyhJfYGDgAA+l2uYBhARt0fEFhGxBfAp4J3a6XRekySphaRM/59Japnl9tcnIm4s+N1/AZhV8Pfo1th5bNO48Jeuk4BxwM3AqMIXJN0s6feSHkxbaGMlbS3p6vQTwnRJe6+zvX0lvZq+fpOktum2hkuaW7DtXpLukVQpabak7xa89hNJd0n6i6Slkl6RNCR97VagD/DPNNO5m3rAknpLul/SIkmzJH2r4LXLJd0u6c50+1Mk7SDpx+nyb0gaUbD8OEk/lfS8pCXpMXUueP0gSeMlvS/pBUnD1ln3EknjgeVAL0nfTH+vSyW9LulrBct/S9KjBdNtJYWk7dLf35eAH6a5/54uM1/SOZJeAT7Y2PGv83saLuktSSqYd5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4Ge6fw3I2LcOssuBHqxdrgNswblwm+21qqC5zUF0zWs/b/SAtg/IlbUsZ0VQNs6tl1dsL0P17N+23QbZplwH7/ZpnmE5H4OAEjaaz3LTAN2qs/G0y95twbeqM/6ZsVw4TfbNN8FhqQ3sX8V+NiIpxExHeicfsm7qfYhGUm1aqNLmtWTR+c0y4Cks4ClEXHDJq53DfCPiHgsm2RmbvGbZeUPfLRfv1hTXfQta27xm5mVGbf4zczKjAu/mVmZceE3MyszLvxmZmXGhd/MrMz8f1mcmVqSTikfAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"def temp(time):\n",
" ''' Returns the ambient temperature based on the time in hours between -3 and 2 where time = 0 is 11 am\n",
" \n",
" Argument\n",
" ---------\n",
" time: time in hours between -3 and 2 where time = 0 is 11 am\n",
" Returns\n",
" -------\n",
" temperature: the ambient temperature at the specified time '''\n",
" \n",
" import numpy as np\n",
" temperature = np.array([55, 58, 60, 65, 66, 67])\n",
" if time == -3:\n",
" return temperature[0]\n",
" elif time == -2:\n",
" return temperature[1]\n",
" elif time == -1:\n",
" return temperature[2] \n",
" elif time == 0:\n",
" return temperature[3]\n",
" elif time == 1:\n",
" return temperature[4]\n",
" elif time == 2:\n",
" return temperature[5]\n",
" else:\n",
" print('Enter hours between -3 and 2')\n",
"\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"temperature = np.array([55, 58, 60, 65, 66, 67])\n",
"t = np.array([-3,-2,-1,0,1,2])\n",
"plt.plot(t,temperature,color = 'Orange')\n",
"plt.xlabel('Time (hr)')\n",
"plt.ylabel('Temperature (F)')\n",
"plt.title('Ambient Temperautre vs Time');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"4a. The grpah does not look correct because it does not account for the time in between each temperaure change. A better way to get Ta(t) is by providing more points to potentially have a continuous function instead of discrete points."
]
},
{
"cell_type": "code",
"execution_count": 583,
"metadata": {
"scrolled": true
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4b.\n"
]
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYUAAAEWCAYAAACJ0YulAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3dd3hUZfbA8e9JCB1RmoKUgKL0ZqSDICquujbE1R8KLmrsrMJaY0FXdl0XRdS1oCiWLFgQsdOkuqKAoFKFFQgBpDcJLeT8/rg3wyTMTCbJ3Jkkcz7Pkyczd+bee24COfOWe15RVYwxxhiAhFgHYIwxpuSwpGCMMcbHkoIxxhgfSwrGGGN8LCkYY4zxsaRgjDHGx5KCMcZTIjJORO6LdRwmPJYUDCLyfyKyUER+F5HNIvKliHSPdVyBiEhDN87cLxWR/X7Pe8Q6xqISkYru9dSPdSzhEpEzCvh9nK2qN6jq07GO1YSnXKwDMLElIkOBB4BbgSnAYeBC4DJgXiGPVU5VsyMepB9VzQCq+p1TgbaqusbL80ZCNH4+IpKoqke9PIc/Vf0F9/chIhWBA8CZqpoZrRhMZFlLIY6JSHXgCeAOVf1IVfer6hFV/VRV73XfU0FEnhORTe7XcyJSwX2tl4hkisj9IvIb8KbftodEZLuIrBORAX7nvEhElovIPhHZKCJ/9XvtEhFZIiK7ReS/ItKmiNdVyY1zg4j8JiIv+MV8oYisEZGH3fg2ujFdJiL/E5EdIjLM71hPich4EZnoxrxARFr6vd5ARCa7x/pVRG7Nt+9/ROQ9EdkHXCMi3UTkOxHZ4/48R4lI7oezOe73Ve6n7MtF5FYRme53zDytCRGZICLPi8hUEdkPdAl1/fl+TlXc85zut+1UETkgIieJyCki8pX7+9ghIl8X8fcxQUQeLuLPP1FEHnF/tttFJF1ETixKHCY8lhTiWxegIjApxHvSgM5AO6At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cFo5rUWknQexmCgr8wXxTKmyQFU3A4jI/4Cp7vafOVbW/DycT/25+5wgItXc2vK56gLb8h37c1U9BBwSka3Aye729ao6P997t+K0BHZQBKp63Kf3EApb2fRXoImIvIBTwHFqiPcWVSsReRI4EagKTPF77VNVVRH5Gdiiqj8DiMgyIBlY4kE8JoosKZiS5JDf4xy/5zkc+7eaAHRR1QMhjnMAqBji2Ef9jrc/wP4V3WMUiYiMIvDaHBNU9al82wpV2VRVd4lIW5xWzx3A1TjrYkTSOOByVf1RRG7AqS2Uy/93kv/3ZX9PygDrPjKlzVScdS8ACNJlsQI4vSgHd6tQngKsc5/PEJFA3Tn7gGqBjqGq9/gNpPt/5U8I4IxhXCMiFUSkMdAU+D5EfLWABFWdCDwCdCjM9YWpGrDZ7WIb4MHxTQlmScGUNkOAFBH5SUSWA8dVeFXVlUB1d8C5sM7CqRyb7c5GOp3Ayz2OAb4s7kCzqi4D3geWA18Bd6jq0RC7nArMEpElOJ/oj1tjW0TOFpFMoD/wqtu1k/vaXOADoI+IZAaZAvsIzmpe04iDcvImL6uSasokd1bOPlUNNBAdar/RwCeqOkNEWgGDVXWoJ0EaUwJZS8GUVS+Tt887XEvdaZuo6lJLCCbeWEvBGGOMj7UUjDHG+FhSMMYY42NJwRhjjI8lBWOMMT6WFIwxxvj8P4sGRQ63vnfjAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"import numpy as np\n",
"N = 40\n",
"hours = 2\n",
"t = np.linspace(0,hours,N)\n",
"t_BD = np.linspace(0,-3,N)\n",
"t_analytical = np.linspace(-3,hours, N)\n",
"T_numerical = np.empty(N)\n",
"T_numerical[0]=85\n",
"T_numerical2 = np.empty(N)\n",
"T_numerical2[0] = 85\n",
"exponent = np.exp(-0.275*t_analytical)\n",
"delta_t = np.diff(t)\n",
"delta_t1 = np.diff(t_BD)\n",
"\n",
"# Caluating a piecewise function for the numerical solution\n",
" \n",
"for i in range(0, len(t)-1):\n",
" time1 = int(t[i])\n",
" temp_a = temp(time1)\n",
" T_numerical[i+1] = -0.275*(T_numerical[i]-temp_a)*delta_t[i] + T_numerical[i] # Numerical solution from t = 0 to 2s\n",
"\n",
"\n",
"for n in range(0, len(t_BD)-1):\n",
" if t_BD[n] == 0:\n",
" time2 = int(t_BD[n])\n",
" temp_a = temp(time2)\n",
" T_numerical2[n+1] = -0.275*(T_numerical2[n]-temp_a)*delta_t1[n] + T_numerical2[n] #Numerical solution from t = -3 to 0s \n",
" \n",
" elif t_BD[n] == -1:\n",
" time2 = int(t_BD[n])\n",
" temp_a = temp(time2)\n",
" T_numerical2[n+1] = -0.275*(T_numerical2[n]-temp_a)*delta_t1[n] + T_numerical2[n] \n",
" \n",
" elif t_BD[n] == -2:\n",
" time2 = int(t_BD[n])\n",
" temp_a = temp(time2)\n",
" T_numerical2[n+1] = -0.275*(T_numerical2[n]-temp_a)*delta_t1[n] + T_numerical2[n] \n",
" \n",
" elif t_BD[n] == -3:\n",
" time2 = int(t_BD[n])\n",
" temp_a = temp(time2)\n",
" T_numerical2[n+1] = -0.275*(T_numerical2[n]-temp_a)*delta_t1[n] + T_numerical2[n] \n",
" \n",
" else:\n",
" time2 = int(t_BD[n])\n",
" temp_a = temp(time2-1)\n",
" T_numerical2[n+1] = -0.275*(T_numerical2[n]-temp_a)*delta_t1[n] + T_numerical2[n] \n",
" \n",
"\n",
" \n",
"time1 = int(t_analytical[i])\n",
"temp_a = temp(time1)\n",
"T_analytical = (85-65)*exponent + 65 #Linear analytical solution \n",
"\n",
"print('4b.')\n",
"import matplotlib.pyplot as plt\n",
"plt.plot(t, T_numerical, '-',color = 'orange', label = 'Nonlinear Numerical')\n",
"plt.plot(t_BD, T_numerical2, '-',color = 'orange')\n",
"plt.plot(t_analytical, T_analytical,'o', color = 'Blue',label = 'Linear Analytical')\n",
"plt.xlabel('Time (hr), t = 0 is 11 am')\n",
"plt.ylabel('Temperature (F)')\n",
"plt.title('Corpse Temperature vs Time')\n",
"plt.legend();\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The numerical solution is now nonlinear or follows more of an exponential shape since it accounts for the change in temperature. This difference is seen in the graph above when graphing the analytical and numerical solution. "
]
},
{
"cell_type": "code",
"execution_count": 573,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"4b. The time of death is -1.5490549054905491 hours before 11 am which is approximately 9:27 am for a body temperature of 98.602 F\n"
]
}
],
"source": [
"for j in range(len(t_BD)):\n",
" body_temp = T_numerical2[j].round(3)\n",
" #print(body_temp)\n",
" if body_temp >= 98.6 and body_temp <= 98.603:\n",
" print('4b. The time of death is', t_BD[j], 'hours before 11 am which is approximately 9:27 am for a body temperature of',body_temp,'F')\n",
" \n",
" "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"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.7.3"
}
},
"nbformat": 4,
"nbformat_minor": 4
}