Skip to content

Commit

Permalink
next hw
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewning committed Oct 24, 2024
1 parent 7d82ae3 commit e81f8ab
Show file tree
Hide file tree
Showing 5 changed files with 182 additions and 10 deletions.
2 changes: 1 addition & 1 deletion atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<title>FLOW Lab</title>
<link href="http://flow.byu.edu/atom.xml" rel="self"/>
<link href="http://flow.byu.edu/"/>
<updated>2024-10-23T20:56:02-06:00</updated>
<updated>2024-10-24T11:39:54-06:00</updated>
<id>http://flow.byu.edu</id>
<author>
<name>Andrew Ning</name>
Expand Down
2 changes: 1 addition & 1 deletion feed.xml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://flow.byu.edu/feed.xml" rel="self" type="application/atom+xml" /><link href="http://flow.byu.edu/" rel="alternate" type="text/html" /><updated>2024-10-23T20:56:02-06:00</updated><id>http://flow.byu.edu/feed.xml</id><title type="html">FLOW Lab</title><subtitle>Flight, Optimization, and Wind Laboratory</subtitle><author><name>Andrew Ning</name></author><entry><title type="html">Optimization Book Available</title><link href="http://flow.byu.edu/posts/opt-book" rel="alternate" type="text/html" title="Optimization Book Available" /><published>2021-10-15T00:00:00-06:00</published><updated>2021-10-15T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/opt-book</id><content type="html" xml:base="http://flow.byu.edu/posts/opt-book"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6853387400052391936" height="698" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">BEM Paper</title><link href="http://flow.byu.edu/posts/bem-paper" rel="alternate" type="text/html" title="BEM Paper" /><published>2021-07-30T00:00:00-06:00</published><updated>2021-07-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/bem-paper</id><content type="html" xml:base="http://flow.byu.edu/posts/bem-paper"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6825450879324434432" height="622" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Eduardo Research Update</title><link href="http://flow.byu.edu/posts/eduardo-latest" rel="alternate" type="text/html" title="Eduardo Research Update" /><published>2021-03-01T00:00:00-07:00</published><updated>2021-03-01T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/eduardo-latest</id><content type="html" xml:base="http://flow.byu.edu/posts/eduardo-latest"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6779795433318420480" height="1142" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Reformulated VPM</title><link href="http://flow.byu.edu/posts/reformulated-vpm" rel="alternate" type="text/html" title="Reformulated VPM" /><published>2021-02-01T00:00:00-07:00</published><updated>2021-02-01T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/reformulated-vpm</id><content type="html" xml:base="http://flow.byu.edu/posts/reformulated-vpm"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6767685749157588992" height="990" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Optimization Book Announcement</title><link href="http://flow.byu.edu/posts/optimization-book" rel="alternate" type="text/html" title="Optimization Book Announcement" /><published>2021-01-20T00:00:00-07:00</published><updated>2021-01-20T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/optimization-book</id><content type="html" xml:base="http://flow.byu.edu/posts/optimization-book"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6758135437300154368" height="679" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">PJ Defense</title><link href="http://flow.byu.edu/posts/pj-defense" rel="alternate" type="text/html" title="PJ Defense" /><published>2020-09-30T00:00:00-06:00</published><updated>2020-09-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/pj-defense</id><content type="html" xml:base="http://flow.byu.edu/posts/pj-defense"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6714312529692237824" height="641" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">VPM Paper</title><link href="http://flow.byu.edu/posts/vpm-paper" rel="alternate" type="text/html" title="VPM Paper" /><published>2020-08-30T00:00:00-06:00</published><updated>2020-08-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/vpm-paper</id><content type="html" xml:base="http://flow.byu.edu/posts/vpm-paper"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6711406263634419712" height="857" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Airborne Wind with Vortex Particle Method</title><link href="http://flow.byu.edu/posts/wind-harvesting" rel="alternate" type="text/html" title="Airborne Wind with Vortex Particle Method" /><published>2020-08-16T00:00:00-06:00</published><updated>2020-08-16T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/wind-harvesting</id><content type="html" xml:base="http://flow.byu.edu/posts/wind-harvesting"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6694076731474739200" height="949" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Judd Mehr and Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Eduardo’s Past Three Years</title><link href="http://flow.byu.edu/posts/eduardo-three-years" rel="alternate" type="text/html" title="Eduardo’s Past Three Years" /><published>2020-08-10T00:00:00-06:00</published><updated>2020-08-10T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/eduardo-three-years</id><content type="html" xml:base="http://flow.byu.edu/posts/eduardo-three-years"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6689985497042944000" height="797" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">FLOWUnsteady in Google Drive</title><link href="http://flow.byu.edu/posts/google-drive-vpm" rel="alternate" type="text/html" title="FLOWUnsteady in Google Drive" /><published>2020-08-02T00:00:00-06:00</published><updated>2020-08-02T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/google-drive-vpm</id><content type="html" xml:base="http://flow.byu.edu/posts/google-drive-vpm"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6689003185174118400" height="1094" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry></feed>
<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="4.3.4">Jekyll</generator><link href="http://flow.byu.edu/feed.xml" rel="self" type="application/atom+xml" /><link href="http://flow.byu.edu/" rel="alternate" type="text/html" /><updated>2024-10-24T11:39:54-06:00</updated><id>http://flow.byu.edu/feed.xml</id><title type="html">FLOW Lab</title><subtitle>Flight, Optimization, and Wind Laboratory</subtitle><author><name>Andrew Ning</name></author><entry><title type="html">Optimization Book Available</title><link href="http://flow.byu.edu/posts/opt-book" rel="alternate" type="text/html" title="Optimization Book Available" /><published>2021-10-15T00:00:00-06:00</published><updated>2021-10-15T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/opt-book</id><content type="html" xml:base="http://flow.byu.edu/posts/opt-book"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6853387400052391936" height="698" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">BEM Paper</title><link href="http://flow.byu.edu/posts/bem-paper" rel="alternate" type="text/html" title="BEM Paper" /><published>2021-07-30T00:00:00-06:00</published><updated>2021-07-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/bem-paper</id><content type="html" xml:base="http://flow.byu.edu/posts/bem-paper"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6825450879324434432" height="622" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Eduardo Research Update</title><link href="http://flow.byu.edu/posts/eduardo-latest" rel="alternate" type="text/html" title="Eduardo Research Update" /><published>2021-03-01T00:00:00-07:00</published><updated>2021-03-01T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/eduardo-latest</id><content type="html" xml:base="http://flow.byu.edu/posts/eduardo-latest"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6779795433318420480" height="1142" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Reformulated VPM</title><link href="http://flow.byu.edu/posts/reformulated-vpm" rel="alternate" type="text/html" title="Reformulated VPM" /><published>2021-02-01T00:00:00-07:00</published><updated>2021-02-01T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/reformulated-vpm</id><content type="html" xml:base="http://flow.byu.edu/posts/reformulated-vpm"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6767685749157588992" height="990" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Optimization Book Announcement</title><link href="http://flow.byu.edu/posts/optimization-book" rel="alternate" type="text/html" title="Optimization Book Announcement" /><published>2021-01-20T00:00:00-07:00</published><updated>2021-01-20T00:00:00-07:00</updated><id>http://flow.byu.edu/posts/optimization-book</id><content type="html" xml:base="http://flow.byu.edu/posts/optimization-book"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6758135437300154368" height="679" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">PJ Defense</title><link href="http://flow.byu.edu/posts/pj-defense" rel="alternate" type="text/html" title="PJ Defense" /><published>2020-09-30T00:00:00-06:00</published><updated>2020-09-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/pj-defense</id><content type="html" xml:base="http://flow.byu.edu/posts/pj-defense"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6714312529692237824" height="641" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Andrew Ning</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">VPM Paper</title><link href="http://flow.byu.edu/posts/vpm-paper" rel="alternate" type="text/html" title="VPM Paper" /><published>2020-08-30T00:00:00-06:00</published><updated>2020-08-30T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/vpm-paper</id><content type="html" xml:base="http://flow.byu.edu/posts/vpm-paper"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6711406263634419712" height="857" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Airborne Wind with Vortex Particle Method</title><link href="http://flow.byu.edu/posts/wind-harvesting" rel="alternate" type="text/html" title="Airborne Wind with Vortex Particle Method" /><published>2020-08-16T00:00:00-06:00</published><updated>2020-08-16T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/wind-harvesting</id><content type="html" xml:base="http://flow.byu.edu/posts/wind-harvesting"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6694076731474739200" height="949" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Judd Mehr and Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">Eduardo’s Past Three Years</title><link href="http://flow.byu.edu/posts/eduardo-three-years" rel="alternate" type="text/html" title="Eduardo’s Past Three Years" /><published>2020-08-10T00:00:00-06:00</published><updated>2020-08-10T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/eduardo-three-years</id><content type="html" xml:base="http://flow.byu.edu/posts/eduardo-three-years"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:6689985497042944000" height="797" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry><entry><title type="html">FLOWUnsteady in Google Drive</title><link href="http://flow.byu.edu/posts/google-drive-vpm" rel="alternate" type="text/html" title="FLOWUnsteady in Google Drive" /><published>2020-08-02T00:00:00-06:00</published><updated>2020-08-02T00:00:00-06:00</updated><id>http://flow.byu.edu/posts/google-drive-vpm</id><content type="html" xml:base="http://flow.byu.edu/posts/google-drive-vpm"><![CDATA[<iframe src="https://www.linkedin.com/embed/feed/update/urn:li:share:6689003185174118400" height="1094" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe>]]></content><author><name>Eduardo Alvarez</name></author><summary type="html"><![CDATA[]]></summary></entry></feed>
52 changes: 45 additions & 7 deletions me275/schedule/hw7/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,30 +95,68 @@ <h1 id="hw-7">HW 7</h1>

<hr />

<p>These first two problems come from x.</p>
<p>These first two problems are based on problems in “Applied Numerical Methods with Python” by Steven Chapra and David Clough, the latter is based on problems in “Principles of Statistics for Engineers and Scientists” by William Navidi.</p>

<ol>
<li>
<p>A mass-spring-damper is a common mechanical system model, for example: vehicle suspension, a bridge, human body, aircraft landing gear, etc. In class, we considered a case with gravity (e.g., bungee jumper), but we now consider the simpler case without gravity (e.g., horizontal). Newton’s second law results in:</p>
<p>A mass-spring-damper is a common mechanical system model (e.g., vehicle suspension, a bridge, human body, aircraft landing gear). In class, we considered a case with gravity (e.g., bungee jumper), but we now consider the simpler case without gravity (e.g., horizontal). Newton’s second law results in:</p>

\[m\frac{dx^2}{dt^2} + b \frac{dx}{dt} + k x = 0\]

<p>where \(m\) is the mass, \(b\) is the damping coefficient, and $k\(is the spring constant. Let\)m = 20, k = 20\(and for\)b\(we will try three values: 5, 40, 200. Assume an initial displacement of 1 and an initial velocity of 0. Using a standard ODE solver, plot the results from\)t = 0$$ to 15, with all three cases on the same plot.</p>
<p>where \(m\) is the mass, \(b\) is the damping coefficient, and \(k\) is the spring constant. Let \(m = 20, k = 20\) and for the damping \(b\) we will try three values: 5, 40, 200. Assume an initial displacement of 1 and an initial velocity of 0. Using a standard ODE solver, plot the results from \(t = 0\) to 15, with all three cases on the same plot.</p>
</li>
<li>
<p>A simple model of an epidemic is:</p>

<p>\(\begin{align}
\[\begin{align}
\frac{dS}{dt} &amp;= - i S I\\
\frac{dI}{dt} &amp;= i S I - r I\\
\frac{dR}{dt} &amp;= r I\\
\end{align}\)
where \(S\) = susceptible individuals, \(I\) = infected individuals, \(R\) = recovered individuals, \(i\) = infection rate, \(r\) = recovery rate. A city has 10,000 people all of whom are susceptible.</p>
\end{align}\]

<p>(a) If a single infectious individual enters the city at t = 0, compute the progression of the epidemic until the number of infected individuals falls below 10. Use the following parameters: \(i\) = 0.0002 and \(r\) = 0.15. Plot S, I and R as a function of time, all on the same plot.</p>
<p>where \(S\) = susceptible individuals, \(I\) = infected individuals, \(R\) = recovered individuals, \(i\) = infection rate, \(r\) = recovery rate. A city has 10,000 people all of whom are susceptible.</p>

<p>(a) If a single infectious individual enters the city at t = 0, compute the progression of the epidemic until the number of infected individuals falls below 10. Use the following parameters: \(i\) = 0.002/7 (the 7 is to convert from infection rate per week to per day) and \(r\) = 0.15. Plot S, I and R as a function of time, all on the same plot.</p>

<p>(b) Suppose that, after recovery, there is a loss of immunity that causes recovered individuals once again to become susceptible. This reinfection mechanism can be modeled as \(\rho R\), where \(\rho\) is the return rate. To be specific this means you should add \(\rho R\) to the existing \(dS/dt\) term (increasing the number of people who susceptible) and you should subtract \(\rho R\) from the existing \(dR/dt\) term (decreasing by the same amount, the pool of recovered individuals). Repeat the computations/plot in (a) using \(\rho = 0.03\).</p>
</li>
<li>
<p>A sample of 100 cars driving on the freeway during a morning commute was drawn, and the number of occupants in each car was tabulated as follows:</p>

<table style="max-width: 500px;">
<tbody>
<tr>
<td>Occupants</td>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
</tr>
<tr>
<td>Number of cars</td>
<td>70</td>
<td>15</td>
<td>10</td>
<td>3</td>
<td>2</td>
</tr>
</tbody>
</table>

<p>a) compute the sample mean</p>

<p>b) compute the sample standard deviation</p>

<p>c) compute the median</p>

<p>d) compute the first and third quartiles (which means 25th percentile and 75th percentile respectively)</p>

<p>e) what proportion of cars had more than the mean number of occupants?</p>
</li>
</ol>


</div>

</body>
Expand Down
Loading

0 comments on commit e81f8ab

Please sign in to comment.