## Where communities thrive

• Join over 1.5M+ people
• Join over 100K+ communities
• Free without limits
##### Activity
• Nov 09 2020 13:10
labarba closed #217
• Nov 09 2020 12:27
Wajiha11 commented #217
• Nov 09 2020 12:27
Wajiha11 opened #217
• Dec 22 2019 20:45
mesnardo edited #216
• Dec 22 2019 20:44
mesnardo closed #216
• Dec 22 2019 20:44
mesnardo closed #215
• Dec 22 2019 20:44
mesnardo closed #213
• Dec 22 2019 20:44

mesnardo on master

Minor changes * [Module 2, Les… (compare)

• Dec 04 2019 01:43
mesnardo labeled #216
• Dec 04 2019 01:43
mesnardo opened #216
• Mar 12 2019 20:30
nightwolfer1 commented #174
• Mar 12 2019 19:32
labarba commented #174
• Mar 12 2019 18:33
nightwolfer1 commented #174
• Feb 21 2019 13:27
bknaepen synchronize #167
• Dec 09 2018 22:11
Chao8219 edited #214
• Dec 09 2018 22:09
Chao8219 synchronize #214
• Nov 27 2018 17:01
mesnardo opened #215
• Oct 03 2018 15:22
Chao8219 opened #214
• Oct 03 2018 00:03
Chao8219 opened #213
• Aug 30 2018 20:53

labarba on format

Sigurd Angenent
@SigurdAngenent

Messed up my previous post. Here's the missing explanation for the code. I think the algorithm in phugiod.py can be simplified. Currently phugoid.py advances the point (the plane) by computing the radius of curvature, and by rotating the point by an angle dtheta along the osculating circle. Instead of that you could also advance the point by a distance ds in the direction (cos(theta), sin(theta)). The difference between the two is of order (ds)^2, i.e. they are equally accurate. The simplification of the code consists in two parts

• you don't need the function rotate(...), so you can remove it from phugoid.py
• you change the "obtain the curve coordinates" block to what appeared in my previous post.

I tried it and managed to upload the modified phugoid.py to my forked numerical-moocs repo (yay! my first commit!)

devbisme
@devbisme
This is a small point and may have already been covered. In 01_02_Phugoid_Oscillation, cell #2, you set N = int(T/dt) followed by t = numpy.linspace(0.0, T, N). Don't you want to set N = int(T/dt)+1? As it is, the values in the t array have values like 0.010001, 0.020002, 0.030003 ....
Ian Hawke
@IanHawke
@devbisme I agree, that looks like a fencepost error. Do you want to submit a patch?
Lorena A. Barba
@labarba
Yes. I had noticed that, but had bigger worries! We should do linspace to N+1
N is the number of time steps you take, but the grid always needs an extra point for the edge.
t = numpy.linspace(0.0, T, N+1)
Ian Hawke
@IanHawke
Ah, yes, I would agree with @labarba 's convention here, as outlined above. Same should hold true for PDEs where it's usually N+2 etc for boundaries.
Lorena A. Barba
@labarba
Rather, it should define N like N = int(t/dt) + 1
Sigurd Angenent
@SigurdAngenent
what about numpy.arange(0.0, T+dt/2, dt)?
Lorena A. Barba
@labarba
Ah, but using arange instead of linspace is a challenge question in the lesson!
Sigurd Angenent
@SigurdAngenent
I'd better go and read those then :)
Lorena A. Barba
@labarba
Maybe I added it in a recent commit. Sync!
devbisme
@devbisme
Thanks for fixing the error. Like I said, it's a small thing especially compared to the edX problems you're dealing with. Nothing's worse than test flying a plane full of passengers.
Lorena A. Barba
@labarba
edX opened up the code more than a year ago, but they are a mess when it comes to managing their updates to the code. The whole problem arose from a mismatch between their code version on GitHub and the version of MongoDB that was current vs. being used in Open edX ... or something like that
scshepard
@scshepard
@devbisme Fencepost error? I'm not familiar with that...
Re: New site. I am able to sign on (my confirmation went to "spam"), but the course is sent for 2015. Many thanks for trying!
Yurlungur
@Yurlungur

In a local group discussion today, we found another correction to module 01_02. The Euler's method loop. Currently, the loop reads:

z[0]=z0
# time-loop using Euler's method
for n in range(N):
u = u + dt*numpy.array([u[1], g*(1-u[0]/zt)])
z[n] = u[0]

But this overwrites z[0] with non-initial data.

z[0]=z0
# time-loop using Euler's method
for n in range(1,N):
u = u + dt*numpy.array([u[1], g*(1-u[0]/zt)])
z[n] = u[0]

I will create another pull request. Thanks for all your hard work!

Lorena A. Barba
@labarba
New instance of Open edX is live !!!
Sigurd Angenent
@SigurdAngenent
where can I find it? the GW front page still leads me to the old pages
Ian Hawke
@IanHawke
Logging in to the "old" site worked and I managed to reply to a post on the forum.
Lorena A. Barba
@labarba
@SigurdAngenent The new instance replaced the old one: hot swap!!
Yurlungur
@Yurlungur
I am able to log on, post in the discussion forum, view the post index and delete posts.
Sigurd Angenent
@SigurdAngenent
OK, I get it: the new is indistinguishable from the old, except the discussion forum works. I managed to post a comment with github markup, which I just learned in this course. The comment was a bit long and I think the text got mashed up a bit (random permutation of paragraphs, I don't think I did that.)
Also, I made a drawing (png) for myself of the forces in the first notebook and tried to post it in my comment. This led to an "upload error".
Lorena A. Barba
@labarba
EVERYTHING WORKS (so far)
Lorena A. Barba
@labarba
@ReblochonMasque Will we have you back in the Discussion forum?
Lorena A. Barba
@labarba
I"m still checking the chat room a few times a day, to see if anyone is here ...
Check out our new IPython Notebook!!
Hal Snyder
@DrXyzzy
Will do. BTW I added a README-sagews.md to the assignment-bank pull request (transcription to symbolic differentiation is still partial).
mayankchetan
@mayankchetan
i'm new to github, and my fork isn't getting updated with the new iPython notebooks, could someone please help me with this?

looked up a video online that said to "pull request" but that didn't quite work

would really appreciate the help

Hal Snyder
@DrXyzzy
See github docs Keep your fork synced, and the second part, Syncing a fork. That updates a local copy. Then push that up to your github fork as noted at bottom of second linked page.
Lorena A. Barba
@labarba
Thanks @DrXyzzy !
@mayankchetan Have patience and perseverance -- GitHub does have a learning curve, but you'll be a happy camper afterwards and glad that you stuck through it.
Awaiz Muakdam
@DrXyzzy thanks for those links.. now I think my local machine is ready for #numericalmooc
Awaiz Muakdam
I setup the numerical-mooc/numerical-mooc repo as my upstream, my awaizmukadam/numerical-mooc as origin and ran git fetch
does GitHub automatically update my fork with the course's repo ?
Hal Snyder
@DrXyzzy
@awaizmukadam No, you have to repeat the steps in Syncing a fork manually to update your local copy and your fork on github. You decide when to merge the upstream repo with your ongoing work. I am doing this with a fork of numerical-mooc/assignment-bank.
Lorena A. Barba
@labarba
@awaizmukadam You have control over if and when you sync. GitHub facilitates collaboration, but it cannot read your mind! :-)
mayankchetan
@mayankchetan
Thank you @DrXyzzy got it :D
Hal Snyder
@DrXyzzy
Cool, I see assignment-bank pull request in right status bar. Progress is slow with symbolic computing transcription, but I think I'm learning.
Lorena A. Barba
@labarba
Hi, everyone --- the GW course has a class meeting tonight at 6:10–8:45 PM EDT and I plan to have this chatroom open during class for live Q&A. You are welcome to join us.
lfgmarcantoni
@lfgmarcantoni

Hi, I have a little question about the third question of module 1 (Array trigonometry), according to my calculations the answer is:

In [23]: p
Out[23]: 7

In [24]: r
Out[24]: array([ 11.2, 4.7, 6.6])

In [25]: numpy.power((numpy.sin(p/r)),3)
Out[25]: array([ 0.20030151, 0.99009101, 0.66454238])

ans: 0.9900
Is there something wrong? Because I can't check the answer. Thanks in advance...

Ian Hawke
@IanHawke
@lfgmarcantoni You'll want to round to 4dp, not truncate to 4dp, in order to match the solution.
Hal Snyder
@DrXyzzy
Gitter.im with KaTex: 1/R=sinθdzdθ
Use  before and after expression.
Lorena A. Barba
@labarba
Nice!!
Lorena A. Barba
@labarba
@DrXyzzy I'm about to announce the "Assignment Bank" broadly and invite contributions. Yours is the first pull request, but it looks like you need to finish it. Go on now!
Hal Snyder
@DrXyzzy
Thanks. There is a second pull request that has been pending for 15 days. It's not finished either, but uses symbolic derivatives instead of infitesimals.