https://github.com/N-BodyShop/changa
Raw File
Tip revision: 69a5c80002f52a61a7002dc8fb77cde41c61b97e authored by Tim Haines on 23 October 2018, 23:21:25 UTC
Complete overhaul of build system
Tip revision: 69a5c80
lymanwerner.h
/// @file lymanwerner.h
/// Declarations for Lyman Werner calculation.

/* inline function used in feedback.cpp and starform.cpp to calculate
   the Lyman Werner luminosity for a star particle of a given age and mass*/
inline double calcLogSSPLymanWerner(double dAgelog, double dMassLog)
{
 /* Variables below are to a polynomial fit for data representing a SSP generated by Starburst99*/    
    double a0 = -84550.812,
      a1 =  54346.066,
      a2 = -13934.144,
      a3 =  1782.1741,
      a4 = -113.68717,
      a5 =  2.8930795;
    return a0
      + a1*dAgelog
      + a2*dAgelog*dAgelog
      + a3*dAgelog*dAgelog*dAgelog
      + a4*dAgelog*dAgelog*dAgelog*dAgelog
      + a5*dAgelog*dAgelog*dAgelog*dAgelog*dAgelog + dMassLog;
}
back to top