Tutorial 0: Start a transient model#

import matplotlib.pyplot as plt

import timflow.transient as tft
ml = tft.ModelMaq(
    kaq=[1, 20, 2],
    z=[25, 20, 18, 10, 8, 0],
    c=[500, 1000],
    Saq=[0.1, 1e-4, 1e-4],
    Sll=[0, 0],
    topboundary="phreatic",
)
ls = tft.RiverString(ml, xy=[(-25, -30), (-15, 10), (10, 20)], tsandh="fixed", layers=0)
w = tft.Well(ml, xw=0, yw=0, rw=0.2, tsandQ=[(0, 1000)], layers=1)

ml.solve(silent=True)

Top-view of model#

Plot a top-view of the model and the locations of the elements.

fig, axes = plt.subplots(1, 3, figsize=(10, 4), sharex=True, sharey=True)

ml.plots.topview(ax=axes[0])
axes[0].set_title("All layers")
ml.plots.topview(ax=axes[1], layers=0)
axes[1].set_title("Layer 0")
ml.plots.topview(ax=axes[2], layers=1)
axes[2].set_title("Layer 1");

# OR
# ml.plot()
../../../_images/39a3f8b1a832e7138cb117d3ae96beb58ef08bfec57e5f385daaa6ce7e38b6b0.png

Cross-section of model#

Plot a cross-section of the model along a line. Optionally add labels and parameter values.

Note: Currently no elements are plotted in the cross-section.

ax = ml.plots.xsection(xy=[(-30, 0), (10, 0)], params=True)
../../../_images/19372952d8dae06c17076a574439df029e6e33de4ff8a188f5f2912344b79dc8.png

Head contours#

Plot head contours at time \(t\) in a given window in specified layers.

ax = ml.plots.contour(
    win=[-50, 50, -50, 50],
    ngr=50,
    levels=10,
    t=10,
    decimals=2,
    layers=[0, 1],
)
../../../_images/654eed0154d48fb86016c567c395405cbcaad969c80d7fb8c56886ef4abbe6ca.png

Head along line#

Plot the heads along a given line at time \(t\) in specified layers.

ax = ml.plots.head_along_line(-30, 10, 0, 0, t=10, layers=[0, 1, 2])
../../../_images/7898383251dbb842737dc6917be5ddfdabf43d9d1097cf4395656b1b2f91115a.png