Package enrichpy :: Module lifetime

Module lifetime

source code

Stellar lifetimes as a function of stellar mass, and related functions.
Functions
 
main_sequence_life(mass)
Rough approxiamtion of main sequence lifetime in years.
source code
 
mass_from_main_sequence_life(life)
Approximate mass given main sequence lifetime in years.
source code
 
invert_function(function, xmin, xmax, xstep, bounds_error=False)
Invert function y = F(x) using interpolation.
source code
 
invert_function_log(function, logxmin, logxmax, logxstep, bounds_error=False)
Invert function y = F(x) using interpolation.
source code
 
invert_function_semilogy(function, xmin, xmax, xstep, bounds_error=False)
Invert function y = F(x) using interpolation.
source code
 
mass_from_main_sequence_life_function(function, mmin=0.0, mmax=1000.0, mstep=0.01)
Returns a function giving stellar mass from lifetime.
source code
 
main_sequence_life_MM89(mass)
Lifetime in years from Maeder & Meynet (1989) via Romano et al. (2005).
source code
 
main_sequence_life_K97(mass)
Lifetime in years from Kodama (1997) via Romano et al. (2005).
source code
 
test_conversion(lifetime_function)
Tests conversion of mass into lifetime and back. Note that this test is not passed right now because of the numerical discontinuties in the lifetime functions where their different segments meet up.
source code
Variables
  __package__ = 'enrichpy'
Function Details

main_sequence_life(mass)

source code 

Rough approxiamtion of main sequence lifetime in years.

tauMS ~ 10^10 years * (M/Msun)^-2.5

mass in solar masses.

mass_from_main_sequence_life(life)

source code 

Approximate mass given main sequence lifetime in years.

tauMS ~ 10^10 years * (M/Msun)^-2.5

mass in solar masses.

invert_function(function, xmin, xmax, xstep, bounds_error=False)

source code 

Invert function y = F(x) using interpolation.

Returns an interpolation function giving x as a function of y.

invert_function_log(function, logxmin, logxmax, logxstep, bounds_error=False)

source code 

Invert function y = F(x) using interpolation.

Internally uses logarithmic scale in the x values and in performing the interpolation.

Returns

an interpolation function giving x as a function of y. NOTE: provide y, don't provide log(y).

invert_function_semilogy(function, xmin, xmax, xstep, bounds_error=False)

source code 

Invert function y = F(x) using interpolation.

Internally uses logarithmic scale in the y values.

Returns

an interpolation function giving x as a function of y. NOTE: provide y, don't provide log(y).

mass_from_main_sequence_life_function(function, mmin=0.0, mmax=1000.0, mstep=0.01)

source code 

Returns a function giving stellar mass from lifetime.

Uses invert_function_semilogy to define an interpolation function that will return stellar mass when given stellar lifetime.

main_sequence_life_MM89(mass)

source code 

Lifetime in years from Maeder & Meynet (1989) via Romano et al. (2005).

The minlife attribute gives the minimum lifetime for a star as M->inf.

Parameters

mass (1D array):
Stellar mass in solar masses.

Notes

From Maeder & Meynet (1989), via Romano, Chiappini, Matteucci, Tosi, 2005, A&A, 430, 491 (2005A&A...430..491R), who say:

t =
  10^(-0.6545 logm + 1) for m <= 1.3 MSun
  10^(-3.7 logm + 1.35) for 1.3 < m/MSun <= 3
  10^(-2.51 logm + 0.77) for 3 < m/MSun <= 7
  10^(-1.78 logm + 0.17) for 7 < m/MSun <= 15
  10^(-0.86 logm - 0.94) for 15 < m/MSun <= 60
  1.2 m^-1.85  +  0.003 for m > 60 MSun
with t in units of Gyr.

main_sequence_life_K97(mass)

source code 

Lifetime in years from Kodama (1997) via Romano et al. (2005).

The minlife attribute gives the minimum lifetime for a star as M->inf.

Parameters

mass: array
Stellar mass in solar masses.

Notes

50 for m <= 0.56 MSun 10^((0.334 - sqrt(1.790 - 0.2232*(7.764 - logm)))/0.1116) for m <= 6.6 MSun 1.2 m^-1.85 + 0.003 for m > 6.6 MSun