TimML Notebook

Cross-sectional model


In [1]:
from pylab import *
%matplotlib inline
from timml import *

Two-layer model with head-specified line-sink

Two-layer aquifer bounded on top by a semi-confined layer. Head above the semi-confining layer is 5. Head line-sink located at $x=0$ with head equal to 2, cutting through layer 0 only.


In [2]:
ml = ModelMaq(kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], \
              topboundary='semi', hstar=5)
ls = HeadLineSink1D(ml, xls=0, hls=2, layers=0)
ml.solve()

x = linspace(-200, 200, 101)
h = ml.headalongline(x, zeros_like(x))
plot(x, h[0], label='layer 0')
plot(x, h[1], label='layer 1')
legend(loc='best')


Number of elements, Number of equations: 2 , 1
..
solution complete
Out[2]:
<matplotlib.legend.Legend at 0x111798668>

1D inhomogeneity

Three strips with semi-confined conditions on top of all three


In [3]:
ml = ModelMaq(kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], topboundary='semi', hstar=5)
StripInhomMaq(ml, x1=-inf, x2=-50, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=15)
StripInhomMaq(ml, x1=-50, x2=50, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=13)
StripInhomMaq(ml, x1=50, x2=inf, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=11)
ml.solve()

x = linspace(-200, 200, 101)
h = ml.headalongline(x, zeros(101))
plot(x, h[0], label='layer 0')
plot(x, h[1], label='layer 1')
legend(loc='best');


Number of elements, Number of equations: 8 , 8
........
solution complete

In [4]:
ml.vcontoursf1D(x1=-200, x2=200, nx=100, levels=20)


Out[4]:
<matplotlib.axes._subplots.AxesSubplot at 0x11205ecf8>

Three strips with semi-confined conditions at the top of the strip in the middle only. The head is specified in the strip on the left and in the strip on the right.


In [5]:
ml = ModelMaq(kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], topboundary='semi', hstar=5)
StripInhomMaq(ml, x1=-inf, x2=-50, kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], npor=0.3, 
                 topboundary='conf')
StripInhomMaq(ml, x1=-50, x2=50, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=3)
StripInhomMaq(ml, x1=50, x2=inf, kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], npor=0.3, 
                 topboundary='conf')
rf1 = Constant(ml, -100, 0, 4)
rf2 = Constant(ml, 100, 0, 4)

ml.solve()

x = linspace(-200, 200, 101)
h = ml.headalongline(x, zeros_like(x))
Qx, _ = ml.disvecalongline(x, zeros_like(x))

figure(figsize=(12, 4))
subplot(121)
plot(x, h[0], label='layer 0')
plot(x, h[1], label='layer 1')
plot([-100, 100], [4, 4], 'b.', label='fixed heads')
legend(loc='best')
subplot(122)
title('Qx')
plot(x, Qx[0], label='layer 0')
plot(x, Qx[1], label='layer 1')


Number of elements, Number of equations: 8 , 10
........
solution complete
Out[5]:
[<matplotlib.lines.Line2D at 0x112210d30>]

In [6]:
ml.vcontoursf1D(x1=-200, x2=200, nx=100, levels=20)


Out[6]:
<matplotlib.axes._subplots.AxesSubplot at 0x112295860>

Impermeable wall

Flow from left to right in three-layer aquifer with impermeable wall in bottom 2 layers


In [7]:
from timml import *
from pylab import *

ml = ModelMaq(kaq=[1, 2, 4], z=[5, 4, 3, 2, 1, 0], c=[5000, 1000])
uf = Uflow(ml, 0.002, 0)
rf = Constant(ml, 100, 0, 20)
ld1 = ImpLineDoublet1D(ml, xld=0, layers=[0, 1])
    
ml.solve()

x = linspace(-100, 100, 101)
h = ml.headalongline(x, zeros_like(x))
Qx, _ = ml.disvecalongline(x, zeros_like(x))

figure(figsize=(12, 4))
subplot(121)
title('head')
plot(x, h[0], label='layer 0')
plot(x, h[1], label='layer 1')
plot(x, h[2], label='layer 2')
legend(loc='best')
subplot(122)
title('Qx')
plot(x, Qx[0], label='layer 0')
plot(x, Qx[1], label='layer 1')
plot(x, Qx[2], label='layer 2')
legend(loc='best')


Number of elements, Number of equations: 3 , 3
...
solution complete
Out[7]:
<matplotlib.legend.Legend at 0x8184cf4a8>

In [8]:
ml.vcontoursf1D(x1=-200, x2=200, nx=100, levels=20)


Out[8]:
<matplotlib.axes._subplots.AxesSubplot at 0x8185362b0>

In [9]:
ml = ModelMaq(kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], topboundary='conf')
StripInhomMaq(ml, x1=-inf, x2=-50, kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], npor=0.3, 
                 topboundary='conf')
StripInhomMaq(ml, x1=-50, x2=50, kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], npor=0.3, 
                 topboundary='conf', N=0.001)
StripInhomMaq(ml, x1=50, x2=inf, kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], npor=0.3, 
                 topboundary='conf')
Constant(ml, -100, 0, 10)
Constant(ml, 100, 0, 10)
ml.solve()
ml.vcontoursf1D(x1=-100, x2=100, nx=100, levels=20)
#
ml2 = ModelMaq(kaq=[1, 2], z=[3, 2, 1, 0], c=[1000], topboundary='conf')
StripAreaSink(ml2, -50, 50, 0.001)
Constant(ml2, -100, 0, 10)
ml2.solve()
ml2.vcontoursf1D(x1=-100, x2=100, nx=100, levels=20)
#
x = np.linspace(-100, 100, 100)
plt.figure()
plt.plot(x, ml.headalongline(x, 0)[0], 'C0')
plt.plot(x, ml.headalongline(x, 0)[1], 'C0')
plt.plot(x, ml2.headalongline(x, 0)[0], '--C1')
plt.plot(x, ml2.headalongline(x, 0)[1], '--C1')


Number of elements, Number of equations: 7 , 10
.......
solution complete
Number of elements, Number of equations: 2 , 1
..
solution complete
Out[9]:
[<matplotlib.lines.Line2D at 0x8187c2c88>]

In [ ]:


In [10]:
ml = Model3D(kaq=1, z=np.arange(5, -0.1, -0.1))
StripInhom3D(ml, x1=-inf, x2=-5, kaq=1, z=np.arange(5, -0.1, -0.1), 
            kzoverkh=0.1)
StripInhom3D(ml, x1=-5, x2=5, kaq=1, z=np.arange(5, -0.1, -0.1),
             kzoverkh=0.1, topboundary='semi', hstar=3, topres=3)
StripInhom3D(ml, x1=5, x2=inf, kaq=1, z=np.arange(5, -0.1, -0.1), 
            kzoverkh=0.1)
rf1 = Constant(ml, -100, 0, 3.2)
rf2 = Constant(ml, 100, 0, 2.97)

ml.solve()

ml.vcontoursf1D(x1=-20, x2=20, nx=100, levels=20)


Number of elements, Number of equations: 7 , 202
.......
solution complete
Out[10]:
<matplotlib.axes._subplots.AxesSubplot at 0x8188bd780>

In [11]:
ml = Model3D(kaq=1, z=np.arange(5, -0.1, -1))
StripInhom3D(ml, x1=-inf, x2=-5, kaq=1, z=np.arange(5, -0.1, -1), 
            kzoverkh=0.1)
StripInhom3D(ml, x1=-5, x2=5, kaq=1, z=np.arange(5, -0.1, -1),
             kzoverkh=0.1, topboundary='semi', hstar=3, topres=3)
StripInhom3D(ml, x1=5, x2=inf, kaq=1, z=np.arange(5, -0.1, -1), 
            kzoverkh=0.1)
rf1 = Constant(ml, -100, 0, 3.2)
rf2 = Constant(ml, 100, 0, 2.97)

ml.solve()

ml.vcontoursf1D(x1=-20, x2=20, nx=100, levels=20)


Number of elements, Number of equations: 7 , 22
.......
solution complete
Out[11]:
<matplotlib.axes._subplots.AxesSubplot at 0x8188c9da0>

In [12]:
ml = ModelMaq(kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], topboundary='semi', hstar=5)
StripInhomMaq(ml, x1=-inf, x2=-50, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=15)
StripInhomMaq(ml, x1=-50, x2=50, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=13)
StripInhomMaq(ml, x1=50, x2=inf, kaq=[1, 2], z=[4, 3, 2, 1, 0], c=[1000, 1000], npor=0.3, 
                 topboundary='semi', hstar=11)
ml.solve()


Number of elements, Number of equations: 8 , 8
........
solution complete

In [ ]: