11 lzamsf = (a(1)*m**5*mx + a(2)*m**11)/
12 & (a(3) + m**3 + a(4)*m**5 + a(5)*m**7 +
13 & a(6)*m**8 + a(7)*m**9*mx)
27 rzamsf = ((a(8)*m**2 + a(9)*m**6)*mx + a(10)*m**11 +
28 & (a(11) + a(12)*mx)*m**19)/
29 & (a(13) + a(14)*m**2 +
30 & (a(15)*m**8 + m**18 + a(16)*m**19)*mx)
44 tbgbf = (a(17) + a(18)*m**4 + a(19)*m**(11.d0/2.d0) + m**7)/
45 & (a(20)*m**2 + a(21)*m**7)
52 real*8 m,mx,f,df,g,dg,a(200)
60 f = a(17) + a(18)*m**4 + a(19)*m**5*mx + m**7
61 df = 4.d0*a(18)*m**3 + 5.5d0*a(19)*m**4*mx + 7.d0*m**6
62 g = a(20)*m**2 + a(21)*m**7
63 dg = 2.d0*a(20)*m + 7.d0*a(21)*m**6
64 tbgbdf = (df*g - f*dg)/(g*g)
71 real*8 m,mx,f,df,g,dg,a(200)
79 f = a(17) + a(18)*m**4 + a(19)*mx + m**7
80 df = a(117) + a(118)*m**4 + a(119)*mx
81 g = a(20)*m**2 + a(21)*m**7
83 tbgdzf = (df*g - f*dg)/(g*g)
99 thookf = 1.d0 - 0.01d0*max(a(22)/m**a(23),a(24)+a(25)/m**a(26))
113 ltmsf = (a(27)*m**3 + a(28)*m**4 + a(29)*m**(a(32)+1.8d0))/
114 & (a(30) + a(31)*m**5 + m**a(32))
129 lalphf = (a(33) + a(34)*m**a(36))/(m**0.4d0 + a(35)*m**1.9d0)
133 elseif(m.le.0.7d0)
then
134 lalphf = a(39) + ((0.3d0 - a(39))/0.2d0)*(m - 0.5d0)
135 elseif(m.le.a(37))
then
136 lalphf = 0.3d0 + ((a(40)-0.3d0)/(a(37)-0.7d0))*(m - 0.7d0)
137 elseif(m.le.a(38))
then
138 lalphf = a(40) + ((a(41)-a(40))/(a(38)-a(37)))*(m - a(37))
140 lalphf = a(41) + ((a(42)-a(41))/(mcut-a(38)))*(m - a(38))
155 lbetaf = a(43) - a(44)*m**a(45)
157 if(m.gt.a(46).and.
lbetaf.gt.0.d0)
then
158 a1 = a(43) - a(44)*a(46)**a(45)
159 lbetaf = a1 - 10.d0*a1*(m - a(46))
176 elseif(m.ge.1.1d0)
then
179 lnetaf = 10.d0 + 100.d0*(m - 1.d0)
188 real*8 m,mhook,a2,a(200)
198 elseif(m.ge.a(51))
then
199 lhookf = min(a(47)/m**a(48),a(49)/m**a(50))
201 a2 = min(a(47)/a(51)**a(48),a(49)/a(51)**a(50))
202 lhookf = a2*((m-mhook)/(a(51)-mhook))**0.4d0
210 real*8 m,m2,rchk,a(200)
223 rtmsf = max(rchk,(a(52) + a(53)*m**a(55))/(a(54) + m**a(56)))
225 rtmsf = (a(57)*m**3+a(58)*m**a(61)+a(59)*m**(a(61)+1.5d0))/
228 rtmsf = a(63) + ((a(64) - a(63))/0.1d0)*(m - a(62))
244 elseif(m.le.0.65d0)
then
245 ralphf = a(73) + ((a(74) - a(73))/0.15d0)*(m - 0.5d0)
246 elseif(m.le.a(70))
then
247 ralphf = a(74) + ((a(75)-a(74))/(a(70)-0.65d0))*(m - 0.65d0)
248 elseif(m.le.a(71))
then
249 ralphf = a(75) + ((a(76) - a(75))/(a(71) - a(70)))*(m - a(70))
250 elseif(m.le.a(72))
then
251 ralphf = (a(65)*m**a(67))/(a(66) + m**a(68))
253 a5 = (a(65)*a(72)**a(67))/(a(66) + a(72)**a(68))
254 ralphf = a5 + a(69)*(m - a(72))
262 real*8 m,m2,m3,b2,b3,a(200)
272 elseif(m.le.a(82))
then
273 rbetaf = 1.06d0 + ((a(81)-1.06d0)/(a(82)-1.d0))*(m-1.d0)
275 b2 = (a(77)*m2**(7.d0/2.d0))/(a(78) + m2**a(79))
276 rbetaf = a(81) + ((b2-a(81))/(m2-a(82)))*(m-a(82))
278 rbetaf = (a(77)*m**(7.d0/2.d0))/(a(78) + m**a(79))
280 b3 = (a(77)*m3**(7.d0/2.d0))/(a(78) + m3**a(79))
281 rbetaf = b3 + a(80)*(m - m3)
290 real*8 m,m1,b1,a(200)
297 if(m.gt.(a(88)+0.1d0))
then
300 b1 = max(0.d0,a(83) + a(84)*(m1-a(85))**a(86))
302 rgammf = a(83) + a(84)*abs(m-a(85))**a(86)
303 elseif(m.le.a(88))
then
304 rgammf = b1 + (a(89) - b1)*((m - m1)/(a(88) - m1))**a(87)
306 if(a(88).gt.m1) b1 = a(89)
307 rgammf = b1 - 10.d0*b1*(m - a(88))
317 real*8 m,mhook,m2,b2,a(200)
327 elseif(m.le.a(94))
then
328 rhookf = a(95)*sqrt((m-mhook)/(a(94)-mhook))
329 elseif(m.le.2.d0)
then
331 b2 = (a(90) + a(91)*m2**(7.d0/2.d0))/
332 & (a(92)*m2**3 + m2**a(93)) - 1.d0
333 rhookf = a(95) + (b2-a(95))*((m-a(94))/(m2-a(94)))**a(96)
335 rhookf = (a(90) + a(91)*m**(7.d0/2.d0))/
336 & (a(92)*m**3 + m**a(93)) - 1.d0
351 lbgbf = (a(1)*m**a(5) + a(2)*m**a(8))/
352 & (a(3) + a(4)*m**a(7) + m**a(6))
366 f = a(1)*m**a(5) + a(2)*m**a(8)
367 df = a(5)*a(1)*m**(a(5)-1.d0) + a(8)*a(2)*m**(a(8)-1.d0)
368 g = a(3) + a(4)*m**a(7) + m**a(6)
369 dg = a(7)*a(4)*m**(a(7)-1.d0) + a(6)*m**(a(6)-1.d0)
371 lbgbdf = (df*g - f*dg)/(g*g)
378 real*8 m,mhefl,a4,a(200)
385 a4 = (a(9)*mhefl**a(10) - a(16))/(exp(mhefl*a(11))*a(16))
388 lbagbf = a(9)*m**a(10)/(1.d0 + a4*exp(m*a(11)))
390 lbagbf = (a(12) + a(13)*m**(a(15)+1.8d0))/(a(14) + m**a(15))
398 real*8 m,lum,a1,a(200)
404 a1 = min(a(20)/m**a(21),a(22)/m**a(23))
405 rgbf = a1*(lum**a(18) + a(17)*lum**a(19))
412 real*8 m,lum,a1,a(200)
418 a1 = min(a(20)/m**a(21),a(22)/m**a(23))
419 rgbdf = a1*(a(18)*lum**(a(18)-1.d0) +
420 & a(17)*a(19)*lum**(a(19)-1.d0))
427 real*8 m,lum,mhelf,m1,a1,a4,xx,a(200)
437 xx = 1.d0 + 5.d0*(a(24)-1.d0)*(m-m1)
444 elseif(m.ge.mhelf)
then
445 a1 = min(a(25)/m**a(26),a(27)/m**a(28))
447 a1 = a(31) + 5.d0*(a(32)-a(31))*(m-m1)
450 ragbf = a1*(lum**a(18) + a(17)*lum**a4)
457 real*8 m,lum,mhelf,m1,a1,a4,xx,a(200)
467 xx = 1.d0 + 5.d0*(a(24)-1.d0)*(m-m1)
474 elseif(m.ge.mhelf)
then
475 a1 = min(a(25)/m**a(26),a(27)/m**a(28))
477 a1 = a(31) + 5.d0*(a(32)-a(31))*(m-m1)
480 ragbdf = a1*(a(18)*lum**(a(18)-1.d0) +
481 & a(17)*a4*lum**(a4-1.d0))
494 m525 = m**(21.d0/4.d0)
495 mctmsf = (1.586d0 + m525)/(2.434d0 + 1.02d0*m525)
502 real*8 m,mhefl,mchefl,mcbagb,a3,a(200)
511 a3 = mchefl**4 - a(33)*mhefl**a(34)
512 mcheif = min(0.95d0*mcbagb,(a3 + a(33)*m**a(34))**(1.d0/4.d0))
517 real*8 FUNCTION mheif(mc,mhefl,mchefl)
519 real*8 mc,mhefl,mchefl,m1,m2,a3,a(200)
529 a3 = mchefl**4 - a(33)*mhefl**a(34)
530 m2 = ((mc**4 - a3)/a(33))**(1.d0/a(34))
543 mcagbf = (a(37) + a(35)*m**a(36))**(1.d0/4.d0)
557 mbagbf = ((mc4 - a(37))/a(35))**(1.d0/a(36))
565 real*8 FUNCTION mcgbtf(t,A,GB,tinf1,tinf2,tx)
567 real*8 t,a,gb(10),tinf1,tinf2,tx
572 mcgbtf = ((gb(5)-1.d0)*a*gb(4)*(tinf1 - t))**
573 & (1.d0/(1.d0-gb(5)))
575 mcgbtf = ((gb(6)-1.d0)*a*gb(3)*(tinf2 - t))**
576 & (1.d0/(1.d0-gb(6)))
582 real*8 FUNCTION lgbtf(t,A,GB,tinf1,tinf2,tx)
584 real*8 t,a,gb(10),tinf1,tinf2,tx
589 lgbtf = gb(4)*(((gb(5)-1.d0)*a*gb(4)*(tinf1 - t))**
590 & (gb(5)/(1.d0-gb(5))))
592 lgbtf = gb(3)*(((gb(6)-1.d0)*a*gb(3)*(tinf2 - t))**
593 & (gb(6)/(1.d0-gb(6))))
606 mcgbf = (lum/gb(4))**(1.d0/gb(5))
608 mcgbf = (lum/gb(3))**(1.d0/gb(6))
621 lmcgbf = gb(4)*(mc**gb(5))
623 lmcgbf = gb(3)*(mc**gb(6))
631 real*8 m,mhefl,a(200)
639 lheif = a(38)*m**a(39)/(1.d0 + a(41)*exp(m*a(40)))
641 lheif = (a(42) + a(43)*m**3.8d0)/(a(44) + m**2)
656 lhef = (a(45) + a(46)*m**(a(48)+0.1d0))/(a(47) + m**a(48))
670 rminf = (a(49)*m + (a(50)*m)**a(52)*mx)/(a(51) + mx)
675 real*8 FUNCTION thef(m,mc,mhefl)
677 real*8 m,mc,mhefl,mm,a(200)
689 mm = max((mhefl - m)/(mhefl - mc),1.0d-12)
690 thef = (a(54) + (
themsf(mc) - a(54))*mm**a(55))*
691 & (1.d0 + a(57)*exp(m*a(56)))
694 thef = (a(58)*m**a(61) + a(59)*mm)/(a(60) + mm)
700 real*8 FUNCTION tblf(m,mhefl,mfgb)
702 real*8 m,mhefl,mfgb,mr,m1,m2,r1,a(200)
713 m2 = log10(m1)/log10(mr)
715 tblf = a(64)*m1**a(63) + a(65)*m2**a(62)
719 tblf = a(66)*m**a(67)*r1**a(68)
729 real*8 m,mc,mhefl,mm,a4,a5,a(200)
740 a4 = (a(69) + a5 - a(74))/((a(74) - a5)*exp(a(71)*mhefl))
741 mm = max((m-mc)/(mhefl - mc),1.0d-12)
742 lzahbf = a5 + (1.d0 + a(72))*a(69)*mm**a(70)/
743 & ((1.d0 + a(72)*mm**a(73))*(1.d0 + a4*exp(m*a(71))))
750 real*8 m,mc,mhefl,rx,ry,mm,f,a(200)
761 mm = max((m-mc)/(mhefl - mc),1.0d-12)
762 f = (1.d0 + a(76))*mm**a(75)/(1.d0 + a(76)*mm**a(77))
763 rzahbf = (1.d0 - f)*rx + f*ry
775 lzhef = 1.5262d+04*m**(41.d0/4.d0)/
776 & (0.0469d0 + m**6*(31.18d0 + m15*(29.54d0 + m15)))
787 rzhef = 0.2391d0*m**4.6d0/(0.0065d0 + (0.162d0 + m)*m**3)
798 themsf = (0.4129d0 + 18.81d0*m**4 + 1.853d0*m**6)/m**(13.d0/2.d0)
805 real*8 m,lum,rx,lx,cm
810 cm = 2.0d-03*m**(5.d0/2.d0)/(2.d0 + m**5)
811 rhehgf = rx*(lum/lx)**0.2d0 + 0.02d0*(exp(cm*lum) - exp(cm*lx))
822 rhegbf = 0.08d0*lum**(3.d0/4.d0)
834 b = 0.002d0*max(1.d0,2.5d0/m)
836 lpertf = ((1.d0 + b**c)*((mew/b)**c))/(1.d0+(mew/b)**c)
849 b = 0.006d0*max(1.d0,2.5d0/m)
852 rpertf = ((1.d0 + b**c)*((mew/b)**c)*(mew**(a/q)))/
862 vrotf = 330.d0*m**3.3d0/(15.d0 + m**3.45d0)
867 real*8 FUNCTION celamf(kw,m,lum,rad,rzams,menv,fac)
870 real*8 m,lum,rad,rzams,menv,fac
871 real*8 lam1,lam2,m1,logm,logl
892 if(kw.gt.3) m1 = 100.d0
893 lam1 = 3.d0/(2.4d0 + 1.d0/m1**(3.d0/2.d0)) - 0.15d0*logl
894 lam1 = min(lam1,0.8d0)
896 lam1 = -3.5d0 - 0.75d0*logm + logl
899 lam2 = min(0.9d0,0.58d0 + 0.75d0*logm) - 0.08d0*logl
901 lam1 = min(lam2,lam1)
903 lam1 = max(lam2,lam1)
904 lam1 = min(lam1,1.d0)
911 aa = min(1.2d0*(logm - 0.25d0)**2 - 0.7d0,-0.5d0)
913 aa = max(-0.2d0 - logm,-0.5d0)
915 bb = max(3.d0 - 5.d0*logm,1.5d0)
916 cc = max(3.7d0 + 1.6d0*logm,3.3d0 + 2.1d0*logm)
917 lam2 = aa + atan(bb*(cc - logl))
919 dd = max(0.d0,min(0.15d0,0.15d0 - 0.25d0*logm))
920 lam2 = lam2 + dd*(logl - 2.d0)
922 lam2 = max(lam2,1.d-2)
923 lam2 = max(1.d0/lam2,lam1)
927 lam1 = lam1 + fac*(lam2 - lam1)
934 lam2 = 0.42d0*(rzams/rad)**0.4d0
942 elseif(menv.ge.1.d0)
then
946 celamf = lam2 + sqrt(menv)*(lam1 - lam2)