{ "cells": [ { "cell_type": "markdown", "id": "913772fb-2212-4c05-bb60-d206f265a613", "metadata": {}, "source": [ "# 355.19: Drainage canal on top of confined aquifer\n", "\n", "Drainage canal on top of a confined aquifer of finite thickness near an open boundary.\n", "\n", "Constant drawdown of the water level in the canal." ] }, { "cell_type": "code", "execution_count": null, "id": "70c38979-755c-4ca1-be14-292fb3ccf24f", "metadata": {}, "outputs": [], "source": [ "import matplotlib.pyplot as plt\n", "import numpy as np\n", "\n", "from bruggeman.flow2d import bruggeman_355_19, bruggeman_355_19_total_discharge" ] }, { "cell_type": "markdown", "id": "ad040781", "metadata": {}, "source": [ "View the function." ] }, { "cell_type": "code", "execution_count": null, "id": "5acad3cc", "metadata": {}, "outputs": [], "source": [ "bruggeman_355_19" ] }, { "cell_type": "markdown", "id": "f6ad01bd", "metadata": {}, "source": [ "View the docstring to get a description of the input parameters" ] }, { "cell_type": "code", "execution_count": null, "id": "20b0e4ff", "metadata": {}, "outputs": [], "source": [ "help(bruggeman_355_19)" ] }, { "cell_type": "markdown", "id": "5d4bf186", "metadata": {}, "source": [ "Define some aquifer parameters." ] }, { "cell_type": "code", "execution_count": null, "id": "47d0cc67-2ff1-4a1b-98ed-86560c4e2772", "metadata": {}, "outputs": [], "source": [ "L = 20 # m\n", "B = 5 # m\n", "h = 1 # m\n", "k = 10 # m/d\n", "D = 20 # m" ] }, { "cell_type": "markdown", "id": "85cde3da", "metadata": {}, "source": [ "Compute the solution." ] }, { "cell_type": "code", "execution_count": null, "id": "59190574-a25a-41ff-8821-4e5f87c95bf7", "metadata": {}, "outputs": [], "source": [ "nx, nz = 100, 100\n", "x, z = np.meshgrid(np.linspace(0, 2 * L, nx), np.linspace(0, D, nz))\n", "om = np.zeros((nz, nx), dtype=\"complex\")\n", "for i in range(nx):\n", " for j in range(nz):\n", " om[i, j] = bruggeman_355_19(x[i, j], z[i, j], L, B, h, k, D)" ] }, { "cell_type": "markdown", "id": "e0a9b901", "metadata": {}, "source": [ "Plot the result." ] }, { "cell_type": "code", "execution_count": null, "id": "e113c379-0ac2-48ae-8d23-9e4ceba7f8a2", "metadata": {}, "outputs": [], "source": [ "plt.subplot(111, aspect=1)\n", "plt.contour(x, z, om.real, np.arange(0, 10, 0.5), colors=\"C0\")\n", "plt.contour(x, z, om.imag, np.arange(0, 10, 0.5), colors=\"C1\")\n", "plt.ylim(20, 0) # z-axis is positive down\n", "plt.axvspan(L - B, L + B, 0, 20, color=\"lightgrey\");" ] }, { "cell_type": "markdown", "id": "ce4b1cb0", "metadata": {}, "source": [ "Compute the total discharge:" ] }, { "cell_type": "code", "execution_count": null, "id": "b4b7afaf", "metadata": {}, "outputs": [], "source": [ "bruggeman_355_19_total_discharge" ] }, { "cell_type": "code", "execution_count": null, "id": "b81003f8", "metadata": {}, "outputs": [], "source": [ "q = bruggeman_355_19_total_discharge(L, B, h, k, D)\n", "print(f\"Total discharge: {float(q):.2f} m^2/d\")" ] } ], "metadata": { "kernelspec": { "display_name": "bruggeman (broken)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.13.11" } }, "nbformat": 4, "nbformat_minor": 5 }