Permalink
Cannot retrieve contributors at this time
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?
-compmech-project01/project/01_Getting-started-project.ipynb
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
361 lines (361 sloc)
53.8 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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": 8, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0.61\n" | |
] | |
} | |
], | |
"source": [ | |
"T_a = 65 #degF\n", | |
"T_1 = 85 #degF\n", | |
"T_2 = 74\n", | |
"t = 2 #hours\n", | |
"dTdt = (T_2-T_1)/t #degF\n", | |
"\n", | |
"K = -dTdt/(T_2-T_a)\n", | |
"print(round(K,2))" | |
] | |
}, | |
{ | |
"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": 10, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"0.6111111111111112" | |
] | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"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", | |
" Arguments\n", | |
" ---------\n", | |
" your inputs...\n", | |
" \n", | |
" Returns\n", | |
" -------\n", | |
" your outputs...\n", | |
" \n", | |
" '''\n", | |
" dTdt = (Temp_t2-Temp_t1)/delta_t\n", | |
" K = -dTdt/(Temp_t2-Temp_ambient)\n", | |
" return K\n", | |
"\n", | |
"measure_K(85,74,65,2)" | |
] | |
}, | |
{ | |
"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": 3, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"The final temperature apporaches 65 degF as time goes to infinity.\n" | |
] | |
}, | |
{ | |
"data": {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XEC6JPtgi5F0qiQYSkTxgLLD81DU73f/i/IP1uR1ICwIXql8lIk+KSJLbQQVS1d3Awzhnd3uASlVd7G5UQWWr6h5wTkKAXi7H05pvA2+5HURTIjIT2K2qa9yO5VTCJdGHvAi520QkGXgZuEtVD7sdTyMRuRLYp6or3I7lFBoXqn9cVccCR3G/y+Ek/r7uq4F8IAdIEpFvuBtV9yYi9+N0fT7ndiyBRCQRuB/4V7djaU24JPpusQi5iMTgJPnnVPUVt+NpYjIwU0SKcbq+viIi/+duSM0EXajexXiCuRjYrqrlqloPvAJMcjmmYMoa1332P+9zOZ6gRGQOcCVwk3a9m34G4nyhr/H/f9MPWCkivV2NKohwSfRdfhFyERGcvuWNqvprt+NpSlXvU9V+qpqH8/d7X1W71JloSwvVuxhSMDuBiSKS6P9vPp0udsHY73Vgjv/1HOA1F2MJSkQuA34MzFTVarfjaUpV16lqL1XN8/9/UwKM8/877VLCItH7L9g0LkK+EXixCy5CPhn4Js6Z8mr/4wq3g+qGGheqXwuMAf7T5XhO4v+1sQBYCazD+X/M1dvkReR54FNgqIiUiMh3gAeBS0RkC86IkQe7YIyPAinAEv//L3/ogjF2CzYFgjHGhLmwOKM3xhjTMkv0xhgT5izRG2NMmLNEb4wxYc4SvTHGhDlL9MYYE+Ys0RtjTJj7/wEXj6Ja4DnVzQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"import math\n", | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"\n", | |
"#a & b\n", | |
"\n", | |
"t = np.linspace(0,15,35)\n", | |
"T_o = 85 #degF\n", | |
"T = 74 #degF\n", | |
"T_a = 65 #degF\n", | |
"\n", | |
"t_numerical = np.zeros(len(t))\n", | |
"t_numerical[0] = T_o\n", | |
"\n", | |
"for i in range(1,len(t)):\n", | |
" t_numerical[i]=t_numerical[i-1]-(K*(t_numerical[i-1]-T_a)*(t[i]-t[i-1]))\n", | |
" \n", | |
"t_analytical = T_a + (T_o-T_a)*(np.exp(-K*t))\n", | |
"\n", | |
"plt.plot(t,t_numerical,label='numerical')\n", | |
"plt.plot(t,t_analytical,label='analytical')\n", | |
"plt.legend(loc='best')\n", | |
"\n", | |
"print('The final temperature apporaches 65 degF as time goes to infinity.')" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0 hours, 50 minutes, and 56 seconds passed since time of death.\n", | |
"Time of death: 10:09:04 AM\n" | |
] | |
} | |
], | |
"source": [ | |
"#c\n", | |
"T_i = 98.6 #degF\n", | |
"time = np.log((T_i-T_a)/(T_o-T_a))/K*3600\n", | |
"\n", | |
"hrs = math.floor(time/3600)\n", | |
"mins = math.floor((time/(3600-hrs))*60)\n", | |
"secs = int(round(((time/(3600-hrs))*60-mins)*60,0))\n", | |
"\n", | |
"print(hrs, 'hours,', mins, 'minutes, and', secs, 'seconds passed since time of death.')\n", | |
"print('Time of death: 10:09:04 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": 5, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"65" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXAAAAD4CAYAAAD1jb0+AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXhV9bn28e8DIYQEQoCESQgQCCAyhoBAg3OVqqfOQ1HLUY9oW6njcWj72reeetSqdaptpVqHqlREsadaEQ+2R5AKZZYhkDCHISQBQiBk3M/7R3Z9PQgSIDsre+f+XBdXsneys+8Fyc3Kb6/1LHN3REQk+rQIOoCIiBwfFbiISJRSgYuIRCkVuIhIlFKBi4hEqbjGfLLU1FTv3bt3Yz6liEjUW7x4cbG7px16f6MWeO/evVm0aFFjPqWISNQzs82Hu19LKCIiUUoFLiISpVTgIiJRSgUuIhKlVOAiIlFKBS4iEqVU4CIiUUoFLiISIZU1tczPL+bRWbkU7qto8K/fqCfyiIjEMndnbWEZ8/KK+SSvmIUbS6ioDhHXwsju1YEuyQkN+nwqcBGRE7BrXwXz8ouZl1fM3PxiisoqAchIS+LqUenk9EtlTN9OtG3d8HWrAhcROQYHq2pZsLGkrrDzillbWAZAh8RW5GSmMb5fKjmZqXRPaRPxLCpwEZGvEQo5q7bvY25+EfPyilm0aQ9VtSHiW7ZgVJ8OXDxiIOMzUxnULZkWLaxRs6nARUQOsW3vQeblFTE3r5hP84vZU14NwMCu7Zg0rhc5mWmM7t2RNvEtA82pAheRZq+soprPNuz+orQ3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BS4FPGj1N5L3MV7f3I2Cwuw8F1gH3N3aoCHuZr27zY+4+1N2HA+8BDzTEEzX5Ag+LA9qYWRyQCGwPOE8knQx85u7l7l4D/A9wScCZIsLdPwF2H3L3RcAr4fdfAS5u1FARdrhtdvc17r42oEgRdYTtnR3+3gb4DOjR6MEi6AjbvO9LN5OABjl6pMkXuLtvAx4HtgA7gFJ3nx1sqohaCZxmZp3MLBE4H+gZcKbG1MXddwCE33YOOI9E1g3AB0GHaAxm9pCZbQWuobnsgYfXQC8C+gDdgSQzuzbYVJHj7muAR6n7NXMWsByo+doHiUQhM/sxdd/brwedpTG4+4/dvSd123trQ3zNJl/gwDnARncvcvdq4B1gXMCZIsrdX3T3LHc/jbpfxfKCztSICs2sG0D47a6A80gEmNkk4ELgGm9+J6O8AVzWEF8oGgp8CzDGzBLNzICzgTUBZ4ooM+scfptO3Ytb04JN1Kj+C5gUfn8S8KcAs0gEmNkE4F7g2+5eHnSexnDIgQjfBqEewXYAAACxSURBVHIb5OtGw39+ZvYz4Crqft1aCvybu1cGmypyzGwu0AmoBu509zkBR4oIM5sGnEHdmM1C4KfAu8B0IJ26/7yvcPdDX+iMWkfY5t3As0AasBdY5u7nBZWxIR1he+8HWgMl4U/7zN1vCSRgBBxhm88HBgAh6kZq3xJ+fe/EnisaClxERL4qGpZQRETkMFTgIiJRSgUuIhKlVOAiIlFKBS4iEqVU4CIiUUoFLiISpf4ft6Ohj7HAk1wAAAAASUVORK5CYII=\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"#a\n", | |
"def changing_temps(hrs):\n", | |
" '''Function defining the ambient temperature as changing each hour rather than remaining at 65 degF.\n", | |
" This function considers 11AM as the base-time associated with T=0. (i.e. 10 is T=-1, 12 is T=1, etc.)\n", | |
" X-axis is adjusted in plot for convenience\n", | |
" The output of the function is changing temperature against time.'''\n", | |
" intervals = [8,9,10,11,12,13]\n", | |
" adj_time = hrs + 3 #adjusting time intervals\n", | |
" a_temps = [55,58,60,65,66,67]\n", | |
" body_temp = a_temps[adj_time]\n", | |
" \n", | |
" plt.plot(intervals,a_temps)\n", | |
" return body_temp\n", | |
"\n", | |
"changing_temps(0)" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"This plot looks like an accurate representation of ambient temperature from 8am to 1pm. A better way to record the temperature is as a continuous function, rather than 6 data points." | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"0 hours, 42 minutes, and 39 seconds passed since time of death.\n", | |
"Time of death: 10:17:21 AM\n" | |
] | |
}, | |
{ | |
"data": { | |
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8li6FKAAAgAElEQVR4nO3deXxU9b3/8ddnlqxkYUmAsCUsshuQCAHUQlELiIi1KtS2aKu0P7eq7U9trVdvf7e91qu917ZeLaIVW4o7xQUX1CpaFg3IvkiAACEsYUuA7JnP748zxCwTkkCSSWY+z8djHjPnnO935jNR3nPmO99zjqgqxhhjQpcr2AUYY4xpWRb0xhgT4izojTEmxFnQG2NMiLOgN8aYEOcJdgGBdOnSRVNTU4NdhjHGtBurV68+rKpJgba1yaBPTU0lKysr2GUYY0y7ISK769tmQzfGGBPiLOiNMSbEWdAbY0yIa5Nj9MaY0FBeXk5ubi4lJSXBLiVkREVF0bNnT7xeb6P7WNAbY1pMbm4ucXFxpKamIiLBLqfdU1WOHDlCbm4uaWlpje7XqKEbEblbRDaJyEYRWSgiUSLysIjsE5G1/tvU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6qup+cHZCgOQg19OQHwLvBLuI2kRkOrBPVdcFu5YzCZWglwDr2uSnq4h0AF4D7lLVwmDXc5qITAMOqerqYNdyBh7gAuApVR0JnCL4Qw41+Me6rwLSgBQgVkS+F9yq2jcReQBn6HNBsGupTkRigAeAfwt2LQ0JlaDPBXpVW+5JkL8uByIiXpyQX6Cqrwe7nlrGA9NFJAdn6OubIvK34JZURy6Qq6qnvwm9ihP8bcmlwC5VzVfVcuB1YFyQawrkoIh0B/DfHwpyPQGJyGxgGnCDtr2DfvrhfKCv8/+76QmsEZFuQa0qgFAJ+i+AASKSJiIROD9+vRHkmmoQEcEZW96iqr8Pdj21qeovVLWnqqbi/P0+UtU2tSeqqgeAvSIy0L9qErA5iCUFsgfIFJEY/3/zSbSxH4z93gBm+x/PBhYHsZaARGQycB8wXVWLgl1Pbaq6QVWTVTXV/+8mF7jA//9pmxISQe//weZ24D2cf1Qvq+qm4FZVx3jg+zh7ymv9t6nBLqodugNYICLrgRHAb4NcTw3+bxuvAmuADTj/xoJ6mLyILARWAANFJFdEfgQ8AlwmIttxZow80gZr/BMQByz1/3t5ug3W2C7YKRCMMSbEhcQevTHGmPpZ0BtjTIizoDfGmBBnQW+MMSHOgt4YY0KcBb0xxoQ4C3pjjAlx/x/NyATOiEo6xQAAAABJRU5ErkJggg==\n", | |
"text/plain": [ | |
"<Figure size 432x288 with 1 Axes>" | |
] | |
}, | |
"metadata": { | |
"needs_background": "light" | |
}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"#b\n", | |
"import math\n", | |
"import numpy as np\n", | |
"import matplotlib.pyplot as plt\n", | |
"\n", | |
"t = np.linspace(0,15,35)\n", | |
"T_o = 85 #degF\n", | |
"T = 74 #degF\n", | |
"T_ch_amb = [55,58,60,65,67]\n", | |
"\n", | |
"T_amb = np.zeros(len(T_ch_amb))\n", | |
"\n", | |
"t_numerical = np.zeros(len(t))\n", | |
"t_numerical[0] = T_o\n", | |
"t_analytical = np.zeros(len(T_ch_amb))\n", | |
"\n", | |
"for i in range(1,len(T_ch_amb)):\n", | |
" T_a = T_ch_amb[i]\n", | |
" t_analytical = T_a + (T_o-T_a)*np.exp(-K*t) \n", | |
" \n", | |
"for j in range(1, len(t)):\n", | |
" t_numerical[j]=t_numerical[j-1]-(K*(t_numerical[j-1]-T_a)*(t[j]-t[j-1]))\n", | |
" \n", | |
"plt.plot(t,t_analytical,label='analytical')\n", | |
"plt.plot(t,t_numerical,label='numerical')\n", | |
"plt.legend(loc='best')\n", | |
"\n", | |
"T_i_2 = 98.6 #degF\n", | |
"time_2 = np.log((T_i_2-60)/(T_o-60))/K*3600\n", | |
"\n", | |
"hrs_2 = math.floor(time_2/3600)\n", | |
"mins_2 = math.floor((time_2/(3600-hrs_2))*60)\n", | |
"secs_2 = int(round(((time_2/(3600-hrs_2))*60-mins_2)*60,0))\n", | |
"print(hrs_2, 'hours,', mins_2, 'minutes, and', secs_2, 'seconds passed since time of death.')\n", | |
"print('Time of death: 10:17:21 AM')" | |
] | |
}, | |
{ | |
"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 | |
} |