Monday, February 15, 2010

 

Help with HW 1



Q: So our orbit thing is not due on tuesday? A: Problem 2.15, the VPython problem, is due at the same time as the others, before 11:59 PM on Monday, February 15th.

Q: I know you specified in the directions not to use the Orbit code, but when asking about class on Tuesday I was told you said to modify the Orbit code with Comet Halley's data.
A: Please use the orbit.py example in VPython as the basis for your solution. Do NOT try to use the ORBIT Fortran code mentioned in the appendix of your textbook and found on the textbook publisher's website. It is far more difficult to get running on your machines.

Q: I have never taken a computer science class, and I have no idea on how to write code. 
A: Fortunately, since this isn't a computer science class, I'm not really expecting you to write the whole code for this. You simply need to do the following:
  1. Start with orbit.py code. 
  2. Change the masses to be appropriate for our Sun and Halley's comet. 
  3. Add a line to print out the time and distance between the Sun and Halley's comet. 
  4. Change the "while 1:" line to stop when the distance is 1 AU. Currently , since 1 is defined to be true all the time, the code runs forever. You need it to run only while the distance is greater than 1 AU. 
  5. Add comments to the code so I know what you were thinking at each line. Anything on a line after a # is a comment. 
Q: I have tried replacing the actual masses and radius's, but nothing shows up. 
A: Remember that I mentioned in class that if you use the actual radii, the Sun and the comet will be so small you won't be able to see them.

Q: I have no idea how to fix this. I have looked on the python website, but still have nothing. 
A: While the VPython site will tell you about how the functions work, for this particular problem, the only new function I'm expecting you to include is the "print" statement and it is very easy. Where students have typically had trouble in the past is converting units (for example, from AU to meters) or knowing what numbers to plug in. Most of the numbers were calculated in Problem 2.14.

Q: Will you be in your office at all tomorrow?
A: My schedule is pretty busy tomorrow. I'm covering Professor Moreau's classes tomorrow at 9:25 AM and at 12:15 PM and will be around a bit just before each of them if you have a question.  I am going to try to be around the office between 1:00 and 2:30 PM, as well, but can't guaranteed that today.  If we don't get a chance to meet and you need help with a particular problem, email me a phone number that you can be reached at and I'll try to call when I have a free moment to assist.

Q: In the third problem, I was wondering if it was necessary to change the coordinates from the J2000.0 date to another date. The problem does not necessarily specify it but I know you mentioned that we would need to know how to convert dates an I am not sure where that comes into play.
A: You do not need to convert dates for Problem 1.8. You would have needed to do that for Problem 1.7, but I ended up not assigning Problem 1.7.

Q: I have been looking to find relation between the period and the semi major axis. I have found relations but they typically involve a mass of the sun, and with the second portion of the question asking for an estimation of the sun's mass, I am a little confused.
A: For Problem 2.14 (a), you can use the simple, empirical version of one of Kepler's Laws to find the semimajor axis.  For Problem 2.14 (b), you will need the more physical version of one of Kepler's Laws. This problem is meant to be a simple one, so don't "overthink" it.

Comments: Post a Comment





<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]