Globular Clusters

Download
Documentation
Screenshots
 Videos
Contacts



GlobularClusters v1.0

release date: August 2014




Index


1. Minimum requirements

2. Main Window

3. Generation

4. Simulation

5. Views

6. Graphics

7. Recording animations

8. Playing animations

9. Algorithm






1. Minimum requirements

The simulation of the gravitational interactions of stars in a globular cluster is an heavy task for a common processor. Standard CPU's are not designed to perform tasks involving many mathematical calculations and GPU's are now replacing them for those specialistic purposes. GlobularCluster software was conceived as a user-friendly and portable simple tool for amateur astronomers and students, so virtually any modern PC with a Windows version equal or superior to XP SP3 and at least 4 GB RAM can run it.







2. Main Window

GlobularClusters software comes with a simple and intuitive user-interface made by a top menu-bar and a main window where all parameters of the simulation are entered (see picture below):




The block of parameters on the right are a simple representation of an H-R diagram for a globular cluster (see picture below). The input of data is simplified by 36 buckets representing combinations of star magnitude (column "size") and spectral type. Each star population in terms of magnitude (from I to VI), is given a unique value of mass (column "mass") in terms of solar masses. The integer value in each bucket represents the relative percentage of stars having the size, mass and spectral type associated with the bucket (no need that the sum of values in the buckets equals the number of stars in the cluster). A black-hole may be allocated at the center of the cluster and its mass specified in terms of solar masses ("0" is used for no black-hole).




On the left side of the main window, the user can define the following parameters:


Concentration

The King's concentration k of stars in a globular cluster, defined by Ivan King, 1962. For higher values the stars in the cluster are more concentrated in the core radius (see picture for k = 100), for lower values the distribution of stars tends to be more uniform (see picture for k = 5) until it reaches the zero value for a uniform distribution in a sphere (see picture for k = 0). Value ranging from 15 to 35 may be considered as typical for a globular cluster (see picture for k = 35).

Stars

The total number of stars in the simulation, limited by hardware capabilities. Up to 50.000 stars the generation of the cluster is fast but simulation of interactions may become extremely long as the number of steps of the algorithm grows as the square of the number of stars. A number of about 1000 stars allows for a real time visualization of interactions if the accuracy is not too high.

Diameter

The diameter in light/years of the bounding sphere (tidal radius of the globular cluster). The diameter must be defined accordingly to the total number of stars and their initial velocity.

Softnening

The minimum distance in light/years used in the computation of interactions beetwen two stars (see algorithm). A low value of the softening is more accurate than a high value but requires a shorter timestep to preserve the stability of the cluster in the simulation. An high value of the softening helps stability but it's generally not physically acceptable.

Timestep

The duration in years of a single computation step. It's the elapsed time beetween two sequential calculation of the gravitational forces. A low value of timestep is more accurate than a high value. The timestep is used in the integration of velocities to obtain the new positions of stars (see algorithm).

Cycles

The number of computation steps for a video frame. The standard frame rate for an animation is 30 fps. Example: with timestep = 2 years and cycles = 20, one second of standard animation is equivalent to a simulated time of 2*20*30 = 1.200 years.

Velocity

The initial value in km/sec of stars velocity. In a stable cluster the velocity of individual stars equals the gravitational forces making them orbiting around the center of the cluster. Concentration, diameter, mass distribution, number of stars, mass of a central black-hole and initial velocities are all values from which depends the stability of a cluster in a simulation, assuming that the computation parameters (timestep, cycles and softening) are also suitable to the specific case. A certain degree of "evaporation" (stars leaving from the cluster because they got the escape velocity) is typical for a globular cluster but if you got an explosion you should consider to review the parameters of your simulation.




3. Generation

The generation of a star cluster is the process of definition of position, velocity, mass, size and spectral type for each individual star of the cluster according to the parameters defined in the main window. The "File" menu presents functions to manage parameter sets by storing and retrieving them in separate files, and to create the cluster. The generation is not a deterministic process because it involves random values that may be different for each run: despite you use the same values for parameters you will never get exactly the same cluster.


"File" menu items:

New

Resets distribution parameters (H-R diagram) to the default values.

Open

Open a file of parameters previously saved.

Save as

Save a file of parameters for future references.

Create Cluster

Generate a cluster according to the current parameters on the main window.

Quit

Close the software (alternate for "ESC").






4. Simulation

The simulation of the interactions of stars in a cluster is the process of computation and visualization of star positions for each video frame of the animation (see "Cycles"). Depending on the heavyness of the task for the processor, you will get a real time animation on the screen or you should record the animation frame by frame to play it after the end of the simulation (see "Recording Animations"). The "Simulation" menu presents functions to manage the simulation, and to rotate automatically the cluster.


"Simulation" menu items:

Run

Starts the calculation of interactions beetwen stars and displays the new positions of stars on the screen for each video frame (see video). Using a high level of accuracy (low softening and short timestep) with a high number of stars may be extremely slow, then be sure to define a convenient number of cycles for frame in order to get a movie with an effective motion of stars. In that case use the recording function to get an animation (remember that few seconds of a movie may requires hours of computation). During the simulation, arrow keys can be used to move up, down, left and right the point of view;  "+" and "-" keys can be used to zoom in and out.

Pause

Pauses the simulation. Click "Run" again to restart.

Rotate

Automatic clockwise rotation of the cluster around the y-axis passing for the center of the bounding sphere. During the rotation the simulation is not active, click "Run" to start simulation (see video). During the rotation, arrow keys can be used to move up, down, left and right the point of view;  "+" and "-" keys can be used to zoom in and out.

Stop

Stops the simulation and returns to the main window.





5. Views

GlobularClusters software presents alternative views of the simulation to allow specific visual analysis of star interactions. The different visualizations of the simulation affects only the rendering of stars, the simulation process doesn't change.The "Views" menu presents functions to select a single population of stars, to render all stars with the same color, to show trails of orbits and to visualize stars in 3D.


"Views" menu items

Standard

Stars are shown with their original spectral colors as defined in the H-R diagram (see video).

White

Stars are rendered in a white color (see video).

3D

Stars are shown in 3D with the anaglyph technique (requires red-cyan glasses). This view is useful to analyze orbits of stars far from the nucleus (see video).

Orbits

The orbits of stars are continuosly tracked on the screen (see video).

I

Shows stars of population I in the standard view and other populations in a dimmed way (see video).

II

Shows stars of population II in the standard view and other populations in a dimmed way.

III

Shows stars of population III in the standard view and other populations in a dimmed way.

IV

Shows stars of population IV in the standard view and other populations in a dimmed way.

V

Shows stars of population V in the standard view and other populations in a dimmed way.

VI

Shows stars of population VI in the standard view and other populations in a dimmed way.

Hide Others

Hides stars of populations different from the selected one.




6. Graphics

The standard visualization of the clusters is useful to analyze the form of the cluster and the interactions of the stars, but it gives few information about fundamental measures as velocity, acceleration and potential of stars. GlobularClusters software presents some graphical representations of such measures by two-dimensional graphics where points represents individual stars with their own spectral color. All graphics show the minimum, average and maximum velocity of the stars of the cluster in km/sec, and also the minimum, average and maximum relative distance between stars in light/years is shown in all graphics.


"Graphs" menu items

Distribution

The graphic shows the distribution of stars in respect to the their distance from the origin. The actual distribution is compared to the theoric curve of King's concentration (depicted in red). Due to evaporation, an increasing number of stars will lay in the last bucket of distance beyond the original bounding sphere of the cluster (see video).

Velocity

The graphic shows the velocity of stars in km/sec in respect to their distance from the origin. Using the arrow keys, the x-axis (velocity) and y-axis (distance from the origin) reference scale can be adjusted. 

Acceleration

The graphic shows the acceleration of stars in km/sec2 in respect to their distance from the origin. Using the arrow keys, the x-axis (velocity) and y-axis (distance from the origin) reference scale can be adjusted.

Potential

The graphic shows the potential of stars as the product of velocity and mass in respect to their distance from the origin. Using the arrow keys, the x-axis (velocity) and y-axis (distance from the origin) reference scale can be adjusted.




7. Recording animations

As the number of stars in the cluster increases, the computation time grows exponentially and real-time visualization is no more possible. To get effective animations of the interactions in such cases, the recording function must be used. Each video frame is recorded as a bitmap image with no losses of information, and the resulting stream of bitmap is stored as a file named by the user.


"Recording" menu items

Short

Records a stream of 400 video frames (13 seconds of animation at 30 fps).

Medium

Records a stream of 1000 video frames (33 seconds of animation at 30 fps).

Long

Records a stream of 2000 video frames (66 seconds of animation at 30 fps).

Extra-Long

Records a stream of 5000 video frames (166 seconds of animation at 30 fps).

Stop

Stops the recording at any point.




8. Playing animations

GlobularCluster software is equipped with a bitmap stream reader to visualize recorded animations without any loss of information. Only bitmap streams previously recorded by GlobularClusters can be played.


"Movie" menu items

Play

Opens a bitmap stream file and plays the animation.

Slow

Sets the frame per second rate at 9 fps.

Normal

Sets the frame per second rate at 18 fps.

Fast

Sets the frame per second rate at 30 fps.

Stop

Stops playing the animation.





9. Algorithm

The algorithm used by GlobularClusters is an "N-body all-pairs" written in C++ language using double precision for numerical values. An N-body simulation numerically approximates the evolution of a system of bodies in which each body continuously interacts with every other body. In the case of star clusters each body represents an individual star, and the bodies attract each other through the gravitational force. The all-pairs approach to N-body simulation is a brute-force technique that evaluates all pair-wise interactions among the N bodies. It is a relatively simple method, but one that is not generally used on its own in the simulation of large systems because of its O(N 2) computational complexity. Given N bodies with an initial position xi and velocity vi for 1 ≤ i ≤ N, the force vector fij on body i caused by its gravitational attraction to body j is given by the following:


where mi and mj are the masses of bodies i and j, respectively; rij = xj − xi is the vector from body i to body j; and G is the gravitational constant. The left factor, the magnitude of the force, is proportional to the product of the masses and diminishes with the square of the distance between bodies i and j. The right factor is the direction of the force, a unit vector from body i in the direction of body j (because gravitation is an attractive force). The total force Fi on body i, due to its interactions with the other N − 1 bodies, is obtained by summing all interactions:



As bodies approach each other, the force between them grows without bound, which is an undesirable situation for numerical integration.  Therefore, a softening factor ε2 > 0 is added, and the denominator is rewritten as follows:



Note the condition j ≠ i is no longer needed in the sum, because fii = 0 when ε2 > 0. In effect, the softening factor limits the magnitude of the force between the bodies, which is desirable for numerical integration of the system state.

To integrate over time, we need the acceleration ai = Fi/mi to update the position and
velocity of body i. The integrator used to update the positions and velocities is a leapfrog-Verlet integrator (Verlet 1967) because it is applicable to this problem and is computationally efficient (it has a high ratio of accuracy to computational cost).






2014 Stefano Coluccini