Fortran77的编程问题,C WATER HAMMER FINITEDIMENSION V(100),H(100)READ(5,1) DX,DT,C,HO,VO,TOL,IMAX1 FORMAT(6F7.0,I4)IMAX1=IMAX-1V(I)=VO2 H(I)=HOT=0N=0100 T=T+DTN=N+1IF(T.GT.TOL) GO TO 3SR=(TOL-T)/TOLGO TO 43 SR=04 CONTINUEV(IMAX)=SR*SQRT(2.*9.81*H
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/24 11:00:31
Fortran77的编程问题,C WATER HAMMER FINITEDIMENSION V(100),H(100)READ(5,1) DX,DT,C,HO,VO,TOL,IMAX1 FORMAT(6F7.0,I4)IMAX1=IMAX-1V(I)=VO2 H(I)=HOT=0N=0100 T=T+DTN=N+1IF(T.GT.TOL) GO TO 3SR=(TOL-T)/TOLGO TO 43 SR=04 CONTINUEV(IMAX)=SR*SQRT(2.*9.81*H
Fortran77的编程问题,
C WATER HAMMER FINITE
DIMENSION V(100),H(100)
READ(5,1) DX,DT,C,HO,VO,TOL,IMAX
1 FORMAT(6F7.0,I4)
IMAX1=IMAX-1
V(I)=VO
2 H(I)=HO
T=0
N=0
100 T=T+DT
N=N+1
IF(T.GT.TOL) GO TO 3
SR=(TOL-T)/TOL
GO TO 4
3 SR=0
4 CONTINUE
V(IMAX)=SR*SQRT(2.*9.81*HO)
\x05 DO 5 I=2,IMAX1
5 V(I)=V(I)-9.81*DT*(H(I)-H(I-1))/DX
\x05 DO 6 I=2,IMAX1
6 H(I)=H(I)-DT*C**2/9.81*(V(I+1))-V(I)/DX
WRITE (6,11) T
11 FORMAT(F10.3)
\x05 WRITE(6,12) (V(I),I=1,IMAX)
\x05 WRITE(6,12) (H(I),I=1,IMAX)
12\x05 FORMAT (12F10.4)
\x05 IF(N.LT.200) GO TO 100
\x05 STOP
\x05 END
Fortran77的编程问题,C WATER HAMMER FINITEDIMENSION V(100),H(100)READ(5,1) DX,DT,C,HO,VO,TOL,IMAX1 FORMAT(6F7.0,I4)IMAX1=IMAX-1V(I)=VO2 H(I)=HOT=0N=0100 T=T+DTN=N+1IF(T.GT.TOL) GO TO 3SR=(TOL-T)/TOLGO TO 43 SR=04 CONTINUEV(IMAX)=SR*SQRT(2.*9.81*H
没有说问题啊.