rotstars: module of rotating stars functions

PyHdust rotstars module: Rotating stars tools.

license:GNU GPL v3.0 https://github.com/danmoser/pyhdust/blob/master/LICENSE
pyhdust.rotstars.beta(par, is_ob=False)[source]

Calculate the \(\beta\) value from Espinosa-Lara for a given rotation rate \(w_{\rm frac} = \Omega/\Omega_c\)

If is_ob == True, it consider the param as ob (instead of \(w_{\rm frac}\)).

pyhdust.rotstars.ellips_th(th, rf)[source]

Ellipsoid radius

Parameters:
  • th – theta, in radians (0 = pole; pi/2 = equator).
  • rt – radius fraction (Req/Rp >= 1)
pyhdust.rotstars.geneva_closest(Mstar, oblat, t, Zstr='014', tar=None, silent=True)[source]

Interpolate models between rotation rates, at closest Mstar.

Usage: Rpole, logL = geneva_closest(Mstar, oblat, t, Zstr=‘014’, tar=None, silent=True)

where t is given in tMS, and tar is the open tar file. The chosen metallicity is according to the input tar file. If tar=None, the code will take Zstr=‘014’ by default.

pyhdust.rotstars.geneva_interp(Mstar, oblat, t, Zstr='014', tar=None, silent=True)[source]

Interpolates Geneva stellar models.

Usage: Rpole, logL, age = geneva_interp(Mstar, oblat, t, tar=None, silent=True)

where t is given in tMS, and tar is the open tar file. The chosen metallicity is according to the input tar file. If tar=None, the code will take Zstr=‘014’ by default.

pyhdust.rotstars.geneva_interp_fast(Mstar, oblat, t, Zstr='014', silent=True)[source]

Interpolates Geneva stellar models, from grid of pre-computed interpolations.

Usage: Rpole, logL, age = geneva_interp_fast(Mstar, oblat, t, Zstr=‘014’)

where t is given in tMS, and tar is the open tar file. For now, only Zstr=‘014’ is available.

pyhdust.rotstars.geneva_pre_computed(Zstr='014', silent=False)[source]

Create geneva pre-computed grid

pyhdust.rotstars.geneva_read(fname, Zstr='014', tar=None)[source]

Reads Geneva model file

Usage: age, Mstar, logL, logTeff, Hfrac, Hefrac, oblat, w, Rpole = geneva_read(fname, tar=None)

where tar is the read tar(.gz) opened file.

pyhdust.rotstars.oblat2w(oblat)[source]

Converts oblateness into wc=Omega/Omega_crit Ekstrom et al. 2008, Eq. 9

Usage: w = oblat2w(oblat)

pyhdust.rotstars.readscr(scrfile)[source]

Read source generated with ref_estrela.txt.

OUTPUT: M, Req and TP (2*solar units and K).

pyhdust.rotstars.rochearea(wfrac, isW=False)[source]

Calculate the Roche area of a rigid rotator.

Equation 4.23 from Cranmer 1996 (thesis).

Area in (squared) radial unit (it must be multiplied to Rpole**2 to a physical size).

pyhdust.rotstars.rotStar(Tp=20000.0, M=10.3065, rp=5.38462, star='B', beta=0.25, wfrac=0.8, th_res=5001, quiet=False, LnotTp=False)[source]

Return the photospheric parameters of a rotating star.

LnotTp: the value of “Tp” is the Luminosity (in solar units).

Calculation of Von Zeipel’s Beta parameter as function of W: see math…

INPUT: th_res (theta resolution, integer)…

OUTPUT: printed status + (ob, Tp values, Area[cm2])

pyhdust.rotstars.rt(th, wfrac)[source]

Roche Rpole normalized radius as function of wfrac.

Parameters:th – theta, in radians (0 = pole; pi/2 = equator).
pyhdust.rotstars.sigma4b_cranmer(M, w)[source]

Computes sigma4b defined in Cranmer 1996 (Eq. 4.22)

Usage: s4b = sigma4b_cranmer(M, w)

where w=Omega/Omega_c, M=stellar mass in Msun (from 1.7 to 20.)

pyhdust.rotstars.vrot_scr(scrfile, old=True)[source]

Returns the vrot value of a given source star.

OUTPUT: vrot in km/s.

pyhdust.rotstars.wfrac_rot(W)[source]

Returns wfrac (Omega/Omega_crit) value from a W value.

Equation 1.23 de Faes (2015).

pyhdust.rotstars.wrot(par, is_ob=False)[source]

Converts \(w_{\rm frac} = \Omega/\Omega_c\) into \(W = vrot/vorb\).

If is_ob == True, it considers the param as the oblateness (instead of \(w_{\rm frac}\)).