- 积分
- 0
- 注册时间
- 2004-11-3
- 仿真币
-
- 最后登录
- 1970-1-1
|
! PROGRAM PCYLIND
DIMENSION PSI(15,9)
CHARACTER*100 GRAPH
CHARACTER*9 SYMBOL/'0',",'*',",'1',",'+',",'2'/
DATA XRANGE,YRANGE,RR,NX/3.5,2.0,1.0,100/
DATA E,H,ITER/0.01,0.25,0/
NI=XRANGE/H+1.1
NJ=YRANGE/H+1.1
N1=(XRANGE-RR)/H+0.1
N2=RR/H+1.1
N3=NJ-1
DO 10 I=1,NI
DO 10 J=1,NJ
10  SI(I,J)=0.0
DO 20 J=2,N3
20 PSI(1,J)=(J-1)*H
DO 30 I=1,NI
30 PSI(I,NJ)=N3*H
40 ITER=ITER+1
DO 50 I=2,NI
DO 60 J=2,N3
BB=PSI(I,J)
IF(J.LE.N2)THEN
IF(I.LE.N1)GOTO 70
A=(J-1)*H-SQRT(1-((NI-1)*H)**2)
B=(NI-I)*H-SQRT(1-((J-1)*H)**2)
IF(A.LE.0.0.OR.B.LE.0.0)GOTO 60
IF(A.GT.H)A=H
IF(B.GT.H)B=H
PSI(I,J)=H*((PSI(I-1,J)/H+PSI(I+1,J)/B)/(B+H)+(PSI(I,J-1)/A
$+PSI(I,J+1)/H)/(A+H))/(1/A+1/B)
GOTO 80
ELSE
IF(I.NE.NI)GOTO 70
PSI(I,J)=0.25*(2*PSI(I-1,J)+PSI(I,J-1)+PSI(I,J+1))
GOTO 80
END IF
70 PSI(I,J)=0.25*(PSI(I-1,J)+PSI(I,J-1)+PSI(I+1,J)+PSI(I,J+1))
80 AAA=ABS(PSI(I,J)-BB)
IF(I.EQ.2.AND.J.EQ.2)AA=AAA
IF(AAA.LE.AA)GOTO 60
AA=AAA
60 CONTINUE
50 CONTINUE
IF(ITER.EQ.50)GOTO 90
IF(AA.GT.E)GOTO 40
90 WRITE(6,100)ITER((PSI(I,J), J=1,NJ),I=1,NI)
100 FORMAT("1",5X,5HITER: ,I2,15(//50X,9F7.2//),"1"//////////)
NY=0.6*NX*YRANGE/XRANGE+0.001
DELX=XRANGE/NX
DELY=YRANGE/NY
DELTA=PSI(1,NJ)/9.0
DO 110 JSYMBL=1,NY
Y=YRANGE-(JSYMBL-0.5)*DELY
J=1+Y/H
Y1=Y-(J-1)*H
Y2=H-Y1
DO 120 ISYMBL=1,NX
X=(ISYMBL-0.5)*DELX
XX=XRANGE-X
IF((Y.GT.RR).OR.(Y.LE.RR.AND.XX.GT.RR))GOTO 130
R=SQRT(XX**2+Y**2)
IF(R.LT.RR)GOTO 140
130 I=1+X/H
X1=X-(I-1)*H
X2=H-X1
A1=X2*Y2
A2=X2*Y1
A3=X1*Y1
A4=X1*Y2
PSIO=(A1*PSI(I,J)+A2*PSI(I,J+1)+A3*PSI(I+1,J+1)+A4*PSI(I+1,J))/
$H**2
NRANGE=1+PSIO/DELTA
GRAPH(ISYMBL)=SYMBOL(NRANGE)
GOTO 120
140 GRAPH(ISYMBL)=''
120 CONTINUE
110 WRITE(6,200)GRAPH
200 FORMAT(20X,100A1)
WRITE(6,210)
210 FORMAT(////43X,20HFIGURE:CHANNEL FLOW,
$ 26H PAST A CIRCULAR CYLINDER.)
STOP
END |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|