1624 dimension u(jmax,4),f(jmax,4),h(jmax,4),y(jmax,4),q1(jmax),
1626 dimension wk(jmax,4)
1627 dimension drp(jmax),drm(jmax),dr(jmax)
1628 dimension betaj(jmax),tej(jmax)
1629 dimension wt(jmax,4),tauabst(jmax),taut(jmax)
1631 dimension okc(jmax),hhc(jmax),prc(jmax),tec(jmax),betac(jmax),
1632 & ssc(jmax),dec(jmax),betao(jmax)
1633 dimension des(jmax),oes1(jmax),ou(jmax,4)
1641 drp(j) = x1(j+1)-x1(j)
1642 drm(j) = x1(j)-x1(j-1)
1643 dr(j) = 0.5*(drp(j)+drm(j))
1645 drp(1) = x1(2) -x1(1)
1646 drm(jx)= x1(jx)-x1(jx-1)
1667 ok = (r/rm1)*sqrt(0.5/r3)
1682 pr = (aa/3.)*(te**4)+rmu*de*te
1684 if (
kcool.eq.1) fac = 1./((1.+1./taup/(1.5*tau+sqrt(3.))))
1685 if (
kcool.eq.0) fac = 1.
1687 pr = (aa/3.)*(te**4)*fac+rmu*de*te
1691 hh = sqrt(b5*pr/de)/ok
1693 ww = 2*ainp1*pr*hh*rg
1696 a = 3*(1-beta)+beta/gm1
1697 ee = (a+0.5)*ws+0.5*(vx*vx+vp*vp)
1707 f(j,2) = rs*(vx*vx+ws)
1708 f(j,3) = rs*(vx*vp+alpha*ws)
1709 f(j,4) = rs*(vx*(ee+ws)+alpha*ws*vp)
1719 xkff = xkkr*demn*(temn**(-3.5))
1720 tauff = xkff*de*hh*rg
1721 taues = xkes*de*hh*rg
1723 qbr = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1724 taup = qbr/(8.*aa*cc*(te**4))
1726 if (
kcool .eq. 1)
then
1727 taueff = sqrt(taup*(tau+2./sqrt(3.)))
1728 else if (
kcool .eq. 0)
then
1729 taueff = sqrt(3*tau*tauff)
1732 if (ns.eq.lns+1)
then
1734 oes1(j)=u(j,4)/u(j,1)-((u(j,2)/u(j,1))*(u(j,2)/u(j,1))
1735 & +(u(j,3)/u(j,1))*(u(j,3)/u(j,1)))/2.
1746 fd = 16*aa*(te**4)/(3*xk*de*hh*cc2)
1747 ff = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg*rg/cc2/cc
1749 if (
kcool .eq.1)
then
1750 fm = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
1756 h(j,2) = wc*(1-dlnor)+ss*(2*vp*vk+vp*vp)
1757 h(j,3) =-ss*(vx*vp+vx*dlkdr+alpha*ws)
1758 h(j,4) =-r*rs*(vx*vp+alpha*ws)*dokdr-r*fm
1759 IF (ns.EQ.lns+1)
THEN
1761 fftr = fm/unit/xmcrit/cc
1762 xlumi = xlumi+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1763 if (j.eq.jx) xljx=2.*pi*(r*rg)*(dr(j)*rg)*fftr
1764 if (taueff.le.1.)
xltn=
xltn+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1765 if (taueff.gt.1.) xltk=xltk+2.*pi*(r*rg)*(dr(j)*rg)*fftr
1782 if (ktcond.eq.1)
then
1794 xkei=alpha*ef*okc(j)*(hhc(j)**3)*prc(j)/tec(j)
1795 cn=cv*xkei*(tec(j+1)-tec(j))/drp(j)
1796 & *sqrt(2./xnpl1)*ainp1*unit
1798 f(j,4)=f(j,4)-x1(j)*cn
1806 ave1 = 0.5*(u(j+1,1)+u(j,1))
1807 ave2 = 0.5*(u(j+1,2)+u(j,2))
1808 ave3 = 0.5*(u(j+1,3)+u(j,3))
1809 ave4 = 0.5*(u(j+1,4)+u(j,4))
1810 fsa1 = f(j+1,1)-f(j,1)
1811 fsa2 = f(j+1,2)-f(j,2)
1812 fsa3 = f(j+1,3)-f(j,3)
1813 fsa4 = f(j+1,4)-f(j,4)
1814 swa1 = 0.5*(h(j+1,1)+h(j,1))
1815 swa2 = 0.5*(h(j+1,2)+h(j,2))
1816 swa3 = 0.5*(h(j+1,3)+h(j,3))
1817 swa4 = 0.5*(h(j+1,4)+h(j,4))
1819 y(j,1) = ave1-0.5*dtdx*fsa1+0.5*dt*swa1
1820 y(j,2) = ave2-0.5*dtdx*fsa2+0.5*dt*swa2
1821 y(j,3) = ave3-0.5*dtdx*fsa3+0.5*dt*swa3
1822 y(j,4) = ave4-0.5*dtdx*fsa4+0.5*dt*swa4
1823 es1(j)=y(j,4)/y(j,1)-((y(j,2)/y(j,1))*(y(j,2)/y(j,1))
1824 & +(y(j,3)/y(j,1))*(y(j,3)/y(j,1)))/2.
1827 fsa1 = f(2,1)-f(1,1)
1828 fsa2 = f(2,2)-f(1,2)
1829 fsa3 = f(2,3)-f(1,3)
1830 fsa4 = f(2,4)-f(1,4)
1831 swa1 = 0.5*(h(1,1)+h(2,1))
1832 swa2 = 0.5*(h(1,2)+h(2,2))
1833 swa3 = 0.5*(h(1,3)+h(2,3))
1834 swa4 = 0.5*(h(1,4)+h(2,4))
1835 wk(1,1) = u(1,1)-dtdx*fsa1+dt*swa1
1836 wk(1,2) = u(1,2)-dtdx*fsa2+dt*swa2
1837 wk(1,3) = u(1,3)-dtdx*fsa3+dt*swa3
1838 wk(1,4) = u(1,4)-dtdx*fsa4+dt*swa4
1845 if (kcau1+kcau2.eq.0)
then
1856 q2(j)= qu1*abs(vxp-vxm)
1861 des(j) = dtdx*(q2(j)*(es1(j+1)-es1(j))
1862 & -q2(j-1)*(es1(j)-es1(j-1)))
1865 des(1)=dtdx*q2(1)*(es1(2)-es1(1))
1868 es1(j) = es1(j)+des(j)
1876 if (
nl(j).ge.2)
then
1887 if (y(j,1).le.0.e0)
then
1890 nlmax=max(nlmax,
nl(j))
1896 if (es1(j).le.0.e0)
then
1900 nlmax=max(nlmax,
nl(j))
1904 if (kcau1.eq.1)
then
1908 if (nlmax.le.10)
then
1928 if (y(j,1).le.0.)
then
1931 if (es1(j).le.0.)
then
1941 r = 0.5*(x1(j)+x1(j+1))
1945 ok = r/rm1*sqrt(0.5/r3)
1951 es = ee-0.5*(vx*vx+vp*vp)
1953 hhs = sqrt(b5*(ain/ainp1)/ss)/ok
1963 a = 3*(1-beta)+beta/gm1
1967 de = ss/(2*ain*hh*rg)
1970 xkff = xkkr*demn*(temn**(-3.5))
1971 tauff = xkff*de*hh*rg
1974 taues = xkes*de*hh*rg
1976 qbr = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
1977 taup = qbr/(8.*aa*cc*(te**4))
1978 pr = ww/(2*ainp1*hh*rg)
1979 if (
kcool.eq.1)
then
1980 te =
ondo(de,pr,taup,tau)
1981 else if (
kcool.eq.0)
then
1987 if (abs((beta-obeta)/beta) .lt. 1.e-6)
go to 730
1994 if (
kcool .eq. 1)
then
1995 taueff = sqrt(taup*(tau+2./sqrt(3.)))
1997 taueff = sqrt(3*tau*tauff)
2000 if (taueff.gt.1.4618e30)
then
2011 hhs = sqrt(b5*(ain/ainp1)/ss)/ok
2012 a = 3*(1-beta)+beta/gm1
2016 de = ss/(2*ain*hh*rg)
2019 xkff = xkkr*demn*(temn**(-3.5))
2020 tauff = xkff*de*hh*rg
2021 taues = xkes*de*hh*rg
2023 qbr = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2024 taup = qbr/(8.*aa*cc*(te**4))
2025 pr = ww/(2*ainp1*hh*rg)
2026 te =
ondo(de,pr,taup,tau)
2031 f(j,2) = rs*(vx*vx+ws)
2032 f(j,3) = rs*(vx*vp+alpha*ws)
2033 f(j,4) = rs*(vx*(ee+ws)+alpha*ws*vp)
2036 dlnor = -(0.5+r/rm1)
2042 fd = 16*aa*(te**4)/(3*xk*de*hh*cc2)
2044 if (
kcool .eq.1)
then
2045 fm = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
2051 h(j,2) = wc*(1-dlnor)+ss*(2*vp*vk+vp*vp)
2052 h(j,3) = -ss*(vx*vp+vx*dlkdr+alpha*ws)
2053 h(j,4) = -r*rs*(vx*vp+alpha*ws)*dokdr-r*fm
2067 if (ktcond.eq.1)
then
2079 xkei = alpha*ef*okc(j)*(hhc(j)**3)*prc(j)/tec(j)
2080 cn = cv*xkei*(tec(j+1)-tec(j))/drp(j)
2081 & *sqrt(2./xnpl1)*ainp1*unit
2083 f(j,4)=f(j,4)-x1(j)*cn
2094 fsa1 = f(j,1)-f(j-1,1)
2095 fsa2 = f(j,2)-f(j-1,2)
2096 fsa3 = f(j,3)-f(j-1,3)
2097 fsa4 = f(j,4)-f(j-1,4)
2098 swa1 = 0.5*(h(j,1)+h(j-1,1))
2099 swa2 = 0.5*(h(j,2)+h(j-1,2))
2100 swa3 = 0.5*(h(j,3)+h(j-1,3))
2101 swa4 = 0.5*(h(j,4)+h(j-1,4))
2102 wk(j,1) = u(j,1)-dtdx*fsa1+dt*swa1
2103 wk(j,2) = u(j,2)-dtdx*fsa2+dt*swa2
2104 wk(j,3) = u(j,3)-dtdx*fsa3+dt*swa3
2105 wk(j,4) = u(j,4)-dtdx*fsa4+dt*swa4
2113 if (kcau1+kcau2.eq.0)
then
2122 q1(j)= qb1*abs(vxp-vxm)
2127 d(j,1) = dtdx*(q1(j)*(u(j+1,1)-u(j,1))-q1(j-1)*(u(j,1)-u(j-1,1)))
2128 d(j,2) = dtdx*(q1(j)*(u(j+1,2)-u(j,2))-q1(j-1)*(u(j,2)-u(j-1,2)))
2129 d(j,3) = dtdx*(q1(j)*(u(j+1,3)-u(j,3))-q1(j-1)*(u(j,3)-u(j-1,3)))
2130 d(j,4) = dtdx*(q1(j)*(u(j+1,4)-u(j,4))-q1(j-1)*(u(j,4)-u(j-1,4)))
2134 d(1,1) = dtdx*q1(1)*(u(2,1)-u(1,1))
2135 d(1,2) = dtdx*q1(1)*(u(2,2)-u(1,2))
2136 d(1,3) = dtdx*q1(1)*(u(2,3)-u(1,3))
2137 d(1,4) = dtdx*q1(1)*(u(2,4)-u(1,4))
2140 u(j,1) = wk(j,1)+d(j,1)
2141 u(j,2) = wk(j,2)+d(j,2)
2142 u(j,3) = wk(j,3)+d(j,3)
2143 u(j,4) = wk(j,4)+d(j,4)
2144 es1(j) = u(j,4)/u(j,1)-((u(j,2)/u(j,1))*(u(j,2)/u(j,1))
2145 & +(u(j,3)/u(j,1))*(u(j,3)/u(j,1)))/2.
2150 des(j) = dtdx*(q2(j)*(es1(j+1)-es1(j))
2151 & -q2(j-1)*(es1(j)-es1(j-1)))
2154 des(1)= dtdx*q2(1)*(es1(2)-es1(1))
2157 es1(j) = es1(j)+des(j)
2161 if (
nl(j).ge.2)
then
2173 if (u(j,1).le.0.e14)
then
2176 nlmax=max(nlmax,
nl(j))
2182 if (es1(j).le.0.e14)
then
2186 nlmax=max(nlmax,
nl(j))
2190 if (kcau2.eq.1)
then
2194 if (nlmax.le.10)
then
2214 if (u(j,1).le.0.)
then
2217 if (es1(j).le.0.)
then
2233 ok = r/rm1*sqrt(0.5/r3)
2239 es = ee-0.5*(vx*vx+vp*vp)
2241 hhs = sqrt(b5*(ain/ainp1)/ss)/ok
2251 a = 3*(1-beta)+beta/gm1
2255 de = ss/(2*ain*hh*rg)
2258 xkff = xkkr*demn*(temn**(-3.5))
2260 tauff = xkff*de*hh*rg
2262 if (tauff.le.0.)
print *,
"TAUABS=",tauff,
"LW1D2"
2264 taues = xkes*de*hh*rg
2266 qbr = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2267 taup = qbr/(8.*aa*cc*(te**4))
2268 pr = ww/(2*ainp1*hh*rg)
2269 if (
kcool.eq.1)
then
2270 te=
ondo(de,pr,taup,tau)
2271 else if (
kcool.eq.0)
then
2277 if (abs((beta-obeta)/beta) .lt. 1.e-6)
go to 731
2284 if (
kcool .eq. 1)
then
2285 taueff = sqrt(taup*(tau+2./sqrt(3.)))
2287 taueff = sqrt(3*tau*tauff)
2290 if (taueff.gt.1.4618e30)
then
2301 a = 3*(1-beta)+beta/gm1
2305 de = ss/(2*ain*hh*rg)
2308 xkff = xkkr*demn*(temn**(-3.5))
2309 tauff = xkff*de*hh*rg
2310 taues = xkes*de*hh*rg
2312 qbr = 2.0*xeff*ajn*de*de*sqrt(te)*hh*rg
2313 taup = qbr/(8.*aa*cc*(te**4))
2314 pr = ww/(2*ainp1*hh*rg)
2315 te =
ondo(de,pr,taup,tau)
2320 fd = 16*aa*(te**4)/(3.*xk*de*hh*cc2)
2323 if (
kcool .eq.1)
then
2324 fm = 8.*aa*(te**4)/(1.5*tau+sqrt(3.)+1./taup)*unit
2338 if (
kcool .eq. 1)
then
2339 taueff = sqrt(taup*(tau+2./sqrt(3.)))
2341 taueff = sqrt(3*tau*tauff)
2350 fftr = fm/unit/xmcrit/cc
2351 xlumi = xlumi+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2352 if (taueff.le.1.)
xltn=
xltn+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2353 if (taueff.gt.1.) xltk=xltk+2.*pi*(r*rg)*(dr(j)*rg)*fftr
2356 xmdeff = -2.*pi*r*rg*vx*cc*ss/xmcrit
2359 IF (mod(ns,klc).EQ.0)
then
2361 else if (frag1 .eq. 1)
then
2363 else if (r .ge. 5.)
then
2367 901
WRITE (10,910) time,r,ss,te,xmdeff
2368 910
FORMAT (1pe10.3,1x,1pe10.3,1x,1pe10.3,1x,1pe10.3,1x,1pe10.3,
2387 if (imore .eq. 2)
then
2388 if (mod(ns,200) .eq. 0)
then
2389 write(6,88)
"ns=",ns,
" t=",time,
" dt=",dt,
" L=",xlumi
2390 88
format (a3,i12,2x,a3,1pe9.3,2x,a3,1pe9.3,2x,a3,1pe9.3)
2394 IF (mod(ns,klc).EQ.0)
WRITE (9,900) time,xlumi,
xltn,xltk,dt,ns
2400 900
FORMAT (1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,1pe10.4,2x,i9)
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp QU common radia kr common prtrb xmdi common optic xltk common lscal kpr common shoki kes(jmax) common/coula/nlmax
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp xkappa
double precision function temp(DE, PR)
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp QU common radia kr common prtrb xmdi common optic tauo(jmax) common/lumi/xlumi
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp QU common radia kr common prtrb xmdi common optic xltn
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich kcool
double precision function ondo(DE, PR, taup, tau)
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp QU common radia kr common prtrb xmdi common optic tauabso(jmax)
IMPLICIT REAL *A O Z RG B5 common BPARM XNPL1 common BMESH JX common BSTEP lns common BWRT1 IRSTRT common BPHY0 kf common licur file10 common curve IMORE common swich ktcond c common error abserr common bradi mesh common artvp QU common radia kr common prtrb xmdi common optic xltk common lscal kpr common shoki nl(jmax) common/energ/es1(jmax) common/fluxr0/drepsi(jmax)