AstroGrav Help /Tutorial /Exercise 6 - Adding New ObjectsVersion 3.5.1
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.
- If you don't already have AstroGrav running, double-click on the AstroGrav application icon () to start it running.
- When the Open Simulation file chooser dialog is displayed, navigate to and open the Tutorial.ast file.
- 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.
- Choose the Window / Units menu item, which will result in the Tutorial: Units window being displayed.
- 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.
- 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.
- 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.
- First, select the Sun because it is to be the parent of the new object.
- 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.]
- 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.
- Enter 'New Star' in the 'Name' field, and then use the tab key to move to the next field.
- Click on the 'Type' field, choose 'Star' from the popup menu, and then use the tab key to move to the next field.
- 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.
- 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.
- 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.
- 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.
- Enter '1' in the 'Semi-Major' field, and then use the tab key to move to the next field.
- Enter '2' in the 'Eccentricity' field, and then use the tab key four times to move to the last field.
- Enter '200' in the 'Peri Long' field to specify a suitable position for the new star on its orbit.
- Enter '81' in the 'True Long' field to specify a suitable position for the new star on its orbit.
- 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.
- Choose the Window / New View menu item (or the 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.
- Choose the Evolve / Run Forward menu item (or the 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.
- 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.
- Now, choose the Evolve / Settings... menu item (or the tool), which will result in the Evolve Settings input dialog being displayed.
- 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.
- Watch what happens on the Tutorial: View 2 window, choosing the View / Magnification / Larger menu item (or the 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!
- 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 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.
Exercises |Previous |Next
Copyright © 2005-2017, AstroGrav Astronomy Software