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.
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.
- Set up initial conditions
- Run "main.py" script
- Call solveAllStars with "rng_T" as parameter
- Once stars are calculated change directory name to "MS_stars" for main sequence or "stars(1e-_)" for varying mass conditions (Thorne-Zytkow simulations)
- 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)
- To plot multiple MS's change the array: seqs to the corresponding exponents
After running script...
>>> solveAllStars(rng_t)
>>> main_sequence()
>>> main_sequence(True)
- Set up initial conditions
- Add desired function alls at the bottom of "main.py" script
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)