Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewning committed Sep 13, 2024
1 parent 4597c5a commit 31fe9d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 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-09-12T22:30:03-06:00</updated>
<updated>2024-09-12T22:31:23-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.2.2">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-09-12T22:30:03-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.2.2">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-09-12T22:31:23-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>
15 changes: 5 additions & 10 deletions me275/schedule/hw2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,20 +113,15 @@ <h1 id="hw-2">HW 2</h1>
\[\pi = 4 \sum_{k = 0}^\infty \frac{(-1)^k}{2k + 1}\]

<p>Because we cannot use an infinite number of terms, the resulting error is called truncation error (note that this is different than roundoff error as it would still exist even if we were able to use exact precision numbers with no rounding). Create a Python script that uses a loop to estimate \(\pi\) using the above formula for \(n = 0, 1, 2, \ldots, 20\) terms. For each value of \(n\), compute the relative percent error. Plot the truncation percent error on the y-axis.</p>
</li>
</ol>

<!-- 1. Iterative algorithms are extremely common in engineering problems. We'll first try a basic iterative algorithm, for which you know the answer, so that you can easily check your answers. The following algorithm is an old way to compute the square root of any positive number $$x$$:

$$
s_{i+1} = \frac{1}{2}\left(s_i + \frac{x}{s_i} \right)
$$
<p>&lt;!– 1. Iterative algorithms are extremely common in engineering problems. We’ll first try a basic iterative algorithm, for which you know the answer, so that you can easily check your answers. The following algorithm is an old way to compute the square root of any positive number \(x\):</p>

The value $$s_i$$ is the current estimate for the square root of $$x$$ and $$s_{i+1}$$ is an updated estimate (from which we can repeat the process again and again). Side note: this method where we update the new estimate from an explicit function of the current estimate ($$s_{i+1} = f(s_i)$$) is called *fixed-point iteration*.
\[s_{i+1} = \frac{1}{2}\left(s_i + \frac{x}{s_i} \right)\]

To implement this algorithm, it is perhaps easiest to start with a for loop for some fixed number of iterations. We won't know how many iterations are needed to converge beforehand, but we can experiment. If that seems to be working well, then replace the for loop with a better version: a while loop that stops once the relative error drops below $$10^{-6}$$. In computing the relative error we don't actually know the exact answer to compare to, which is a common scenario, so we use the new estimate as the "true answer" and compare to the prior value. -->
<p>The value \(s_i\) is the current estimate for the square root of \(x\) and \(s_{i+1}\) is an updated estimate (from which we can repeat the process again and again). Side note: this method where we update the new estimate from an explicit function of the current estimate (\(s_{i+1} = f(s_i)\)) is called <em>fixed-point iteration</em>.</p>

<ol>
<p>To implement this algorithm, it is perhaps easiest to start with a for loop for some fixed number of iterations. We won’t know how many iterations are needed to converge beforehand, but we can experiment. If that seems to be working well, then replace the for loop with a better version: a while loop that stops once the relative error drops below \(10^{-6}\). In computing the relative error we don’t actually know the exact answer to compare to, which is a common scenario, so we use the new estimate as the “true answer” and compare to the prior value. –&gt;</p>
</li>
<li>
<p>The equations for projectile motion in two-dimensions (neglecting air resistance) are:</p>

Expand Down

0 comments on commit 31fe9d1

Please sign in to comment.