< Explanations Lesson 2 >

Lesson 1: Let us model the revolution of Earth around the Sun

Creating system

Saving system

Running simulation

Bookmark

 

Creating system

Create the Sun-Earth system model. In order to do so, we have to define the two bodies by typing the current position- and velocity vector, mass, diameter, color and group:

 

Body
Name

Position (m) Velocity (m/s) Mass (kg) Diameter (m) Color Group
X Y X Y
Sun 0 0 0 0 1.989E30 1,390,000,000
 
Sun & Earth
Earth -149,597,870,691* 0 0 29,790 5.974,2E24 12,756,280
 
Sun & Earth

* When entering data, do not type comma (,) characters, as all they do is improve readability

 

As seen, data are realistic, so the simulation will be size- and time proportional.

The Sun is located in the middle of the coordinate system, in rest state, with the Earth on her left (because X is negative), with a velocity vector pointing downwards (positive Y). In order to ensure that both bodies are visible on the screen at the same time, we need to use a very high reducing (zoom = 1E-9). In this case, the size of Earth will shrink to 1 pixel.

 

1) Start Gravity application, and create a new system by means of the System dialog window. Choose File/New... menu.

 

2) Fill in the System page of the dialog window as follows:

 

 

The name of the system can be maximum 31 characters long. The time unit and refresh is one hour, so the movement will not be too slow and too fast either. The reducing should be one billion-fold (1e-9).

 

3) Switch on vectors and body names on the Visuals page. Adjust the multiplication value of vectors too, so that vectors can be visible on the screen. Set the length of trail to 1000 by switching the trailing first on, then entering 1000 in the Length field, finally switching the trailing off:

 

 

The length of trailing is 1000. This means that if trailing is on, then the program will start deleting the earliest drawn bodies (and vectors, etc.) following the thousandth screen refresh.

If body trailing is off, then trailing of vectors and mass centres will also be off. In this example, bodies will draw a following track 1000 times, but there will always be only one velocity and one force vector visible at each body.

 

4) Define the two bodies on Bodies page:

 

 

You can add a new body to the system using Add or Ins buttons. Then you can fill the elements of the middle line. You still can’t see "Sun & Earth" element in the group list, but the default "Group1". The group name can be changed on the next page.

The mass of the Sun and Earth are included in the units. Using this, change the unit of mass temporarily to sun-mass on the System page, then return to the mass and enter 1. You can enter the mass of the Earth the same way as above, then reset the unit to kilograms.

 

5) On the Other page, change the name of the first group to "Sun & Earth":

 

 

6) Type description of the system on the Description page:

 

 

Save the data with the OK button.

You can see the Sun in the middle of the screen, with the Earth on her left with two vectors: the gravity force points towards the Sun, while the velocity vector of the Earth is tangential. If the direction of rotation of the Earth is counter-clockwise (as shown by the velocity vector’s direction in the example), then we can see the Sun-Earth system from the northern pole of the Sun.

If you want to change any parameters (e.g. change the background color to dark-blue), then reopen the previous dialog window by selecting the Edit/System... menu. You can modify the background color by the Background button on the System page.

 

Saving system

You can save the system with the File/Save or File/Save As... menus. The default file extension is .grav. The system can be loaded by File/Open... menu, or clicking on the previously used file names (maximum 4) above File/Exit menu.

 

Running simulation

Start the simulation with the Motion/Run menu, or pressing F7 key, or by means of the suitable ToolBar button. The simulation can be stopped the same way as it is started.

During the simulation you can see that the orbit of the Earth is almost circular, and the Earth revolves round the Sun in a year.

 

Bookmark

You can step back to the start (or a previously saved state) of the simulation anytime using Bookmark. If you press the small triangle pointing down next to the Bookmark button in ToolBar, a menu containing the saved bookmarks appears.

When creating a new system or loading a saved one, a bookmark pointing to the starting state (named Restart) is created automatically. Selecting this you can jump back to the start of the simulation. You can rename a bookmark using the Bookmark dialog window (Edit/Bookmark... or CTRL+F8). You can add bookmarks to the system also during simulation using the Motion/Add bookmark menu (Shift+F8) or the suitable button on the ToolBar. The program automatically names the added bookmarks including the current time into the name.

 

 

 

 

 


< Explanations Lesson 2 >