Distribution Notes for HMS11 (B.Paczynski, Princeton U., 1997) ********************* Program "hms11.f" calculates model of Hydrogen Main Sequence stars. A star is assumed to be chemically homogeneous, and in hydrostatic and thermal equilibria. It may calculate a series of models equally spaced in the logarithm of the stellar mass. INPUT: All data is entered from the keyboard at the request of the program. An example of the content of the computer display during the interactive work with the program is enclosed. The data to be input: [numbers in brackets will give convergence for ZAMS sun ---JJG] X = hydrogen content (by mass fraction) [ 0.7 ] Z = heavy element content (by mass fraction) [ 0.02] log M = log10 ( stellar mass / solar mass) [ 0. ] log Te = log10 ( effective temperature ) [ 3.8 ] log L = log10 ( stellar luminosity /solar luminosity ) [ 0. ] log Tc = log10 ( central temperature ) [ 7.15] log rhc = log10 ( central density ) [ 1.95] iprint = control of the amount of output nm = a number of stellar models to be calculated dm = increment in log M between the models NOTICE: for the program to work the user must provide a guess of the values of the four boundary parameters: log Te, log L, log Tc, log rhc. The guessed values have to be fairly close to the correct values for the program to converge. OUTPUT: The results of computations are shown on the display, and are stored in two files: "hms11.re1" (a summary of results) and "hms11.re2" (more results). The amount of results shown on the display and stored in "hms11.re2" is controlled by the input parameter: "iprint". If iprint=1 then every integration step is stored. If iprint=100 then one out of 100 integration steps is stored, and so on. If iprint=-1 then only final results are shown. SUBROUTINES: At the beginning program "hms11" sets values of various constants in the common/const/. Program "hms11" opens new files: "hms11.re1" and "hms11.re2" to store the results on a disk. It asks for the input parameters to be typed from the keyboard. The program "hms11" uses subroutine "sch" to iterate an accurate numerical model. Subroutine "sch" uses subroutine "envel" to integrate stellar structure equations from the surface to the fitting point, and the subroutine "core" to integrate the equations from the center to the fitting point. The differences in temperature, density, radius and luminosity at the fitting point between the inward and outward integrations are calculated numerically as a function of surface and central boundary parameters. The partial derivatives are calculated numerically too, making additional envelope and core integrations with slightly modified boundary parameters. This way coefficients of a 4x4 matrix are calculated. This matrix relates the changes in the boundary parameters with the differences at the fitting point. the matrix is inverted with the subroutine "solve", and the corrections to the boundary parameters are calculated. Subroutine "envel" integrates stellar structure equations from the surface inwards to the fitting point. It first sets the outer boundary conditions at the surface, where optical depth is very small, in practice the density is taken as 10**(-12) g/cm**3. Later, "envel" uses subroutine "step" to make many integration steps, one at a time. It uses subroutine "prout" to display the results of integrations on the screen and to store them on the disk in a file "hms11.re2". Subroutine "core" integrates stellar structure equations from the center outwards to the fitting point. Subroutine "step" makes one integration step for the stellar structure equations using a second order Runge-Kutta method. It uses subroutine "rhs" to calculate right hand sides of the ordinary differential equations. Subroutine "rhs" calculates the right hand sides of the ordinary differential equations of stellar structure for the subroutine "step". It uses subroutines "state", "nburn", and "opact" to calculate thermodynamic quantities, nuclear burning rate and opacity, respectively. Subroutine "state" calculates pressure and other thermodynamic relations. It includes perfect gas of ions (assuming full ionization), partially degenerate, partly relativistic electron gas, and radiation. It does not calculate partial ionization. Subroutine "nburn" calculates hydrogen burning rate through the p-p and CNO cycles using fairly accurate analytic formulae. It does not calculate the screening corrections. It does not calculate helium burning. Subroutine "opact" calculates opacity with a very approximate analytical formula which allows for electron scattering with corrections for high temperature and density (it is fairly accurate), "Kramers term" (i.e. free-free, bound-free and bound-bound transitions, but very crudely), opacity due to negative hydrogen ion and molecules (very crudely), and electron conductivity (fairly accurately). Subroutine "solve" inverts a 4x4 matrix for the subroutine "sch". This is needed to find the relation between the differences between the envelope and core integrations at the fitting point, and the corrections to the boundary parameters at the surface and at the center. Subroutine "prout" stores the results of integrations in a file "hms11.re2". (DDS, 11/24/97).