2 real*8 FUNCTION mlwind(kw,lum,r,mt,mc,rl,z)
5 real*8 lum,r,mt,mc,
rl,z
6 real*8 dml,dms,dmt,p0,x,mew,lum0,kap,neta,bwind
7 parameter(lum0=7.0d+04,kap=-0.5d0)
15 if(lum.gt.4000.d0)
then
16 x = min(1.d0,(lum-4000.d0)/500.d0)
17 dms = 9.6d-15*x*(r**0.81d0)*(lum**1.24d0)*(mt**0.16d0)
18 dms = dms*(z/0.02d0)**(1.d0/2.d0)
22 if(kw.ge.2.and.kw.le.9)
then
24 dml = neta*4.0d-13*r*lum/mt
27 if(
rl.gt.0.d0) dml = dml*(1.d0 + bwind*(min(0.5d0,(r/
rl)))**6)
30 if(kw.eq.5.or.kw.eq.6)
then
31 p0 = -2.07d0 - 0.9d0*log10(mt) + 1.94d0*log10(r)
34 dmt = -11.4d0+0.0125d0*(p0-100.d0*max(mt-2.5d0,0.d0))
36 dmt = 1.d0*min(dmt,1.36d-09*lum)
40 dms = max(dml,1.0d-13*lum**(3.d0/2.d0))
43 mew = ((mt-mc)/mt)*min(5.d0,max(1.2d0,(lum/lum0)**kap))
46 dml = 1.0d-13*lum**(3.d0/2.d0)*(1.d0 - mew)
47 dml = dml*(z/0.02d0)**(1.d0/2.d0)
51 x = 1.0d-5*r*sqrt(lum)