New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here


by: Devin Gottlieb


Marketplace > University of Pittsburgh > Physics 2 > PHYS0475 > INTROPHYSSCIENCE ENGRG1RECITATION
Devin Gottlieb
GPA 3.97


Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Class Notes
25 ?




Popular in Course

Popular in Physics 2

This 4 page Class Notes was uploaded by Devin Gottlieb on Monday October 26, 2015. The Class Notes belongs to PHYS0475 at University of Pittsburgh taught by Staff in Fall. Since its upload, it has received 50 views. For similar materials see /class/229421/phys0475-university-of-pittsburgh in Physics 2 at University of Pittsburgh.




Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 10/26/15
The Earth s orbit and an exoplanetary orbit You may nd it use ll to refer to your fan cart program for the basic structure ofyour new program but it is simpler and clearer to start a new program rather than trying to modify the fan cart program The main difference is that the net force on the fan cart was constant but the gravitational force can vary in both magnitude and direction at different locations 1 Creating the objects Actual data for the Sun and Earth may be found on the inside back cover ofthe textbook We ll make the radii ofthe Earth and Sun much bigger than they really are in order to be able to see them in the vast reaches ofspace Place the Earth at its normal distance from the Sun to the right ofthe Sun along the x axis from visual import Sun sphereposvector000 radiuslelO colorcoloryellow Earth sphereposvector1Sell00 radiusSe9 colorcolorcyan sceneautoscale 0 What is that last statement Normally VPython automatically zooms out ifthe scene gets bigger and zooms in if the scene gets smaller so that you can always see the entire scene The statement sceneautoscale 0 says turn offautoscaling for this scene Having autoscaling offmakes it easier to view some ofthe orbits you are going to display Run the program to see the Sun and Earth 2 Giving the objects physical attributes In addition to geometrical attributes such as pos and radius you can give objects physical attributes such as mass Give the Sun and Earth the correct masses see inside back cover oftextbook Also de ne the gravitational constant G G Sun m Earthm 3 Specifying initial conditions You ve already speci ed the initial positions ofthe Sun and Earth You also need to specify their initial momenta Because it has such huge mass we will assume the Sun hardly moves and its velocity is initially zero actually it is dri ing through space Suppose the Earth is initially headed in the ydirection with speed 2e4 ms Specify the initial momenta as vectors Also create a curve object to use to show the trajectory Earthtrail curvecolorEarthcolor Also choose a value for At the time interval you will use in updating momentum and position The criteria are that At should be small enough that neither the force nor the velocity are changing very much so that the updates are accurate yet At should be big enough that you re not waiting forever for the computer to calculate a huge number ofupdates Think about what you know about how long it takes the Earth to make a complete circular orbit ofthe Sun and the criteriajust mentioned and choose a reasonable value for At Also set a clock time to 0 to be able to time how long an orbit takes deltat t 4 The while loop Again thinking about what you know about how long it takes the Earth to go around the Sun choose a suitable stopping time for your While loop While t lt Inside your while loop you need to do the following Calculate the gravitational force acting on the Earth Update the momentum ofthe Earth Update the position ofthe Earth Append positions to the curve object to leave atrail EarthtrailappendposEarthpos Update the time t In your calculations use the position ofthe Sun in the form Sunpos rather than assuming it is always at the origin This will make it easier to write a binary star prograrnlater when both stars will move Run the program Ifit runs too fast slow it down by using a rate statement such as rate300 Ifit runs too slowly increase At Adjust the stopping time so that the Earth makes several complete orbits 5 Accuracy Ifyou use a very large At the calculation is inaccurate because during that large time interval the force changes a lot making the momentum update inaccurate and the momentum changes a lot making the position update inaccurate On the other hand ifyou use a very small Atfor high accuracy the program runs very slowly In computational science there is a tradeoifbetween accuracy and speed How can you tell whether an orbit is accurate There s a simple test Make Atsmaller and see whether the motion changes That is see whether the orbit changes shape Obviously the program will run more slowly Experiment with your value for At to nd a good compromise between accuracy and speed Cut the step size At and see whether the motion changes or not Let the Earth go around the Sun ve times in this test To see the effects ofAt being too large increase At until the motion is different than it is with small At In your notes record the approximate biggest value ofAt you can use and still get accurate motion in ve trips around the Sun You will be asked for this value when you turn in your program Your instructor will ask you to demonstrate an accurate orbit and a deliberately inaccurate orbit CHECKPOINT 1 Make sure your program does the same thing as the others at your table 6 Visualizing the momentum vector with an arrow Next you will visualize the Earth s momentum by creating an arrow before the while loop and updating it inside the loop You need to know the approximate magnitude ofthe momentum in order to be able to scale the arrow to t into the scene so inside the loop print the momentum vector print p Earthp As an example suppose the magnitude ofthe momentum were about le3 lkg39ms and you want to scale down to lel l In What would you need as amomentum scale factor pscale in this case You would need a factor pscale that is approximately lel lle3 I so that ifyou multiply pscale times amomentum whose magnitude is about le3l kg39ms you get a length ofabout le3 l lel lle3l lel l Or suppose that the magnitude ofthe momentum were 100 kg39ms then you would need pscale to be about lel llOO so that ifyou multiply pscale times amomenturn whose magnitude is about 100 kg39ms you get alength ofabout100lell100lell Take a look at your print statement to see what is your speci c case in order to decide on the necessary scale factor for momentum Before the while loop insert these statements pscale parr arrowcolorcolorred The last statement creates an arrow object with default position and axis attributes You will set these attributes inside the loop Comment out your print statement which slows down orbit plotting Inside your loop update the pos attribute ofthe parr arrow object to be on the Earth and update its axis attribute to represent the current vector value ofthe momentum ofthe Earth multipled by pscale Run the program Use a rate statement or a small time interval At to slow the orbit enough to be able to see clearly the behavior ofthe momentum vector You may have to adjust the scale factor once you have seen the full orbit Questions your instructor will ask you at the next checkpoint For this elliptical orbit what is the direction ofthe momentumvector Tangential Radial Something else What happens to the momentum as it approaches the Sun As it moves away from the Sun Why You should be able to explain this qualitatively in terms ofthe momentum principle 7 Visualizing the force vector with an arrow Using the same ideas you used to display the momentum as an arrow display an arrow representing the force acting on the Earth Display the force acting on the Earth as an arrow with its tail always on the Earth Questions your instructor will ask you at the next checkpoint For this elliptical orbit is the force vector always perpendicular to the momentum vector When is the gravitational force large Small 8 Other orbits Change the initial speed ofthe Earth to 35e4 ms and see what kind of orbit you get You will have to zoom out to see the whole orbit since autoscaling is turned off 9 Circular orbits Set the initial conditions so as to get a circular orbit of our Earth around our Sun to check that the program is working properly Note that the initial speed ofthe Earth can be calculated from the distance it goes around the Sun in one year Give this initial speed to the Earth and see whether you get a circular orbit Change your loop to stop when t is the number ofseconds in ayear and see whether in fact the Earth now takes one year to make one circular orbit Re ection What kind oforbit do you get ifthe initial speed is too slow for a circular orbit Too fast CHECKPOINT 2 Make sure everyone at your table has similar output 10 Extrasolar planetary system Over the past decade or so scientists have discovered about 200 planets orbiting about far distant stars You will simulate this situation and perhaps begin to understand how these planets can be detected even when they are too distant to be seen from Earth Change the mass ofthe Earth to be halfthe mass of our Sun Give the Earth the initial velocity that our actual Earth has and give the Sun an initial momentum Sump vector000 Before the loop create a curve object for the Sun Suntrail curvecolorSuncolor Turn autoscaling back on by commenting out the statement sceneautoscale 0 Inside your loop comment out the arrow update statements Inside your loop update the Sun s momentum and position and update its trail To update the Sun s momentum think carefully before doing lots more calculations they aren t neede Run the program What do you see Ifyou don t have complete orbits increase the time in your while statement Experiment with other initial momenta for the Sun and Earth In particular try this give the Sun an initial momentum that is equal in magnitude but opposite in direction to the initial momentum ofthe Earth What is special about the orbit you observe What is the total initial momentum What does the momentum principle predict for the total momentum later Explain CHECKPOINT 3 Make sure thewhole table agrees on the output 11 Playing around What happens ifyou aim the objects straight away from each other With large or small initial speeds What happens ifyou aim the objects straight toward each other When the objects get very close the force changes rapidly with distance so the calculations become increasingly inaccurate and the whole thing may seem to blow up which is not what would actually happen Our Sun is not actually stationary but is moving in a giant orbit around the center of our Milky Way galaxy and the galaxy is moving toward the Andromeda galaxy Restore the Earth s mass to its actual mass and give it an initial velocity lt 0 0 2e4 gtms Give the Sun an initial velocity lt7100 1000 0 gtms Watch as the Earth orbits the moving Sun What is the shape ofthe Earth s curve You might like to add a third star to your binary star and see what wild kinds of orbits you can achieve The orbits for a binary star can only be straight lines circles ellipses parabolas or hyperbolas But with three bodies orbiting each other the orbits can be very diverse and very complicated Except for some very special cases very specially chosen initial conditions the threebody problem has been shown to have no analytical solution that is there is no math function that gives the form ofthe orbits but it is easy to instruct a computer to carry out a numerical solution as you did for the binary star A caution Update all the momenta BEFORE updating all the positions Otherwise the calculations ofgravitational forces would mix positions corresponding to different times You might like to model the SunEarthMoon system or the Solar System A practical di iculty with visualizing the SunEarthMoon systemis that the EarthMoon systemis very small compared to the great distance to the Sun so it s just hard to see the details ofthe Moon s motion


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Janice Dongeun University of Washington

"I used the money I made selling my notes & study guides to pay for spring break in Olympia, Washington...which was Sweet!"

Steve Martinelli UC Los Angeles

"There's no way I would have passed my Organic Chemistry class this semester without the notes and study guides I got from StudySoup."

Parker Thompson 500 Startups

"It's a great way for students to improve their educational experience and it seemed like a product that everybody wants, so all the people participating are winning."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.