PET328 2020-2021 Test 1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

1

2 COVENANT UNIVERSITY
3 TITLE OF EXAMINATION: Test 1
4 DEPARTMENT: PETROLEUM ENGINEERING
5 SESSION: 2020/2021 SEMESTER: OMEGA
6 COURSE CODE: PET328 CREDIT UNIT: 2
7 COURSE TITLE: COMPUTER APPLICATIONS IN PETROLEUM ENGINEERING
8 INSTRUCTION: ATTEMPT TO ANSWER ALL QUESTIONS TIME: 30 minutes
9
10 Question 1: [7 marks]
11 The script shown below has been written to compute STOIIP for each block in a discretized reservoir model and to
12 ultimately report the total STOIIP in such reservoir. For re-usability purposes, the Lead Software Develper in your
13 team has requested that you convert the script to a function to be named stoiip_discretized. The grid of porosity
14 (poro) and initial water saturation (swi) values should be passed to the function as poro_list and swi_list, respectively;
15 with the list index corresponding to the natural ordering of the grid blocks. The function should return a list
16 (stoiip_list) containing all STOIIP values, with elements arranged in natural ordering of the block. Additionally, the
17 function should also return the total STOIIP value (total_stoiip). A sample of the discretized model and grid values is
18 provided below for your guidance.
19
20 #...TTOWG!
21 # input statements
22 Lx = float(input('What is the length of the reservoir in x-direction?'))
23 Ly = float(input('What is the length of the reservoir in y-direction?'))
24 h = float(input('What is the thickness of the reservoir?'))
25 nx = int(input('How many blocks there are in x-axis?'))
26 ny = int(input('How many blocks there are in y-axis?'))
27 boi = float(input('What is the value of initial oil FVF?'))
28 # discretizing the reservoir
29 delta_x = Lx/nx
30 delta_y = Ly/ny
31 # calculating the area per block
32 area = delta_x*delta_y
33 # initializing output variable
34 total_stoiip = 0
35 # the 'for' loop
36 for j in range(1,ny+1):
37 for i in range(1,nx+1):
38 block_n_order = (nx*(j-1))+i
39 poro = float(input('What is the value of porosity for Block
40 {0}?'.format(block_n_order)))
41 sw = float(input('What is the value of water saturation for Block
42 {0}?'.format(block_n_order)))
43 block_stoiip = (7758*area*h*poro*(1-sw))/boi
44 total_stoiip = total_stoiip + block_stoiip
45 print('The amount of oil in Block {0} is {1:.2f} STB'.format(block_n_order,
46 block_stoiip))
47 # displaying the results.
48 print('The amount of oil in the entire reservoir is {0:.2f} STB'.format(total_stoiip))

49
50 Question 2: [3 marks]
51 Which of the two for loops in the script above runs fastest? [1 mark]
52 How many times (in terms of nx and ny) would Line 46 be executed? [1 mark]
53 For what purpose is the use of function float in the script above? [1 mark]
54 Best wishes, now and always!!!

You might also like