Skip to content

update #2

Open
wants to merge 56 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
2ce5ca3
updated lecture 07
rcc02007 Feb 7, 2017
1282935
updated lecture 07 output
rcc02007 Feb 7, 2017
3bfd22a
updated lecture 07 pdf and markdown
rcc02007 Feb 7, 2017
3519f1b
added HW3
rcc02007 Feb 8, 2017
6e10962
added HW3
rcc02007 Feb 8, 2017
889acf4
update HW3
rcc02007 Feb 13, 2017
4b1d857
update HW3
rcc02007 Feb 13, 2017
593b1de
updated HW3 1d
rcc02007 Feb 13, 2017
59658f7
Delete �Y
rcc02007 Feb 13, 2017
e5f170b
Delete �40
rcc02007 Feb 13, 2017
5128cfd
update lecture 08
rcc02007 Feb 14, 2017
9e7d607
Merge branch 'master' of https://github.uconn.edu/rcc02007/ME3255S2017
rcc02007 Feb 14, 2017
c994d71
format lecture_08.pdf
rcc02007 Feb 14, 2017
4c0d2a9
update syllabus
rcc02007 Feb 14, 2017
de553ce
add lecture 09
rcc02007 Feb 16, 2017
9b28df0
add lecture 10
rcc02007 Feb 20, 2017
07507da
update lecture 10
rcc02007 Feb 21, 2017
3780f0c
added HW4
rcc02007 Feb 21, 2017
4a4ee8b
update HW4
rcc02007 Feb 21, 2017
9d98bda
update HW4
rcc02007 Feb 21, 2017
f29d2cd
update HW4
rcc02007 Feb 21, 2017
72ca990
added suggested gauss elimination
rcc02007 Feb 21, 2017
543fb4b
added suggested gauss elimination
rcc02007 Feb 21, 2017
35dbdeb
add spring constant
rcc02007 Feb 22, 2017
46f626e
added lecture 11
rcc02007 Feb 23, 2017
d34ee71
updated lecture notes
rcc02007 Feb 27, 2017
a1f55bc
updated lecture 11 notes
rcc02007 Feb 27, 2017
05acb2b
updated schedule on Syllabus
rcc02007 Feb 27, 2017
903cb54
add lect 12
rcc02007 Feb 28, 2017
9bc0a6b
update lecture 12 and recommended probs
rcc02007 Feb 28, 2017
ba3c42c
added lecture 13
rcc02007 Mar 2, 2017
a12f02d
updated lecture 13
rcc02007 Mar 2, 2017
e2b2c99
added lecture 14 and LU pdf
rcc02007 Mar 7, 2017
0f702b6
added ipynb for lectures
rcc02007 Mar 9, 2017
fb67d3f
added lecture 15
rcc02007 Mar 21, 2017
4963f62
added HW 5
rcc02007 Mar 21, 2017
6c39d72
added lecture 16
rcc02007 Mar 23, 2017
6b8c056
updated syllabus
rcc02007 Mar 23, 2017
6ceea38
added lecture 16
rcc02007 Mar 28, 2017
95d9d2d
added lecture 17
rcc02007 Mar 28, 2017
2a444b3
added lecture 18
rcc02007 Mar 30, 2017
545ef32
added lecture 19
rcc02007 Apr 4, 2017
598519d
added hw6
rcc02007 Apr 4, 2017
953d785
added lecture 20
rcc02007 Apr 6, 2017
2d5bcb2
added final project
rcc02007 Apr 7, 2017
5313636
added pdf of project
rcc02007 Apr 7, 2017
8db16c4
fix problem_1_data typos
rcc02007 Apr 10, 2017
ee2c3e2
fix HW6 gradient of cost equation
rcc02007 Apr 10, 2017
acc9ebe
added lecture 21
rcc02007 Apr 11, 2017
7a4d88b
added lecture 22
rcc02007 Apr 13, 2017
72a7055
updated HW6 README.pdf
rcc02007 Apr 13, 2017
33c3301
added lecture 23
rcc02007 Apr 18, 2017
fea26cc
added lecture 24
rcc02007 Apr 20, 2017
56aabf7
added lecture 25 and corrected project numbers
rcc02007 Apr 26, 2017
d668298
added competition #2 - Darts
rcc02007 Apr 26, 2017
10c32fc
Update README.md
rcc02007 Mar 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions 01_phugoid/.gitignore
@@ -0,0 +1 @@
*.pyc
764 changes: 764 additions & 0 deletions 01_phugoid/.ipynb_checkpoints/01_01_Phugoid_Theory-checkpoint.ipynb

Large diffs are not rendered by default.

Large diffs are not rendered by default.

929 changes: 929 additions & 0 deletions 01_phugoid/.ipynb_checkpoints/01_03_PhugoidFullModel-checkpoint.ipynb

Large diffs are not rendered by default.

1,187 changes: 1,187 additions & 0 deletions 01_phugoid/.ipynb_checkpoints/01_04_Second_Order_Methods-checkpoint.ipynb

Large diffs are not rendered by default.

764 changes: 764 additions & 0 deletions 01_phugoid/01_01_Phugoid_Theory.ipynb

Large diffs are not rendered by default.

949 changes: 949 additions & 0 deletions 01_phugoid/01_02_Phugoid_Oscillation.ipynb

Large diffs are not rendered by default.

943 changes: 943 additions & 0 deletions 01_phugoid/01_03_PhugoidFullModel.ipynb

Large diffs are not rendered by default.

1,187 changes: 1,187 additions & 0 deletions 01_phugoid/01_04_Second_Order_Methods.ipynb

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions 01_phugoid/README.md
@@ -0,0 +1,43 @@
#Module 1: The phugoid model of glider flight.

##Summary

The phugoid model motivates the learning of numerical time integration methods. The model is described by a set of two nonlinear ordinary differential equations, representing the oscillatory trajectory of an aircraft subject to longitudinal perturbations.

* [Lesson 1](http://nbviewer.ipython.org/github/numerical-mooc/numerical-mooc/blob/master/lessons/01_phugoid/01_01_Phugoid_Theory.ipynb) presents the physics of phugoids in the assumption of zero drag (following Lanchester, 1909). Plotting the flight path gives fascinating curve shapes.
* [Lesson 2](http://nbviewer.ipython.org/github/numerical-mooc/numerical-mooc/blob/master/lessons/01_phugoid/01_02_Phugoid_Oscillation.ipynb) develops a single-equation model for zero-drag oscillations, leading to simple harmonic motion. The lesson defines initial-value problems, demonstrates Euler's method, and uses the exact solution to study the numerical convergence.
* [Lesson 3](http://nbviewer.ipython.org/github/numerical-mooc/numerical-mooc/blob/master/lessons/01_phugoid/01_03_PhugoidFullModel.ipynb) develops the full phugoid model and solves it with (vectorized) Euler's method. In the absence of an exact solution, the study of convergence uses a grid-refinement method, obtaining the observed order of convergence. The lesson ends with the paper-airplane challenge.
* [Lesson 4](http://nbviewer.ipython.org/github/numerical-mooc/numerical-mooc/blob/master/lessons/01_phugoid/01_04_Second_Order_Methods.ipynb) starts with the screencast "Euler's method is a first-order method" and develops second-order methods: explicit midpoint (modified Euler) and Runge-Kutta. It ends with a grid-refinement study.

##Badge earning

Completion of this module in the online course platform can earn the learner the Module 1 badge.

###Description: What does this badge represent?

The earner completed Module 1 "The phugoid model of glider flight" of the course "Practical Numerical Methods with Python" (a.k.a., numericalmooc).

###Criteria: What needs to be done to earn it?

To earn this badge, the learner needs to complete the graded assessment in the course platform including: answering quiz about basic numerical Python commands; answering quiz about basics of initial-value problems; completing the individual coding assignment "Rocket flight" and answering the numeric questions online. Earners should also have completed self-study of the four module lessons, by reading, reflecting on and writing their own version of the codes. This is not directly assessed, but it is assumed. Thus, earners are encouraged to provide evidence of this self-study by giving links to their code repositories or other learning objects they created in the process.

###Evidence: Website (link to original digital content)

Desirable: link to the earner's GitHub repository (or equivalent) containing the solution to the "Rocket flight" coding assignment.
Optional: link to the earner's GitHub repository (or equivalent) containing other codes, following the lesson.

###Category:

Higher education, graduate

###Tags:

engineering, computation, higher education, numericalmooc, python, gwu, george washington university, lorena barba, github

###Relevant Links: Is there more information on the web?

[Course About page](http://openedx.seas.gwu.edu/courses/GW/MAE6286/2014_fall/about)

[Course Wiki](http://openedx.seas.gwu.edu/courses/GW/MAE6286/2014_fall/wiki/GW.MAE6286.2014_fall/)

[Course GitHub repo](https://github.com/numerical-mooc/numerical-mooc)
335 changes: 335 additions & 0 deletions 01_phugoid/Rocket_Assignment.ipynb
@@ -0,0 +1,335 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"###### Content under Creative Commons Attribution license CC-BY 4.0, code under MIT license (c)2014 L.A. Barba, G.F. Forsyth."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Coding Assignment: Rocket"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The equations of motion for a rocket in purely vertical flight are given by\n",
"\n",
"\\begin{align}\n",
"\\frac{dh}{dt} &= v\\\\\n",
"(m_s+m_p) \\frac{dv}{dt}& = -(m_s+m_p)g + \\dot{m}_pv_e - \\frac{1}{2}\\rho v|v|AC_D\n",
"\\end{align}\n",
"\n",
"$h$ is the altitude of the rocket\n",
"\n",
"$m_s = 50kg$ is the weight of the rocket shell\n",
"\n",
"$g = 9.81 \\frac{m}{s^2}$\n",
"\n",
"$\\rho = 1.091 \\frac{kg}{m^3}$ is the average air density (assumed constant throughout flight)\n",
"\n",
"$A = \\pi r^2$ is the maximum cross sectional area of the rocket, where $r = 0.5 m$\n",
"\n",
"$v_e = 325 \\frac{m}{s}$ is the exhaust speed\n",
"\n",
"$C_D = 0.15 $ is the drag coefficient\n",
"\n",
"$m_{po} = 100 kg$ at time $t = 0$ is the initial weight of the rocket propellant\n",
"\n",
"The mass of the remaining propellant is given by:\n",
"\n",
"$$m_p = m_{po} - \\int^t_0 \\dot{m}_p d\\tau$$\n",
"\n",
"where $\\dot{m}_p$ is the time-varying burn rate given by the following figure:\n",
"\n",
"Propellant Burn Rate\n",
"\n",
"![burn rate](./burn.rate.png)\n",
"\n",
"Using Euler's method with a timestep of $\\Delta t=0.1s$, create a Python script to calculate the altitude and velocity of the rocket from launch until crash down. \n",
"\n",
"\n",
"\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Assessment:\n",
"\n",
"To check your answers, you can register for [MAE 6286: Practical Numerical Methods with Python](http://openedx.seas.gwu.edu/courses/GW/MAE6286/2014_fall/about).\n",
"\n",
"1. At time $t=3.2s$, what is the mass (in kg) of rocket propellant remaining in the rocket?\n",
"\n",
"2. What is the maximum speed of the rocket in $\\frac{m}{s}$?\n",
" At what time does this occur (in seconds)? \n",
" What is the altitude at this time (in meters)? \n",
" \n",
"3. What is the rocket's maximum altitude during flight (in meters)? At what time (in seconds) does this occur?\n",
"\n",
"4. At what time (in seconds) does the rocket impact the ground? What is the velocity of the rocket (in $\\frac{m}{s}$) at time of impact?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Derivation of the rocket equations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In case you are kind of confused about the rocket equations, here we show how to get to them. \n",
"\n",
"Newton's second law states that the acceleration of the vehicle times its mass is equal to all the forces acting on it. Therefore,\n",
"\n",
"\\begin{equation}\n",
"(m_s + m_p)\\frac{d\\bf{v}}{dt}=\\sum {\\bf F}.\n",
"\\end{equation}\n",
"In the above formula we have assumed that the propellant inside the rocket and the rocket move at the same velocity (in other words, their relative velocity is negligible). \n",
"\n",
"Two of the external forces acting on the rocket are,\n",
"\n",
"\\begin{align}\n",
"{\\bf F}_g&= (m_s+m_p)\\bf{g} \\quad (\\rm{Gravity}),\\\\\n",
"{\\bf F}_d&= - \\frac{1}{2} \\rho_a \\mathbf{v} |\\mathbf{v}| A C_D \\quad (\\rm{Drag}).\n",
"\\end{align}\n",
"\n",
"We also need to consider the force resulting from the ejection of the propellant. During an interval $dt$, the engine of the rocket ejects downwards a mass of propellant given by $\\dot m_p dt$. Relative to the rocket, the speed of the ejected burning gas is assumed constant and equal to $v_e$ (the exhaust speed). The momentum variation induced on the exhaust gas by the engine during that interval is therefore, $d{\\bf p}_{gas} = \\dot m_p {\\bf v}_e dt$. Again using Newton's second law we conclude that the force applied by the rocket on the gas is,\n",
"\n",
"\\begin{align}\n",
"{\\bf F}_{rocket\\rightarrow gas} = \\frac{d{\\bf p}_{gas}}{dt} = \\dot m_p {\\bf v}_e\n",
"\\end{align}\n",
"\n",
"Using Newton's third law (|action| = |reaction|), the force exerted by the exhaust gas on the rocket is then,\n",
"\n",
"\\begin{align}\n",
"{\\bf F}_{gas\\rightarrow rocket} = -{\\bf F}_{rocket\\rightarrow gas} = -\\dot m_p {\\bf v}_e\n",
"\\end{align}\n",
"\n",
"If we collect all the forces acting on the rocket we finally have:\n",
"\n",
"\\begin{align}\n",
"(m_s + m_p)\\frac{d\\bf{v}}{dt}=(m_s+m_p){\\bf g}- \\frac{1}{2} \\rho_a \\mathbf{v} |v| A C_D -\\dot m_p {\\bf v}_e\n",
"\\end{align}\n",
"\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"###### The cell below loads the style of the notebook."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"outputs": [
{
"data": {
"text/html": [
"<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=Arvo:400,700,400italic' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=PT+Mono' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=Shadows+Into+Light' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=Nixie+One' rel='stylesheet' type='text/css'>\n",
"<style>\n",
"\n",
"@font-face {\n",
" font-family: \"Computer Modern\";\n",
" src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');\n",
"}\n",
"\n",
"#notebook_panel { /* main background */\n",
" background: rgb(245,245,245);\n",
"}\n",
"\n",
"div.cell { /* set cell width */\n",
" width: 750px;\n",
"}\n",
"\n",
"div #notebook { /* centre the content */\n",
" background: #fff; /* white background for content */\n",
" width: 1000px;\n",
" margin: auto;\n",
" padding-left: 0em;\n",
"}\n",
"\n",
"#notebook li { /* More space between bullet points */\n",
" margin-top:0.8em;\n",
"}\n",
"\n",
"/* draw border around running cells */\n",
"div.cell.border-box-sizing.code_cell.running { \n",
" border: 1px solid #111;\n",
"}\n",
"\n",
"/* Put a solid color box around each cell and its output, visually linking them*/\n",
"div.cell.code_cell {\n",
" background-color: rgb(256,256,256); \n",
" border-radius: 0px; \n",
" padding: 0.5em;\n",
" margin-left:1em;\n",
" margin-top: 1em;\n",
"}\n",
"\n",
"div.text_cell_render{\n",
" font-family: 'Alegreya Sans' sans-serif;\n",
" line-height: 140%;\n",
" font-size: 125%;\n",
" font-weight: 400;\n",
" width:600px;\n",
" margin-left:auto;\n",
" margin-right:auto;\n",
"}\n",
"\n",
"\n",
"/* Formatting for header cells */\n",
".text_cell_render h1 {\n",
" font-family: 'Nixie One', serif;\n",
" font-style:regular;\n",
" font-weight: 400; \n",
" font-size: 45pt;\n",
" line-height: 100%;\n",
" color: rgb(0,51,102);\n",
" margin-bottom: 0.5em;\n",
" margin-top: 0.5em;\n",
" display: block;\n",
"}\n",
"\n",
".text_cell_render h2 {\n",
" font-family: 'Nixie One', serif;\n",
" font-weight: 400;\n",
" font-size: 30pt;\n",
" line-height: 100%;\n",
" color: rgb(0,51,102);\n",
" margin-bottom: 0.1em;\n",
" margin-top: 0.3em;\n",
" display: block;\n",
"}\t\n",
"\n",
".text_cell_render h3 {\n",
" font-family: 'Nixie One', serif;\n",
" margin-top:16px;\n",
" font-size: 22pt;\n",
" font-weight: 600;\n",
" margin-bottom: 3px;\n",
" font-style: regular;\n",
" color: rgb(102,102,0);\n",
"}\n",
"\n",
".text_cell_render h4 { /*Use this for captions*/\n",
" font-family: 'Nixie One', serif;\n",
" font-size: 14pt;\n",
" text-align: center;\n",
" margin-top: 0em;\n",
" margin-bottom: 2em;\n",
" font-style: regular;\n",
"}\n",
"\n",
".text_cell_render h5 { /*Use this for small titles*/\n",
" font-family: 'Nixie One', sans-serif;\n",
" font-weight: 400;\n",
" font-size: 16pt;\n",
" color: rgb(163,0,0);\n",
" font-style: italic;\n",
" margin-bottom: .1em;\n",
" margin-top: 0.8em;\n",
" display: block;\n",
"}\n",
"\n",
".text_cell_render h6 { /*use this for copyright note*/\n",
" font-family: 'PT Mono', sans-serif;\n",
" font-weight: 300;\n",
" font-size: 9pt;\n",
" line-height: 100%;\n",
" color: grey;\n",
" margin-bottom: 1px;\n",
" margin-top: 1px;\n",
"}\n",
"\n",
".CodeMirror{\n",
" font-family: \"PT Mono\";\n",
" font-size: 90%;\n",
"}\n",
"\n",
"</style>\n",
"<script>\n",
" MathJax.Hub.Config({\n",
" TeX: {\n",
" extensions: [\"AMSmath.js\"],\n",
" equationNumbers: { autoNumber: \"AMS\", useLabelIds: true}\n",
" },\n",
" tex2jax: {\n",
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
" },\n",
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
" \"HTML-CSS\": {\n",
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
" }\n",
" });\n",
"</script>\n"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from IPython.core.display import HTML\n",
"css_file = '../../styles/numericalmoocstyle.css'\n",
"HTML(open(css_file, \"r\").read())"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"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.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
Binary file added 01_phugoid/burn.rate.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 01_phugoid/figures/glider_forces-lesson3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 01_phugoid/figures/glider_forces.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.