1 REM ===================================== 2 REM OLDGRN.BAS 3 REM 4 REM By Dan Shier 5 REM Commercial Rights Reserved 6 REM 7 REM Edited for COGS Disk by J Phillips 8 REM 18 March 1984 9 REM ===================================== 10 REM Last Modified: 8 JUNE 1984 15 DIM E$(20) 17 BKG=15: REM Inverse background color for IBM-PC 20 L$ = STRING$(79,"*") 22 '****** TITLE PAGE **************** 25 CLS 30 PRINT " ______________________________ " 32 PRINT " |::::: | " 34 PRINT " |:::::: | " 36 PRINT " |::::: | O L D " 38 PRINT " |:::::: | " 40 PRINT " |::::::::----------------------| G A M M A R A Y " 42 PRINT " |::::::::::::: | " 44 PRINT " |:::::::::::::::::::::: | N E U T R O N " 46 PRINT " |:::::: | " 48 PRINT " |:::: | " 50 PRINT " |::::--------------------------| By DANIEL E. SHIER " 52 PRINT " |:::: | " 54 PRINT " |::::: | " 56 PRINT " |::::::: | " 58 PRINT " |:::::::: | This is a program to calibrate old " 60 PRINT " |::::::::----------------------| neutron logs--the kind that are " 62 PRINT " |:::::::: | scaled in counts per second, " 64 PRINT " |:: | environmental units, etc. " 66 PRINT " |______________________________| " 70 LOCATE 24,1,1,0,13 72 PRINT "Press to continue; to exit; for help....."; 74 Q$=INKEY$: IF Q$="" THEN 74 76 IF Q$= CHR$(27) THEN 20000 78 IF Q$="H" OR Q$="h" THEN 530 80 IF Q$ <> " " THEN BEEP: GOTO 74 114 '****** INPUT DATA **************** 120 CLS 125 PRINT "Input the neutron units for the left side of the log track" 130 INPUT LF 140 PRINT "Input the neutron units for the right side of the log track" 150 INPUT RT 160 PRINT "Input the number of ASCALE units between the two sides of the neutron log track" 170 INPUT SP 180 PRINT "Input the ASCALE units for the low porosity rock facies" 190 INPUT UX 200 LC = LF + (RT - LF) * UX / SP 210 PRINT "Input the estimated porosity for the low porosity rock facies" 220 INPUT LP 230 PRINT "Input the ASCALE units for the high porosity rock facies" 240 INPUT UX 250 HC = LF + (RT - LF) * UX / SP 260 PRINT "Input the estimated porosity for the high porosity rock facies": PRINT "For severely washed-out hole use 48% sandstone porosity, 45% limestone porosity": PRINT "or 43% domomite porosity" 270 INPUT HP 280 B = (LOG(HP) - LOG(LP))/(HC - LC) 290 A = LOG(HP) - B * HC 300 PRINT "WHAT NOW? 0 = Quit for this well" 302 PRINT " 1 = Input ASCALE value and calculate porosity" 304 PRINT " 2 = Input porosity and calculate corresponding ASCALE value" 310 INPUT DD 320 IF DD = 0 THEN 25 330 IF DD = 1 THEN GOSUB 370 340 IF DD = 2 THEN GOSUB 450 350 GOTO 300 360 END 362 '****** CALCULATE POROSITY **************** 370 PRINT "Input ASCALE value" 380 INPUT UX 'UX = SCALE UNITS OF UNKNOWN 390 CX = LF + UX * (RT-LF)/SP 'CX = COUNTS OF UNKNOWN 400 PP = A + B * CX 410 PX = EXP(PP) 420 PRINT "This corresponds to a rock porosity of "PX 430 PRINT STRING$(79,"-") 440 RETURN 442 '****** POROSITY TO ASCALE *************** 450 PRINT "Input rock porosity" 460 INPUT PX 470 CX = (LOG(PX) - A)/B 480 UX = (CX - LF) * SP / (RT - LF) 490 PRINT STRING$(79,"-") 500 PRINT "This corresponds to "UX" ASCALE units." 510 PRINT STRING$(79,"-") 520 RETURN 530 '***** SCREEN LISTING OF EXPLANATION ************************************* 535 CLS 540 PRINT "Old neutron logs are calibrated based on the observation that the logarithm of" 542 PRINT "the porosity is proportional to the neutron response in counts per second." 544 PRINT "Calibration of the neutron scale is done by the TWO POINT method in which" 550 PRINT "two different rock layers, one with a known low porosity and one with a known" 552 PRINT "high porosity are used to establish a porosity scale for the entire log" 554 PRINT "curve. In the pre-computer era this was done by using semi-log graph paper." 560 PRINT "This scaling is done automatically by this program. This program also " 562 PRINT "makes it much easier to deal with the wide variety of oddball neutron scales" 564 PRINT "that are used on the various logs by creating a new scale for the log." 570 PRINT "This new scale is distance from the left hand side of the log track in" 572 PRINT "whatever sort of arbitrary units you elect to use, from milimeters to 50 units" 574 PRINT "per inch on your engineers scale. In the program these units are refered to" 580 PRINT "as ASCALE units." 585 PRINT 590 PRINT "Normally very low porosity carbonate layers are assigned a porosity of 1%" 592 PRINT "to 3%. Shale zones with extreme hole enlargement are assigned a limestone" 594 PRINT "porosity of 45%" 596 PRINT 600 PRINT "When dealing with complex lithologies, remember that to convert from limestone" 602 PRINT "porosity to sandstone porosity, add 3%. When converting from limestone" 604 PRINT "porosity to dolomite porosity subtract 2%. Thus a 10% limestone porosity is" 610 PRINT "equivalent to a 13% sandstone porosity and an 8% dolomite porosity." 620 PRINT 660 PRINT STRING$(16,"+");" PRESS TO CONTINUE ";STRING$(36,"+"); 665 X$=INKEY$: IF X$="" THEN 665 667 CLS: LOCATE 5,1 670 GOTO 25 19990 REM ********************** 19992 REM EXIT ROUTINE 19994 REM ********************** 20000 CLS: PRINT TAB(28) "E X I T P R O G R A M" 20005 LOCATE 8,20: PRINT "EXIT TO:" 20010 M$(1) = " 1. MENU, to run another program. " 20015 M$(2) = " 2. BASIC " 20020 M$(3) = " 3. MS-DOS System level " 20025 M$(4) = " 4. CANCEL Exit Command " 20030 FOR Y = 1 TO 4: LOCATE 2*Y + 8, 20: PRINT M$(Y): NEXT Y 20035 LOCATE 23,1: PRINT "Enter number or use arrows to make selection; then press " 20037 LOCATE ,,0: REM Cursor OFF 20040 Y=1: MVE=NO : X=1:Q$="" 20045 WHILE Q$ <> CHR$(13) 20050 LOCATE 2*Y + 8, 20: COLOR 0,BKG: PRINT M$(Y): COLOR 7,0 20055 Q$=INKEY$: IF Q$="" THEN 20055 20060 IF LEN(Q$) = 2 AND ASC(RIGHT$(Q$,1)) = 72 THEN MVE=YES: X=Y-1: IF X<1 THEN X=4 20065 IF LEN(Q$) = 2 AND ASC(RIGHT$(Q$,1)) = 80 THEN MVE=YES: X=Y+1: IF X>4 THEN X=1 20067 IF Q$ >="1" AND Q$ <= "4" THEN X=VAL(Q$): MVE=YES 20070 IF MVE=YES THEN LOCATE 2*Y + 8, 20: PRINT M$(Y): Y=X: MVE=NO 20075 WEND 20080 LOCATE ,,1: REM Cursor ON 20085 CLS 20100 IF Y = 1 THEN LOCATE 12,1: PRINT "Loading.....MENU": RUN "MENU" 20110 IF Y = 2 THEN END 20120 IF Y = 3 THEN SYSTEM 20130 IF Y = 4 THEN 25: REM Title Page 30000 CLS: END