Program 8: The Movement of the Sun through our Galaxy
Introduction and Purpose
The purpose of the program GALAXY.BAS is to simulate the movement an object (the Sun) through Our Galaxy (The Milky way) with three posibilities:
When the radial speed is rougly 250 km/sec. In this case its path is a circle.
When its radial speed is almost zero. In this case its path is almost a straight line. The object will oscillate.
When its radial speed is almost zero and when there is a black hole in the center of our Galaxy. In this case the path will be bended when the object approaches the BH.
To get a copy select: GALAXY.BAS
To see the listing of the program select: GALAXY.HTM
The program consists of 3 displays:
Main Selection Display
Simulation Display under three possibilities.
Parameter Selection Display
The Main Selection Display is used to select the Simulation Display or the Parameter Selection Display.
In order to select the Simulation Display: Select possibility 1 to 3 and Select S. This will start the simulation under predefined initial conditions.
In order to select the Parameter Selection Display select 0.
From the Parameter Selection Display you can modify the following parameters:
Delta time in ly
V origin (Galaxy)
Speed of gravity
Initial distance of object in lightyears
Initial radial speed of object in km/sec
Mass of Black hole in Sun Masses M0
For type 1 the standard value for Delta time in ly is 0.05 light years. If performance is slow you can try 0.1. For higher accuracy use 0.01.
For type 2 and 3 delta time is 0.0005 light years.
The parameter V origin (Galaxy) defines the speed of our galaxy in km/sec. The standard value is 0. First try 0. Secondly try 1000 km/sec
The parameter Phi origin defines the direction of the speed of our galaxy as a function of our Sun. Valid values are 0, 90, 180, 270 and 360.
The parameter Display condition defines the number of iterations between screen updates. The standard value is 100.
The parameter Initial condition has to values 0, 1 or 2.
For a value of 0 there is no change in initial condition.
For a value of 1 the initial position of the Sun is modified.
For a value of 2 the initial velocity of the Sun is modified.
The parameter Speed of gravity defines the speed of gravity propagation. Standard value is 300000 km/sec.
The parameter Initial distance in ly defines the initial distance of the object in lightyears. Standaard value for type 1 is 25000 ly and for type 2 and 3 50000 ly
The parameter Initial radial speed of stardefines the initial radial speed of object in km/sec. Standaard value for type 2 and 3 is 0.0015 km/sec
The parameter Mass Black hole in M0defines the Mass of Black hole in Sun Masses M0. Standaard value for type 3 is 2600000 Sun Masses M0
The Simulation Display Consists of three parts:
The top part shows the values of the parameters.
For type 2 at closest distance the simulation stops. Enter any character to continue.
The middle part shows (1) the position and direction of our Galaxy and (2) the position of the Sun in red.
For the type 2 also in yellow (larger) and braun (largest)
The bottom part shows the values of certain parameters after each revolution of the Sun. The first parameter shows the time in counts accumulated and the time in count between revolutions. The last parameter is important in order to see if the revolution times increases
The last parameter shows the distance between the center of the Galaxy and the Sun.
All tests are done with delta time = 0.01 light year
For V origin = 0 Revolution time is 189.56 million years
For V origin = 1000 c = 0 km/sec Revolution time is 189.56 million years
For V origin = 1000 c = 300000 km/sec
The table below shows the results of 12 simulations.
The parameter phi defines the direction of the speed of the galaxy.
init = 0 init = 1 init = 2
phi rev time distance rev time distance rev time distance
0 191.47 25000.0 189.56 24916.7 189.57 25000.0
90 189.46 25000.0 189.56 25000.1 189.46 25000.0
180 187.68 25000.0 189.56 25083.3 189.57 25000.0
270 189.67 25000.0 189.56 25000.2 189.67 25000.0
The column init = 0 shows the time in million years after one revolution and the distance in light years, for different values phi.
Phi is the direction of the speed of the galaxy.
What the simulation shows is that the revolution time is different i.e. is a function of phi.
This is wrong because the Sun moves in a circle and it should not make any difference where you start the simulation.
For phi = 0 the center of galaxy moves towards the Sun.
That means the virtual position is away from the Sun.
This in turn means that the acceleration is smaller then it should be.
Finally this means that the revolution time will be larger.
For phi = 180 the center of galaxy moves away from the Sun.
That means the virtual position is toward the Sun.
This in turn means that the acceleration is larger then it should be.
Finally this means that the revolution time will be smaller.
To solve this problem we can do two things:
change the initial position. This is done in the column init = 1
change the initial velocity. This is done in the column init = 2
The result of both is that the revolution time is almost the same and is independent of the direction of the speed of the galaxy.
The simulation assumes that the center of gravity of the galaxy coincides with the center of the Galaxy.
This is not correct.
The center of gravity of the galaxy, from the point of vew of the Sun, does not coincide with the center of our Galaxy and has an offset towards the Sun.
See program MASS_GAL.BAS for details.
Change the speed of gravity with a factor of 100. The revolution time and the distance will be constant.
Does this galaxy simulation requires dark matter ?
Last modified:19 October 2000
Back to my home page: Contents of This Document