Skip to content
Permalink
master
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>README</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
span.underline{text-decoration: underline;}
div.column{display: inline-block; vertical-align: top; width: 50%;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
</style>
<script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js" type="text/javascript"></script>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<h1 id="computational-mechanics-01---getting-started">Computational Mechanics 01 - Getting Started</h1>
<h2 id="working-with-python-and-numerical-methods">Working with Python and Numerical Methods</h2>
<p>Welcome to Computational Mechanics Module #1 - Getting Started!</p>
<p>There are three modules and one final project. The modules will get us started on our exploration of computational mechanics using Python, listed below each module are the learning objectives.</p>
<ol type="1">
<li><a href="./notebooks/01_Interacting_with_Python.ipynb">01_Interacting_with_Python</a></li>
</ol>
<ul>
<li>Using the <code>print()</code> function. The concept of <em>function</em>.</li>
<li>Using Python as a calculator.</li>
<li>Concepts of variable, type, assignment.</li>
<li>Special variables: <code>True</code>, <code>False</code>, <code>None</code>.</li>
<li>Supported operations, logical operations.</li>
<li>Reading error messages.</li>
</ul>
<ol start="2" type="1">
<li><a href="./notebooks/02_Working_with_Python.ipynb">02_Working_with_Python</a></li>
</ol>
<ul>
<li>Good coding habits and file naming</li>
<li>How to define a function and return outputs</li>
<li>How to import libraries</li>
<li>Multidimensional arrays using NumPy</li>
<li>Accessing values and slicing in NumPy arrays</li>
<li><code>%%time</code> magic to time cell execution.</li>
<li>Performance comparison: lists vs NumPy arrays</li>
<li>Basic plotting with <code>pyplot</code>.</li>
</ul>
<ol start="3" type="1">
<li><a href="./notebooks/03-Numerical_error.ipynb">03-Numerical_error</a></li>
</ol>
<ul>
<li>Numerical integration with the Euler approximation</li>
<li>The source of truncation errors</li>
<li>The source of roundoff errors</li>
<li>How to time a numerical solution or a function</li>
<li>How to compare solutions</li>
<li>The definition of absolute error and relative error</li>
<li>How a numerical solution converges</li>
</ul>
<h2 id="computational-mechanics-project-01---heat-transfer-in-forensic-science"><a href="./project/01_Getting-started-project.ipynb">Computational Mechanics Project #01 - Heat Transfer in Forensic Science</a></h2>
<p>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.</p>
<p>Forensic scientists use Newton’s law of cooling to determine the time elapsed since the loss of life,</p>
<p><span class="math inline">\(\frac{dT}{dt} = -K(T-T_a)\)</span>,</p>
<p>where <span class="math inline">\(T\)</span> is the current temperature, <span class="math inline">\(T_a\)</span> is the ambient temperature, <span class="math inline">\(t\)</span> is the elapsed time in hours, and <span class="math inline">\(K\)</span> is an empirical constant.</p>
<p>Suppose the temperature of the corpse is 85<span class="math inline">\(^o\)</span>F at 11:00 am. Then, 2 hours later the temperature is 74<span class="math inline">\(^{o}\)</span>F.</p>
<p>Assume ambient temperature is a constant 65<span class="math inline">\(^{o}\)</span>F.</p>
</body>
</html>