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/09/06 14:31:56
![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](/uploads/image/z/14241112-16-2.jpg?t=Fortran77%E7%9A%84%E7%BC%96%E7%A8%8B%E9%97%AE%E9%A2%98%2CC+WATER+HAMMER+FINITEDIMENSION+V%28100%29%2CH%28100%29READ%285%2C1%29+DX%2CDT%2CC%2CHO%2CVO%2CTOL%2CIMAX1+FORMAT%286F7.0%2CI4%29IMAX1%3DIMAX-1V%28I%29%3DVO2+H%28I%29%3DHOT%3D0N%3D0100+T%3DT%2BDTN%3DN%2B1IF%28T.GT.TOL%29+GO+TO+3SR%3D%28TOL-T%29%2FTOLGO+TO+43+SR%3D04+CONTINUEV%28IMAX%29%3DSR%2ASQRT%282.%2A9.81%2AH)
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
没有说问题啊.