Test d1d2 function#
import matplotlib.pyplot as plt
import numpy as np
import timflow.transient as tft
ml1 = tft.ModelMaq(
kaq=10, z=[11, 10, 0], c=100, Saq=0.001, topboundary="semi", tmin=1, tmax=10
)
ls1 = tft.River(model=ml1, x1=-100, y1=0, x2=100, y2=0, tsandh=[(0, 1)])
ml1.solve()
self.neq 1
solution complete
ml2 = tft.ModelMaq(
kaq=10, z=[11, 10, 0], c=100, Saq=0.001, topboundary="semi", tmin=1, tmax=10
)
ls2 = tft.RiverHo(model=ml2, x1=-100, y1=0, x2=100, y2=0, tsandh=[(0, 1)], order=0)
ml2.solve()
self.neq 1
solution complete
ylim = 30 * ml1.aq.lababs.item()
N = 100
x = np.zeros(N)
y = np.linspace(0, ylim, N)
h1 = ml1.headalongline(x, y, 10).squeeze()
h2 = ml2.headalongline(x, y, 10).squeeze()
plt.semilogx(y[1:], h1[1:])
plt.semilogx(y[1:], h1[1:], "--")
[<matplotlib.lines.Line2D at 0x712a84b48190>]
Head goes to zero at 30 times largest lambda
ml1.head(0, ylim - 1e-6, 10), ml2.head(0, ylim, 10)
(array([[7.60742575e-16]]), array([[0.]]))
ml2.head(0, ylim - 1e-6, 10), ml2.head(0, ylim, 10)
(array([[7.60743739e-16]]), array([[0.]]))