AstroGrav iconAstroGrav Help /Tutorial /Exercise 6 - Adding New ObjectsVersion 3.4.1

AstroGrav icon    Exercise 6 - Adding New Objects

This exercise teaches you how to add new objects, and should take about 20 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.

Editing the Units

In this exercise, you are going to add a star in a hyperbolic orbit that will pass through the Solar System, and see what effect it has on the orbits of the planets. In the Tutorial simulation, the units for the luminosity, mass, and radius are initially Watts, kilograms, and kilometers. Go through the following steps to learn how to edit the units to something more convenient for adding the new star.

  1. Choose the Window / Units menu item, which will result in the Tutorial: Units window being displayed.
  2. In the 'Luminosity' popup menu, select 'solar luminosities', and notice how the information in the 'Luminosity' column of the Tutorial: Table window changes to reflect your new choice of 'Luminosity' unit.
  3. In the 'Mass' popup menu, select 'solar masses', and notice how the information in the 'Mass' column of the Tutorial: Table window changes to reflect your new choice of 'Mass' unit.
  4. In the 'Radius' popup menu, select 'solar radii', and notice how the information in the 'Radius' column of the Tutorial: Table window changes to reflect your new choice of 'Radius' unit.

Adding a New Star

You are now ready to add the new star to the simulation. You will be creating a star in a hyperbolic orbit that will pass through the Solar System, and whose closest approach to the Sun is 1.0AU (the average distance of the Earth from the Sun). The formula for the closest approach on a hyperbolic orbit is

    closest approach = semi-major axis (eccentricity - 1),

so a value of 1.0AU for the semi-major axis and 2.0 for the eccentricity will do. Go through the following steps to learn how to add the new star.

  1. First, select the Sun because it is to be the parent of the new object.
  2. Now, choose the Edit / Add Object... menu item, which will result in the New Object dialog being displayed that allows you to choose the parent of the new object. The Sun should already be selected here, so all you need to do is to accept this dialog. [If you wanted to, you could change the desired parent at this stage. If you chose None for the parent, you would have to enter the new object using Absolute Elements instead of Orbital Elements.]
  3. The Editor of 'Sun/10' dialog should now be displayed, with the default name of 'Sun/10' indicating that the new object is the 10th object orbiting the Sun.
  4. Enter 'New Star' in the 'Name' field, and then use the tab key to move to the next field.
  5. Click on the 'Type' field, choose 'Star' from the popup menu, and then use the tab key to move to the next field.
  6. Click on the 'Color' field, choose a color from the 'Swatches' (any will do), accept the dialog, and then use the tab key to move to the next field.
  7. Enter '0.5' in the 'Luminosity' field (half the luminosity of the Sun), and then use the tab key to move to the next field.
  8. Enter '0.5' in the 'Mass' field (half the mass of the Sun), and then use the tab key to move to the next field.
  9. Enter '0.5' in the 'Radius' field (half the radius of the Sun), and then use the tab key to move to the next field.
  10. Enter '1' in the 'Semi-Major' field, and then use the tab key to move to the next field.
  11. Enter '2' in the 'Eccentricity' field, and then use the tab key four times to move to the last field.
  12. Enter '200' in the 'Peri Long' field to specify a suitable position for the new star on its orbit.
  13. Enter '81' in the 'True Long' field to specify a suitable position for the new star on its orbit.
  14. Accept the dialog, and notice that the new star has appeared in all three windows with the status bars now showing '18 Objects' instead of '17 Objects'. In the Tutorial: View window, a red line has appeared in the top-right corner of the window, which is part of the new star's orbit (the red color indicates that the orbit is a hyperbola rather than an ellipse). In the Tutorial: Table window, a new row for 'New Star' has appeared between the rows for 'Neptune' and 'Pluto'. In the Tutorial: Structure window, 'New Star' has appeared at the bottom.

If instead of a star, you want to a add a new planet, moon, or asteroid to a simulation, the only change that you need to make to this procedure is to choose the appropriate type from the popup menu of the 'Type' field.

Evolving the Modified Simulation

Go through the following steps to see what happens when you start the modified simulation running.

  1. Choose the Window / New View menu item (or the 'Window / New View' icon tool), and notice how a new Tutorial: View 2 window appears. This new window shows a much more convenient view of the simulation, with the center of mass of the system being in the center of the window. You could have manipulated the original Tutorial: View window instead, but it's useful to have two view windows visible - one showing the overall view, and the other showing a close-up of the inner Solar System.
  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 date and time on the left of the status bar increases by one day at a time.
  3. Flip between the two view windows by clicking on them, and notice how the planets in the inner Solar System are moving around quite quickly, whereas the planets in the outer Solar System are moving around much more slowly, and the new star is only approaching the Solar System very slowly.
  4. Now, choose the Evolve / Settings... menu item (or the 'Evolve / Settings...' icon tool), which will result in the Evolve Settings input dialog being displayed.
  5. Change the time step from 1.0 to 3.0 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 three days at a time.
  6. Watch what happens on the Tutorial: View 2 window, choosing the View / Magnification / Larger menu item (or the 'View / Magnification / Larger' icon tool) occasionally to increase the magnification as the new star approaches the Solar System. Notice what a mess the new star makes of the Solar System as it passes close to the Sun!
  7. Finally, when the new star has moved off far from the Sun again, stop the simulation running by using the Evolve / Stop menu item (or the 'Evolve / Stop' icon tool).

You may wish to try running the simulation backward again to watch the Solar System repair itself, or to experiment with using different values for the new star's fields to see how the changes effect the way that the simulation evolves.

Next: Adding New Families of Objects

You've now completed Exercise 6, and are ready to move on to Exercise 7, which teaches you how to add new families of objects.


AstroGrav iconExercises |Previous |Next

Valid HTML 4.01!Valid CSS!