Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanesnuwara committed Jun 26, 2020
1 parent d07bcc1 commit 6799388
Showing 1 changed file with 59 additions and 49 deletions.
108 changes: 59 additions & 49 deletions Unit 10 Gas-Condensate Reservoirs/notebook/10_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@
"colab": {
"name": "10_examples.ipynb",
"provenance": [],
"collapsed_sections": [],
"collapsed_sections": [
"_Ktsc5vt2lFK",
"TcuCtSKl6bDr",
"qW7bVcE14Rra"
],
"toc_visible": true,
"authorship_tag": "ABX9TyMTEwLMnXhuhwJT8mhd4I0e",
"authorship_tag": "ABX9TyNxHWtG6AjwrWmuYZojtvq6",
"include_colab_link": true
},
"kernelspec": {
Expand Down Expand Up @@ -49,7 +53,7 @@
"import pandas as pd\n",
"from scipy.optimize import curve_fit"
],
"execution_count": 28,
"execution_count": 1,
"outputs": []
},
{
Expand All @@ -59,19 +63,25 @@
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 34
"height": 134
},
"outputId": "5bc73c01-51e0-4867-caa6-48047ffa4f3a"
"outputId": "d5c095dd-cec2-4e39-e8d9-03d9263fc348"
},
"source": [
"!git clone https://github.com/yohanesnuwara/reservoir-engineering"
],
"execution_count": 5,
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"text": [
"fatal: destination path 'reservoir-engineering' already exists and is not an empty directory.\n"
"Cloning into 'reservoir-engineering'...\n",
"remote: Enumerating objects: 61, done.\u001b[K\n",
"remote: Counting objects: 100% (61/61), done.\u001b[K\n",
"remote: Compressing objects: 100% (61/61), done.\u001b[K\n",
"remote: Total 1206 (delta 23), reused 0 (delta 0), pack-reused 1145\u001b[K\n",
"Receiving objects: 100% (1206/1206), 16.89 MiB | 21.17 MiB/s, done.\n",
"Resolving deltas: 100% (544/544), done.\n"
],
"name": "stdout"
}
Expand Down Expand Up @@ -124,7 +134,7 @@
" F = Bg * (Gp - Gi)\n",
" return(F)"
],
"execution_count": 6,
"execution_count": null,
"outputs": []
},
{
Expand Down Expand Up @@ -194,7 +204,7 @@
"print('Table Data')\n",
"data"
],
"execution_count": 7,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -382,7 +392,7 @@
"print('Table Data with Calculated Rsi and Boi')\n",
"data"
],
"execution_count": 8,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -558,7 +568,7 @@
"param = pd.DataFrame({'p': p, 'Bto': Bto, 'Btg': Btg, 'F': F, 'Eg': Eg})\n",
"param"
],
"execution_count": 9,
"execution_count": null,
"outputs": [
{
"output_type": "execute_result",
Expand Down Expand Up @@ -705,7 +715,7 @@
"plt.tight_layout(pad=3.0)\n",
"plt.show()"
],
"execution_count": 10,
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
Expand Down Expand Up @@ -754,7 +764,7 @@
"sys.path.append('/content/reservoir-engineering')\n",
"from utilities import *"
],
"execution_count": 11,
"execution_count": null,
"outputs": []
},
{
Expand All @@ -767,7 +777,7 @@
"source": [
"b, a = simple_linear_regression_traditional(Eg, F)"
],
"execution_count": 12,
"execution_count": null,
"outputs": []
},
{
Expand Down Expand Up @@ -799,7 +809,7 @@
"plt.plot(Eg, y)\n",
"plt.show()"
],
"execution_count": 13,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -873,7 +883,7 @@
"data = pd.DataFrame({'Measured in': measured_in, 'Initial Fluid in Place': ifip, '@4000 psig': p4000, '@3500 psig': p3500, '@2900 psig': p2900, '@2100 psig': p2100, '@1300 psig': p1300, '@605 psig': p605, '@0 psig': p0})\n",
"data"
],
"execution_count": 56,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -1032,7 +1042,7 @@
"Gfgi = (area * poro * (1 - swi)) / Bgi\n",
"print('Hydrocarbon pore space:', Gfgi, 'bbl')"
],
"execution_count": 51,
"execution_count": null,
"outputs": [
{
"output_type": "stream",
Expand Down Expand Up @@ -1104,7 +1114,7 @@
"base_uri": "https://localhost:8080/",
"height": 254
},
"outputId": "230528e5-6aeb-43bd-83c7-23aac314aa1d"
"outputId": "99e8ea5c-020c-4b10-f2ce-94783068528e"
},
"source": [
"# data\n",
Expand All @@ -1115,7 +1125,7 @@
"separator_second = np.array([np.nan, 4.74, 12.09, 20.75, 27.95, 37.23, 96.68])\n",
"separator_third = np.array([np.nan, 1.21, 3.16, 5.61, 7.71, 10.25, 24.23])\n",
"Gp_j = np.array([0, 47.9, 140.03, 327.93, 547.98, 722.37, 878.78])\n",
"Gp_j = Gp_j * 1E+03 # convert Mscf to scf\n",
"Gp_j = Gp_j * 1E+03\n",
"Np_j = np.array([0, 7.21, 15.4, 24, 29.7, 35.1, 135.7])\n",
"z_j = np.array([.867, .799, .748, .762, .819, .902, np.nan])\n",
"z2_j = np.array([.867, .802, .744, .704, .671, .576, np.nan])\n",
Expand All @@ -1126,7 +1136,7 @@
" 'Gp_j': Gp_j, 'Np_j': Np_j, 'z_j': z_j, 'z2_j': z2_j, 'Vo_j': Vo_j})\n",
"cvd"
],
"execution_count": 14,
"execution_count": 3,
"outputs": [
{
"output_type": "execute_result",
Expand Down Expand Up @@ -1282,7 +1292,7 @@
"metadata": {
"tags": []
},
"execution_count": 14
"execution_count": 3
}
]
},
Expand All @@ -1295,7 +1305,7 @@
"base_uri": "https://localhost:8080/",
"height": 50
},
"outputId": "11d40c18-f19a-41b0-9ce4-f4b64c9dd96a"
"outputId": "cba80fa6-995b-4523-faf4-52c49264fba8"
},
"source": [
"# calculate gas FVF (Bg)\n",
Expand Down Expand Up @@ -1416,18 +1426,18 @@
" Boj_arr.append(Boj)\n",
"\n",
" # Eq 10.30\n",
" Bgj = Vtgj / Gfgj\n",
" Bgj_arr.append(Bgj)\n",
" Bgj = (Vtgj / Gfgj) * 1E+03 # result in RB/Mscf \n",
" Bgj_arr.append(Bgj) \n",
"\n",
" # Eq 10.31\n",
" Rsj = Gfoj / Nfoj\n",
" Rsj_arr.append(Rsj)\n",
"\n",
" # Eq 10.32\n",
" Rvj = (Nfgj / Gfgj) * 1E+06 # result in STB/scf \n",
" Rvj = (Nfgj / Gfgj) * 1E+06 # result in STB/MMscf \n",
" Rvj_arr.append(Rvj)"
],
"execution_count": 16,
"execution_count": 8,
"outputs": [
{
"output_type": "stream",
Expand All @@ -1448,18 +1458,18 @@
"base_uri": "https://localhost:8080/",
"height": 262
},
"outputId": "1754379a-76f3-420b-d0ce-d7b99da950ef"
"outputId": "c00a96c3-313d-46b0-e725-9728e19bedb6"
},
"source": [
"cvd_result = pd.DataFrame({'Eq 10.13': Vtoj_arr, 'Eq 10.14': ntj_nt1_arr, 'Eq 10.15': Vtoj_Vtgj_arr, 'Eq 10.16': Vtgj_arr,\n",
" 'Eq 10.17': delta_Vtgj_arr, 'Eq 10.18': ngj_nt1_arr, 'Eq 10.19': delta_ngj_to_ngj_arr,\n",
" 'Eq 10.20': delta_ngj_to_nt1_arr, 'Eq 10.21': delta_Gpj_arr, 'Eq 10.22': delta_Npj_arr,\n",
" 'Eq 10.23': Gj_arr, 'Eq 10.24': Nj_arr, 'Eq 10.25': Gfgj_arr, 'Eq 10.26': Nfgj_arr, \n",
" 'Eq 10.27': Gfoj_arr, 'Eq 10.28': Nfoj_arr, 'Eq 10.29': Boj_arr, 'Eq 10.30': Bgj_arr, \n",
" 'Eq 10.31': Rsj_arr, 'Result Rv': Rvj_arr})\n",
" 'Eq 10.27': Gfoj_arr, 'Eq 10.28': Nfoj_arr, 'Bo (RB/STB)': Boj_arr, 'Bg (RB/Mscf)': Bgj_arr, \n",
" 'Rs (scf/STB)': Rsj_arr, 'Rv (STB/Mscf)': Rvj_arr})\n",
"cvd_result"
],
"execution_count": 17,
"execution_count": 9,
"outputs": [
{
"output_type": "execute_result",
Expand Down Expand Up @@ -1499,10 +1509,10 @@
" <th>Eq 10.26</th>\n",
" <th>Eq 10.27</th>\n",
" <th>Eq 10.28</th>\n",
" <th>Eq 10.29</th>\n",
" <th>Eq 10.30</th>\n",
" <th>Eq 10.31</th>\n",
" <th>Result Rv</th>\n",
" <th>Bo (RB/STB)</th>\n",
" <th>Bg (RB/Mscf)</th>\n",
" <th>Rs (scf/STB)</th>\n",
" <th>Rv (STB/Mscf)</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
Expand All @@ -1525,7 +1535,7 @@
" <td>0.000000</td>\n",
" <td>0.000000</td>\n",
" <td>NaN</td>\n",
" <td>0.000703</td>\n",
" <td>0.702667</td>\n",
" <td>NaN</td>\n",
" <td>154.418626</td>\n",
" </tr>\n",
Expand All @@ -1548,7 +1558,7 @@
" <td>12851.893068</td>\n",
" <td>5.358838</td>\n",
" <td>3.802535</td>\n",
" <td>0.000730</td>\n",
" <td>0.729942</td>\n",
" <td>2398.261083</td>\n",
" <td>150.521921</td>\n",
" </tr>\n",
Expand All @@ -1571,7 +1581,7 @@
" <td>111628.545389</td>\n",
" <td>64.551333</td>\n",
" <td>1.855780</td>\n",
" <td>0.000794</td>\n",
" <td>0.793621</td>\n",
" <td>1729.298848</td>\n",
" <td>88.896125</td>\n",
" </tr>\n",
Expand All @@ -1594,7 +1604,7 @@
" <td>82066.667599</td>\n",
" <td>90.244243</td>\n",
" <td>1.635341</td>\n",
" <td>0.001002</td>\n",
" <td>1.002403</td>\n",
" <td>909.383962</td>\n",
" <td>45.769026</td>\n",
" </tr>\n",
Expand All @@ -1617,7 +1627,7 @@
" <td>30925.198947</td>\n",
" <td>98.232282</td>\n",
" <td>1.414354</td>\n",
" <td>0.001596</td>\n",
" <td>1.595849</td>\n",
" <td>314.817068</td>\n",
" <td>25.903204</td>\n",
" </tr>\n",
Expand All @@ -1640,7 +1650,7 @@
" <td>14760.917822</td>\n",
" <td>96.213825</td>\n",
" <td>1.161639</td>\n",
" <td>0.003570</td>\n",
" <td>3.570262</td>\n",
" <td>153.417846</td>\n",
" <td>30.965078</td>\n",
" </tr>\n",
Expand All @@ -1649,21 +1659,21 @@
"</div>"
],
"text/plain": [
" Eq 10.13 Eq 10.14 Eq 10.15 ... Eq 10.30 Eq 10.31 Result Rv\n",
"0 0.000000 1.000000 617.490015 ... 0.000703 NaN 154.418626\n",
"1 20.377170 1.000000 652.454223 ... 0.000730 2398.261083 150.521921\n",
"2 119.793063 0.946210 690.606346 ... 0.000794 1729.298848 88.896125\n",
"3 147.580114 0.846568 805.841572 ... 0.001002 909.383962 45.769026\n",
"4 138.935253 0.663758 968.656485 ... 0.001596 314.817068 25.903204\n",
"5 111.765693 0.466611 1240.107989 ... 0.003570 153.417846 30.965078\n",
" Eq 10.13 Eq 10.14 Eq 10.15 ... Bg (RB/Mscf) Rs (scf/STB) Rv (STB/Mscf)\n",
"0 0.000000 1.000000 617.490015 ... 0.702667 NaN 154.418626\n",
"1 20.377170 1.000000 652.454223 ... 0.729942 2398.261083 150.521921\n",
"2 119.793063 0.946210 690.606346 ... 0.793621 1729.298848 88.896125\n",
"3 147.580114 0.846568 805.841572 ... 1.002403 909.383962 45.769026\n",
"4 138.935253 0.663758 968.656485 ... 1.595849 314.817068 25.903204\n",
"5 111.765693 0.466611 1240.107989 ... 3.570262 153.417846 30.965078\n",
"\n",
"[6 rows x 20 columns]"
]
},
"metadata": {
"tags": []
},
"execution_count": 17
"execution_count": 9
}
]
},
Expand Down Expand Up @@ -1721,7 +1731,7 @@
"source": [
""
],
"execution_count": 17,
"execution_count": null,
"outputs": []
}
]
Expand Down

0 comments on commit 6799388

Please sign in to comment.