Introduction to numerical projects

Similar documents
A = 6561 times greater. B. 81 times greater. C. equally strong. D. 1/81 as great. E. (1/81) 2 = 1/6561 as great.

The Hidden Lives of Galaxies. Jim Lochner, USRA & NASA/GSFC

Name: Earth 110 Exploration of the Solar System Assignment 1: Celestial Motions and Forces Due in class Tuesday, Jan. 20, 2015

USING MS EXCEL FOR DATA ANALYSIS AND SIMULATION

The Two-Body Problem

Lecture 13. Gravity in the Solar System

From Aristotle to Newton

EDMONDS COMMUNITY COLLEGE ASTRONOMY 100 Winter Quarter 2007 Sample Test # 1

Notes: Most of the material in this chapter is taken from Young and Freedman, Chap. 13.

Planetary Orbit Simulator Student Guide

DIRECT ORBITAL DYNAMICS: USING INDEPENDENT ORBITAL TERMS TO TREAT BODIES AS ORBITING EACH OTHER DIRECTLY WHILE IN MOTION

Angular Velocity vs. Linear Velocity

Correct Modeling of the Indirect Term for Third-Body Perturbations

The University of Texas at Austin. Gravity and Orbits

The following questions refer to Chapter 19, (PAGES IN YOUR MANUAL, 7 th ed.)

Gravitation and Newton s Synthesis

Solar System. 1. The diagram below represents a simple geocentric model. Which object is represented by the letter X?

astronomy A planet was viewed from Earth for several hours. The diagrams below represent the appearance of the planet at four different times.

Astronomy 110 Homework #04 Assigned: 02/06/2007 Due: 02/13/2007. Name:

Use the following information to deduce that the gravitational field strength at the surface of the Earth is approximately 10 N kg 1.

Orbital Dynamics with Maple (sll --- v1.0, February 2012)

Barycenter of Solar System Earth-Moon barycenter? Moon orbits what?

Orbital Mechanics. Angular Momentum

Extra-solar massive planets with small semi-major axes?

Lecture L17 - Orbit Transfers and Interplanetary Trajectories

Lecture 19: Planet Formation I. Clues from the Solar System

Newton s Law of Gravity

Lab 6: Kepler's Laws. Introduction. Section 1: First Law

AP Environmental Science Graph Prep

Solar System Fundamentals. What is a Planet? Planetary orbits Planetary temperatures Planetary Atmospheres Origin of the Solar System

Introduction to Netlogo: A Newton s Law of Gravity Simulation

Class 2 Solar System Characteristics Formation Exosolar Planets

Name Class Date. true

Scaling the Solar System

Planets and Dwarf Planets by Shauna Hutton

This paper is also taken for the relevant Examination for the Associateship. For Second Year Physics Students Wednesday, 4th June 2008: 14:00 to 16:00

Chapter 25.1: Models of our Solar System

Geol 116 The Planet Class 7-1 Feb 28, Exercise 1, Calculate the escape velocities of the nine planets in the solar system

Astrodynamics (AERO0024)

Please be sure to save a copy of this activity to your computer!

Q3.2.a The gravitational force exerted by a planet on one of its moons is 3e23 newtons when the moon is at a particular location.

Related Standards and Background Information

Section 4: The Basics of Satellite Orbits

UNIT V. Earth and Space. Earth and the Solar System

Lesson 3 Understanding Distance in Space (optional)

Name: Date: Period: Gravity Study Guide

Halliday, Resnick & Walker Chapter 13. Gravitation. Physics 1A PHYS1121 Professor Michael Burton

Introduction to the Solar System

Exercise: Estimating the Mass of Jupiter Difficulty: Medium

Halliday, Resnick & Walker Chapter 13. Gravitation. Physics 1A PHYS1121 Professor Michael Burton

Chapter 5: Circular Motion, the Planets, and Gravity

Let s first see how precession works in quantitative detail. The system is illustrated below: ...

Binary Stars. Kepler s Laws of Orbital Motion

Newton s Law of Universal Gravitation

Journey to other celestial objects. learning outcomes

Grade 6 Standard 3 Unit Test A Astronomy. 1. The four inner planets are rocky and small. Which description best fits the next four outer planets?

Planets beyond the solar system

Unit 8 Lesson 2 Gravity and the Solar System

Name Class Period. F = G m 1 m 2 d 2. G =6.67 x Nm 2 /kg 2

The orbit of Halley s Comet

Orbital Dynamics: Formulary

Astronomy 1140 Quiz 1 Review

Orbits of the Lennard-Jones Potential

Dynamics of Celestial Bodies, PLANETARY PERTURBATIONS ON THE ROTATION OF MERCURY

Exam # 1 Thu 10/06/2010 Astronomy 100/190Y Exploring the Universe Fall 11 Instructor: Daniela Calzetti

Background Information

Once in a Blue Moon (Number Systems and Number Theory)

Penn State University Physics 211 ORBITAL MECHANICS 1

G U I D E T O A P P L I E D O R B I T A L M E C H A N I C S F O R K E R B A L S P A C E P R O G R A M

Reasons for Seasons. Question: TRUE OR FALSE. Question: TRUE OR FALSE? What causes the seasons? What causes the seasons?

Earth in the Solar System

Math 1302, Week 3 Polar coordinates and orbital motion

2. Orbits. FER-Zagreb, Satellite communication systems 2011/12

Chapter 6. Work and Energy

How To Understand The Theory Of Gravity

The Sun. Solar radiation (Sun Earth-Relationships) The Sun. The Sun. Our Sun

Physics Midterm Review Packet January 2010

Newton s Law of Gravitation

The Gravitational Field

circular motion & gravitation physics 111N

Chapter 6 Formation of Planetary Systems Our Solar System and Beyond

Gravity. in the Solar System. Beyond the Book. FOCUS Book

Section 1 Gravity: A Force of Attraction

Physics 53. Gravity. Nature and Nature's law lay hid in night: God said, "Let Newton be!" and all was light. Alexander Pope

APPLIED MATHEMATICS ADVANCED LEVEL

Data Provided: A formula sheet and table of physical constants is attached to this paper. DARK MATTER AND THE UNIVERSE

NOTES: GEORGIA HIGH SCHOOL SCIENCE TEST THE SOLAR SYSTEM

Problem Set #13 Solutions

Newton s derivation of Kepler s laws (outline)

Orbital Mechanics and Space Geometry

Sample Questions for the AP Physics 1 Exam

Mechanics 1: Conservation of Energy and Momentum

= = GM. v 1 = Ωa 1 sin i.

Center of Gravity. We touched on this briefly in chapter 7! x 2

Coordinate Systems. Orbits and Rotation

Name Partners Date. Energy Diagrams I

The Moon. Nicola Loaring, SAAO

1. Title: Relative Sizes and Distance in the Solar System: Introducing Powers of Ten

Study Guide due Friday, 1/29

From local to global relativity

Transcription:

Introduction to numerical projects Here follows a brief recipe and recommendation on how to write a report for each project. Give a short description of the nature of the problem and the eventual numerical methods you have used. Describe the algorithm you have used and/or developed. Here you may find it convenient to use pseudocoding. In many cases you can describe the algorithm in the program itself. Include the source code of your program. Comment your program properly. If possible try to find analytic solutions or known limits in order to test your program when developing the code. Include your results either in figure form or in a table. Remember to label your results. All tables and figures should have relevant captions and labels on the axes. Try to evaluate the reliabilty and numerical stability/precision of your results. If possible include a qualitative and/or quantitative discussion of the numerical stability eventual loss of precision etc. Try to give an interpretation of you results in your answers to the problems. Critique: if possible include your comments and reflections about the exercise whether you felt you learnt something ideas for improvements and other thoughts you ve made when solving the exercise. We wish to keep this course at the interactive level and your comments can help us improve it. Try to establish a practice where you log your work at the computerlab. You may find such a logbook very handy at later stages in your work especially when you don t properly remember what a previous test version of your program did. Here you could also record the time spent on solving the exercise various algorithms you may have tested or other topics which you feel worthy of mentioning. Format for electronic delivery of report and programs The preferred format for the report is a PDF file. You can also use DOC or postscript formats. As programming language we prefer that you choose between C/C++ Fortran2008 or Python. The following prescription should be followed when preparing the report: Use Devilry to hand in your projects log in at http://devilry.ifi.uio.no with your normal UiO username and password and choose either fys3150 or fys4150. There you can load up the files within the deadline. 1

Upload only the report file! For the source code file(s) you have developed please provide us with your link to your github domain. The report file should include all of your discussions and a list of the codes you have developed. Do not include library files which are available at the course homepage unless you have made specific changes to them. Comments from us on your projects approval or not corrections to be made etc can be found under your Devilry domain and are only visible to you and the teachers of the course. Finally we encourage you to work two and two together. Optimal working groups consist of 2-3 students. You can then hand in a common report. Project 3 building a model for the solar system deadline October 28 (noon) The aim of this project is to develop a code for simulating the solar system. In the first part however we will limit ourselves (in order to test our Runge-Kutta solver) to a hypothetical solar system with one planet say Earth which orbits around the Sun. The only force in the problem is gravity. Newton s law of gravitation is given by a force F G F G = GM sunm Earth r 2 where M sun is the mass of the Sun and M Earth is the mass of Earth. The gravitational constant is G and r is the distance between Earth and the Sun. We assume that the sun has a mass which is much larger than that of Earth. We can therefore safely neglect the motion of the sun in this problem. In the first part of this project your aim is to compute the motion of the Earth using different methods for solving ordinary differential equations. We assume that the orbit of Earth around the Sun is co-planar and we take this to be the xy-plane. Using Newton s second law of motion we get the following equations and d 2 x dt 2 = F Gx M Earth d 2 y dt 2 = F Gy M Earth where F Gx and F Gy are the x and y components of the gravitational force. a) Rewrite the above second-order ordinary differential equations as a set of coupled first order differential equations. Write also these equations in terms of dimensionless variables. As an alternative to the usage of dimensionless variables you could also use so-called astronomical units (AU as abbreviation). If you choose the latter set 2

of units one astronomical unit of length known as 1 AU is the average distance between the Sun and Earth that is 1 AU = 1.5 10 11 m. It can also be convenient to use years instead of seconds since years match better the solar system. The mass of the Sun is M sun = M = 2 10 30 kg. The mass of Earth is M Earth = 6 10 24 kg. The mass of other planets like Jupiter is M Jupiter = 1.9 10 27 kg and its distance to the Sun is 5.20 AU. Similar numbers for Mars are M Mars = 6.6 10 23 kg and 1.52 AU for Venus M Venus = 4.9 10 24 kg and 0.72 AU for Saturn are M Saturn = 5.5 10 26 kg and 9.54 AU for Mercury are M Mercury = 2.4 10 23 kg and 0.39 AU for Uranus are M Uranus = 8.8 10 25 kg and 19.19 AU for Neptun are M Neptun = 1.03 10 26 kg and 30.06 AU and for Pluto are M Pluto = 1.31 10 22 kg and 39.53 AU. Pluto is no longer considered a planet but we add it here for historical reasons. Finally mass units can be obtained by using the fact that Earth s orbit is almost circular around the Sun. For circular motion we know that the force must obey the following relation F G = M Earthv 2 = GM M Earth r r 2 where v is the velocity of Earth. The latter equation can be used to show that v 2 r = GM = 4π 2 AU 3 /yr 2. Discretize the above differential equations and set up an algorithm for solving these equations using the so-called Runge-Kutta 4 (RK4 hereafter) method discussed in the lecture notes chapter 8. b) Write then a program which solves the above differential equations for the Earth-Sun system using the RK4 method. Your code should now be object-oriented. Try to figure out which parts and operations could be written as classes and generalized (hint: one possibility is to write a class which returns the distance between the various objects. Or you could write a planet class which contains relevant data about different planets). Your task here is to think of the program flow and figure out which parts can be abstracted and reused for many types of operations. c) Find out which initial value for the velocity that gives a circular orbit and test the stability of your algorithm as function of different time steps t. Make a plot of the results you obtain for the position of Earth (plot the x and y values) orbiting the Sun. Check also for the case of a circular orbit that both the kinetic and the potential energies are constants. Check also that the angular momentum is a constant. Explain why these quantities are conserved. d) Consider then a planet which begins at a distance of 1 AU from the sun. Find out by trial and error what the initial velocity must be in order for the planet to escape from the sun. Can you find an exact answer? 3

e) We will now study the three-body problem still with the Sun kept fixed at the center but including Jupiter (the most massive planet in the solar system having a mass that is approximately 1000 times smaller than that of the Sun) together with Earth. This leads us to a three-body problem. Without Jupiter Earth s motion is stable and unchanging with time. The aim here is to find out how much Jupiter alters Earth s motion. The program you have developed can easily be modified by simply adding the magnitude of the force betweem Earth and Jupiter. This force is given again by F Earth Jupiter = GM JupiterM Earth rearth Jupiter 2 where M Jupiter is the mass of the sun and M Earth is the mass of Earth. The gravitational constant is G and r Earth Jupiter is the distance between Earth and Jupiter. We assume again that the orbits of the two planets are co-planar and we take this to be the xy-plane. Modify your first-order differential equations in order to accomodate both the motion of Earth and Jupiter by taking into account the distance in x and y between Earth and Jupiter. Set up the algorithm and plot the positions of Earth and Jupiter using the fourth-order Runge-Kutta method. Discuss the stability of the solutions using your RK4 solver. Repeat the calculations by increasing the mass of Jupiter by a factor of 10 and 1000 and plot the position of Earth. Study again the stability of the RK4 solver. f) Finally using our RK4 solver we carry out a real three-body calculation where all three systems Earth Jupiter and the Sun are in motion. To do this choose the center-of-mass position of the three-body system as the origin rather than the position of the sun. Give the sun an initial velocity which makes the total momentum of the system exactly zero (the center-of-mass will remain fixed). Compare these results with those from the previous exercise and comment your results. Extend your program to include all planets in the solar system (if you have time you can also include the various moons but it is not required) and discuss your results. Try to find data for the initial positions and velocities for all planets. g) The perihelion precession of Mercury. This part is optional (frivillig)! An important test of the general theory of relativity was to compare its prediction for the perihelion precession of Mercury to the observed value. The observed value of the perihelion precession when all classical effects (such as the perturbation of the orbit due to gravitational attraction from the other planets) are subtracted is 43 (43 arc seconds) per century. Closed elliptical orbits are a special feature of the Newtonian 1/r 2 force. In general any correction to the pure 1/r 2 behaviour will lead to an orbit which is not closed 4

i.e. after one complete orbit around the Sun the planet will not be at exactly the same position as it started. If the correction is small then each orbit around the Sun will be almost the same as the classical ellipse and the orbit can be thought of as an ellipse whose orientation in space slowly rotates. In other words the perihelion of the ellipse slowly precesses around the Sun. You will now study the orbit of Mercury around the Sun adding a general relativistic correction to the Newtonian gravitational force so that the force becomes F G = GM ] SunM Mercury [1 + 3l2 r 2 r 2 c 2 where M Mercury is the mass of Mercury r is the distance between Mercury and the Sun l = r v is the magnitude of Mercury s orbital angular momentum per unit mass and c is the speed of light in vacuum. Run a simulation over one century of Mercury s orbit around the Sun with no other planets present starting with Mercury at perihelion on the x axis. Check then the value of the perihelion angle θ p using tan θ p = y p x p where x p (y p ) is the x (y) position of Mercury at perihelion i.e. at the point where Mercury is at its closest to the Sun. You may use that the speed of Mercury at perihelion is 12.44 AU/yr and that the distance to the Sun at perihelion is 0.3075 AU. You need to make sure that the time resolution used in your simulation is sufficient for example by checking that the perihelion precession you get with a pure Newtonian force is at least a few orders of magnitude smaller than the observed perihelion precession of Mercury. Can the observed perihelion precession of Mercury be explained by the general theory of relativity? 5