/*fhummr evaluate Hummer's betaF(beta) function */ #include "cddefines.h" #include "fhummr.h" double fhummr(double beta) /* beta is ratio of continuum to mean line opacity, * returns dest prob = beta F(beta) */ { double fhummr_v, x; # ifdef DEBUG_FUN fputs( "<+>fhummr()\n", debug_fp ); # endif /* evaluates Hummer's F(beta) function for case where damping * constant is zero, are returns beta*F(beta) * fit to Table 1, page 80, of Hummer MNRAS 138, 73-108. * beta is ratio of continuum to line opacity; FUMMER is * product of his F() times beta; the total destruction prob * this beta is Hummer's normalization of the Voigt function */ assert( beta >= 0.) ;/* non-positive is unphysical */ if( beta <= 0. ) { fhummr_v = 0.; } else { x = log10(beta); if( x < -5.5 ) { fhummr_v = 3.8363 - 0.56329*x; } else if( x < -3.5 ) { fhummr_v = 2.79153 - 0.75325*x; } else if( x < -2. ) { fhummr_v = 1.8446 - 1.0238*x; } else { fhummr_v = 0.72500 - 1.5836*x; } fhummr_v *= beta; } # ifdef DEBUG_FUN fputs( " <->fhummr()\n", debug_fp ); # endif return( fhummr_v ); }