nafiz27me
Technical User
- Feb 26, 2012
- 2
PROGRAM CYLINDRICAL FIN
DIMENSION T(500,500,500), OLDT(500,500,500),ERR(500,500,500)
DIMENSION R(500),Y(500),Z(500)
REAL CC,H,DR,DY,DZ,A,D,RY,YZ,ZR,B,E,TA,RL,YL,ZL
+P,AC,QF,MF,Q,EF,EFF,QMAX,AS,LC,QT,QF1,QF2
INTEGER I,J,K,M,N,L,M1,N1,L1,M2,M4,M34,N2,N4,N34,L2,L4,L34
RL=0.5
YL=6.283
ZL=0.04
M=100
N=40
L=20
M2=((M/2)+1)
M4=((M/4)+1)
M34=((3*M/4)+1)
N2=((N/2)+1)
N4=((N/4)+1)
N34=((3*N/4)+1)
L2=((L/2)+1)
L4=((L/4)+1)
L34=((3*L/4)+1)
DR=RL/M
DY=YL/N
DZ=ZL/L
CC=400.0
H=10.0
TA=25
M1=M-1
N1=N-1
L1=L-1
***VARIABLES***** A=DR*DY*DZ D=DR+DY+DZ RY=DR*DY YZ=DY*DZ ZR=DZ*DR E=RY+YZ+ZR
***VARIABLES FOR EFFICIENCY AND EFFECTIVENESS (CROSS-SECTION AREA,PERIMETER,M,SURFACE AREA OF FIN)***** AC=3.1416*DR*2 P=2(3.1416*DR+DZ) MF=((H*P)/(CC*AC))(0.5) AS=2*3.1416*DR*DZ+3.1416*DR*2 ********************** distance discritization ************
R(1)=0.0
Y(1)=0.0
Z(1)=0.0
R(M+1)=RL
Y(N+1)=YL
Z(L+1)=ZL
DO I=2,M
R(I)=R(I-1)+DR
END DO
DO J=2,N
Y(J)=Y(J-1)+DY
END DO
DO K=2,L
Z(K)=Z(K-1)+DZ
END DO
DO I=1,M
DO J=1,N
DO K=1,L
T(I,J,K)=0.0
END DO
END DO
END DO
DO I=1,M
DO J=1,N
T(I,J,1)=400
END DO
END DO
ITER=0.0
READ(*,*) LAST
31 CONTINUE
ITER=ITER+1
********************FORMULAS**************************************************
DO I=2,M1
DO J=2,N1
DO K=2,L1
T(I,J,K)=((R*DR*T(I+1,J,K)*(YZ)**2.0)-((T(I+1,J,K)+T(I-1,J,K))*
+(R*YZ)**2.0)-((T(I,J+1,K)+T(I,J-1,K))*(ZR**2.0))-((T(I,J,K+1)+
+T(I,J,K-1))*(R*RY)**2.0))/((R*DR*(YZ)**2.0)-(2.0*(R*YZ)**2.0)-
+(2.0*(ZR)**2.0)-(2.0*(R*RY)**2.0))
END DO
END DO
END DO
******************** END OF ITERATIONG FORMULAS******* DO I=1,M DO J=1,N DO K=1,L OLDT(I,J,K)=T(I,J,K) END DO END DO END DO
DO I=1,M
DO J=1,N
DO K=1,L
ERR(I,J,K)=T(I,J,K)-OLDT(I,J,K)
END DO
END DO
END DO
EMAX=0.0
EMAX=MAX(EMAX,ERR(I,J,K))
WRITE(*,*) ITER, EMAX
IF (ITER.LT.LAST) GOTO 31
WRITE(*,*) DR,A,B,E
END PROGRAM CYLINDRICAL FIN
"Hi this is my program to solve a problem of three dimensional cylindrical fin. But when i run this program in fortran 6.2 this error shows up "Error: The shapes of the array expressions do not conform. [T]" now i don't understand why this is happening. I need quick assistance.. " Anyone please help me.
DIMENSION T(500,500,500), OLDT(500,500,500),ERR(500,500,500)
DIMENSION R(500),Y(500),Z(500)
REAL CC,H,DR,DY,DZ,A,D,RY,YZ,ZR,B,E,TA,RL,YL,ZL
+P,AC,QF,MF,Q,EF,EFF,QMAX,AS,LC,QT,QF1,QF2
INTEGER I,J,K,M,N,L,M1,N1,L1,M2,M4,M34,N2,N4,N34,L2,L4,L34
RL=0.5
YL=6.283
ZL=0.04
M=100
N=40
L=20
M2=((M/2)+1)
M4=((M/4)+1)
M34=((3*M/4)+1)
N2=((N/2)+1)
N4=((N/4)+1)
N34=((3*N/4)+1)
L2=((L/2)+1)
L4=((L/4)+1)
L34=((3*L/4)+1)
DR=RL/M
DY=YL/N
DZ=ZL/L
CC=400.0
H=10.0
TA=25
M1=M-1
N1=N-1
L1=L-1
***VARIABLES***** A=DR*DY*DZ D=DR+DY+DZ RY=DR*DY YZ=DY*DZ ZR=DZ*DR E=RY+YZ+ZR
***VARIABLES FOR EFFICIENCY AND EFFECTIVENESS (CROSS-SECTION AREA,PERIMETER,M,SURFACE AREA OF FIN)***** AC=3.1416*DR*2 P=2(3.1416*DR+DZ) MF=((H*P)/(CC*AC))(0.5) AS=2*3.1416*DR*DZ+3.1416*DR*2 ********************** distance discritization ************
R(1)=0.0
Y(1)=0.0
Z(1)=0.0
R(M+1)=RL
Y(N+1)=YL
Z(L+1)=ZL
DO I=2,M
R(I)=R(I-1)+DR
END DO
DO J=2,N
Y(J)=Y(J-1)+DY
END DO
DO K=2,L
Z(K)=Z(K-1)+DZ
END DO
DO I=1,M
DO J=1,N
DO K=1,L
T(I,J,K)=0.0
END DO
END DO
END DO
DO I=1,M
DO J=1,N
T(I,J,1)=400
END DO
END DO
ITER=0.0
READ(*,*) LAST
31 CONTINUE
ITER=ITER+1
********************FORMULAS**************************************************
DO I=2,M1
DO J=2,N1
DO K=2,L1
T(I,J,K)=((R*DR*T(I+1,J,K)*(YZ)**2.0)-((T(I+1,J,K)+T(I-1,J,K))*
+(R*YZ)**2.0)-((T(I,J+1,K)+T(I,J-1,K))*(ZR**2.0))-((T(I,J,K+1)+
+T(I,J,K-1))*(R*RY)**2.0))/((R*DR*(YZ)**2.0)-(2.0*(R*YZ)**2.0)-
+(2.0*(ZR)**2.0)-(2.0*(R*RY)**2.0))
END DO
END DO
END DO
******************** END OF ITERATIONG FORMULAS******* DO I=1,M DO J=1,N DO K=1,L OLDT(I,J,K)=T(I,J,K) END DO END DO END DO
DO I=1,M
DO J=1,N
DO K=1,L
ERR(I,J,K)=T(I,J,K)-OLDT(I,J,K)
END DO
END DO
END DO
EMAX=0.0
EMAX=MAX(EMAX,ERR(I,J,K))
WRITE(*,*) ITER, EMAX
IF (ITER.LT.LAST) GOTO 31
WRITE(*,*) DR,A,B,E
END PROGRAM CYLINDRICAL FIN
"Hi this is my program to solve a problem of three dimensional cylindrical fin. But when i run this program in fortran 6.2 this error shows up "Error: The shapes of the array expressions do not conform. [T]" now i don't understand why this is happening. I need quick assistance.. " Anyone please help me.