Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Hamiltonian mechanics wikipedia , lookup
Analytical mechanics wikipedia , lookup
Newton's theorem of revolving orbits wikipedia , lookup
Classical central-force problem wikipedia , lookup
Center of mass wikipedia , lookup
N-body problem wikipedia , lookup
Relativistic mechanics wikipedia , lookup
Equations of motion wikipedia , lookup
Institute for Applied and Numerical Mathematics Prof. Dr. Tobias Jahnke • Dipl.-Biol. Michael Kreim Geometric Numerical Integration (c) Apply the Stömer-Verlet method to the outer solar system with h = 100 over a time period of 200.000 Earth days. Plot the orbits of all the planets. Examine the conservation of energy and compare with the results from part (a) by plotting the corresponding relative energy error in a separate figure. Assignment 3 Summer Semester 2014 18 The Outer Solar system th (d) Compute the total angular momentum, June, 2014 4 Points Simulate the motion of the outer planets (Jupiter, Saturn, Uranus, Neptune and Pluto) with the explicit Euler, symplectic Euler and Stömer-Verlet methods. This N -body problem can be formulated as a Hamiltonian system with N = 5 and N N X i−1 X 1 X 1 (i) T (i) mi mj H(p, q) = . p p −G (i) − q (j) || 2 i=1 mi ||q i=1 j=0 Above, q = (q (1) , . . . , q (N ) )T ∈ R3N and p = (p(1) , . . . , p(N ) )T ∈ R3N are composed of the vectors q (i) , p(i) = mi q̇ (i) ∈ R3 , which describe the positions and momenta of the i-th planet, with mi > 0 denoting its mass and velocity q̇ (i) . pTi B3 qi −pTi B2 qi , I(p, q) = pi × qi = i=1 i=1 pTi B1 qi 6 X 6 X where, 0 B1 = -1 0 1 0 0 0 0 , 0 0 B2 = 0 -1 planet Sun mass m0 = 1.00000597682 Jupiter m1 = 9.54786104043e − 4 G = 2.95912208286e − 4. Saturn m2 = 2.85583733151e − 4 Note that the Sun mass m0 takes into account also the mass of the inner planets and initial values for the Sun are q (0) (0) = (0, 0, 0)T and q̇ (0) (0) = (0, 0, 0)T . Uranus m3 = 4.37273164546e − 5 (a) Apply the explicit Euler method to the outer solar system with h = 10 over a time period of 200.000 Earth days. Plot the orbits of all the planets in R3 . Hint: take a look at the MATLAB function plot3‡ . Neptune m4 = 5.17759138449e − 5 ∗ Taken from Ernst Hairer, Christian Lubich, and Gerhard Wanner, Geometric numerical integration. Structure-preserving algorithms for ordinary differential equations. Second edition, Springer, 2006. † These values can be downloaded from the course homepage: http://www.math.kit.edu/ianm3/ lehre/geonumint2014s/. ‡ http://www.mathworks.de/de/help/matlab/ref/plot3.html 0 0 0 1 0 , 0 0 B3 = 0 0 0 0 -1 0 1 . 0 (e) Plot the angular momentum over time for the Symplectic Euler, Stömer-Verlet and the Explicit Euler methods. The initial data∗ is given in Table 1 and corresponds to September 5th, 1994 at 00:00h† . The masses are taken relative to the Sun, distances are in A.U. (astronomical units), time in Earth days and the gravitational constant is (b) Apply the symplectic Euler method to the outer solar system with h = 100 over a time period of 200.000 Earth days. Plot the orbits of all the planets. Examine the conservation of energy and compare with the results from part (a) by plotting the corresponding relative energy error in a separate figure. Pluto m5 = 1/(1.3 · 108 ) initial position 0 0 0 −3.5023653 −3.8169847 −1.5507963 9.0755314 −3.0458353 −1.6483708 8.3101420 −16.2901086 −7.2521278 11.4707666 −25.7294829 −10.8169456 −15.5387357 −25.2225594 −3.1902382 Table 1: Data for the outer solar system initial velocity 0 0 0 0.00565429 −0.00412490 −0.00190589 0.00168318 0.00483525 0.00192462 0.00354178 0.00137102 0.00055029 0.00288930 0.00114527 0.00039677 0.00276725 −0.00170702 −0.00136504 Discussion The N planets we have considered (plus the Sun) are moving in R3 with their mutual gravitational attraction as the only acting force. The equations of motion for q (i) , p(i) can be derived in the following way: • Newton’s second law of motion states that mi q̈ (i) is equal to the sum of the forces acting on the i-th celestial body. • Newton’s law of universal gravitation states that the magnitude of the force on a body of mass mi due to another body of mass mj is proportional to the product of the masses and inversely proportional to the distance between the bodies, i.e., Gmi mj /||q (j) − q (i) ||2 . • The direction of the force is along a unit vector from the i-th to j-th body, i.e., (q (j) − q (i) )/||q (i) − q (j) ||. • Combining everything yields the equations of motion mi q̈ (i) = N X j=0,i6=j Gmi mj (q (j) − q (i) ) . ||q (i) − q (j) ||3 • Defining p = (p(1) , . . . , p(N ) )T ∈ R3N , where p(i) = mi q̇ (i) is the momentum of the i-th point mass, leads to the Hamiltonian system q̇ (i) = p(i) ∂H = (i) , mi ∂p ṗ(i) = N X j=0,i6=j Gmi mj (q (j) − q (i) ) ∂H = − (i) , (i) (j) 3 ||q − q || ∂q which can be easily checked by computing ∂H/∂p(i) and −∂H/∂q (i) , respectively. explicit Euler, h = 10, time = 200000 (days) symplectic Euler, h = 100, time = 200000 (days) Jupiter Saturn Uranus Neptune Pluto 30 30 20 20 10 10 0 0 −10 −10 −20 −20 −30 30 Jupiter Saturn Uranus Neptune Pluto −30 30 20 20 10 20 0 0 −10 −20 −30 −20 10 20 0 0 −10 −20 −30 −20 The MATLAB programs can be solved in pairs or alone, and with the assistance of the tutor. The students should present their programs in the exercise class taking place on 16th July, 2014 at the latest.