{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# A well in uniform flow" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Consider a well in the middle aquifer of a three aquifer system. Aquifer properties are given in Table 1. The well is located at $(x,y)=(0,0)$, the discharge is $Q=10,000$ m$^3$/d and the radius is 0.2 m. There is a uniform flow from West to East with a gradient of 0.002. The head is fixed to 20 m at a distance of 10,000 m downstream of the well. Here is the cookbook recipe to build this model:\n", " \n", "* Import numpy: `import numpy as np`\n", "* Import pyplot for plotting: `import matplotlib.pyplot as plt`\n", "* import timflow.steady as tfs: `import timflow.steady as tfs`\n", "* Create the model and give it a name, for example `ml` with the command `ml = tml.ModelMaq(kaq, z, c)` (substitute the correct lists for `kaq`, `z`, and `c`).\n", "* Enter the well with the command `w = tml.Well(ml, xw, yw, Qw, rw, layers)`, where the well is called `w`.\n", "* Enter uniform flow with the command `tml.Uflow(ml, slope, angle)`.\n", "* Enter the reference head with `tml.Constant(ml, xr, yr, head, layer)`.\n", "* Solve the model `ml.solve()`\n", "\n", "**Table 1: Aquifer data for exercise 1**\n", "|Layer |$k$ (m/d)|$z_b$ (m)|$z_t$|$c$ (days)|\n", "|-------------|--------:|--------:|----:|---------:|\n", "|Aquifer 0 | 10 | -20 | 0 | - |\n", "|Leaky Layer 1| - | -40 | -20 | 4000 | \n", "|Aquifer 1 | 20 | -80 | -40 | - |\n", "|Leaky Layer 2| - | -90 | -80 | 10000 | \n", "|Aquifer 2 | 5 | -140 | -90 | - ||\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "import timflow.steady as tfs\n", "\n", "figsize = (6, 6)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ml = tfs.ModelMaq(kaq=[10, 20, 5], z=[0, -20, -40, -80, -90, -140], c=[4000, 10000])\n", "w = tfs.Well(ml, xw=0, yw=0, Qw=10000, rw=0.2, layers=1)\n", "tfs.Constant(ml, xr=10000, yr=0, hr=20, layer=0)\n", "tfs.Uflow(ml, slope=0.002, angle=0)\n", "ml.solve()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Questions:\n", "### Exercise 1a\n", "What are the leakage factors of the aquifer system?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(\"The leakage factors of the aquifers are:\")\n", "print(ml.aq.lab)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1b\n", "What is the head at the well?" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(\"The head at the well is:\")\n", "print(w.headinside())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1c\n", "Create a contour plot of the head in the three aquifers. Use a window with lower left hand corner $(x,y)=(−3000,−3000)$ and upper right hand corner $(x,y)=(3000,3000)$. Notice that the heads in the three aquifers are almost equal at three times the largest leakage factor." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ml.plots.contour(\n", " win=[-3000, 3000, -3000, 3000],\n", " ngr=50,\n", " layers=[0, 1, 2],\n", " levels=10,\n", " legend=True,\n", " figsize=figsize,\n", ");" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1d\n", "Create a contour plot of the head in aquifer 1 with labels along the contours. Labels are added when the `labels` keyword argument is set to `True`. The number of decimal places can be set with the `decimals` keyword argument, which is zero by default." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ml.plots.contour(\n", " win=[-3000, 3000, -3000, 3000],\n", " ngr=50,\n", " layers=[1],\n", " levels=np.arange(30, 45, 1),\n", " labels=True,\n", " legend=[\"layer 1\"],\n", " figsize=figsize,\n", ");" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1e\n", "Create a contour plot with a vertical cross-section below it. Start three pathlines from $(x,y)=(-2000,-1000)$ at levels $z=-120$, $z=-60$, and $z=-10$. Try a few other starting locations." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "win = [-3000, 3000, -3000, 3000]\n", "axes = ml.plots.topview_and_xsection(win=win, figsize=figsize)\n", "ml.plots.tracelines(\n", " -2000 * np.ones(3),\n", " -1000 * np.ones(3),\n", " [-120, -60, -10],\n", " hstepmax=50,\n", " win=win,\n", " orientation=\"both\",\n", " ax=axes,\n", ")\n", "ml.plots.tracelines(\n", " 0 * np.ones(3),\n", " 1000 * np.ones(3),\n", " [-120, -50, -10],\n", " hstepmax=50,\n", " win=win,\n", " orientation=\"both\",\n", " ax=axes,\n", ")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Exercise 1f\n", "Add an abandoned well that is screened in both aquifer 0 and aquifer 1, located at $(x, y) = (100, 100)$ and create contour plot of all aquifers near the well (from (-200,-200) till (200,200)). What are the discharge and the head at the abandoned well? Note that you have to solve the model again!" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "ml = tfs.ModelMaq(kaq=[10, 20, 5], z=[0, -20, -40, -80, -90, -140], c=[4000, 10000])\n", "w = tfs.Well(ml, xw=0, yw=0, Qw=10000, rw=0.2, layers=1)\n", "tfs.Constant(ml, xr=10000, yr=0, hr=20, layer=0)\n", "tfs.Uflow(ml, slope=0.002, angle=0)\n", "wabandoned = tfs.Well(ml, xw=100, yw=100, Qw=0, rw=0.2, layers=[0, 1])\n", "ml.solve()\n", "ml.plots.contour(\n", " win=[-200, 200, -200, 200],\n", " ngr=50,\n", " layers=[0, 2],\n", " levels=20,\n", " color=[\"C0\", \"C1\", \"C2\"],\n", " legend=True,\n", " figsize=figsize,\n", ");" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(\"The head at the abandoned well is:\")\n", "print(wabandoned.headinside())\n", "print(\"The discharge at the abandoned well is:\")\n", "print(wabandoned.discharge())" ] } ], "metadata": { "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 4 }