In the previous question, we treated each satellite's location as fixed. In reality of course, with the exception of satellites in geo-stationary orbits, each satellite will move with respect to the receiving device on Earth. We remain in our simplified 2D problem and we want to evolve the orbital motion of a satellite in a polar orbit (i.e. going around a meridian with fixed longitude). To good approximation, the orbital dynamics are governed by the Earth's gravity a = " = FG M = GM 72 - r = =>>>> x" (t)=(t)|3 GMO (t) (4) where again we placed the origin of the coordinate system at the centre of the Earth. This is a second order system of ODEs, which we can reformulate as '(t) J'(t) = = v(t) GM® |x(t) 3 (t) (5) (6) The system of equations governing the orbital dynamics is thus given by these four first order ODEs [x' (t)] y' (t) Vx(t) vy(t) = GM v(t) [v₁₂ (t)] ax(t) (x(t)+(1)2)3/2(t) (a) Create a new file q4.cpp with a main() function. Copy the source files (7) (i) euler.cpp implementing Euler's method and rk4.cpp implementing the Runge-Kutta method RK4 to your current directory, to solve this system of ODEs. First implement the vector of functions on the right hand side (RHS) of Eq. (7). The initial value problem (IVP) is complete once we provide the inital data for the satellite's position = (x(t = 0), y(t = 0)) and velocity o = (v(t = 0), vy(t = 0)). Set these to the following values (innits of m and m/s respectively): x(t = 0) = 0.0, y(t = 0) = 26378100.0, v(t = 0) = 3887.3, vy(t = 0) = 0.0. (8) In the function main(), set up the initial conditions and call the ODE solver. Finally, add print statements to display the results. b) Compile the code and run it with Euler's method, to evolve the orbit for 10000 seconds, using N = 100 and print out the components of position and velocity to a data file. Plot the resulting coordinate data on the (x, y) plane using gnuplot or an alternative of your choice. Repeat the process using the RK4 integrator and plot the resulting orbit on top of the one obtained with Euler's method. Make a qualitative comparison between the two (zoom in if needed). (c) Repeat the process to evolve the orbit for a full day (86400 seconds), and print out the data of coordinates and velocities every 60 seconds. Again plot the results for the two ODE integration methods and compare. According to Newtonian dynamics, this should be a closed orbit, i.e. the satellite should return to its initial position and velocity after a full orbit. Are the results consistent with this expected property? d) To simplify the problem, we have neglected many secondary effects, among which is the gravitational pull of the Moon. Assume the Lunar position to be fixed at (xL, YL)=(384400000.0, 0.0) [m]. Add its gravitational effect as an additional -GMF term on the RHS of the ODE, replacing MML and ŕ(t) → (x(t) xL, y(t)-YL). Define the value of the lunar mass to ML = 7.342 x 1022 kg. Evolve the ODE for a full day using the RK4 method and plot the orbit as before. Quantify the difference. (e) Increase the initial velocity in steps of 10% and keep doing so, until your plot shows the satellite shooting beyond the Moon during its first orbit. Increase the total integration time to a few days when necessary. Note down the initial velocity and submit the plot of the orbit. (f) Bonus [5 marks]: Give a brief description of how you would modify the system of ODES to better represent the full dynamics of the Earth-Moon-Satellite system (still in 2D). Take into account that both the Moon and the Earth are moving under each other's gravitational pull. What would be the dimensionality of the problem, what would be the dynamical variables, what would you include in the RHS and how would you set up initial data? Since the Earth is wobbling around due to the Moon's gravitational pull, is there a better point to place the origin of the coordinate axes?
In the previous question, we treated each satellite's location as fixed. In reality of course, with the exception of satellites in geo-stationary orbits, each satellite will move with respect to the receiving device on Earth. We remain in our simplified 2D problem and we want to evolve the orbital motion of a satellite in a polar orbit (i.e. going around a meridian with fixed longitude). To good approximation, the orbital dynamics are governed by the Earth's gravity a = " = FG M = GM 72 - r = =>>>> x" (t)=(t)|3 GMO (t) (4) where again we placed the origin of the coordinate system at the centre of the Earth. This is a second order system of ODEs, which we can reformulate as '(t) J'(t) = = v(t) GM® |x(t) 3 (t) (5) (6) The system of equations governing the orbital dynamics is thus given by these four first order ODEs [x' (t)] y' (t) Vx(t) vy(t) = GM v(t) [v₁₂ (t)] ax(t) (x(t)+(1)2)3/2(t) (a) Create a new file q4.cpp with a main() function. Copy the source files (7) (i) euler.cpp implementing Euler's method and rk4.cpp implementing the Runge-Kutta method RK4 to your current directory, to solve this system of ODEs. First implement the vector of functions on the right hand side (RHS) of Eq. (7). The initial value problem (IVP) is complete once we provide the inital data for the satellite's position = (x(t = 0), y(t = 0)) and velocity o = (v(t = 0), vy(t = 0)). Set these to the following values (innits of m and m/s respectively): x(t = 0) = 0.0, y(t = 0) = 26378100.0, v(t = 0) = 3887.3, vy(t = 0) = 0.0. (8) In the function main(), set up the initial conditions and call the ODE solver. Finally, add print statements to display the results. b) Compile the code and run it with Euler's method, to evolve the orbit for 10000 seconds, using N = 100 and print out the components of position and velocity to a data file. Plot the resulting coordinate data on the (x, y) plane using gnuplot or an alternative of your choice. Repeat the process using the RK4 integrator and plot the resulting orbit on top of the one obtained with Euler's method. Make a qualitative comparison between the two (zoom in if needed). (c) Repeat the process to evolve the orbit for a full day (86400 seconds), and print out the data of coordinates and velocities every 60 seconds. Again plot the results for the two ODE integration methods and compare. According to Newtonian dynamics, this should be a closed orbit, i.e. the satellite should return to its initial position and velocity after a full orbit. Are the results consistent with this expected property? d) To simplify the problem, we have neglected many secondary effects, among which is the gravitational pull of the Moon. Assume the Lunar position to be fixed at (xL, YL)=(384400000.0, 0.0) [m]. Add its gravitational effect as an additional -GMF term on the RHS of the ODE, replacing MML and ŕ(t) → (x(t) xL, y(t)-YL). Define the value of the lunar mass to ML = 7.342 x 1022 kg. Evolve the ODE for a full day using the RK4 method and plot the orbit as before. Quantify the difference. (e) Increase the initial velocity in steps of 10% and keep doing so, until your plot shows the satellite shooting beyond the Moon during its first orbit. Increase the total integration time to a few days when necessary. Note down the initial velocity and submit the plot of the orbit. (f) Bonus [5 marks]: Give a brief description of how you would modify the system of ODES to better represent the full dynamics of the Earth-Moon-Satellite system (still in 2D). Take into account that both the Moon and the Earth are moving under each other's gravitational pull. What would be the dimensionality of the problem, what would be the dynamical variables, what would you include in the RHS and how would you set up initial data? Since the Earth is wobbling around due to the Moon's gravitational pull, is there a better point to place the origin of the coordinate axes?
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education