Skip to content

Commit

Permalink
Created using Colaboratory
Browse files Browse the repository at this point in the history
  • Loading branch information
yohanesnuwara committed Mar 5, 2020
1 parent 0fedbcc commit c7cb923
Showing 1 changed file with 132 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"name": "fd1d_linearflow.ipynb",
"provenance": [],
"collapsed_sections": [],
"authorship_tag": "ABX9TyNXN1hI1PA52xiT8k/v0165",
"include_colab_link": true
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/yohanesnuwara/reservoir-engineering/blob/master/Reservoir%20Simulation%20Ertekin/Unit%205%20Finite-Difference%20Approximation%20to%20Linear-Flow%20Equations/fd1d_linearflow.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "eOe4EUXrFd9G",
"colab_type": "text"
},
"source": [
"# **Unit 5 Finite-Difference Approximations to Linear-Flow Problems**\n",
"\n",
"## Explicit Formulation\n",
"\n",
"$$p_{i}^{n+1} = (\\frac{\\alpha_c B_l \\Delta t}{V_b \\phi c_l})_i \\cdot q_{lsc_i} + (\\frac{\\alpha_c B_l \\Delta t}{V_b \\phi c_l})_i \\cdot [T_{lx_{i+1/2}}^{n} p_{i+1}^{n}-(T_{lx_{i+1/2}}^{n} + T_{lx_{i-1/2}}^{n})p_{i}^{n}+T_{lx_{i-1/2}}p_{i-1}^{n}]$$\n",
"\n",
"In the following codes, $(\\frac{\\alpha_c B_l \\Delta t}{V_b \\phi c_l})_i$ will be written as `factor`"
]
},
{
"cell_type": "code",
"metadata": {
"id": "IJsmLh1xKz8S",
"colab_type": "code",
"colab": {}
},
"source": [
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import pandas as pd"
],
"execution_count": 0,
"outputs": []
},
{
"cell_type": "code",
"metadata": {
"id": "rJZBuBCVK6JV",
"colab_type": "code",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 134
},
"outputId": "e871c872-7bd9-49e5-f833-63db4056e97e"
},
"source": [
"!git clone https://github.com/yohanesnuwara/reservoir-engineering"
],
"execution_count": 2,
"outputs": [
{
"output_type": "stream",
"text": [
"Cloning into 'reservoir-engineering'...\n",
"remote: Enumerating objects: 149, done.\u001b[K\n",
"remote: Counting objects: 0% (1/149)\u001b[K\rremote: Counting objects: 1% (2/149)\u001b[K\rremote: Counting objects: 2% (3/149)\u001b[K\rremote: Counting objects: 3% (5/149)\u001b[K\rremote: Counting objects: 4% (6/149)\u001b[K\rremote: Counting objects: 5% (8/149)\u001b[K\rremote: Counting objects: 6% (9/149)\u001b[K\rremote: Counting objects: 7% (11/149)\u001b[K\rremote: Counting objects: 8% (12/149)\u001b[K\rremote: Counting objects: 9% (14/149)\u001b[K\rremote: Counting objects: 10% (15/149)\u001b[K\rremote: Counting objects: 11% (17/149)\u001b[K\rremote: Counting objects: 12% (18/149)\u001b[K\rremote: Counting objects: 13% (20/149)\u001b[K\rremote: Counting objects: 14% (21/149)\u001b[K\rremote: Counting objects: 15% (23/149)\u001b[K\rremote: Counting objects: 16% (24/149)\u001b[K\rremote: Counting objects: 17% (26/149)\u001b[K\rremote: Counting objects: 18% (27/149)\u001b[K\rremote: Counting objects: 19% (29/149)\u001b[K\rremote: Counting objects: 20% (30/149)\u001b[K\rremote: Counting objects: 21% (32/149)\u001b[K\rremote: Counting objects: 22% (33/149)\u001b[K\rremote: Counting objects: 23% (35/149)\u001b[K\rremote: Counting objects: 24% (36/149)\u001b[K\rremote: Counting objects: 25% (38/149)\u001b[K\rremote: Counting objects: 26% (39/149)\u001b[K\rremote: Counting objects: 27% (41/149)\u001b[K\rremote: Counting objects: 28% (42/149)\u001b[K\rremote: Counting objects: 29% (44/149)\u001b[K\rremote: Counting objects: 30% (45/149)\u001b[K\rremote: Counting objects: 31% (47/149)\u001b[K\rremote: Counting objects: 32% (48/149)\u001b[K\rremote: Counting objects: 33% (50/149)\u001b[K\rremote: Counting objects: 34% (51/149)\u001b[K\rremote: Counting objects: 35% (53/149)\u001b[K\rremote: Counting objects: 36% (54/149)\u001b[K\rremote: Counting objects: 37% (56/149)\u001b[K\rremote: Counting objects: 38% (57/149)\u001b[K\rremote: Counting objects: 39% (59/149)\u001b[K\rremote: Counting objects: 40% (60/149)\u001b[K\rremote: Counting objects: 41% (62/149)\u001b[K\rremote: Counting objects: 42% (63/149)\u001b[K\rremote: Counting objects: 43% (65/149)\u001b[K\rremote: Counting objects: 44% (66/149)\u001b[K\rremote: Counting objects: 45% (68/149)\u001b[K\rremote: Counting objects: 46% (69/149)\u001b[K\rremote: Counting objects: 47% (71/149)\u001b[K\rremote: Counting objects: 48% (72/149)\u001b[K\rremote: Counting objects: 49% (74/149)\u001b[K\rremote: Counting objects: 50% (75/149)\u001b[K\rremote: Counting objects: 51% (76/149)\u001b[K\rremote: Counting objects: 52% (78/149)\u001b[K\rremote: Counting objects: 53% (79/149)\u001b[K\rremote: Counting objects: 54% (81/149)\u001b[K\rremote: Counting objects: 55% (82/149)\u001b[K\rremote: Counting objects: 56% (84/149)\u001b[K\rremote: Counting objects: 57% (85/149)\u001b[K\rremote: Counting objects: 58% (87/149)\u001b[K\rremote: Counting objects: 59% (88/149)\u001b[K\rremote: Counting objects: 60% (90/149)\u001b[K\rremote: Counting objects: 61% (91/149)\u001b[K\rremote: Counting objects: 62% (93/149)\u001b[K\rremote: Counting objects: 63% (94/149)\u001b[K\rremote: Counting objects: 64% (96/149)\u001b[K\rremote: Counting objects: 65% (97/149)\u001b[K\rremote: Counting objects: 66% (99/149)\u001b[K\rremote: Counting objects: 67% (100/149)\u001b[K\rremote: Counting objects: 68% (102/149)\u001b[K\rremote: Counting objects: 69% (103/149)\u001b[K\rremote: Counting objects: 70% (105/149)\u001b[K\rremote: Counting objects: 71% (106/149)\u001b[K\rremote: Counting objects: 72% (108/149)\u001b[K\rremote: Counting objects: 73% (109/149)\u001b[K\rremote: Counting objects: 74% (111/149)\u001b[K\rremote: Counting objects: 75% (112/149)\u001b[K\rremote: Counting objects: 76% (114/149)\u001b[K\rremote: Counting objects: 77% (115/149)\u001b[K\rremote: Counting objects: 78% (117/149)\u001b[K\rremote: Counting objects: 79% (118/149)\u001b[K\rremote: Counting objects: 80% (120/149)\u001b[K\rremote: Counting objects: 81% (121/149)\u001b[K\rremote: Counting objects: 82% (123/149)\u001b[K\rremote: Counting objects: 83% (124/149)\u001b[K\rremote: Counting objects: 84% (126/149)\u001b[K\rremote: Counting objects: 85% (127/149)\u001b[K\rremote: Counting objects: 86% (129/149)\u001b[K\rremote: Counting objects: 87% (130/149)\u001b[K\rremote: Counting objects: 88% (132/149)\u001b[K\rremote: Counting objects: 89% (133/149)\u001b[K\rremote: Counting objects: 90% (135/149)\u001b[K\rremote: Counting objects: 91% (136/149)\u001b[K\rremote: Counting objects: 92% (138/149)\u001b[K\rremote: Counting objects: 93% (139/149)\u001b[K\rremote: Counting objects: 94% (141/149)\u001b[K\rremote: Counting objects: 95% (142/149)\u001b[K\rremote: Counting objects: 96% (144/149)\u001b[K\rremote: Counting objects: 97% (145/149)\u001b[K\rremote: Counting objects: 98% (147/149)\u001b[K\rremote: Counting objects: 99% (148/149)\u001b[K\rremote: Counting objects: 100% (149/149)\u001b[K\rremote: Counting objects: 100% (149/149), done.\u001b[K\n",
"remote: Compressing objects: 100% (134/134), done.\u001b[K\n",
"remote: Total 845 (delta 49), reused 0 (delta 0), pack-reused 696\u001b[K\n",
"Receiving objects: 100% (845/845), 4.95 MiB | 30.33 MiB/s, done.\n",
"Resolving deltas: 100% (347/347), done.\n"
],
"name": "stdout"
}
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "N-NT2lf1GKb3",
"colab_type": "text"
},
"source": [
"## Example 5.8 \n",
"\n",
"![Example 5 8](https://user-images.githubusercontent.com/51282928/75949840-09e36380-5eda-11ea-824c-dd5c9ac6f6d5.PNG)"
]
},
{
"cell_type": "code",
"metadata": {
"id": "dLVKK7xd7fGK",
"colab_type": "code",
"colab": {}
},
"source": [
"\"Task. determine pressure distribution during first year of production with timestep 10 days\"\n",
"\n",
"# known\n",
"pi = 6000 # initial pressure, in psia\n",
"delta_x = 1000 # ft\n",
"delta_y = 1000\n",
"delta_z = 75\n",
"B = 1 # phase FVF, assumed constant over pressure, rb/stb\n",
"c = 3.5E-06 # phase compressibility, psi^-1\n",
"k_x = 15 # perm in x direction, md\n",
"poro = 0.18\n",
"mu = 10 # phase viscosity, cp\n",
"\n",
"delta_t = 10 # days\n",
"qsc = -150 # minus means production, stb/d\n",
"\n",
"# calculate "
],
"execution_count": 0,
"outputs": []
}
]
}

0 comments on commit c7cb923

Please sign in to comment.