Spectrum 2000 Mindware Ltd.






CRAIN'S PETROPHYSICAL HANDBOOK
c. 1978 - 2008 E. R. (Ross) Crain, P.Eng.
Rocky Mountain House, Alberta Canada T4T 2A2
403-845-2527 email us
Please be fair to the author - pay your Shareware Fee HERE
and receive a copy of Crain’s Petrophysical Handbook on CD-ROM at no extra cost.
Updated 4 July 2005

CHAPTER THIRTEEN: CALCULATOR METHODS

Table of Contents
13.00 Introduction to This Chapter
13.01 Effective Porosity, Shale Content and Water Saturation
13.02 Apparent Water Resistivity, Apparent Water Salinity and Formation Temperature
13.03 Structural Dip Removal
13.04 Average Porosity and Saturation from Core or Computer Aided Log Analysis
13.05 Permeability and Specific Productivity Index From RFT
13.06 Horner Plot and Permeability from RFT
13.07 A Comprehensive Calculator Program
13.08 Operating Instructions for TI 59/57
13.09 Registers and Flag Usage for TI 59/57
13.10 Operating Instructions for HP 67/97
13.11 Register, Label, and Flag Usage for the HP 67/97
13.12 Operating Instructions for HP 41C, CV or CX Program
13.13 Explanation of Logic Code Usage
13.14 Program Code for TI 59/57
13.15 Program Code for HP 67/97
13.16 Program Code for HP 41C, CV, CX2
13.17 In Conclusion
13.18 Exercises for Chapter Thirteen
13.19 Bibliography For Chapter Thirteen

Continue to Chapter Fourteen

Publication History: This Chapter was originally published as Chapter Thirteen of The Log Analysis Handbook, Pennwell 1986. This electronic version created Aug 2002. Anyone wishing to contribute modern calculator programs to this Chapter should email us.

CHAPTER THIRTEEN: CALCULATOR METHODS

13.00 Introduction to This Chapter
Programmable calculators have had an enormous impact on quantitative log analysis over the past 30 years. They are faster, more accurate and repeatable than charts. Calculators compete effectively with even the most expensive computers, since not everyone has quick access to a good computer program. They are more portable and cheaper than most computers and can travel safely.

They have evolved rapidly over the same time span. In 1973, the first Hewlett Packard programmable calculator had 49 program steps for $400.00. In 1983, this machine was available with 400 steps for under $100.00, with a variety of printers, tape cassette drives, and even colour plotters at extra cost. Pocket sized Basic language calculator/computers were also available at slightly higher cost by the early 80's. Today, a scientific programmable calculator is still required on the desk or in the field by most geologists and engineers.

There are two kinds of programmable calculators. One uses standard algebraic notation familiar to most users of non programmable calculators. The second uses reverse polish notation (RPN), a method developed to increase efficiency and conserve storage space in small computers and calculators. The first type are often called Texas Instruments style (TI style) and the second Hewlett Packard style (HP style) calculators, after the major manufacturers of these machines. It is more difficult to learn to use RPN calculators, but you get more features and performance per dollar. HP also makes algebraic style calculators.

In the past two decades, the distinction between calculators and computers has blurred even further with first lap-sized portable computers and finally shirt pocket portables. The latter are BASIC language computers a little bigger than a credit card, with as much as 4000 to 8000 bytes of memory selling for about $100.00 to $200.00. They can be interfaced to printers, plotters, and cassette tape drives. Thus the era of the programmable calculator, as described in this Chapter, has probably come to an end, just as the slide rule died in 1972.

However, the program descriptions, tricks to conserve memory usage, and the overall mathematical design should be useful for anyone wishing to code their own program into a pocket calculator/computer. The code will load directly with only minor changes if you own a calculator from the same "family" as the older ones listed in this Chapter.

The programs listed in this Chapter fall into five categories:
Type 1. General purpose for small HP calculators (e.g. HP-25, HP-15, HP-33, etc.).
Type 2. Shaly sand and Simandoux water saturation for TI-57 or 59 calculators.
Type 3. Same as Type 2, but for HP-69 or 97 calculators.
Type 4. Same as Type 3, but for HP-41C, CV or CX calculators, with complex lithology method added.
Type 5. Same as Type 4, but for Sharp PC1260/1261 pocket computer, with bulk volume water method added.

The author is indebted to Mr. David W. Curwen, who developed the Type 2, 3, and 4 programs, while associated with the author in their consulting practice. They are very comprehensive packages, unlike most published programs which are single purpose subroutines, often unconnected to each other. Any of the three programs will do the bulk of the work that an analyst is called upon to do. Magnetic card or cassette versions of the program code for all these programs are no longer available.

Mr. William F. Clow extended these programs to utilize the full capabilities of the shirt pocket computer. The author is grateful to both men for their kind permission to allow publication of the details of these programs. The code for the shirt pocket program is no longer available.

These programs can be customized by the user if sufficient program space exists in the calculator. Many other programs can be found in the extensive log analysis literature on the subject, most of which is listed in the bibliography to this Chapter. Other implementations can be found throughout the industry under a variety of trade names.


13.01 Program For Effective Porosity, Shale Content and Water Saturation
This program will perform a rapid shaly sand analysis as well as water saturation calculations for each level of data entered. Interpretation parameters need only be entered once and can be modified at any time. It was designed for the first HP programmable calculator which had only 49 program steps and 7 storage registers - not much of a calculator by today's standards. Due to very small storage capacity of the calculator, some parameters were stored in the integer part of a storage register and a different parameter is stored in the fractional part.

The author processed more than 1000 wells through this calculator including over 200 well site analyses. Even after developing the first desktop computer system (LOG/MATE) in 1976, this program was continued for another 10 years before moving to the shirt pocket calculator/computer of the era.

The program contains several options. In smaller calculators, the selected option must be coded into the memory manually. In larger calculators, each option can be left in the calculator memory, and called as subroutines.

A. Object:
l. Calculate PHIe from:
PHIe = (PHID * PHINSH - PHIN * PHIDSH) / (PHINSH - PHIDSH)

If gas crossover, calculate PHIe from:
PHIe = ((PHIN ^ 2 + PHID ^ 2) / 2) ^ 0.5

2. Calculate Vsh from:
Vsh = (PHIN - PHID) / (PHINSH - PHIDSH)
or: Vsh = (GR - GRO) / (GR100 - GR0)

3. Calculate Rwa from:
Rwa = (PHIe ^ M) * RESD / A

4. Calculate Sw from:
PHIe = PHIe / 100
C = A * RW@FT * (1 - Vsh) / (PHIe ^ M)
D = C * Vsh / (2 * RSH)
E = C / RESD
Sw = (D ^ 2 + E) ^ 0.5 - D

WHERE:
A = tortuosity exponent (fractional)
C = intermediate terms (fractional)
D = intermediate terms (fractional)
E = intermediate terms (fractional)
GR = gamma ray log reading (API)
GR0 = clean line for gamma ray (API)
GR100 = shale line for gamma ray (API)
M = cementation exponent (fractional)
PHID = density log reading (percent)
PHIDSH = density shale reading (percent)
PHIe = effective porosity (percent)
PHIN = neutron log reading (percent)
PHINSH = neutron shale reading (percent)
RESD = deep resistivity log reading (ohm-m)
RSH = shale resistivity log reading (ohm-m)
Rwa = apparent water resistivity (ohm-m)
RW@FT = water resistivity log reading (ohm-m)
Sw = water saturation (fractional)
Vsh = volume of shale (fractional)

B. Main Program Code:
Line Key Code Comment Key Code Comment
#
-------------------- Porosity -------------------
--- No Gas Option--- --- Gas Option ---

1. RCL 2 (PHIDSH) X ^ 2 (PHIN ^ 2)
2. * X -> Y
3. X -> Y (PHID) X ^ 2 (PHIN ^ 2)
4. RCL 1 (PHINSH) +
5. * 2
6. - /
7. RCL 2 (PHIDSH) SQR
8. RCL 1 (PHINSH) NOP
9. - NOP
10. / NOP
11. R/S displays PHIe% R/S displays PHIe%

-------------- Formation Factor ---------------

12. 1
13. %
14. RCL 4 (-M)
15. Y ^ X (PHIe) ^ - M
16. STO 5

------------------Shale Volume ----------------
--- N-D Option --- - -- GR Option ---
17. NOP Rdown
18. RCL 0 (PHIN) Rdown (GRLOG)
19. RCL 7 (PHID) RCL 3 (GR0)
20. - INT
21. RCL (PHINSH) -
22. RCL 2 (PHIDSH) RCL 1 (1/(GR100- GR0)
23. - FRAC
24. / *
25. R/S displays Vsh R/S displays Vsh

---------------- Vsh^2 Option ------------------

26. NOP X ^ 2 Vsh ^ option
27. STO 7 (Vsh)

------------- Water Saturation -----------------

28. 1
29. - (Vsh - 1)
30. RCL 3 (A * RW@FT)
31. FRAC
32. *
33. STO * 5 C = A * RW * (Vsh-1) * (PHIe ^ M)
34. RCL 7 (Vsh)
35. *
36. RCL 2
37. FRAC (1 / (2 * RSH))
38. *
39. STO 0 D = -C * Vsh / (2 * RSH)
40. RCL 5 (-C)
41. RCL 6 (1 / RESD)
42. * -E = (-C) * (1 / RESD)
43. RCL 0 (-D)
44. X ^ 2
45. -
46. CHS
47. SQR
48. RCL 0 (-D)
49. + Sw = ((1 - D) ^ 2 - (-E)) ^ 0.5 + (-D)
Displays Sw

C. Running the Program:
Select and code program options desired into memory.
Enter data as follows:
Step 1. PHINSH STO 1 (must be integer percent in order to conserve storage locations)
2. PHIDSH STO2 (must be integer percent in order to conserve storage locations)
3. GR0 STO 3 (must be integer API in order to conserve storage locations)
4. GR100 Enter GRO - 1/X STO + 1
5. RSH Enter 2 * 1/x STO + 2
6. A Enter RW@FT * STO + 3 (must be less than 1.00)
7. M CHS STO 4
8. RESD 1/X STO 6
9. GR enter (omit if Vsh from crossplot option)
10. PHID STO 7
11. PHIN STO 0
12. R/S displays PHIe (%)
13. R/S displays Vsh (fractional)
14. R/S displays Sw (fractional)

For next level go to Step 8.
Note all PHI in % to conserve storage locations.

D. Example
Assume data as follows:
PHINSH = 40 %
PHIDSH = 10%
GR0 = 15 API
GR100 = 120 API
RSH = 20 ohm-m
A = 0.8
RW@FT = 0.09 ohm-m
M = 2.15
RESD = 1.5 ohm-m
GR = 36 API
PHID = 20 %
PHIN = 26 %

Run program as follows:
Step 0. Clear Program
1. 40 STO 1
2. 10 STO 2
3. 15 STO 3
4. 120 ENTER 15 - 1/X STO + 1
5. 20 ENTER 2 * 1/X STO + 2
6. 0.8 ENTER 0.09 * Sto + 3
7. 2.15 CHS STO 4

Option 1: Vsh from crossplot

Step 8. 1.5 1/X STO 6
10. 20 STO 7
11. 26 STO 0
12. R/S displays PHIe = 18 (%)
13. R/S displays Vsh = 0.20
14. R/S displays Swe = 1.08

Note, Step 9 is not necessary for this option.

Option 2: Vsh from GR
Step 8. 1.5 1/X STO 6
9. 36 ENTER
10. 20 STO 7
11. 26 STO 0
12. R/S displays PHIe = 18 (%)
13. R/S displays Vsh = 0.20
14. R/S displays Swe = 1.08

For next level go to step 8.

E. Notes
If any constant is changed do appropriate STO and STO + related to it. Note that both Vsh options cannot be run back to back without re-entering RES, GR, PHIN and PHID at step 8.

To find approximate RW@FT in clean wet zone:
RW@FT = Rwa = RESD ENTER PHIe ENTER M Y^X * A /

To find WSa from Rwa:
WSa = 400 ENTER FT / Rwa ENTER 1.14 Y^X /

To find Rwa from WSa:
Rwa = 400 ENTER FT / WSa / 0.88 Y^X

WSa is water salinity in 1000's ppm NaCl.

13.02 Apparent Water Resistivity, Apparent Water Salinity and Formation Temperature
This program is useful when reviewing a large area for water resistivity and temperature data to be used in Program 1.

A. Object
1. Calculate temperature gradient from:
GRAD = (BHT - SUFT) / BHTDEP

2. Calculate apparent formation temperature rom:
FT = (DEPTH * GRAD) + SUFT

3. Calculate apparent water resistivity corrected for shale from:
Rwa = (PHIe ^ M) / (A * ( 1 - Vsh)) / RESD - Vsh / RSH)

4. Calculate apparent salinity from:
WSa = 400 / ((FT * Rwa) ^ 1.14)

PHIe is estimated from PHID for sandstones and PHIN in carbonates. Vsh is estimated from GR.

WHERE:
A = tortuosity exponent (fractional)
BHT = bottom hole temperature ( F or C)
BHTDEP = bottom hole temperature depth (feet or meters)
DEPTH = formation depth (feet or meters)
FT = formation temperature
GRAD = temperature gradient ( F or C)
M = cementation exponent (fractional)
N = saturation exponent (fractional)
PHIe = effective porosity (fractional)
RESD = deep resistivity log reading (ohm-m)
Rwa = apparent water resistivity (ohm-m)
SUFT = surface temperature ( F or C)
Vsh = volume of shale fractional)
WSa = water salinity (ppm * 1000)

B. Main Program Code:
Line Key Code Comments
1. FIX 4
2. RCL 3 (SUFT)
3. -
4. X -> Y
5. /
6. STO 0 (GRAD)
7. R/S displays GRAD
8. FIX 0
9. RCL 0 (GRAD)
10. *
11. RCL 3 (SUFT)
12. +
13. ENTER
14. R/S displays FT
15. FIX 3
16. 1/X
17. STO 6 (1 / RESD)
18. Rdown
19. X^2 or NOP (Vsh ^ 2 or Vsh)
20. STO 7
21. Rdown
22. RCL 2 (M)
23. Y^X (PHI) ^ M
24. RCL 1 (A)
25. /
26. 1
27. RCL 7 (Vsh2 or Vsh)
28. -
29. /
30. RCL 7 (Vsh ^ 2 or Vsh)
31. RCL 4 (RSH)
32. /
33. RCL 6 (1 / RESD)
34. -
35. CHS
36. /
37. R/S displays Rwa
38. FIX 1
39. RCL 5
40. Y^X
41. *
42. 1/X
43. 2
44. 10^X
45. 4
46. *
47. *
48. GT0 07 displays WSa (1000 ppm)

C. Running the Program:
Code program into calculator and enter data as follows:
Step 0. Clear Program
1. A STO 1
2. M STO 2
3. SUFT STO 3
4. RSH STO 4
5. 1.14 STO 5
6. BHTDEP ENTER BHT
7. R/S displays GRAD ('F / ft or degrees C / m)
8. Key in DEPTH
9. R/S displays FTa ('F or degrees C)
10. PHIe ENTER Vsh ENTER RESD
11. R/S displays Rwa (ohm-m)
12. R/S displays WSa (ppm/1000)

For next level go to step 8

D. Example
Assume data as follows:
A = 0.62
M = 2.15
SUFT = 20 F
RSH = 20 ohm-m
BHTDEP = 10000 ft
BHT = 100 F
DEPTH = 7500 ft
PHIe = 0.26
Vsh = 0.20
RESD = 1.4 (Case 1)
RESD = 50 (Case 2)

Step 0. Clear Program
1. 0.62 STO 1
2. 2.15 STO 2
3. 20 STO 3
4. 20 STO 4
5. 1.14 STO 5
6. 10,000 ENTER 100
7. R/S displays GRAD = 0.0080 ('F/ft)
8. 7500
9. R/S displays FTa = 80 ('F)
10. 0.26 ENTER 0.20 ENTER 1.5
11. R/S displays Rwa = 0.141 (ohm-m)
12. R/S displays WSa = 47.2 (x 1000 ppm)
13. 7500
14. R/S displays FT = 80 ('F)
15. 0.26 ENTER 0.20 ENTER 50
16. R/S displays Rwa = 9.280 (ohm-m)
17. R/S displays WSa = 0.0 (x 1000 ppm)

E. Notes:
If Rwa goes negative or a division by zero error occurs, then Vsh is too high or RSH is too low.

To find Rwa from DST water salinity:
Rwa = 400 ENTER FT / WSa / 0.88 Y^X

To find SWa from Rwa:
Swa = RW@FT ENTER Rwa / N 1/X Y^X


13.03 Structural Dip Removal
A. Object:
Calculate dips of stratigraphic deposition by removal of regional dip from true dip.

B. Main Program
Line # Key Code Comments
1. RCL 2 (AZR)
2. -
3. X -> Y
4. -> P
5. RCL 1 (MAGR)
6. -
7. -> P
8. FIX 1
9. R/S displays MAGS
10. Rdown
11. RCL 2
12. +
13. FIX 0 displays AZS

C. Running the Program:
Step 0. Clear program
1. MAGR STO 1
2. AZR STO 2
3. MAGT ENTER
4. AZT
5. R/S displays MAGS
6. R/S displays AZS

For next level go to Step 1 or Step 3

D. Example
Given: Regional dip 13 degrees @ 60 degrees azimuth
True (actual) dip 26 degrees @ 100 degrees azimuth

Step 0. Clear program
1. 13.0 STO 1
2. 60.0 STO 2
3. 26.0 ENTER
4. 100.0
5. R/S displays 18 degrees (stratigraphic dip angle)
6. R/S displays 128 degrees (stratigraphic dip azimuth)

Stratigraphic dip was 18 degrees @ 128 degrees azimuth

E. Notes:
This program was modified from a Schlumberger technical review (date unknown)

Where:
AZR = azimuth of regional dip
AZS = azimuth of stratigraphic dip
AZT = azimuth of true dip
MAGR = angle of regional dip
MAGS = angle of stratigraphic dip
MAGT = angle of true dip


13.04 Average Porosity and Saturation from Core or Computer Aided Log Analysis
A. Object:
Calculates average porosity and water saturation by summing porosity feet and
hydrocarbon feet, and dividing by total feet. No cut-offs are applied.

B. Main Program

Line # Key Code Comments
1. CHS (-Sw)
2. Sto 7 (-Sw)
3. Rdown  
4. STO 6 (PHIe)
5. Rdown  
6. -  
7. CHS  
8. STO + 5 (Sum (H))
9. X = 0  
10. GTO 23  
11. STO *6 (Phi-H)
12. 2  
13. 10^X  
14. STO + 7 (100 - Sw)
15. RCL 6 (PhiH)
16. STO + 1 Sum (PhiH)
17. RCL 6 (PhiH)
18. STO + 1 Sum (PhiH)
19. RCL 7 (HydH)
20. STO + 2 Sum (HydH)
21. R/S  
22. GTO 01  
23. RCL 2 Sum (HydH)
24. RCL 1 Sum (PhiH)
25. /  
26. 2  
27. 10^X  
28. -  
29. CHS (SWavg%)
30. INT  
31. RCL 1 Sum (PhiH)
32. RCL 5 (H)
33. / (PHIavg%)
34. 2  
35. 10^X  
36. /  
37. +  
38. FIX 3 displays SWavg% and PHIavg (fractional) simultaneously separated by a dot
39. R/S  
40. RCL 1  
41. 1  
42. %  
43. R/S displays Sum (PhiH)
44. RCL 2  
45. 4  
46. 10^X  
47. /  
48. R/S displays Sum (HydH)
49. RCL 5 displays Sum (H)

C. Running the Program:
Step 0. Clear program
1. Clear registers
2. TOPDEP ENTER BOTDEP ENTER PHIe ENTER Sw R/S (PHIe and Sw are %)
3. Repeat Step 2 for each level
4. Clear stack
5. R/S displays SWavg. PHIavg
6. R/S displays Sum (PhiH)
7. R/S displays Sum (HydH)
8. R/S displays Sum (H)

For next interval go to Step 0

RCL 1 displays Sum (PhiH) at any time
RCL 2 displays Sum (HydH) at any time
RCL 5 displays Sum (H) at any time

D. Example
Assume data as follows:
DEPTH Sw PhIe
3106 - 3107 50% 20%
3107 - 3110 70% 24%

Step 0. Clear program
1. Clear registers
2. 3106 ENTER 3107 ENTER 20 ENTER 50 R/S
3. 3107 ENTER 3110 ENTER 24 ENTER 70 R/S
4. Clear stack
5. R/S displays 65.230 giving SWavg = 65% and PHIavg = 23%
6. R/S displays 0.92 porosity feet
7. R/S displays 0.30 hydrocarbon feet
8. R/S displays 4.00 feet net pay

If input data was in meters, results would be in meters.
If Sw data is not available, key in a zero. HydH will equal PhiH.


13.05 Permeability and Specific Productivity Index From RFT
A. Object:
This program aids in calculating permeability from the RFT, using the preflow data.

1. Calculate specific productivity index (bbl / day/ psi) from RFT pretest data:
J60 = 15.51 / (Ps - P60)
J150 = 38.78 / (Ps - P150)

2. Calculate permeability (md) from RFT pretest data:
K60 = 2194 / (Ps - P60)
K150 = 5485 / (Ps - P150)

OR
K60 = 141.46 J60
K150 = 141.46 J150

If fill up time (Tfill) is greater than 20 sec. these equations are modified by multiplying by 20 / Tfill.

WHERE:
J60 = specific productivity index (bbl/day/spi) for 60cc/min rate
J150 = specific productivity index (bbl/day/psi) for 150cc/min rate
K60 = permeability (md) from 60cc/min rate
K150 = permeability (md) from 150cc/min rate
Pf = shut in pressure (psi)
P60 = flowing pressure (psi) for 60cc/min rate
P150 = flowing pressure (psi) for 150cc/min rate
Tfill = fillup time for 20 cc chamber (sec)

B. Main Program:

Line # Key Code Comments
1. RCL 3 (20)
2. RCL 7 (Tfill)
3. /  
4. RCL 0 (15.51)
5. *  
6. RCL 4 (Ps)
7. RCL 5 (P60)
8. -  
9. /  
10. R/S displays J60
11. RCL 2 (141.46)
12. *  
13. R/S displays K60
14. RCL 3 (20)
15. RCL 7 (Tfill)
16. /  
17. RCL 1 (38.78)
18. *  
19. RCL 4 (Ps)
20. RCL 6 (P150)
21. -  
22. /  
23. R/S displays J150
24. RCL 2 (141.46)
25. * displays K150

C. Running the Program:
Step 0. Clear Program, FIX 3
1. 15.51 STO 0
2. 38.78 STO 1
3. 141.46 STO 2
4. 20 STO 3
5. Ps STO 4
6. P60 STO 5
7. P150 STO 6
8. Tfill STO 7
9. R/S displays J60
10. R/S displays K60
11. R/S displays J150
12. R/S displays K150

For next level go to Step 5

D. Example
Assume RFT data as follows from Figure 13.01:

shut in pressure Ps = 3737 psi
flowing pressure P60 = 2736 psi
P150 = 1836 psi
Tfill = 20 sec


FIGURE 13.01: RFT Pressure recording

Step 0. Clear program
1. 15.51 STO 0
2. 38.78 STO 1
3. 141.46 STO 2
4. 20 STO 3
5. 3737 STO 4
6. 2736 STO 5
7. 1836 STO 6
8. 20 STO 7
9. R/S displays J60 = 0.015 bbl/day/psi
10. R/S displays K60 = 2.19 md
11. R/S displays J150 = 0.020 bbl/day/psi
12. R/S displays K150 = 2.89 md

For next level go to Step 5


13.06 Horner Plot and Permeability from RFT
A. Object:
This program aids in calculating permeability from the RFT, using the Horner method.

1. Calculate last flow rate before buildup (Q)
IF Tfill < 20 seconds
THEN Q = 150cc / min / 60 sec/min = 2.5cc/sec
IF Tfill > 20 second
THEN Q = 20 / Tfill

2. Calculate fill up time at last flow rate
IF Tfill < 20
THEN T2 = 20 / Q
IF Tfill >= 20
THEN T2 = Tfill

3. Calculate DELTT / (T2 + DELTT) for Horner plot

4. Plot Pf vs DELTT /(T2 + DELTT) on semi-log paper

5. Pick slope (Z) of straight line portion (psi/cycle)

6. Calculate Kh = 176.8 * Q * VISW / Z

7. Calculate PERMrft = Kh / H

WHERE:
DELTT = time since fill up (seconds)
H = formation thickness (feet)
Kh = flow capacity (md-feet)
PERMrft = permeability from RFT (md)
Q = flow rate (cc/sec)
Tfill = time to fill up 20 cc chamber (sec)
T2 = time to fill 20 cc chamber at last flow rate (sec)
VISW = fluid viscosity (cp)
Z = slope of Horner plot (psi/cycle)

B. Main Program

Line # Key Code Comments
1. RCL 1 (20)
2. X >= Y  
3. GTO 09 (ie Q = 10/T2)
4. Rdown (Tfill)
5. 1/X  
6. RCL 1 (20)
7. * Q = 20/Tfill
8. GTO 13  
9. Rdown (T2)
10. 1/X  
11. RCL 0 (10)
12. * (Q = 10/T2)
13. STO 4 (Q)
14. 1/X  
15. RCL 1 (20)
16. * (T = 20 / Q)
17. STO 5 (T)
18. R/S Key in DELTT displays (DELTT/T + DELTT)
19. STO 6 (DELTT)
20. RCL 5 (T)
21. + (T + DELTT)
22. 1/X  
23. RCL 6 (DELTT)
24. * (DELTT/T + DELTT)
25. X = 0  
26. GTO 28  
27. GTO 18  
28. RCL 2 (176.8* cc)
29. RCL 4 (Q)
30. *  
31. ENTER  
32. R/S find Z (psi/cycle) on plot, key in Z
33. 1/X  
34. * gives K (md)

C. Running the Program:
Step 0. Clear program
1. 10 STO 0
2. 20 STO 1
3. VISW ENTER 176.8 * STO 2
4. Key in T2
5. R/S displays T
6. Key in DELTT1
7. R/S displays DELTT1 (T + DELTT1)
8. Key in DELTT2
9. T/S displays DELTT2 / (T + DELTT2)
10. etc.
11. Key in 0 for last point
12. Plot Pn vs DELTTn / (T + DELTTn)
13. Determine Z (psi / cycle) from plot
14. Key in Z
15. R / S displays K (md)

For next plot go to Step 4

D. Example
Assume RFT data as follows:
VISW = 0.50 cp
Tfill = 18 seconds
T2 = 20 / 2.5 = 8 seconds

Time versus pressure data as shown in Figure 13.01. Horner Plot slope as shown in Figure 13.02.


FIGURE 13.02: Horner plot


Step 0. Clear program, FIX 3
1. 10 STO 0
2. 20 STO 1
3. 0.5 ENTER 176.8* STO 2
4. 8 ENTER
5. R/S displays T = 8
6. 12
7. R/S displays DELTT / (T + DELTT) = 0.60
8. 18
9. R/S = 0.69
10. 30
11. R/S = 0.79
12. 42
13. R/S = 0.82
14. 0
15. R/S displays 221.0 (ignore this value)
16. plot P vs DELTT / (T + DELTT)
17. determine Z = 56 psi/cycle from plot
18. 56
19. R/S displays K = 3.95 md


13.07 A Comprehensive Calculator Program
This program, with slight variations, can be used on the TI-57 or 59, the HP-67 or 97, or the HP-41C, 41CV or 41CX as well as more modern models.

A. Object
1. Calculate porosity from:
If no gas PHIe = (PHID * PHINSH - PHIN * PHIDSH) / (PHINSH - PHIDSH)
If gas PHIa = ((PHIN ^ 2 + PHID ^ 2) / 2) ^ 0 .5
If no DENS PHIs = (DELT - DELTMA) / (DELTW - DELTMA)

2. Calculate shale volume from:
Vshx = (PHIN - PHID) / (PHINSH - PHIDSH)
or Vshg = (GR - GRO) / (GR100 - GRO)

For Clavier option:
Vsh = 1.7 - (3.38 - (Vshg + 0.7) ^ 2) ^ 0.5

3. Calculate apparent water resistivity from:
Rwa = (PHIe ^ M) * RESD / A

4. Calculate water saturation from:
C = A * RW@FT * (1 - Vsh) / (PHIe ^ M)
D = C * Vsh / (2 * RSH)
E = C / RESD
Sw = (D ^ 2 + E) ^ 0.5 - D

WHERE:
A = tortuosity exponent (fractional)
C = intermediate term (fractional)
D = intermediate term (fractional)
E = intermediate term (fractional)
M = cementation exponent (fractional)
PHIe = effective porosity (fractional)
RSH = shale resistivity (ohm-m)
Rwa = apparent water resistivity (ohm-m)
RW@FT = actual water resistivity (ohm-m)
Sw = water saturation (fractional)
Vsh = volume of shale (fractional)

The flow chart for this program is given in Figure 13.03.


FIGURE 13.03: Flow diagram for log analysis calculator program

13.08 Operating Instructions for TI 59/57
Step 1. Load Side 1 and Side 2 of magnetic card into calculator.

Step 2. Initialize program by pressing 2nd "E" This sets all flags to zero, sets up counters, and initializes program ("Init").

Step 3. "Init" also begins the enter constants routine Key in Constant Value and press R/S.
The next Reg. No. will be displayed. The first two constants are:
Reg 0 = RSH
Reg 1 = RW@FT

After entering the RW@FT value, the program enters default values for Reg. 2 through 7 and leaves the calculator at Reg 2 for modification of these values. If defaults are okay, go to Step 4 at this point.

To modify one value, simply key in Value STO Reg. No., where Value = the constant to be entered and Reg. No. = the correct register number for that constant, as shown in the list below:

Reg 2 = DENSMA
Reg 3 = DENSMA - DENSW
Reg 4 = DELTMA
Reg 5 = DELTW - DELTMA
Reg 6 = A
Reg 7 = M

Step 4. To enter crossplot shale point key in Value and press 2nd "A", where Value = PHINSH or PHIDSH. The program sorts values of PHINSH and PHIDSH so that they can be entered in any
order but must be entered in pairs (i.e., if you wish to change one value, enter the
modified value and the unmodified value for the companion curve). The display will show
the lowest value of the pair.

Step 5. To enter Vsh constants for GR curve, key in Value and press 2nd "B", where Value = GRO or GR100. The same sort features as above are in effect.

Step 6. To enter program logic code to determine calculation options, key in a.bc and press
2nd "C", where:
a = 0 = do Clavier correction
1 = do not do corrections
b = 0 = do both PHIe and PHIa calculations and alternate display
1 = do PHIe calculations only
2 = do PHIa calculations only
c = 0 = do both Vsh calculation and alternate display
1 = do Vshg calculations only
2 = do Vshx calculations only

After it is entered, the display will show the current value of the logic code. The
logic code can be entered or changed anytime. For an explanation of how to use
these logic code switches, see Section 15.13.

Step 7. Select Rwa / Sw option code to determine final calculation method. Key in option
code and press 2nd "D", where:
option code = 0 Display Rwa
option code = 2 Display Sw

This code can be changed at any time by repeating the above process.

All the above steps are for program set-up and are normally done once for a run sequence. Only periodic changes are necessary for such things as zone changes (constants) or after establishing RW@FT from Rwa (Rwa / Sw option).

The following entries would be repeated for each computation level as they represent all the input variables for a single calculation of either Rwa or Sw. The program is designed to advance to the next computational level only if all the variables necessary for computation have been entered. (i.e., compute PHI only after PHIN and PHID have been entered; compute Sw only if RESD has been entered and PHI has been computed). This can be over-ridden simply by "insisting" on a computation by re-entering the value for the present step.

Step 8. Key in PHIN and press "A". Display = PHIN if value is first PHI entry or PHIe or PHIa if value is second PHI entry.

Step 9. Key in PHID and press "B". Display = PHID if value is first PHI entry or PHIe or PHIa if value is second PHI entry. If density data is entered, it must be in gm/cc. Display
will show equivalent porosity value.

Step 8 and 9 are entered as pairs in either order. Program will check for an entry in each and compute PHIa or PHIa or both as determined by program logic code value "b".
If b = 0 computes PHIe, displays for 1 second; computes PHIa, displays for 1 second, then back to PHIe - push R/S to use value shown in display
If b = 1 computes PHIe, displays value for 1 second and stops
If b = 2 computes PHIa, displays value for 1 second and stops.

Step 10. Key in DELT and press "C". This display will show PHIS.

Step 11. Key in GR and press "D". The display will show Vshg and/or Vshx. This calculation is determined by program logic code value "c".
If c = 0 computes Vshg, displays for 1 second; computes Vshx, displays for 1 second; then returns to Vshg calculation and so on until R/S is pressed.
If c = 1 computes Vshg, displays for 1 second, and stops. For each of the above if a = 2 Vshg is the linear relationship. If a = 0, the Clavier correction is applied to Vshg.
If c = 2 computes Vshx, displays for 1 second and stops.

Step 12. Key in RESD and press "E". The display will show RESD if no PHI has been computed. If a PHI value has been previously calculated for this level.

If Rwa / Sw option = 0, the display is Rwa.
If Rwa / Sw option = 2 the display is Rwa for 1 second, then Sw and program stops.

If you wish to change RW@FT at this point, push R/S, enter new RW@FT, and push R/S. The new value is automatically stored and used from then on.

Then Sw is displayed and program stops.

Return to Step 8 for next level.


13.09 Registers and Flag Usage for TI 59/57
Storage Registers
No. Content Name Default Value

0 RSH 2.0
1 RW@FT 0.25
2 DENSMA 2.65
3 DENSMA - DENSW 1.65
4 DELTMA 55.5
5 DELTW - DELTMA 133.5
6 A 0.62
7 M 2.15
8 Test Reg 3
9 not used
10 PHIDSH 0
11 PHINSH 0
12 GRO 0
13 GR100 0
14 Map Code 0.00
15 Rwa / Sw option 0
16 Counter 0
17 not used
18 not used
19 not used
20 PHID 0
21 PHIN 0
22 PHIS or PHI (comp) 0
23 not used
24 GRlog 0
25 Vsh 0
26 RESD 0
27 "EXCH" 1/Sw or 0
28 "EXCH" 2 or 0
29 not used 0

Flags
No. Purpose
0 PHI entry
1 PHIe only; Vshg only
2 PHIa only; Vshx only
3 not used
4 PHI (comp) or RES input
5 not used
6 Exch Subr first entry

Card Layout

___A___
  ___B___ ___C___ ___D___ ___E___
|
|   |   |   |   |
|
PHINSH
|
GRO
|
Logic
|
Rwa/Sw
|
Init
|
|
PHIDSH
|
GR100
|
Code
|
Code
|   |
|
_______
| _______ | _______ | _______ | _______ |
|
|   |   |   |   |
|
PHIN
|
PHID
|
DELT
|
GR
|
RESD
|
|
|
DENS
|   |   |   |
|
_______
| _______ | _______ | _______ | _______ |
 
A
B
C
D
E
 

13.10 Operating Instructions for HP 67/97
Step 1. Load side 1 and side 2 of program card into calculation.

Step 2. Initialize program to input constants by pressing "f" and "a".

Step 3. Input constants (in the following order) by pressing "R/S" after each entry:
0. Clavier option

1. Logic code (a.bc)
2. DELTMA

3. DELTW-DELTMA
4. DENSMA

5. DENSMA-DENSW
6. PHINSH

7. PHIDSH
8. GR0

9. GR100
10. A

11. M
12. RSH

13. RW@FT

See Section 13.13 for an explanation of the use of the logic code.

Step 4. Calculate porosity:
- enter neutron value (PHIN) and press "A".
- enter density (DENS) or density porosity (PHID) and press "B"
- PHID is calculated automatically if DENS is entered

Order is unimportant but two values must be entered before a calculation is made. If code b=0, the display will alternate between PHIe and PHIa until a number >1 is entered
during a pause. The last PHI displayed is used.

Step 4a. Enter sonic DELT, (calculates PHIS) and press "C" or enter any desired porosity if PHIS or PHID are not acceptable. Store directly by pressing "STO C".

Step 5. Calculate Vsh.
- enter GR value and press "D"
- if code c=0, the display will alternate between Vshg and Vshx until a number >1 is entered during a pause. If an Archie Sw is desired, enter GR = GR0 to get Vsh = 0. If the Clavier option code = 1, the Clavier function of Vshg is skipped.

Step 6. Calculate Sw or Rwa.
- enter RESD and press "E".
- if no porosity pair has been entered, no calculation is made; to force a result, reenter RESD. If code a=0, program will pause to display RW@FT. It may be altered at this point if desired. If code a=1, Rwa will be calculated with no pause and Sw will be displayed.


13.11 Register, Label, and Flag Usage for the HP 67/97
Registers
0 Clavier Option
1 Map Code
2 DELTMA
3 DELTW - DELTMA
4 RHOMA
5 RHOMA - RHOW
6 PHINSH
7 PHIDSH
8 GRO
9 GR100
50 A
51 M
52 Rsh
53 RW@FT
54 --
55 --
56 --
57 --
58 --
59 --

Registers 10 through 49 and 54 through 59 are not used.

A PHIN
B PHID
C PHID or PHIe
D GR or Vsh
E RESD
I Counter or Vsh

Labels
A PHIN
B PHID or DENS
C DELT or PHIS
D GR
E RESD

a Initialize
b Calculate PHIe
c Store PHIe
d Store Vsh
e Map code subroutine

0 Porosity test
1 Store constants
2 --
3 Calculate Rwa
4 Rwa code test
5 Set to skip Clavier
6 Calculate Vshg
7 Calculate Vshx
8 Calculate PHIe
9 Calculate PHIa

Flags
0 Option 1
1 Clavier
2 Do Sw
3 Option 2


Card Layout

___a___
  ___b___ ___c___ ___d___ ___e___
|
|   |   |   |
Logic
|
|
INIT
|
PHIe
|
|
Vsh
|
Code
|
|
_______
| _______ | _______ | _______ | _______ |
|
|   |   |   |   |
|
PHIN
|
PHID