Abdel-Alim HashemKing Saud University

Riyadh, Saudi Arabia

A simple personal computer (PC) program written in Basic can quickly calculate the trajectory of a modified S-type deviated well. The program calculates the build-up angle, the measured depth, the true vertical depth of each interval, the total measured depth of the well, the end of build, and the drop-off point. The input data are the final hold true vertical depth, the final hold horizontal displacement, the build-up rate, the drop-off rate, and the final hold angle.

The program can be run on any IBM-compatible computer with MS-DOS version 5 or higher and QBasic or any other Basic program that does not require line numbers.

The drilling literature is full of equations and methods used to calculate the course of well paths from surveys taken after a well has been drilled.'-' Very little information, however, covers how to calculate well bore trajectory from limited data.

Furthermore, many of the equations are quite complex and difficult to use. Man)7 petroleum engineers and geologists need a quick, easy method to calculate the angle and measured depth necessary to reach a target in a deviated well bore. Most of the available programs are large and require much input data.

There are several types of directional well trajectories that can be drilled to hit a target: a simple type well path or build-and-hold trajectory, a continuous build trajectory, an S-type trajectory, or a modified S-type trajectory. 2 The S-type well has an angle build section, an angle hold section, and an angle drop section with the well returning to vertical. In the modified S-type well, following the drop section, the well bore remains at some angle and does not return to vertical.

Gardner published a simple program that quickly calculates the angle and measured depth of a simple directional well bore trajectory.' The simple trajectory is conventional, and there are some cases where an S or modified S trajectory is necessary to reach a target.

### BASIC EQUATIONS

The equations used in this Basic program are based on conventional geometry and use the well bore distances and angles shown in Fig. 1 (67099 bytes). The accompanying box lists the equations and nomenclature.

Equations 1-3 are simple geometry equations, and Equations 4 and 5 are based on standard trigonometry. The horizontal displacement and true vertical depths in both build-up and drop-off sections are found by using geometry and trigonometry with Equations 6-9.

Substituting the values of Equations 6-9 into Equation 3 yields Equation 12. Simplifying Equation 12 by multiplying both sides by tan(O), considering that cos2(0) + sin2(0) = 1, produces Equation 15. Equation 16 (DELTAerror) gives the difference of both sides of Equation 15. This equation is solved by the program.

### PROGRAM

Fig. 2 (70911 bytes) shows the sequence of the program steps for the modified S-type deviated well bore trajectory. The program, listed in Box 1 (175352bytes), is divided into three main parts: input data, algorithm, and output section.

The input data include the final hold true vertical depth, the final hold horizontal displacement, the kick-off-point, the build-up rate, the drop-off rate, and the final hold angle (0). These data can be easily input through a displayed dialog on the screen. If the kick-off-point depth is greater than the total true vertical depth, an error in the input data will be displayed.

The algorithm is based on Equation 16. (40280 bytes) This equation is solved by rearranging terms and iterating on angle 0 until the error value in Delta will be within an acceptable tolerance, or as close as possible to zero. This tolerance is assumed to be 0.00001 in this program. Engineering judgment must be used to decide the tolerance for each well.

The iterative solution of the angle 0 is actually based on two assumptions:

- The first assumed angle is between 90 (upper boundary) and 0 (lower boundary) and is approximated from the final hold horizontal displacement and the true vertical depth from the kick-off point (KOP) to the final hold point.
- The next iteration uses an angle midway between the first assumption and one of the boundaries.

By repeating these assumptions through loop order and using the midpoint between each assumption and the boundary, the function diverges quickly, and the angle 0 will be determined. Also, the distances of each section in the well will be calculated using the angle 0, the radii of curvature of build-up and drop-off sections of the well, and the final hold angle (0).

The output data are normally displayed on the screen and follow with a question about output requirements. A printout confirms the user's answer.

The output is divided into build-up section information, hold section information, drop-off section information, and the final hold well information. These sections contain all necessary information about the well.

The program can be run very fast giving displayed or written information about the well. Moreover, the build-up rate, drop-off rate, and final hold angle can be changed to determine the best data of the well trajectory to hit the proposed target.

### RESULTS

Box 2 (116739 bytes) shows the results of a sample run of this program for a modified S-type well. The proposed well has an 11,000-ft true vertical depth, 6,000-ft final hold horizontal displacement, 2/1 00-ft build-up rate, 3/1 00-ft drop-off rate, and final hold angle of 25.

The output shows that the build-up angle (0) is about 41. The other relevant data are also listed in Box 2 (116739 bytes).

### REFERENCES

- Bourgone, A.T., Millheim, K.K., Chenevert, M.E., and Young Jr., F.S., "Applied Drilling Engineering," Society of Petroleum Engineers textbook series, Vol. 2, 1991.
- Wiggins, M.L., and juvkam-Wold, H.C., "Simplified Equations for Planning Directional and Horizontal Wells," SPE paper No. 21261 presented at the SPE Eastern Regional Meeting, Columbus, Ohio, Oct. 31 -Nov. 2,1990.
- Wiggins, M.L., Chue, J., and juvkam-Wold, H.C., "Single Equation Simplifies Horizontal, Directional Drilling Plans," OGJ, Nov. 2,1992, pp. 74-79.
- Millheim, K.K., "Evaluating and Planning Directional Wells Utilizing Post Analysis Techniques and a Three Dimensional Bottom Hole Assembly Program," SPE paper No. 8339, presented at the 54th Annual Technical Conference and Exhibition, Las Vegas, Sept 23-26, 1979.
- Gardner, M.K., "Program Helps Quickly Calculate Deviated Well Path," OGJ, Nov. 22,1993, pp. 79-80.

### THE AUTHOR

Hashem has a PhD in drilling engineering from Clausthal University in Germany and BS and MS degrees in petroleum engineering from Cairo University in Egypt. He has written many papers on casing design, directional drilling, and horizontal technology.

*Copyright 1995 Oil & Gas Journal. All Rights Reserved.*