<jupyter_start><jupyter_text>Assignment 3This assignment is about the application of Python for well-test analysis. You're given a CSV data (have been loaded here), and your task is to **simulate the well transient response** (not to analyze it). Given reservoir properties* Reservoir initial pressure 3,000 psia* Porosity 15%* Total compressibility 12 microsip* Permeability 1,000 md* Radius of wellbore 4 inch (1 inch = 0.0833 ft)* Reservoir thickness 10 ft* Oil viscosity 2 cp* Distance from wellbore to reservoir outer boundary 8,000 ft * Oil FVF 1.33 RB/STB Read instruction carefully 😊* To help you coding, refer to the section about "Modeling a Multirate Test" and "Modeling a Multiple Pressure Test" in our [session 5 notebook](https://bit.ly/python-welltest).* There are 3 columns in the data, "Time" (in hours), "Rate" (in $m^3$/hour), and "Pressure" (in bar). * Don't forget to convert the "Rate" to barrel/day and convert "Pressure" to psia. * Do a modeling of multirate test using the "Time" and "Rate" data* Do a modeling of multiple pressure test using the "Time" and "Pressure" data<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
# cloning to github repository 
!git clone https://github.com/yohanesnuwara/pyreservoir
# import system
import sys
sys.path.append('/content/pyreservoir/welltest')

# functions you will use
from wellflo import * # import all functions
from wellanalysis import constant_rate_drawdown_test, constant_rate_buildup_test
# filepath of the data
filepath = '/content/pyreservoir/data/welltest/Data_Well_Transient_Modeling.csv'
Data = pd.read_csv(filepath)
Data["pressure (bar)"] = Data["pressure (bar)"].apply(lambda x: x*14.504)
Data["rate (m3/hr)"] = Data["rate (m3/hr)"].apply(lambda x: x*150.955)
Data = Data.rename(columns={'rate (m3/hr)':'rate(bbl/day)','pressure (bar)':'pressure(psia)'})
Data<jupyter_output><empty_output><jupyter_text>Input reservoir properties<jupyter_code># Input reservoir properties
poro = 0.15 
ct = 12E-6 
perm = 1000
rw = 4 * 0.08333 
h = 10
mu = 2 
re = 8000
Bo = 1.33

p_initial = 3000<jupyter_output><empty_output><jupyter_text>Modeling the Multirate Test (use timestep 0.1 hour)<jupyter_code>Data.head(10)
# Define t and q from data
t_change = Data['time (hr)'].values
q_change = Data['rate(bbl/day)'].values


plt.step(t_change,q_change)
plt.show()
time_finite = time_finite_acting(perm,poro,mu,ct,rw,re)
time_finite = np.round(time_finite,3)
print('Finite acting time is {} hrs'.format(time_finite))


t_step = 0.1

simulate_multirate_test(p_initial, t_step, t_change, q_change, re, rw, perm, poro, mu, ct, Bo, h)<jupyter_output><empty_output><jupyter_text>Modeling the Multiple Pressure Test (use timestep 0.1 hour)<jupyter_code># Define t and p from data
poro = 0.15 
ct = 12E-6 
perm = 1000
rw = 4 * 0.08333 
h = 10
mu = 2 
re = 8000
Bo = 1.33

p_initial = 3000




t_change = Data['time (hr)'].values
p_change = Data['pressure(psia)'].values


plt.step(t_change,p_change)
plt.show()
time_finite_multipsi = time_finite_acting(perm,poro,mu,ct,rw,re)
time_finite_multipsi = np.round(time_finite_multipsi,3)
print('Finite acting time is {} hrs'.format(time_finite_multipsi))
t_step = 0.1

simulate_multipressure_test(p_initial, t_step, t_change, p_change, 
                            re, rw, perm, poro, mu, ct, Bo, h)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11563614744351962, 'fraction_numerical': 0.03596908442330559, 'mean_word_length': 5.3731060606060606, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '522649', 'license': 'MIT', 'n_tokens_mistral': 1301, 'n_tokens_neox': 1167, 'n_words': 358, 'path': 'EnP_training/SPE_assignment3_notebook.ipynb', 'repo_name': 'k1m190r/python-bootcamp-for-geoengineers', 'size': '3364'}