UNIVERSITY OF MINES AND TECHNOLOGY, TARKWA
FIRST SEMESTER EXAMINATIONS, APRIL 2023
COURSE NO: PE/NG/RP/PG 351
COURSE NAME: COMPUTER PROGRAMMING-PRACTICALS
CLASS: PE/NG/RP/PG 3 TIME: 2 HRS
Name: __________________________________________ Index Number: _______________
Answer only ONE question. [40 Marks]
QUESTION 1
The following well logging data pertain to a shaly sandstone formation discovered at Thompson
Oilfield, Ghana with Fertl and Hammack water saturation equation given by:
1/2
FR V R
S w = w − sh w
Rt 0.4e Rsh
0.81
F=
e2
(i) Design a Graphical User Interface (GUI) with Microsoft Excel VBA codes to calculate the true
resistivity (Rt) using Fertl and Hammack water saturation equation.
(ii) Use the following reservoir data obtained from Thompson Oilfield, Ghana to test the VBA
codes written in (i) to calculate the true resistivity (Rt) using Fertl and Hammack water saturation
equation.
S w = 30% Rw = 0.05 . m e = 18% Vsh = 20% Rsh = 1 . m
QUESTION 2
The directional survey and dogleg severity (DLS) of a new wellbore drilled at UMaT School of
Petroleum Studies, Tarkwa, Ghana is to be computed by using the radius of curvature directional
method and tangential method with the following survey data given below.
Survey 1 Survey 2
Depth, ft 7482 7782
Inclination, degrees 4 8
Azimuth, degrees 10 35
Page 1 of 5
MD(cos I1 − cos I 2 )(sin A2 − sin A1)
North =
(I 2 − I1)( A2 − A1)
MD(cos I1 − cos I 2 )(cos A1 − cos A2 )
East = Minimum of Curvature method
(I 2 − I1)( A2 − A1)
MD(sin I 2 − sin I1)
Vert =
(I 2 − I1)
100
DLS = ...Tan gential method
L ( sin I1 sin I 2 )( sin A1 sin A2 + cos A1 cos A2 ) + cos I1 cos I 2
Design a Graphical User Interface (GUI) with Microsoft Excel VBA codes to calculate the
directional survey (ft) and dogleg severity (degrees per 100 ft) of the new wellbore drilled for both
methods.
QUESTION 3
Design a similar Scientific Converter GUI for both temperature, pressure, and volume shown
below in Microsoft Excel VBA using the command button (Convert) to do the unit conversions.
(a) Pressure: Input (bar, psi, atm, MPa) and Output (bar, psi, atm, MPa)
(i) bar = 14.5033 psi (ii) bar = 0.987 atm (iii) bar = 0.1 MPa
(iv) Test your GUI and codes developed to convert 200 bar into psi, atm, and MPa
(b)Temperature: Input (Celsius, Fahrenheit, Kelvin, Rankine) and Output (Celsius,
Fahrenheit, Kelvin, Rankine)
(i) Celsius = 33.8 Fahrenheit (ii) Celsius = 274.15 Kelvin (iii) Celsius = 493.47 Rankine
(iv) Test your GUI and codes developed to convert 200 0Celsius into Fahrenheit, Kelvin, and
Rankine
(c)Volume: Input (Barrel (bbl), Gallon (US gal), Cubic feet (ft3), Cubic meter (m3)) and
Output (Barrel (bbl), Gallon (US gal), Cubic feet (ft3), Cubic meter (m3))
(i) bbl = 42 US gal (ii) bbl = 5.6145 ft3 (iii) bbl = 0.1590 m3
(iv) Test your GUI and codes developed to convert 200 barrels into Gallon (US gal), Cubic feet
(ft3), and Cubic meter (m3).
Page 2 of 5
QUESTION 4
(a) The table below shows the data and the plot for Pressure versus Depth. Enter this data into
Microsoft Excel and reproduce the same plot and state one comment about the plot.
Page 3 of 5
Pressure (Psia)
0 500 1000 1500 2000 2500 3000 3500
0
2000
4000
Depth (ft)
6000
8000
10000
12000
(b) The table below shows the Critical Properties of Pure Components of Natural Gases. Use the
data to plot Critical Temperature (R) (x-axis) versus Critical Pressure (psi) (y-axis) using
scatter with smooth lines and markers. State one comment about the plot.
Compound Critical Temperature Critical Pressure
(R) (psi)
Methane 344 673
Ethane 550 709
Propane 666 618
iso-Butane 733 530
n- Butane 766 551
iso-Pentane 830 482
n-Pentane 847 485
n-Hexane 915 434
n-Heptane 973 397
n-Octane 1024 361
Nitrogen 227 492
Carbon Dioxide 548 1072
Hydrogen Sulfide H2S 673 1306
Page 4 of 5
QUESTION 5
Design a GUI for a trigonometric calculator below using Microsoft Excel VBA for the user to
select degrees or radians options for computations. Test the calculator with an angle of 450 to
radians (Sin, Cos, Tan, Sin-1, Cos-1 and Tan-1) and 45 radians to degrees (Sin, Cos, Tan, Sin-1, Cos-
1
and Tan-1) for all the trigonometric functions
Examiner: Dr Eric Thompson Brantson
Page 5 of 5