Binding energy arXiv:1009.5400
Functions/Subroutines

calc_BE Module Reference

This module contains the subroutines and functions that are called to compute the binding energy for a set of stellar parameters. This module should be USEd by the calling program. More...

Functions/Subroutines

subroutine, public read_BE_input (path)
 This subroutine reads the input files for all available metallicities. Call this routine once when starting your program, before calling the function calc_logBE() or calc_logBE_recom().
subroutine, public read_BE_input_Z (path, iz)
 This subroutine reads the input file for the iz-th metallicity in the database. It is called by read_BE_input(), and in principle there is no need for the user to call it directly.
real(double), public calc_logBE (logZ, Mzams, M, logR, GB, ignore_massloss)
 This function computes log[BE/erg] as a function of log[Z], Mzams, M, log[R/Ro] and GB.
real(double), public calc_logBE_recom (logZ, M, logR)
 This function computes the recombination-energy term log[BE_recom/erg] as a function of log[Z], M, and log[R/Ro].

Detailed Description

This module contains the subroutines and functions that are called to compute the binding energy for a set of stellar parameters. This module should be USEd by the calling program.


Function/Subroutine Documentation

subroutine,public calc_BE::read_BE_input ( character,dimension(*),intent(in)  path)

This subroutine reads the input files for all available metallicities. Call this routine once when starting your program, before calling the function calc_logBE() or calc_logBE_recom().

Parameters:
pathThe path (relative or absolute) where the input data files can be found.
Return values:
NoneThe data that are read in are distributed via the module BE_data.

References BE_data::alphas, BE_data::ms, BE_data::nz, read_BE_input_Z(), and BE_data::rs.

subroutine,public calc_BE::read_BE_input_Z ( character,dimension(*),intent(in)  path,
integer,intent(in)  iz 
)

This subroutine reads the input file for the iz-th metallicity in the database. It is called by read_BE_input(), and in principle there is no need for the user to call it directly.

Parameters:
pathThe path (relative or absolute) where the input data files can be found;
izNumber of the desired metallicity in the database.
Return values:
NoneThe data that are read in are distributed via the module BE_data.

References BE_data::alphas, BE_data::groups, BE_data::LMHMbs, BE_data::ms, BE_data::ndat, BE_data::ndatmax, BE_data::ngr, BE_data::rs, and BE_data::zs.

Referenced by read_BE_input().

real(double),public calc_BE::calc_logBE ( real(double),intent(in)  logZ,
real(double),intent(in)  Mzams,
real(double),intent(in)  M,
real(double),intent(in)  logR,
integer,intent(in)  GB,
logical,intent(in),optional  ignore_massloss 
)

This function computes log[BE/erg] as a function of log[Z], Mzams, M, log[R/Ro] and GB.

Parameters:
logZ10-base log of metallicity (solar = log[0.02]);
Mzamsstellar ZAMS mass (in solar masses);
Mcurrent stellar mass (in solar masses);
logR10-base log of stellar radius, expressed in solar radii (log[R/Ro]);
GBgiant branch: 1: RGB, 2: AGB (CO core exists).
ignore_masslossif true, ignore the factor Lambda that corrects for mass loss (logical, optional; default: false)
Return values:
calc_logBEThe 10-base log of the absolute value of the envelope binding energy expressed in erg.

References BE_data::alphas, BE_data::LMHMbs, BE_data::logBE0, BE_data::ms, BE_data::ndat, BE_data::nRGBbc, BE_data::nz, BE_data::RGBb_coef, BE_data::rs, and BE_data::zs.

real(double),public calc_BE::calc_logBE_recom ( real(double),intent(in)  logZ,
real(double),intent(in)  M,
real(double),intent(in)  logR 
)

This function computes the recombination-energy term log[BE_recom/erg] as a function of log[Z], M, and log[R/Ro].

Parameters:
logZ10-base log of metallicity (solar = log[0.02]);
Mcurrent stellar mass (in solar masses);
logR10-base log of stellar radius, expressed in solar radii (log[R/Ro]);
Return values:
calc_logBEThe 10-base log of the absolute value of the envelope binding energy expressed in erg.

References BE_data::alphas, BE_data::logBE0, BE_data::ms, BE_data::ndat, BE_data::nz, BE_data::rs, and BE_data::zs.