Horizontal wells#

A horizontal well is located in a 20 m thick aquifer; the hydraulic conductivity is \(k = 10\) m/d and the vertical anisotropy factor is 0.1. The horizontal well is placed 5 m above the bottom of the aquifer. The well has a discharge of 1000 m\(^3\)/d and radius of \(r=0.2\) m. The well is 200 m long and runs from \((x, y) = (−100, 0)\) to \((x, y) = (100, 0)\).

Three-dimensional flow to the horizontal well is modeled by dividing the aquifer up in 11 layers; the elevations are: [20, 15, 10, 8, 6, 5.5, 5.2, 4.8, 4.4, 4, 2, 0]. At the depth of the well, the layer thickness is equal to the diameter of the well, and it increases in the layers above and below the well. A transient timflow model is created with the Model3D command. The horizontal well is located in layer 6 and is modeled with the DitchString element.

import matplotlib.pyplot as plt
import numpy as np

import timflow.transient as tft

figsize = (6, 6)
# parameters
k = 10  # hydraulic conductivity, m/d
Ss = 1e-4  # specific storage, 1/m
anisotropy = 0.1  # kz / kh
z = [20, 15, 10, 8, 6, 5.5, 5.2, 4.8, 4.4, 4, 2, 0]  # top and bottoms of layers, m
ml = tft.Model3D(kaq=k, z=z, Saq=Ss, kzoverkh=anisotropy, tmin=0.1, tmax=100)
nls = 21
x = np.linspace(-100, 100, nls)
y = np.zeros(nls)
xy = np.vstack((x, y)).T
hw = tft.DitchString(
    ml, xy=xy, tsandQ=[(0, 1000)], layers=6
)  # horizontal well in layer 6
ml.solve()
self.neq  20
solution complete
h = ml.headgrid(
    np.linspace(-200, 200, 20),
    np.linspace(-100, 100, 20),
    t=[10, 20],
    layers=range(7),
    parallel=True,
    show_progress=True,
)
headgrid:   0%|          | 0/400 [00:00<?, ?it/s]
headgrid:   0%|          | 1/400 [00:00<00:54,  7.26it/s]
headgrid:   2%|▏         | 7/400 [00:00<00:14, 27.76it/s]
headgrid:   3%|▎         | 13/400 [00:00<00:10, 35.86it/s]
headgrid:   5%|▍         | 19/400 [00:00<00:09, 38.43it/s]
headgrid:   6%|▋         | 25/400 [00:00<00:08, 42.33it/s]
headgrid:   8%|▊         | 31/400 [00:00<00:08, 44.31it/s]
headgrid:   9%|▉         | 37/400 [00:00<00:08, 44.45it/s]
headgrid:  11%|█         | 43/400 [00:01<00:07, 44.66it/s]
headgrid:  12%|█▏        | 49/400 [00:01<00:07, 45.02it/s]
headgrid:  14%|█▍        | 55/400 [00:01<00:07, 45.71it/s]
headgrid:  15%|█▌        | 60/400 [00:01<00:07, 44.29it/s]
headgrid:  16%|█▋        | 65/400 [00:01<00:07, 44.29it/s]
headgrid:  18%|█▊        | 70/400 [00:01<00:07, 42.55it/s]
headgrid:  19%|█▉        | 75/400 [00:01<00:08, 38.56it/s]
headgrid:  20%|██        | 82/400 [00:01<00:07, 41.99it/s]
headgrid:  22%|██▏       | 88/400 [00:02<00:07, 43.95it/s]
headgrid:  23%|██▎       | 93/400 [00:02<00:06, 44.17it/s]
headgrid:  24%|██▍       | 98/400 [00:02<00:06, 45.04it/s]
headgrid:  26%|██▌       | 103/400 [00:02<00:06, 43.23it/s]
headgrid:  27%|██▋       | 109/400 [00:02<00:06, 43.98it/s]
headgrid:  28%|██▊       | 114/400 [00:02<00:06, 45.15it/s]
headgrid:  30%|██▉       | 119/400 [00:02<00:06, 43.05it/s]
headgrid:  31%|███       | 124/400 [00:02<00:06, 42.12it/s]
headgrid:  32%|███▎      | 130/400 [00:03<00:06, 42.06it/s]
headgrid:  34%|███▍      | 135/400 [00:03<00:06, 43.64it/s]
headgrid:  35%|███▌      | 141/400 [00:03<00:06, 43.13it/s]
headgrid:  36%|███▋      | 146/400 [00:03<00:05, 42.52it/s]
headgrid:  38%|███▊      | 152/400 [00:03<00:05, 42.20it/s]
headgrid:  40%|███▉      | 158/400 [00:03<00:05, 44.48it/s]
headgrid:  41%|████      | 164/400 [00:03<00:05, 45.74it/s]
headgrid:  42%|████▏     | 169/400 [00:03<00:04, 46.78it/s]
headgrid:  44%|████▎     | 174/400 [00:04<00:05, 44.89it/s]
headgrid:  45%|████▍     | 179/400 [00:04<00:05, 43.21it/s]
headgrid:  46%|████▌     | 184/400 [00:04<00:05, 42.27it/s]
headgrid:  48%|████▊     | 190/400 [00:04<00:05, 41.96it/s]
headgrid:  49%|████▉     | 195/400 [00:04<00:04, 43.09it/s]
headgrid:  50%|█████     | 201/400 [00:04<00:04, 43.74it/s]
headgrid:  52%|█████▏    | 206/400 [00:04<00:04, 43.46it/s]
headgrid:  53%|█████▎    | 212/400 [00:04<00:04, 41.89it/s]
headgrid:  55%|█████▍    | 218/400 [00:05<00:04, 42.96it/s]
headgrid:  56%|█████▌    | 224/400 [00:05<00:04, 43.76it/s]
headgrid:  57%|█████▊    | 230/400 [00:05<00:03, 43.54it/s]
headgrid:  59%|█████▉    | 236/400 [00:05<00:03, 43.57it/s]
headgrid:  60%|██████    | 242/400 [00:05<00:03, 45.14it/s]
headgrid:  62%|██████▏   | 247/400 [00:05<00:03, 45.35it/s]
headgrid:  63%|██████▎   | 252/400 [00:05<00:03, 43.03it/s]
headgrid:  64%|██████▍   | 257/400 [00:06<00:03, 39.58it/s]
headgrid:  66%|██████▌   | 263/400 [00:06<00:03, 41.33it/s]
headgrid:  67%|██████▋   | 269/400 [00:06<00:02, 44.15it/s]
headgrid:  69%|██████▉   | 275/400 [00:06<00:02, 44.75it/s]
headgrid:  70%|███████   | 280/400 [00:06<00:02, 43.72it/s]
headgrid:  72%|███████▏  | 286/400 [00:06<00:02, 43.68it/s]
headgrid:  73%|███████▎  | 292/400 [00:06<00:02, 46.86it/s]
headgrid:  74%|███████▍  | 297/400 [00:06<00:02, 43.68it/s]
headgrid:  76%|███████▌  | 302/400 [00:07<00:02, 42.99it/s]
headgrid:  77%|███████▋  | 308/400 [00:07<00:02, 43.03it/s]
headgrid:  78%|███████▊  | 314/400 [00:07<00:01, 43.71it/s]
headgrid:  80%|███████▉  | 319/400 [00:07<00:01, 45.19it/s]
headgrid:  81%|████████  | 324/400 [00:07<00:01, 44.79it/s]
headgrid:  82%|████████▏ | 329/400 [00:07<00:01, 43.69it/s]
headgrid:  84%|████████▎ | 334/400 [00:07<00:01, 41.93it/s]
headgrid:  85%|████████▌ | 340/400 [00:07<00:01, 40.80it/s]
headgrid:  86%|████████▋ | 346/400 [00:08<00:01, 41.90it/s]
headgrid:  88%|████████▊ | 352/400 [00:08<00:01, 42.12it/s]
headgrid:  90%|████████▉ | 358/400 [00:08<00:00, 42.39it/s]
headgrid:  91%|█████████ | 364/400 [00:08<00:00, 42.14it/s]
headgrid:  92%|█████████▎| 370/400 [00:08<00:00, 42.09it/s]
headgrid:  94%|█████████▍| 376/400 [00:08<00:00, 43.44it/s]
headgrid:  96%|█████████▌| 382/400 [00:08<00:00, 45.02it/s]
headgrid:  97%|█████████▋| 388/400 [00:09<00:00, 44.93it/s]
headgrid:  98%|█████████▊| 393/400 [00:09<00:00, 45.50it/s]
headgrid: 100%|██████████| 400/400 [00:09<00:00, 51.09it/s]
headgrid: 100%|██████████| 400/400 [00:09<00:00, 43.38it/s]
ml.plots.contour(win=[-200, 200, -100, 100], ngr=20, t=10, layers=6, parallel=True);
../../_images/edd614a264ea267ad05c968a5108b6bdc58f0d523bdadaf62a0d041a0d0aec1c.png
hw.headinside(20)[0]  # returns heads in each line-sink (but they are all equal)
array([[-4.16010758]])
t = np.linspace(1, 100, 100)
hwinside = hw.headinside(t)
plt.plot(t, hwinside[0, 0])
plt.xlabel("time (d)")
plt.ylabel("head inside well (m)")
plt.grid()
../../_images/2df76cfb9f767c333ac23b1af5f81d425c6b69076bdba3b34edea150c10640ef.png
# contours in vertical cross-section. interpolation between cell centers
ax = ml.plots.vcontour(
    win=[-400, 400, 0, 0],
    n=100,
    t=50,
    levels=20,
    vinterp=True,
    figsize=(16, 4),
    horizontal_axis="x",
)
../../_images/e922c3a1f6794815a3cc100cefa46168979c1dd191d17ed5f5cc3161ab9ef487.png
# contours in vertical cross-section. no interpolation between cell centers
ax = ml.plots.vcontour(
    win=[-400, 400, 0, 0],
    n=100,
    t=50,
    levels=20,
    vinterp=False,
    figsize=(16, 4),
    horizontal_axis="x",
)
../../_images/01e9a5b2b0adf21eedbc317aec79d2f6585f34ea5c30b13492260a9b092bb186.png