AstroGrav iconAstroGrav Help /Tutorial /Exercise 2 - Evolving SimulationsVersion 5.3

AstroGrav icon    Exercise 2 - Evolving Simulations

This exercise teaches you how to evolve simulations, and should take about 10 minutes to complete.

Opening the Tutorial Simulation

If you already have the Tutorial simulation open, choose the File / Revert to Saved menu item, which will return the simulation to the same state that it was in when you first opened it. Otherwise, go through the following steps to open it.

  1. If you don't already have AstroGrav running, double-click on the AstroGrav application icon (AstroGrav icon) to start it running.
  2. When the Open Simulation file chooser dialog is displayed, navigate to and open the Tutorial.ast file.
  3. The Tutorial simulation will then open, and you will see the simulation's three windows displayed on your screen.

The Tutorial: View window should be the frontmost window, but if it isn't, click on it to bring it to the front. This window is a view of the simulation in which you will see the Sun and the five innermost planets - Mercury, Venus, Earth, Mars, and Jupiter. This exercise will show you how to evolve this simulation and how to use the different commands related to evolving simulations.

Stepping Forward and Backward

Go through the following steps to learn how to step the simulation forward and backward in time.

  1. Choose the Evolve / Step Forward menu item (or the 'Evolve / Step Forward' icon tool), which will move the simulation forward one day. Repeat this command several times, and notice how the objects move in the view window, the data in the table window updates, and the date and time on the left of the status bar increases by one day each time you use the command. The structure window also updates, but you will not notice anything changing because the hierarchical structure of the system does not change from one day to the next.
  2. Now, choose the Evolve / Step Backward menu item (or the 'Evolve / Step Backward' icon tool), which will move the simulation backward one day. Repeat this command several times, and notice how the objects move in the view window, the data in the table window updates, and the date and time on the left of the status bar decreases by one day each time you use the command. The structure window also updates, but you will not notice anything changing because the hierarchical structure of the system does not change from one day to the next.

Next, go through the following steps to learn how to change the simulation's time step to any other value.

  1. Choose the Evolve / Settings... menu item (or the 'Evolve / Settings...' icon tool), which will result in the Evolve Settings input dialog being displayed.
  2. Change the time step from 1.0 to 10 days and accept the dialog.
  3. Repeatedly use the Evolve / Step Forward menu item (or the 'Evolve / Step Forward' icon tool) and the Evolve / Step Backward menu item (or the 'Evolve / Step Backward' icon tool), and notice how the simulation now moves forward and backward ten days at a time, instead of one day at a time as it did before you edited the time step.

If you have a simulation containing a large number of objects or you choose a very large time step, it can take a noticeable time for each step to be calculated, and you can cancel the process if you wish by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).

Running Forward and Backward

Go through the following steps to learn how to run the simulation forward and backward in time.

  1. Choose the File / Revert to Saved menu item, which will return the tutorial simulation to the same state that it was in when you first opened it.
  2. Choose the Evolve / Run Forward menu item (or the 'Evolve / Run Forward' icon tool), which will start the simulation running forward in time. Notice how the objects move in the view window, the data in the table window updates, and the date and time on the left of the status bar increases by one day at a time. The structure window also updates, but you will not notice anything changing because the hierarchical structure of the system does not change from one day to the next.
  3. Now, stop the simulation running by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).
  4. Now, choose the Evolve / Run Backward menu item (or the 'Evolve / Run Backward' icon tool), which will start the simulation running backward in time. Notice how the objects move in the view window, the data in the table window updates, and the date and time on the left of the status bar decreases by one day at a time. The structure window also updates, but you will not notice anything changing because the hierarchical structure of the system does not change from one day to the next.
  5. Now, stop the simulation running by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).

Next, go through the following steps to learn how to change the speed at which the simulation runs.

  1. Choose the Evolve / Run Forward menu item (or the 'Evolve / Run Forward' icon tool), which will start the simulation running forward in time. Notice how the date and time on the left of the status bar increases by one day at a time.
  2. Now, choose the Evolve / Settings... menu item (or the 'Evolve / Settings...' icon tool), which will result in the Evolve Settings input dialog being displayed.
  3. Change the time step from 1.0 to 10 days and accept the dialog. Notice how the simulation now runs much more quickly, with the date and time on the left of the status bar now increasing by ten days at a time.
  4. Now, use the Evolve / Settings... menu item (or the 'Evolve / Settings...' icon tool) again to change the time step from 10 days to 1 year, and notice how the Earth now appears to be stationary because in each year it travels through one complete orbit. If you are ever puzzled by an object that appears to be stationary or moving slowly in the wrong direction, it is always worth checking to see if your choice of time step is responsible for the effect.
  5. Finally, stop the simulation running by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).

It takes time for your computer to display each of the windows after a time step, so you can speed up the evolution of the simulation by minimizing or closing some of the windows. To minimize a window, click on it to bring it to the front, and then choose the Window / Minimize menu item (or the window's minimize icon), which will result in the window becoming iconized in the taskbar/dock.

Evolving to a Specified Date/Time

Go through the following steps to learn how to evolve the simulation (either forward and backward) to a specified time.

  1. Choose the File / Revert to Saved menu item, which will return the tutorial simulation to the same state that it was in when you first opened it.
  2. Now, choose the Evolve / Evolve To... menu item, which will result in an input dialog being displayed that shows the current date and time.
  3. Ensure that the Animate checkbox is selected, and then accept the dialog without bothering to change the displayed date and time. Watch how the simulation starts to evolve towards the specified date and time.
  4. The simulation will probably evolve too slowly for your liking, so use the Evolve / Settings... menu item (or the 'Evolve / Settings...' icon tool) to increase the time step.
  5. When the simulation has evolved to the specified date and time, it will stop automatically.

You can stop the simulation evolving before it reaches the specified date and time, by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).

If you repeat the above sequence of instructions, but with the Animate checkbox deselected instead of selected, evolution is much faster without a display of the simulation after each time step. If evolution takes more than a second or two, a progress bar is displayed to indicate how long it will take to reach the specified date and time.

Next: Using View Windows

You've now completed Exercise 2, and are ready to move on to Exercise 3, which teaches you how to use view windows.


AstroGrav iconExercises |Previous |Next

Valid HTML 4.01!Valid CSS!