Skip to content

Latest commit

 

History

History
49 lines (34 loc) · 2.13 KB

README.md

File metadata and controls

49 lines (34 loc) · 2.13 KB

Modelling of the Main Sequence (Thorne-Zytkow Group)

This code solve the physical properties for stars based on initial values (Tc). Each solved star is stored as a pickle file is the "stars" directory (a new directory must be made before solving for a set of stars). The main sequence/main sequences can then be plotted by running the main_sequence() function.

Furthermore each star can be plotted for their individual properties: density, temperature, mass, etc... This can only be done after the star is solved.

Setup

The range of initial value can be alternated with the rng_T variable in "main.py". The parameters for the range are (starting T, ending T, number of stars), respectively. Lastly, ensure the target directory (stars) exists.

For the Thorne-Zytkow simulations, set up new variable: M_bh and add it at the end of the call to the "bisection" method in solveStar. All other steps can be run the same way as with the Main Sequence.

Building the Main Sequence

With Spyder or other IDE

  1. Set up initial conditions
  2. Run "main.py" script
  3. Call solveAllStars with "rng_T" as parameter
  4. Once stars are calculated change directory name to "MS_stars" for main sequence or "stars(1e-_)" for varying mass conditions (Thorne-Zytkow simulations)
  5. Main sequences can be individually plotted with "main_sequence()" or overplotted with "main_sequence()" (First parameter set to True to plot normal MS as well)
  6. To plot multiple MS's change the array: seqs to the corresponding exponents
Example
After running script...
>>> solveAllStars(rng_t)
>>> main_sequence()
>>> main_sequence(True)

With python3 only

  1. Set up initial conditions
  2. Add desired function alls at the bottom of "main.py" script

Plotting Individual Stars

A star's property can be plotted after it has been solve. This uses the plotAll() function. The star can be loaded using the load_star() (takes the directory name and filename). For example,

>>> s = load_star("star(1e2)","30000000.0.p")
>>> plotAll(s)