changa  3.5
 All Classes Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
lymanwerner.h
Go to the documentation of this file.
1 
4 /* inline function used in feedback.cpp and starform.cpp to calculate
5  the Lyman Werner luminosity for a star particle of a given age and mass*/
6 inline double calcLogSSPLymanWerner(double dAgelog, double dMassLog)
7 {
8  /* Variables below are to a polynomial fit for data representing a SSP generated by Starburst99*/
9  double a0 = -84550.812,
10  a1 = 54346.066,
11  a2 = -13934.144,
12  a3 = 1782.1741,
13  a4 = -113.68717,
14  a5 = 2.8930795;
15  return a0
16  + a1*dAgelog
17  + a2*dAgelog*dAgelog
18  + a3*dAgelog*dAgelog*dAgelog
19  + a4*dAgelog*dAgelog*dAgelog*dAgelog
20  + a5*dAgelog*dAgelog*dAgelog*dAgelog*dAgelog + dMassLog;
21 }