lwang-astro / PeTar

PeTar is a high-performance N-body code for modelling the evolution of star clusters and tidal streams, including the effect of galactic potential, dynamics of binary and hierarchical system, single and binary stellar evolution.
MIT License
71 stars 19 forks source link

Petar + SSE / Pre-main-sequence status / age of stars #18

Closed christianboily closed 2 years ago

christianboily commented 3 years ago

I have a question about the state of stars in PeTar when the status is given on input ( in an ascii input file, this is column #21 I believe, when the columns 1 = mass, 2 to 4 is x,y,z , etc .. )..

-> I f I set the state of the star to be 17 (pre-main-sequence), is the age of the star interpreted as the time from the -> start of the contraction (i.e., the formation of the star), or is it the time left before we reach the main sequence ? In -> other words. should I set the age to be < 0 if t = 0 means "start on the main sequence" ?

-> I ran PeTar with an age offset of 4.567 Myr and integrated an 1k-star cluster in the MW2014 Galpy potential. The age of -> the system is clearly indicated at the top of the output file, but the age of the star is still the age = 4.567 Myr that I gave -> on input. Does that mean the PeTar adds the age of the system to the input age of the star when it looks up the SSE
-> tracks ? I think this point is especially important when considering massive stars (when a few Myr offset can make a -> huge difference in L and mass ).

By the way, it proved relatively easy to run PeTar + Galpy together, which is extremely useful for future studies (or comparing with Gaia data). Many thanks for this great code + tools !

all the best,

Christian B.

lwang-astro commented 3 years ago

I think that right now there is no pre-main-sequence support from BSE code. So I don't think you can set 17 for the stellar type. The SSE/BSE function calling frequency depends on how fast the star evolve. Thus, the low-mass star evolve very slow with a large time step to call SSE/BSE function, indeed you may see a large offset between the age in the snapshots and the simulation time, but it won't happen for massive stars since the call frequency is much higher. So this is not a problem. You can double check the snapshots, if you found some strangle evolution, please let me know.

lwang-astro commented 3 years ago

Right now I have also implemented the python tool to transfer the snapshots data to astropy SkyCoord format. Thus it is easy to generate observational like data (e.g., proper motion, RA, DEC ...) with different reference frame. You can find the information from the README https://github.com/lwang-astro/PeTar#the-reference-frame-and-coordinate-system-transformation