This notebook tests line-sink strings


In [1]:
import matplotlib.pyplot as plt
from timml import *

One HeadLineSinkString in one layer


In [2]:
ml = ModelMaq(kaq=[10, 20, 5],
              z=[0, -20, -40, -80, -90, -140], 
              c=[4000, 10000])
rf = Constant(ml, xr=0, yr=10000, hr=20, layer=0)
ls1 = HeadLineSinkString(ml, xy=[(-100, 0), (0, 0), (100, 0), (100, 50)], hls=10, layers=0)
ml.solve()


Number of elements, Number of equations: 2 , 4
..
solution complete

In [3]:
plt.figure(figsize=(16, 4))
for i in range(3):
    plt.subplot(1, 3, i + 1)
    ml.contour([-200, 200, -100, 100], ngr=50, layers=i, newfig=False)


HeadLineSinkString in two layers


In [4]:
ml = ModelMaq(kaq=[10, 20, 5],
              z=[0, -20, -40, -80, -90, -140], 
              c=[4000, 10000])
rf = Constant(ml, xr=0, yr=10000, hr=20, layer=0)
ls1 = HeadLineSinkString(ml, xy=[(-100, 0), (0, 0), (100, 0), (100, 50)], hls=10, layers=[0, 1])
ml.solve()


Number of elements, Number of equations: 2 , 7
..
solution complete

In [5]:
plt.figure(figsize=(16, 4))
for i in range(3):
    plt.subplot(1, 3, i + 1)
    ml.contour([-200, 200, -100, 100], ngr=50, layers=i, newfig=False)


`HeadLineSinkString, each section in different layer


In [6]:
ml = ModelMaq(kaq=[10, 20, 5],
              z=[0, -20, -40, -80, -90, -140], 
              c=[4000, 10000])
rf = Constant(ml, xr=0, yr=10000, hr=20, layer=0)
ls1 = HeadLineSinkString(ml, xy=[(-100, 0), (0, 0), (100, 0), (100, 50)], hls=10, layers=[0, 1, 0])
ml.solve()


Number of elements, Number of equations: 2 , 4
..
solution complete

TODO: make sure segments are plotted correctly in each layer


In [7]:
plt.figure(figsize=(16, 4))
for i in range(3):
    plt.subplot(1, 3, i + 1)
    ml.contour([-200, 200, -100, 100], ngr=50, layers=i, newfig=False)



In [10]:
ml.contour([-200, 200, -100, 100], ngr=50, layers=2)



In [11]:
ml.contour([-200, 200, -100, 100], ngr=50, layers=1, newfig=False)


A 2D array (NLS, NLAYERS)

Layers can always be specified as a 2D array.


In [10]:
ml = ModelMaq(kaq=[10, 20, 5],
              z=[0, -20, -40, -80, -90, -140], 
              c=[4000, 10000])
rf = Constant(ml, xr=0, yr=10000, hr=20, layer=0)
ls1 = HeadLineSinkString(ml, xy=[(-100, 0), (0, 0), (100, 0), (100, 50)], hls=10, layers=[[0, 1], [0, 1], [0, 1]])
ml.solve()


Number of elements, Number of equations: 2 , 7
..
solution complete

In [11]:
plt.figure(figsize=(16, 4))
for i in range(3):
    plt.subplot(1, 3, i + 1)
    ml.contour([-200, 200, -100, 100], ngr=50, layers=i, newfig=False)