1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| subroutine lapadj (at,gam,za,cp,ch,nt,ce)
real at(20),gam(20),za(20),cp(20),ch(20),ce(20)
real s2,d1,d2,d3,db,dt
integer nt
nt=6
do 7998 i=1,19
ch(i)=0.0
7998 continue
7999 s2=0.0
za(19)=0.0
do 8002 i=18,2,-1
d1=at(i+1)-at(i)
d2=gam(i)*(za(i)-za(i+1))
if (d1.gt.d2) then
d3=1.0*(d1-d2)
db=cp(i)*d3/(cp(i)+cp(i+1))
dt=cp(i+1)*d3/(cp(i)+cp(i+1))
at(i)=at(i)+dt
at(i+1)=at(i+1)-db
ch(i)=ch(i)+dt
ch(i+1)=ch(i+1)-db
s2=s2+d3
nt=i
end if
8002 continue
if (s2.gt..005)then
goto 7999
endif
do 8005 i=2,18
if (at(19).lt.(at(18)+.04))then
ce(i)=ce(i)*.95
end if
ce(i)=ce(i)+ch(i)/8.0
if(ch(i).lt..00001) then
ce(i)=ce(i)*.99
end if
8005 continue
return
end |
Partager