Upload
dinh-thien-sy
View
278
Download
0
Embed Size (px)
Citation preview
7/26/2019 Numbering Method Exams
1/66
PETE 301
Final Exam
December 14, 2004
(Do not turn in your 4 cheat sheets. Sho your or!. Sho the units, i"
a##ro#riate.$
1. (10 points) The measured side length of a metal cube is a = 2.50 ft 0.1 ft.
Its mass (measured with a weighing scale that has 1 % accuracy) is m = 1.0 10!lbm.
"alculate the density (in lbm#ft!) and indicate its relati$e error in %.
7/26/2019 Numbering Method Exams
2/66
2. (10 points) "onsider the following euations for the &ewton'ahson method. (a) *hat is the+acobian matri,- (b) what are the initial residuals- assuming initial $alues of ,1= ,2= 1- and (c)erform one &ewton'ahson iteration- showing the new $alues for ,1- ,2- r1- and r2.
510
110
21
2
21
=+
=+
xx
xx
2
7/26/2019 Numbering Method Exams
3/66
3. (10 points)The deth of a 120 ft wide ri$er is measured from a boat (see the setch).
The results are shown in the table. "alculate (a) the cross'sectional area of the ri$er- and (b) the water
flowdown the ri$er (in ft!#sec) if the water $elocity is nown to be 0./ ft#sec. (&ote ecause of the
euidistant measurements and correct number of anels- use reeated imson3s rule.)
x, "t %, "t0 0.0030 2.5460 9.2990 4.83120 0.00
!
water le$el
bottom
measured deth- d
distance from left- ,
7/26/2019 Numbering Method Exams
4/66
4. (10 points) emember that we de$eloed formulas for calculating band mfor 4east uares fitting of
a straight line. *e choseband mto minimie the sum of the residuals 6 2
)( iyy 7. ut- remember
that we want to ha$e bfi,ed and fit only mfor determining 89I: from our # lot. o- we ;ust need a
formula for determining mwhen bis gi$en.
7/26/2019 Numbering Method Exams
5/66
5. (10 points)*rite a ? subroutine named @?Test()A that sums u the numbers ( 1- 2- !- > -B-
100) and writes the result into cell !.
5
7/26/2019 Numbering Method Exams
6/66
6. (10 points) "onsider the ordinary differential euation xexy += with an initial $alue of y = 2. at ,
= 0. "alculate the $alue for y at , = 2 using the non'iterati$e Ceun method (h=2).
7. (10 points)uose you ha$e the following data
7/26/2019 Numbering Method Exams
7/66
x f(x)1.3 3.61.4 3.91.5 4.21.6 4.7
Dse three different Taylor3s series aro,imations (forward- bacward- and central) to estimate f E (1.5).
For each method (a) write the formula with roer notation- (b) calculate the $alue- and (c) state the order
of accuracy. "learly identify each method.
/
7/26/2019 Numbering Method Exams
8/66
8. (10 points) For the following 9assim data (a) calculate the total ore $olume of the reser$oir (b)
calculate the total cumulati$e roduction for the run. how the units with your answers.
IMAX 16
JMAX 6
SWAT 0.26CROC 3.00E-06
GRAV 0.7
PREF 4500
T 610
END
CMNT gri !"! #$%"i&'----
DE(X 120
DE() -1
30 40 50 50 45 40
*X 0.10
*) 0.10
+ 53P+I 0.21
POI 4500
END
CMNT #%,$$ !"! #$%"i&'----
NAME 1 1 1 0
/G 1 50000
A(P+ 1.5
WE(( 2
PMAP 2
DE(T 0.1
DTMX 50
TIME 1TIME 10
TIME 50
TIME 100
TIME 500
TIME 1000
END
G
7/26/2019 Numbering Method Exams
9/66
9. (10 points)uose you ha$e a suare shaed reser$oir. Hou want to ma,imie roduction o$er a 10year eriod. (a) indicate with Owhere you would drill two wells if you drilled them at the same time.4abel them well 1 and well 2. (b) &ow assume you drilled well 1 at the beginning and cannot drill well 2until the second year. ar these otimal locations with X.
J
7/26/2019 Numbering Method Exams
10/66
10. (10 points) nswer the following uestions by utting true (T) or false (F)1' *e can insert function code inside sub code ( )2' The ? function should start with the word function and end by words end sub ( )!' sub can return either one or many $alues ( )>' ? rogram without 8tion K,licit use default declaration for all the
$ariables as double. ( )5' *e can write the outut on the sreadsheet without using with sheets
eyword. ( )' *hile B.*end loo does not wor if the condition is true and the
ForB&e,t loo does the same ( )/' *hich of the following statement is correct'
a. If x10 t!"n s#m x "n$ if)b. If x10 t!"n s#m x
%. If x10 t!"ns#m x
"n$ ifG& *hich of the following statement is correct'
a) '#m 6b) '#m 15%) '#m 7
8tion K,licitub sumrogram()
7/26/2019 Numbering Method Exams
11/66
PETE 301
Exam &
'oember 22, 2004
(Turn in your 3 cheat sheets ith your exam. Sho your or!. Sho the
units, i" a##ro#riate.$
1 (20 points)
7/26/2019 Numbering Method Exams
12/66
3. (15 points) *hat is the +acobian matri, of the &ewton'ahson method for the following system ofeuations.
1.!2
5!
2
2
1
12
=+
=+
xx
ex x
4. (15 points) uose we ha$e a sand aced core container 20 ft long. *e ressure it with air at 100sia. Then we oen $al$e on both ends to the atmosheric ressure- 1>./ sia. "onsider the finite
difference euation for this flow roblem in the following form )(2 11
1
11
1
n
i
n
i
n
i
n
i
n
i ppppp =+ ++
+++
.
uose we are using 5 grid oints with a grid oint on each end. Fill in the following table of the matri,coefficients and right hand side for the first timestep. Include the roer boundary conditions. s" "xa%t*a+#"s ,!"-" yo# %an b#t #s" t!" mat! symbo+s "+s",!"-".
i ai bi ci di1
2
!
>
5
12
7/26/2019 Numbering Method Exams
13/66
5. (15 points) *hat is the ma,imum timeste that we can tae with the e,licit F
7/26/2019 Numbering Method Exams
14/66
6. (20 points)The following rogram multilies matri, times matri, to yield the resulting " matri,.
1. *hat are the dimensions of matri, "M:rogram
2. ead matri, () from data sheet!. ead matri, () from data sheet>. *rite the resulting matri, " in @8ututA sheet5. "omlete the routine- including the arguents
ub atri,Nmultilication()) s - >) s
7/26/2019 Numbering Method Exams
15/66
PETE 301
Exam )
*ctober 2+, 2004
(Turn in your 2 cheat sheets ith your exam. Sho your or!. Sho the
units, i" a##ro#riate.$
1. (20 points) *e want to fit the following gas ressure#roduction data with the straight linematerial balance euation (p/z) = (p/z)I[1-Gp/ G]. ut we want our line to go e,actly throughthe oint at Gp= 0.
(a)In the form of a linear euation-y = b + mx- identify ,- y- b- and m for this roblemM
(b) Dse the least suares method to calculate the sloe of the straight line. *hat is the initial gas'in'lace-GM
Gp (p/z)
scf (bl#10
15
7/26/2019 Numbering Method Exams
16/66
2. (20 points) lab test has been erformed on a core samle by flowing water through it and measuringthe ressure dro-- and flow rate- . *e now that we can calculate ermeability- (md)- from -/00 #4. Find a least suares fit of the data and calculate . how all thecalculations on aer.
Data:4- cm 5.2
- cm2 1.>5
- c 0.J5
Flow Data
- cm!#sec - si105 0.!21J0 0.1
!20 0.J50
1
7/26/2019 Numbering Method Exams
17/66
3. (10 points) uose we ha$e the following K,cel sreadsheet which uses a certain nonlinear euationas a model of y = f(,). 8ur model uses arameters "1 and "2. *e now we can get the best @leastsuaresA fit of the model to the data by using the K,cel tool @ol$erA. *hen the ol$er window os u-what do you @tellA sol$er in order to get the best fit. 6hint This is a simle answer. Hour answer willcontain certain K,cel cell locations (such as 1- etc.). Hou do not ha$e to mae any calculations- or figureout what the model is- or change any $alues by hand. +ust mention what information you gi$e to ol$er.7
/
1odel
arameters"1 = 5.2
2 "2 = 12.>
3 ,i yi y(,i) from model esidP2
4 5.1 >20 >!1./> 1!G.!J1/
5 .> GJ /.J>> 1>5.!>/1
6 /.2 GJ0 G55.!/ 11JG.G21
7
8 um of residP2 = 1>G2.5
1/
7/26/2019 Numbering Method Exams
18/66
4. (20 points) "onsider the ordinary differential euation yxy += with an initial $alue of y = 0.5 at
, = 1. "alculate the $alue for y at , = ! using the non'iterati$e Ceun method.
1G
7/26/2019 Numbering Method Exams
19/66
5. (20 points)The following rogram is the unge'Qutta >thorder method to calculate the static ressuredro in a non flowing gas well.
z
p
!
"
D#
p#
1>>=
. ead the reuired data used in the calculation from worsheet (@
7/26/2019 Numbering Method Exams
20/66
ub calculate()
7/26/2019 Numbering Method Exams
21/66
PETE 301
Exam
*ctober 4, 2004
(Turn in your 1 cheat sheet ith your exam. Sho your or!. Sho the
units, i" a##ro#riate.$
1. (1+ #oints$*e want to estimate the error of the inside $olume of a ;oint of casing. The inside
diameter- d- is 5.5 inches 0.>! %. The length of a ;oint is !1 ft 0.5 ft. "alculate the inside $olume of a
;oint of casing (ft!). Indicate the relati$e error in %. how all the stes.
2. (1+ #oints$uose an euation of state is written in following nonlinear @W'factor formA
! L 2.S ' 1./ = 0
Dse &ewton3s method to find the root- starting from = 1.000 (we will call it the ero'th aro,imation
of the root). "arry out only the first iteration ste and gi$e the first aro,imation of the root. (
7/26/2019 Numbering Method Exams
22/66
3. (1+ #oints$ uose we ha$e a new gas well and erform a flow test. *e oen the well on a
!0#>A choe and measure the following flow rates at the times indicated. (a) Dse imson3s 1#! rule to
calculate the $olume roduced in 2> hours 6note that the flow rate is gi$en in scf#day- not scf#hr7. (b)
eeat the calculation using traeoidal integration.
Time- Flow rate-
hours scf#day '
0 !-500
12 2-50
2> 1-550
4. (1+ #oints$Dsing Taylor3s series- deri$e the finite difference formula foR3f EE(,i) using data at oints,i- ,iL1and ,iL2. how the formula- the first truncated term- and the order of the aro,imation.
22
7/26/2019 Numbering Method Exams
23/66
+. (20 #oints$uose a gas well has a reser$oir ressure- pr= 2-100 sia and a wellhead flowing
ressure- pw$= 250 sia. *e want to calculate the flow rate- % (scf#d)- of this well. *e ha$e two
euations and now that both euations must ha$e the same bottomhole flowing ressure-pwf. *e can use
this to set u a root'finding roblem in the formf(%)= 0.
The reser$oir euation %= 0.000!5 (pr&' pwf&)
The tubing euation %&= (pwf&- pw$&' *,)
(a) set u the root'finding euation- f(%) = 0- then (b) calculate f() 6Cint f(%)must only ha$e one
unnow- %7
2!
7/26/2019 Numbering Method Exams
24/66
-. (20 #oints$The following VBA code calcla!e" !he #ini## of (x,y)$% "ingfnc!ion call #ini##.nswer the following uestions'
1' ar the errors in this rogram.2' :encil in the corrections.
!' *hat local $ariables are declared in this rogramM>' *hat ublic $ariables are declared in this rogramM5' ead , from column - row in worsheet @dataA.' ead y from column - row / in worsheet @dataA./' *rite the $alue of d in column "- row 2 in worsheet @8ututA.G' *ill the function minimum return two $alues or one $alueM
8tion K,licit
7/26/2019 Numbering Method Exams
25/66
PETE 301Final Exam
December 1-, 2003
(Turn in your 4 cheat sheets ith your exam. Sho your or!. Dont
"or/et the units, i" a##ro#riate.$
1. (15 points):ore $olume in the laboratory may be calculated by . = .o ep. "alculate .at = 5-000
si if .o= 25.5 cm!1G% and the comressibility- - is estimated to be 25 , 10'(fraction)#si 2 , 10'
(fraction)#si. Indicate the relati$e error in %.
2. (10 points)nswer the following uestions by utting true () or false (Y)1'The ? rogram should start by word sub and end by word end sub ( )2' function can return many $alues ( )!' *hen we used 8tion K,licit in ? rogram- we do not ha$e to declare all the $ariables. ( )
>' *e can read the data from sreadsheet without using with sheets eyword.( )
5' *ith IfBThen BKlse statement we should not used Knd If ( )' *hile B.*end loo does not wor if the condition is not true and the ForB&e,t loo does thesame ( )/' To read array (!-!) we should use two ForB.&e,t loo. ( )
25
7/26/2019 Numbering Method Exams
26/66
3. (10 points)Dsing Taylor3s series- deri$e the finite difference formula for f EE(, i) using data at oints,i- ,i'1and ,i'2. how the formula- the first truncated term- and the order of the aro,imation.
4. (10 points) uose we ha$e a sand aced core container 10 ft long. *e ressure it with air at 1-000sia. Then we oen a $al$e on the left end to the atmosheric ressure- 1>./ sia- while lea$ing the rightend closed. "onsider the finite difference euation for this flow roblem in the following form
)(2 11
1
11
1
n
i
n
i
n
i
n
i
n
i ppppp =+ ++
+++
. uose we are using 5 grid oints. Fill in the following table of
the matri, coefficients for a timeste. Include the roer boundary conditions. Dse e,act $alues whereyou can- but use the math symbols elsewhere.
i ai bi ci1
2
!
>
5
2
7/26/2019 Numbering Method Exams
27/66
5. (10 points) If an 4D decomosition subroutine (for sol$ing a system of linear euations) returns withthe error message @the determinant of the coefficient matri, is eroA- then most robably
a) the system you want to sol$e has one uniue solutionb) the system you want to sol$e has no solutionc) the system you want to sol$e has infinitely many solutionsd) either b) or c)e) none of the abo$e
6. (15 points) "onsider the following euation
, L 2e,= /,2
:ut this in the form of f(,) = 0. Tae 2 iterations to find the root with the &ewton'ahson method.egin with an initial guess of , = 1.
2/
7/26/2019 Numbering Method Exams
28/66
IMAX 10
JMAX 20
CROC 3.00E-06
GRAV 0.7
PREF 4500T 610
END
CMNT gri !"! #$%"i&'----
DE(X 40
DE() 30
*X 0.1
*) 0.1
+ 45
P+I 0.2
POI 4500
END
CMNT #%,$$ !"! #$%"i&'----
NAME 1 3 11 0
NAME 2 10 6 0
NAME 3 6 15 0
/G 1 50000
A(P+ 1.5
WE(( 2
PMAP 2
DE(T 1
DTMX 50
TIME 1
TIME 30
DE(T 1
/G 2 35000
TIME 60
TIME 80
DE(T 1
/G 1 70000
TIME 190
DE(T 1
/G 1 80000
/G 3 55000
TIME 365
END
2G
7/26/2019 Numbering Method Exams
29/66
7. (10 points)4oo at the inut data for the attached 2< roblem.(a) "alculate the ore $olume of the reser$oir.(b) *hat is the roduction rate of each well at t = 1J5 days(c) uose you wanted to add a fourth well at 0 days at location i = G- ;=12. Hou want to roduce this
fourth well at a constant bottom'hole ressure of 200 sia. Indicate on the data age what changesyou would mae.
8.(10 points) uose that we run 9assim (we can run either as a liuid or gas). *e mae a coule ofruns and notice that when we doubled the rate for the second run- we #i#notget twice the ressure dro
at the well.(a) *hat mat$ematial termdo we use to describe this roerty of the differential euation for this
simulationM
(b) Is this lac of @roortionalityA of results more liely for a gas well or oil wellM
2J
7/26/2019 Numbering Method Exams
30/66
9.(10 points) et u the grid data section for the following 9assim roblem *e are using a 5 , 5 21
7/26/2019 Numbering Method Exams
42/66
>2
7/26/2019 Numbering Method Exams
43/66
3. (15 /oin!") The de/!h of a 360 f! wide ie i" #ea"ed fo# a $oa! ("ee !he
"Ce!ch). The e"l!" ae "hown in !he !a$le. +alcla!e (a) !he co"";"ec!ional aea of
!he ie and ($) !he wa!e Dow down !he ie (in f!3"ec) if !he wa!e eloci!% i"
nifo# a! 0.8 f!"ec. (Eo!e< Beca"e of !he e-idi"!an! #ea"e#en!" and coec!
n#$e of /anel" "e e/ea!ed i#/"on" le.)
>!
water le$el
bottom
measured deth- d
distance from left- , x, "t %, "t0 0.0090 3.59180 11.23270 8.20360 0.00
7/26/2019 Numbering Method Exams
44/66
4. (10 /oin!") ha! i" !he di,eence $e!ween a VBA /oga# !ha! "e" F/!ion
'x/lici! and a VBA /oga# doe" no! "e F/!ion 'x/lici! Be co#/le!e $!
conci"e.
5. (15 /oin!") &"ing Ta%lo" "eie" deie a Gni!e di,eence fo#la fo f H(x i) "ing
da!a a! /oin!" xi;1and xi>1. how !he fo#la !he G"! !nca!ed !e# and !he
ode.
>>
7/26/2019 Numbering Method Exams
45/66
6. (15 /oin!") The following VBA code calcla!e" !he sin (x)$% "ing fnc!ion callsine1. An"we !he following -e"!ion"'
6; n $ VBA021 which aia$le" ae declaed in!ege7; Iead xdeg fo# cell" (21) in "hee!" da!a.8; +all !he fnc!ion "ine1 in line 11.9; i!e !he e"l! of "ine1(x) in cell"(22) in "hee! da!a.10; +o#/le!e an% #i""ing "!a!e#en!" no!ed $% JJJ. in !he /oga# and
fnc!ion.
8tion K,licit"onst :i s 15J2/G
7/26/2019 Numbering Method Exams
46/66
7. (15 /oin!") //o"e %o hae !he following da!a/
7/26/2019 Numbering Method Exams
48/66
3 (10 points) uose we ha$e a new gas well and erform a flow test. *e oen the well on a !0#>Aand measure the following flow rates at the times indicated. Dse imson3s 1#! rule to calculate the$olume roduced in 2> hours 6note that the flow rate is gi$en in scf#day- not scf#hr7.
Time- Flow rate-
hours scf#day '0 !-500
> !-150
G 2-GJ0
12 2-50
1 2-1G0
20 1-G00
2> 1-550
4. (10 points) If an 4D decomosition subroutine (for sol$ing a system of linear euations) returns withthe error message @the determinant of the coefficient matri, is eroA- then most robably
a) the system you want to sol$e has one uniue solutionb) the system you want to sol$e has no solutionc) the system you want to sol$e has infinitely many solutionsd) either b) or c)e) none of the abo$e
>G
7/26/2019 Numbering Method Exams
49/66
5. (10 points) "onsider the following euation
, L 2 = e,
:ut this in the form of f(,) = 0. Tae 2 iterations to find the root with the &ewton'ahson method.egin with an initial guess of , = 2.
>J
7/26/2019 Numbering Method Exams
50/66
6. (15 points) This ? rogram reads in the number of euations and the augmented coefficient matri,.The 9auss'+ordan elimination subroutine is located in a searate module. 8ur Thomas subroutine is alsoa$ailable in that searate module. Hou realie that for a secific roblem the coefficient matri, is alwaystridiagonal (and diagonally dominant) so you decide to %a++ t!" T!omas a+o-it!mto sol$e it. The dataare in @heet1A and you are not allowed to change it.
7/26/2019 Numbering Method Exams
51/66
IMAX 8JMAX 1
RWE( 0.25
CROC 3.00E-06
GRAV 0.7
PREF 4500
T 610
END
CMNT gri !"! #$%"i&'----
Option ExplicitOption Base 1
Sub VBA091()'Naive Gauss-Jo!an eli"ination#i" n As $nte%e& i As $nte%e& As $nte%e
all GaussJo!an(A)
it* o+s*eets(,S*eet1,)
ells(1& n . /) ,Solution, o i 1 2o n
ells(i . 1& n . /) A(i& n . 1) Next i
En! it*
En! Sub
51
it* o+s*eets(,S*eet1,) ells(1& 1) ,Nu"be o3 e4uations& n5,
n ells(1& 6) 7e#i" A(n& n . 1) As #ouble
o i 1 2o n o 1 2o n . 1
A(i& ) ells(i . 1& ) Next Next iEn! it*
7/26/2019 Numbering Method Exams
52/66
RR -1
0.915 2.657 9.66 29.231 82.028 300 400 500 600
DE() 30
*X 0.1
*) 0.1
P+I 0.2
POI 4500END
CMNT #%,$$ !"! #$%"i&'----
NAME 1 1 1 0
/G 1 50000
A(P+ 1.5
WE(( 2
PMAP 2
DE(T 0.1
DTMX 50
TIME 1
TIME 10
TIME 50TIME 100
TIME 500
TIME 1000
END
52
7/26/2019 Numbering Method Exams
53/66
7. (15 points)4oo at the inut data for the attached J , 1 radial 1< roblem.(d) Kach timeste will calculate J ressures for the J gridblocs. *hat is the radius- r1- that corresonds
to the ressure in the first gridblocM(e) "alculate the ore $olume of the reser$oir.(f) uose you wanted to roduce at 50-000 scf#d for 50 days- then shut in the well for 10 days- then
roduce at constant bottom'hole ressure of 50 sia for 1-000 more day 6this is a total of50L10L1-000 days from time 07. Indicate what changes in data you need to mae an accurate run.6ar out the lines in the original data that you want to relace- then write the lines you need7.
8.(10 points) uose that we run 9assim (we can run either as a liuid or gas). *e mae a coule ofruns and notice that when we doubled the rate for the second run- we got twice the ressure dro at thewell.(b) *hat mat$ematial wor#do we use to describe this roerty of the differential euationM
(b) Is this @roortionalityA of results more liely for an gas well or oil wellM
9.(10 points) et u the grid data section for the following 9assim roblem *e are using a 5 , 5 2ot" "a%! st#$"nt ,i++ p-obab+y !a*" a $iff"-"nt ans,"- to t!is p-ob+"m?.
5.(20 points) "onsider the following @linear reser$oir modelA and its expliitsolution scheme
55
7/26/2019 Numbering Method Exams
56/66
,1 ,2 . . . ,n,
t is in days- , is in ft
orosity 0.1
$iscosity .!! cct "omressibility 10
'5 1#si :ermeability 0.01 md
The total length is 200 ft. The initial ressure is !000 si- the left ressure is changed to 1000 si at the $ery first momentand then et constant. The right ressure is et constant at the initial !000 si.The e,licit solution scheme is
left
n pp =+11
))2((1
11
1 n
i
n
i
n
i
n
i pppp+
+ +=
(where i runs from 2 to n,'1)
01 =+nnxp
where( )
t
x
3
/t
=2
00!!.0
In our case n, = 21 and ft10=x .
a) "alculate the $alue of the coefficient at the following $alues of t .
t 0.1 day 1 day 10 day 100 day
b) "ircle the abo$e timeste sies which would be stable. Y'out the ones that would be unstable.
c) "alculate 2and ! at t = 1 day using t = 1 day.
5
7/26/2019 Numbering Method Exams
57/66
. (20 oints) This ? rogram reads in the number of euations and the augmented coefficient matri,.The 9auss'+ordan elimination subroutine is located in a searate module. 8ur Thomas subroutine is also a$ailable in thatsearate module. Hou realie that for a secific roblem the coefficient matri, is always tridiagonal (and diagonallydominant) so you decide to #s" t!" T!omas a+o-it!mto sol$e it. The data are in @heet1A and you are not allowed tochange it. To mae things easy you should not touch the art of the rogram that reads in the roblem matri, (it is @bo,edA).Hou should- howe$er- introduce changes to the rogram (additional declarations- set u matri, coefficients- call of theThomas routine- dislay the solution- etc.) Indicate the changesX [8o0 4$o0l# ro44 o0t t$e exi4tin6 4ol0tion]
Option ExplicitOption Base 1Sub VBA091()
'Naive Gauss-Jo!an eli"ination#i" n As $nte%e& i As $nte%e& As $nte%e
all GaussJo!an(A)
it* o+s*eets(,S*eet1,)ells(1& n . /) ,Solution,
o i 1 2o n
ells(i . 1& n . /) A(i& n . 1) Next iEn! it*
En! Sub
5/
it* o+s*eets(,S*eet1,)
ells(1& 1) ,Nu"be o3 e4uations& n5, n ells(1& 6)
7e#i" A(n& n . 1) As #ouble o i 1 2o n
o 1 2o n . 1 A(i& ) ells(i . 1& )
Next Next i
En! it*
1 15
2 15
! 15> 15
5 20
20Tota+
7/26/2019 Numbering Method Exams
58/66
PETE 301
Exam 2
*ctober 2, 2002
(+0 minutes, o#en boo! an% notes, sho your or! sho units
here a##ro#riate$
1. (20 oints) common model for matching or forecasting oil roduction is theexponential #elinewhich can be e,ressed in terms of theinitial rate- %i- and a decline coefficient- a- as follows
&ow suose you ha$e the following data
(a)Hou want to use a @transformation to a straight' line formA. *rite the transformed straight line euation.
(b) *hat is the indeendent (,) $ariable of the straight'line fitM how all three $alues.
(c) *hat is the deendent (y) $ariable of the straight line fitM how all three $alues.
(d) how how you will calculate the arameters of the original (nonlinear) model (that is- %iand a) after you ha$e found the@4lopeA and @intereptA of the transformed straight line euationM (
7/26/2019 Numbering Method Exams
59/66
2. (20 oints) *e want to fit the following gas ressure#roduction data with the straight line material balance euation(p/z) = (p/z)i[1-Gp/G]. ut we want our line to go e,actly through the oint at Gp= 0.Dse the least suares method to calculate the sloe of the straight line. *hat is the initialgas'in'lace- GM(a)In the form of a linear euation- y = b + mx- what is b- what is mM
(b) Dse the least suares method to calculate the sloe of the straight line. *hat is theinitial gas'in'lace- GM
!. (20 oints) "onsider the following differential euation describing the roduction rate decline of a well
where %ois the roduction rate in 8:< (stoc tan barrel oil er day) and tis time elased from the start of roduction (in
days). The initial roduction rate is >00 8:.0
5.01.01
00025.0o
o %t#t
#%
+=
7/26/2019 Numbering Method Exams
60/66
>. (15 /oin!") //o"e we hae !he following 'xcel "/ead"hee! which "e" a ce!ain nonlinea
e-a!ion a" a #odel of % * f(x). F #odel "e" /aa#e!e" +1 and +2. e Cnow we can ge! !he
$e"! lea"! "-ae" G! of !he #odel !o !he da!a $% "ing !he 'xcel !ool ole. hen !he ole
window /o/" / wha! do %o !ell "ole in ode !o ge! !he $e"! G!. Khin!< Thi" i" a "i#/le an"we.
Lo an"we will con!ain ce!ain 'xcel cell loca!ion" ("ch a" A1 e!c.). Lo do no! hae !o #aCe an%calcla!ion" o Gge o! wha! !he #odel i" o change an% ale" $% hand. M"! #en!ion wha!
info#a!ion %o gie !o ole.N
5. (25 /oin!") The following "$o!ine i" wi!!en !o #aCe FE' T' of a ce!ain #e!hod !o "ole an
ini!ial ale F' /o$le#20 >!1./> 1!G.!J1/+ 6.4 GJ /.J>> 1>5.!>/1- 7.2 GJ0 G55.!/ 11JG.G21
um of residP2 = 1>G2.5
0
Sub $8(xi As #ouble& i As #ouble& * As #ouble& ip As #ouble)
#i" +1 As #ouble& +6 As #ouble& xip As #ouble
xip xi . *
+1 3(xi& i)
ip i.*:+1
+6 3(xip& ip)
ip i . * ; 6 : (+1 . +6)
En! Sub
7/26/2019 Numbering Method Exams
61/66
c) *rite a omplete? rogram using (@callingA) this subroutine to sol$e the @ressure in a static gas wellA roblem withdata gi$en in your 4ab'/ assignment. (:lease
7/26/2019 Numbering Method Exams
62/66
2
7/26/2019 Numbering Method Exams
63/66
3. (15 /oin!") The de/!h of a 240 f! wide ie i" #ea"ed fo# a $oa! ("ee !he
"Ce!ch).
The e"l!" ae "hown in !he !a$le. +alcla!e (a) !he co"";"ec!ional aea of !he
ie and ($) !he water fowdown !he ie (in f!3"ec) if !he wa!e eloci!% i"
Cnown !o $e 0.7 f!"ec. (Eo!e< Beca"e of !he e-idi"!an! #ea"e#en!" and coec! n#$e of
/anel" "e e/ea!ed i#/"on" le.)
!
water le$el
bottom
measured deth- d
distance from left- , x, "t %, "t0 0.0060 2.54120 9.29180 4.83240 0.00
7/26/2019 Numbering Method Exams
64/66
4. (15 /oin!") i!e a VBA "$o!ine na#ed VBATe"!() !ha! "#" / !he
n#$e" ( 1 2 3 4 J 100) and wi!e" !he e"l! in!o cell B3.
>
7/26/2019 Numbering Method Exams
65/66
5. (10 /oin!") A//oxi#a!el% how #an% fnc!ion eala!ion" ("!e/") ae needed in
!he $i"ec!ion #e!hod if %o wan! !o edce !he leng!h of !he ini!ial $acCe! $% Ge
ode" of #agni!de
6. (15 /oin!") The VBA fnc!ion "hown calcla!e" !he ol#e in"ide a leng!h of
/i/e. Fne line of code i" #i""ing. lea"e co#/le!e i!
Function Pipevolume (pipe_id As Double, length As Double) As Double
' calculates volume inside pipe in cu. ft.' pipe_id is give in inches, length in ft.
Const Pi As Double = 3.14159Dim Area As Double
Area = Pi * (pipe_id/12.0)^2/4
End Function
5
7/26/2019 Numbering Method Exams
66/66
7. (15 /oin!") //o"e %o hae !he following da!a