Program 2: Mass of a Galaxy calculation based on rotation curve
Introduction and Purpose
The reason of this program is the following question: How much dark matter ?
This program calculates:
- the mass of our Galaxy as a function of visible matter (Radius Visible Galaxy), the radius of the bulge (R bulge) and the speed of the Sun (SP velocity)
- the rotation speed of our Galaxy as a function of the distance from the center of our Galaxy. The maximum distance is 70000 lightyears.
The result of the program is displayed in 3 displays.
- Display 1 consists of three parts:
- Part 1 shows the 11 parameters to select.
- Part 2 shows the results of the calibration phase
- Part 3 shows the results of the simulation.
- Display 2 shows the results of the simulation in a graphical form.
- Display 3 shows the results of the simulation in numbers.
Operation - part 1
When the program starts you get a display showing 4 lines with 11 parameters.
Next you get the following text:
- # r Defines the number of segments in the r direction. Standard value is 5.
- # z Defines the number of segments in the z direction. Standard value is 3.
- delta alpha Defines the delta angle alpha. Standard value is 10 degrees.
- Radius BulgeDefines the radius of the bulge. Standard value = 7500 light years
- Radius Visible galaxyDefines the radius of visible galaxy. Standard value = 60000 light years
- Radius Total galaxyDefines the radius of total galaxy. Standard value = 70000 light years
- height disk Defines the height of the disk at centre of Galaxy. Standard value is 2000 light years.
- shape disk Defines the height of the disk at distance of Radius Total galaxy. Shape = 1 means that the distance is equal height disk. Standard value = 0.1
- sp velocity Defines velocity setpoint for calibration at a distance of 25000 lightyears. Standard value is 250 km/sec.
- disk type Defines the disk type.
There are 4 disk types:
- 1 = straight line. 2 = cosinus (0 - 90). 3 = cosinus (90 - 180). 4 = cosinus (0 - 180)
The standard value is 2.
- Disk Dens CorrectionDefines Disk Density Correction relative to bulge. Standard value is 0.6
- calibration Defines calibration condition. 1 = yes. 0 = No. Standard value is 1.
To get a first impression about the program do not make any change.
- Enter value 1 - 11 to modify parameter
- Enter value 12 perform disk type height test
- Enter -1 to end program
- or press ENTER key to start simulation
- Parameter ?
Operation - part 2
Just press ENTER in order to start the simulation.
This terminates one simulation.
Modify the parameters and repeat the previous steps or ENTER -1 to terminate the program.
- Display 1 part 2 shows the results of the calibration phase.
- Each line shows the speed of the galaxy at the distance of the Sun (25000 light years) for different values of the mass of the disk
When the speed becomes close to the sp velocity parameter the message:
- Calibration finished - Start calculation
Is displayed. Next press ENTER
- Display 1 part 3 shows the results of the simulation.
The bottom part shows the mass of the bulge, the mass of the disk and the total mass.
The bottom part also shows the density of the bulge and the density of the disk.
Next press ENTER
- Display 2 shows the galaxy rotation curve in a graphical form
Next press ENTER
- Display 3 shows the galaxy rotation curve in numbers.
Next press ENTER
Program: MASS_GAL.BAS source
In order to retrieve the source select:MASS_GAL.BAS
To see the listing select:MASS_GAL.HTM
Execution file select: MASS_GAL.EXE and: brun45.exe
For similar programs in Visual Basic VB MASS GAL.ZIP
For description of that VB program select:VB Mass gal.htm
For similar programs in Excel select circ11.xls, circ12.xls and circ11.xls to circ15.xls. The purpose of those programs is to calculate disk density profiles to support (flat) galaxy rotation curves.
For a description of those programs and of "Read me First" select circ11.xls.htm
For a program to calculate galaxy rotation curves use: Grotc.xls.
For a description of this programs and of "Read me First" select grotc.xls.htm
The calculation of the speed curve of a Galaxy with is concentrated in one point:
In order to calculate the speed of the Galaxy with has a bulge and a disk, proceeds as follows:
- The program starts with the following data:
- m0 = mass of object 1 i.e. mass of Galaxy
- m1 = mass of object 2 i.e. the Sun
- d = distance between m0 and m1.
- The centre of gravity Z is described in the following picture:
m0 r0 Z r1 m1
- With the following 2 equations the parameters r0 and r1 can be calculated:
- d = r0 + r1
- m0 * r0 = m1 * r1
- r1 = d * m0 / (m0 + m1)
- In order to calculate the acceleration a1 of m1 the following two equations can be used:
- a1 = G * m0 / (d * d)
- a1 = (v1 * v1) / r1
- Combining the above two equations the speed v1 of m1 becomes:
- v1 = SQRT (G * m0 * r1) / d
- When m1 is very small to m0 this becomes:
- v1 = SQRT ((G * m0)/d) Keppler's third Law
- Repeat step 6 for different values of d and you will get the rotation curve of a Galaxy with it's mass concentrated in one point.
- Starting point is a section of the Galaxy at position: r, phi and z
- The 3 dimensions of this section is: dr, r*dphi and dz
- The volume is: dvol = dr * r * dphi * dz
- The mass is: dm = dvol * density
- The x,y,z co-ordinates of this section are: r * cos(phi) , r * sin(phi) and z
- With a Sun at dsun the distance dx = dsun - r * cos(phi)
- With a Sun at dsun the distance dy = r * sin(phi)
- With a Sun at dsun the distance d = SQRT (dx * dx + dy * dy + z * z)
- The acceleration da for dm is: da = G * dm / (d * d)
- The acceleration dax in the x direction is: dax = da * dx / d
- Calulate the sum: m = m + dm, vol = vol + dvol, ax = ax + dax
The above 11 steps are done for all the segments dr, dphi and dz.
The result is m (mass of Galaxy), vol (volume of Galaxy) and ax.
ax is the total acceleration component in the x direction at position dsun.
- Calculate mass m0c, concentrated at centre with has the same influence:
- m0c = ax * dsun * dsun / G
Equation 5 (6) in the first section of this paragraph describes the calculation of the rotation speed of a Galaxy, with mass concentrated in one point.
- Calculate the speed v1 of the sun at distance dsun:
- v1 = SQRT (G * m0c * r1) / dsun
- Repeat steps 1 to 13 for different values of distance dsun.
Calculation of rcor (disk height) as a function of r.
**** 4 2
|3 1 4 2
| 3 1 4 2
| 3 1 4 2
h2 | 3 1 4 2
| 3 1 2
| 3 4 1 2
| 3 4 1 2
| 3 4 1 2
| 3 4 1 2
h1 | *
h1 = is equal to: height disk * shape disk
h2 = is equal to the parameter: height disk - h1
distdisk = is equal to : Radius Total galaxy - Radius Bulge
1 rcor = h1 + h2 * (distdisk - r) / distdisk ' lineair
2 rcor = h1 + h2 * COS(r / distdisk * pi / 2) ' cosinus 0 - 90 degrees
3 rcor = h1 + h2 + h2 * COS(pi / 2 + r / distdisk * pi / 2) ' cosinus 90 - 180 degrees
4 rcor = h1 + h2 / 2 + h2 / 2 * COS(r / distdisk * pi) ' cosinus 0 - 180 degrees
The dark matter simulation gives 2 results:
- When you compare the calculated rotation curve with a measured one (See the book: UNIVERSE ) page 492, you will see that the two are almost the same. This means that the amount of invisible matter or dark matter for our Galaxy is almost zero.
- The real amount of visible mass of our Galaxy (taken the shape into account) is roughly four times as much as when you consider our Galaxy as a point.
Created: 9 September 1996
Last modified: 4 December 2001
Excel programs added: 1 Sept 2003
Visual Basic Program added: 1 Mai 2011
Back to my home page Contents of This Document