Binding energy arXiv:1009.5400
Modules | Functions/Subroutines | Variables

src/binding_energy.f90 File Reference

This file contains the routines to read in the data files and compute the envelope binding energy for a given set of stellar parameters. More...

Modules

module  kinds
 

Provides the double-precision kind "double" or "dbl".


module  BE_data
 

This module distributes data between the binding-energy routines; it does not have to be USEd in the calling program.


module  calc_BE
 

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.


Functions/Subroutines

subroutine, public calc_BE::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 calc_BE::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_BE::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_BE::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].

Variables

integer, parameter kinds::double = selected_real_kind(15, 307)
 Double-precision kind.
integer, parameter kinds::dbl = double
 Double-precision kind.
integer, parameter BE_data::nz = 6
 Number of available metallicities.
real(double), dimension(nz),
parameter 
BE_data::zs = (/1.e-4_dbl, 1.e-3_dbl, 0.01_dbl, 0.015_dbl, 0.02_dbl, 0.03_dbl/)
 List of available metallicities.
integer, parameter BE_data::ngr = 5
 Number of model groups.
character, dimension(5), parameter BE_data::groups = (/'LMR1 ','LMR2 ','LMA ','HM ','Recom'/)
 List of model groups.
integer, parameter BE_data::ndatmax = 999
 Maximum number of coefficients.
integer, dimension(nz, ngr) BE_data::ndat
 Actual number of coefficients.
real(double), dimension(nz,
ngr, ndatmax) 
BE_data::alphas
 Fitting coefficients (alpha_m,r)
integer, dimension(nz, ngr,
ndatmax) 
BE_data::ms
 Powers for M for each coefficient.
integer, dimension(nz, ngr,
ndatmax) 
BE_data::rs
 Powers for R for each coefficient.
real(double) BE_data::LMHMbs
 Low-mass/high-mass boundaries (boundaries between groups LM* and HM)
integer, parameter BE_data::nRGBbc = 5
 Number of coefficients for RGB boundaries (boundaries between groups LMR1 and LMR2)
real(double) BE_data::RGBb_coef
 Coefficients for RGB boundaries (boundaries between groups LMR1 and LMR2)
real(double), parameter BE_data::logBE0 = 33.29866_dbl
 The binding energy was originally expressed in erg per solar mass to avoid large numbers, so we need to add this constant (log10[Mo/g]) to log(BE).

Detailed Description

This file contains the routines to read in the data files and compute the envelope binding energy for a given set of stellar parameters.