In [1]:
from pylab import *
from timml import *
%matplotlib notebook
In [2]:
ml1 = ModelMaq(kaq=20)
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = LineSinkBase(ml1, x1=-10, y1=-10, x2=10, y2=10, Qls=1000)
ml1.solve()
In [3]:
print('head at center of line-sink:', ml1.head(ls1.xc, ls1.yc))
print('discharge of line-sink:', ls1.discharge())
In [4]:
ml2 = ModelMaq(kaq=20)
rf2 = Constant(ml2, xr=0, yr=20, hr=30)
N = 20
d = 20 / N
xw = np.arange(-10 + d/2, 10, d)
yw = np.arange(-10 + d/2, 10, d)
for i in range(N):
Well(ml2, xw[i], yw[i], Qw=1000 / N)
ml2.solve(silent=True)
In [5]:
ml1.contour([-20, 20, -20, 20], 50, [0], np.arange(20, 31, 1), color='b')
ml2.contour([-20, 20, -20, 20], 50, [0], np.arange(20, 31, 1), color='r', newfig=False)
In [6]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSink(ml1, -10, -10, 10, 10, 20, order=7, layers=0)
ml1.solve()
In [7]:
ml2 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf2 = Constant(ml2, xr=0, yr=20, hr=30)
N = 50
d = 20 / N
xw = np.arange(-10 + d/2, 10, d)
yw = np.arange(-10 + d/2, 10, d)
for i in range(N):
HeadWell(ml2, xw[i], yw[i], 20, layers=0)
ml2.solve(silent=True)
Qwell = 0
for i in range(N):
Qwell += ml2.elementlist[i + 1].discharge()
In [8]:
print('discharge of line-sink:', ls1.discharge())
print('discharge of wells:', Qwell)
In [9]:
ml1.contour([-20, 20, -20, 20], 50, [0], np.arange(20, 31, 1), color='b')
ml2.contour([-20, 20, -20, 20], 50, [0], np.arange(20, 31, 1), color='r', newfig=False)
In [10]:
x = linspace(-100, 100, 100)
h1 = ml1.headalongline(x, 0)
h2 = ml2.headalongline(x, 0)
figure()
plot(x, h1.T, 'b')
plot(x, h2.T, 'r')
Out[10]:
In [11]:
ml = ModelMaq(kaq=3)
ls = HeadLineSink(ml, -10, 0, 10, 0, wh=1, res=2, order=2)
rf = Constant(ml, 0, 20, 2)
ml.solve()
In [12]:
for i in range(3):
print((ml.head(ls.xc[i], ls.yc[i]) - ls.hc) * ls.wh / ls.res)
print(np.sum(ls.strengthinf[i] * ls.parameters[:, 0]))
In [13]:
ml = ModelMaq(kaq=[1, 2], z=[20, 10, 10, 0], c=[1000])
lslayer = 0
order = 2
ls = HeadLineSink(ml, -10, 0, 10, 0, order=order, wh=1, res=2, layers=[lslayer])
rf = Constant(ml, 0, 20, 2)
ml.solve()
for i in range(order + 1):
print((ml.head(ls.xc[i], ls.yc[i]) - ls.hc[i])[lslayer] * ls.wh / ls.res)
print(np.sum(ls.strengthinf[i] * ls.parameters[:, 0]))
In [14]:
ml = ModelMaq(kaq=[1, 2], z=[20, 12, 10, 0], c=[1000])
order = 2
ls = HeadLineSink(ml, -10, 0, 10, 0, order=order, hls=1, wh=1, res=2, layers=[0, 1])
rf = Constant(ml, 0, 2000, 2)
ml.solve()
for i in range(order + 1):
for ilay in range(2):
print(((ml.head(ls.xc[i], ls.yc[i]) - ls.hc[i]) * ls.wh / ls.res)[ilay])
print(np.sum(ls.strengthinf[2 * i + ilay] * ls.parameters[:, 0]))
In [15]:
print(ml.headalongline(ls.xc, ls.yc))
print(ls.hc)
Give one value that is applied at all control points
In [16]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSink(ml1, -10, 0, 10, 0, hls=20, order=2, layers=[0])
ml1.solve()
print(ml1.headalongline(ls1.xc, ls1.yc))
Give order + 1
values, which is applied at the order + 1
control points. This may not be so useful, as the user needs to know where those control points are.
In [17]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSink(ml1, -10, 0, 10, 0, hls=[20, 19, 18], order=2, layers=[0])
ml1.solve()
print(ml1.headalongline(ls1.xc, ls1.yc))
In [18]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSink(ml1, -10, 0, 10, 0, hls=[19, 20], order=2, layers=[0])
ml1.solve()
print(ml1.headalongline(ls1.xc, ls1.yc))
In [19]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = LineSinkDitch(ml1, -10, -10, 10, 10, Qls=1000, order=2, layers=[0])
ml1.solve()
print(ml1.headalongline(ls1.xc, ls1.yc))
print(ls1.discharge())
In [20]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = LineSinkDitch(ml1, -10, -10, 10, 10, Qls=1000, order=2, layers=[0, 1])
ml1.solve()
print(ml1.headalongline(ls1.xc, ls1.yc))
print(ls1.discharge())
In [21]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSinkString(ml1, xy=[(-10, 0), (0, 0), (10, 0), (10, 10)], hls=20, order=5, layers=[0])
ml1.solve()
ml1.contour([-20, 20, -20, 20], 50, [0], 40)
In [22]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=30)
ls1 = HeadLineSinkString(ml1, xy=[(-10, 0), (0, 0), (10, 0), (10, 10)], hls=[20, 22], order=5, layers=[0])
ml1.solve()
ml1.contour([-20, 20, -20, 20], 50, [0], 40)
In [23]:
xls1 = np.linspace(-10, 10, 50)
yls1 = np.linspace(0, 0, 50)
hls1 = ml1.headalongline(xls1, yls1)
figure()
plot(xls1, hls1[0])
xls2 = np.linspace(10, 10, 50)
yls2 = np.linspace(0, 10, 50)
hls2 = ml1.headalongline(xls2, yls2)
plot(10 + yls2, hls2[0])
Out[23]:
In [24]:
for ls in ls1.lslist:
print(ml1.headalongline(ls.xc, ls.yc)[0])
print(ls.hc)
In [25]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=200, hr=2)
ls1 = HeadLineSinkString(ml1, xy=[(-10, 0), (0, 0), (10, 0), (10, 10)], hls=[0, 1],
res=2, wh=5, order=5, layers=[0])
ml1.solve()
In [26]:
xls1 = np.linspace(-10, 10, 50)
yls1 = np.linspace(0, 0, 50)
hls1 = ml1.headalongline(xls1, yls1)
figure()
plot(xls1, hls1[0])
xls2 = np.linspace(10, 10, 50)
yls2 = np.linspace(0, 10, 50)
hls2 = ml1.headalongline(xls2, yls2)
plot(10 + yls2, hls2[0])
Out[26]:
In [27]:
for ls in ls1.lslist:
print(ml1.headalongline(ls.xc, ls.yc)[0])
print(ls.hc)
In [28]:
ls.res
Out[28]:
In [29]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=1)
ls1 = LineSinkDitchString(ml1, xy=[(-10, 0), (0, 0), (10, 0)], Qls=100, wh=2, res=5, order=2, layers=[0])
ml1.solve()
print('discharge:', ls1.discharge())
In [30]:
ml1.contour([-20, 20, -20, 20], 50, [0], 20)
In [31]:
ml1 = ModelMaq(kaq=[20, 10], z=[20, 12, 10, 0], c=[100])
rf1 = Constant(ml1, xr=0, yr=20, hr=1)
ls1 = LineSinkDitchString(ml1, xy=[(-10, 0), (0, 0), (10, 0), (10, 20)], Qls=100, wh=2, res=5, order=2, layers=[0,1,0])
ml1.solve()
In [32]:
ml = Model3D(kaq=1, z=np.arange(10, -0.1, -0.2), kzoverkh=0.1, topboundary='semi', topres=0, topthick=2, hstar=7)
xy = list(zip(np.linspace(-10, 10, 21), np.zeros(21)))
ls = LineSinkDitchString(ml, xy=xy, Qls=100, wh=2, res=5, order=2, layers=np.arange(10, 30, 1))
ml.solve()
In [33]:
ml.vcontour([-20, 20, 0, 0], 100, 20)