home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
oilfield
/
spe-25.lzh
/
FLOW.FOR
< prev
next >
Wrap
Text File
|
1987-12-14
|
12KB
|
183 lines
DIMENSION ITITLE(35),SW(20),RKO(20),RKW(20),FW(20),FWG(20) FLO00010
DIMENSION ALINE(100),COL(100) FLO00020
DIMENSION INDEX(200)
C LOGICAL*1 FNAME(30) FLO00030
CHARACTER*1 A(60) FLO00040
C COMMON/FILE/ FNAME FLO00050
IN = 5 FLO00060
IND = 3 FLO00070
IOUT = 6 FLO00080
1 CONTINUE FLO00090
C CALL CHKFIL(IN,IOUT,IND,FNAME,KSTSTS) FLO00100
C IF(KSTSTS.EQ.0) GO TO 11 FLO00110
READ(IN,3)(ITITLE(I),I=1,35) FLO00180
WRITE(IOUT,8) FLO00120
C WRITE(IOUT,2) FLO00130
8 FORMAT(' ') FLO00140
5 FORMAT(2I2) FLO00150
3 FORMAT(35A2) FLO00160
6 FORMAT(3F10.5) FLO00170
READ(IN,5)N,IPLOT FLO00190
DO 10 I = 1,N FLO00200
READ(IN,6)SW(I),RKO(I),RKW(I) FLO00210
10 CONTINUE FLO00220
C DENSITY, IB/CU.FT., WATER INFLUX RATE BWPD, AREA FT**2 FLO00230
READ(IN,24)UO,UW FLO00240
24 FORMAT(2F15.5) FLO00250
READ(IN,24)DARCY,BWPD FLO00260
READ(IN,24)DO,DW FLO00270
C DO, DW DENSITIES , IB/FT.**3 FLO00280
READ(IN,24)SQFT,ANGLE FLO00290
C AREA OPEN FOR WATER INFLUX, SQFT, ANGLE, DIP ANGLE, DEGREES FLO00300
UWUO = UW/UO FLO00310
QTA = BWPD/SQFT FLO00320
DELDEN = DW - DO FLO00330
ANGLE = ANGLE/57.2958 FLO00340
SINA = SIN(ANGLE) FLO00350
DO 4 I = 1,N FLO00360
IF(RKW(I).EQ.0.0)RKW(I) = 0.00001 FLO00370
IF(RKO(I).EQ.0.0)RKO(I) = 0.00001 FLO00380
RKORKW = RKO(I)/RKW(I) FLO00390
FW(I) = 1.0 + (RKORKW*UWUO) FLO00400
TERM = 1.0 - (0.00784*DARCY*RKO(I)*DELDEN*SINA/UO/QTA) FLO00410
FWG(I) = TERM/FW(I) FLO00420
FW(I) = 1.0/FW(I) FLO00430
4 CONTINUE FLO00440
WRITE(IOUT,8) FLO00450
WRITE(IOUT,8) FLO00460
WRITE(IOUT,3)(ITITLE(IJ),IJ = 1,35) FLO00470
WRITE(IOUT,8) FLO00480
WRITE(IOUT,80) FLO00490
80 FORMAT(10X,' WATER RELATIVE PERMEABILITY FRACTIONAFLO00500
1L FLOW ',/, FLO00510
2 ' SATURATION OIL WATER FLO00520
3STANDARD GRAVITY') FLO00530
DO 7 I = 1,N FLO00540
WRITE(IOUT,81)SW(I),RKO(I),RKW(I),FW(I),FWG(I) FLO00550
81 FORMAT(10X,F6.2,12X,F10.4,2X,F10.4,3X,F10.4,2X,F10.4) FLO00560
7 CONTINUE FLO00570
C PLOT RESULTS FLO00580
WRITE(IOUT,8) FLO00590
WRITE(IOUT,8) FLO00600
C CALCULATE AVERAGE WATER SATURATION AT B.T. AND SATURATION AT THE FLO00610
C FLOODFRONT. FLO00620
SFSZ = 0.0 FLO00630
SFSZG = 0.0 FLO00640
SLOPE = 0.0 FLO00650
SLOPEG = 0.0 FLO00660
DO 91 I = 2,N FLO00670
DFWDS = (FW(I) - FW(1))/(SW(I) - SW(1)) FLO00680
IF(DFWDS.GE.SLOPE) SLOPE = DFWDS FLO00690
IF(SLOPE.EQ.DFWDS)SFSZ = SW(I) FLO00700
DFWDSG = (FWG(I) - FWG(1))/(SW(I) - SW(1)) FLO00710
IF(DFWDSG.GE.SLOPEG)SLOPEG = DFWDSG FLO00720
IF(SLOPEG.EQ.DFWDSG) SFSZG = SW(I) FLO00730
91 CONTINUE FLO00740
C CALCULATE AVERAGE SATURATION AT B.T. FLO00750
B = 0.0 - (SLOPE*SW(1)) FLO00760
SDBT = (1.0 - B)/SLOPE FLO00770
BG = 0.0 - (SLOPEG*SW(1)) FLO00780
SDBTG = (1.0 -BG)/SLOPEG FLO00790
WRITE(IOUT,92)SDBTG,SDBT,SFSZG,SFSZ FLO00800
92 FORMAT(10X,'AVERAGE SATURATION AT BREAKTHROUGH:',/, FLO00810
1 ' WITH GRAVITY = ',F10.4,/, FLO00820
2 ' WITHOUT GRAVITY = ',F10.4,/,/, FLO00830
3 ' AVERAGE SATURATION AT FLOOD FRONT:',/, FLO00840
4 ' WITH GRAVITY = ',F10.4,/, FLO00850
5 ' WITHOUT GRAVITY = ',F10.4) FLO00860
WRITE(IOUT,8) FLO00870
WRITE(IOUT,8) FLO00880
C FLO00890
22 FORMAT(I5) FLO00900
IF(IPLOT.NE.1) GO TO 40 FLO00910
C FIND THE MINIMUM AND MAXIMUM VALUES FLO00920
XMAX = 1.0 FLO00930
XMIN = 0.0 FLO00940
YMAX = 1.0 FLO00950
YMIN = 0.0 FLO00960
C CALCULATE THE INCREMENTAL VALUES OF LINES AND COLUMNS FLO00970
XINC = (XMAX - XMIN)/50.0 FLO00980
YINC = (YMAX - YMIN)/50.0 FLO00990
Y1 = YMIN + (YINC*5.0) FLO01000
Y2 = YMIN + (YINC*10.0) FLO01010
Y3 = YMIN + (YINC*15.0) FLO01020
Y4 = YMIN + (YINC*20.0) FLO01030
Y5 = YMIN + (YINC*25.0) FLO01040
Y6 = YMIN + (YINC*30.0) FLO01050
Y7 = YMIN + (YINC*35.0) FLO01060
Y8 = YMIN + (YINC*40.0) FLO01070
Y9 = YMIN + (YINC*45.0) FLO01080
C BEGIN PLOT FLO01090
WRITE(IOUT,803) FLO01100
803 FORMAT(1H1) FLO01110
WRITE(IOUT,8) FLO01120
WRITE(IOUT,3)(ITITLE(IJ),IJ = 1,35) FLO01130
WRITE(IOUT,8) FLO01140
WRITE(IOUT,806)YMIN,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,YMAX,XMAX FLO01150
806 FORMAT(1H ,8X,11F5.1,/, FLO01160
1F10.2,2X,'I----I----I----I----I----I----I----I----I----I----I') FLO01170
MX = 0 FLO01180
B = 0.0 FLO01190
ALINE(1) = XMAX FLO01200
DO 808 K = 2,51 FLO01210
MX = MX + 1 FLO01220
DO 807 J = 1,60 FLO01230
807 A(J) = ' ' FLO01240
ALINE(K) = ALINE(K-1) - XINC FLO01250
DO 809 L = 1,N FLO01260
MN = 0 FLO01270
IF(FW(L).GE.(ALINE(K)-(XINC/2.)).AND.FW(L).LT. FLO01280
1(ALINE(K)+(XINC/2.)))MN = L FLO01290
IF(MN.NE.0) GO TO 810 FLO01300
IF(FWG(L).GE.(ALINE(K) -(XINC/2.)).AND.FWG(L).LT. FLO01310
1(ALINE(K)+(XINC/2.)))MN = L FLO01320
IF(MN.NE.0) GO TO 13 FLO01330
809 CONTINUE FLO01340
IF(MN.EQ.0) GO TO 811
810 CONTINUE
COL(1) = YMIN FLO01350
DO 812 M = 2, 61
COL(M) = COL(M-1) + YINC
IF(SW(MN).GE.(COL(M) - (YINC/2.)).AND.SW(MN).LT.
1(COL(M) + (YINC/2.)))A(M)='*'
812 CONTINUE
GO TO 811
13 CONTINUE
COL(1) = YMIN
DO 14 M = 2, 61
COL(M) = COL(M-1) + YINC
IF(SW(MN).GE.(COL(M)-(YINC/2.)).AND.SW(MN).LT.
1(COL(M) + (YINC/2.)))A(M)= 'G'
14 CONTINUE
811 CONTINUE
IF(K.EQ.26) GO TO 813
IF(K.EQ.51) GO TO 814
IF(MX.NE.10) GO TO 815
B = B + 1.0
XVAL = XMAX - (B*10.0*XINC)
WRITE(IOUT,816)XVAL,(A(IK),IK=1,49)
816 FORMAT(1H ,F10.2,1X,'-',49A1,'-')
MX = 0
GO TO 808
815 CONTINUE
WRITE(IOUT,817)(A(II), II = 1,49)
817 FORMAT(1H ,11X,'I',49A1,'I')
GO TO 808
813 CONTINUE
WRITE(IOUT,818)(A(II), II =1,49)
818 FORMAT(1H ,2X,' FW ',2X,'I',49A1,'I')
GO TO 808
814 CONTINUE
WRITE(IOUT,819)XMIN,YMIN,Y1,Y2,Y3,Y4,Y5,Y6,Y7,Y8,Y9,YMAX
819 FORMAT(1H ,
1F10.2,1X,'I----I----I----I----I----I----I----I----I----I----I',/,
29X,11F5.1)
808 CONTINUE
WRITE(IOUT,8)
WRITE(IOUT,805)
805 FORMAT(1H ,25X,'WATER SATURATION (SW)')
WRITE(IOUT,8)
40 CONTINUE
999 STOP
END