{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Test circular building pit\n", "\n", "Comparing timflow solutions with `LeakyWalls` and `LeakyBuildingPit` to the exact\n", "analytical solution for a circular building pit in a semi-confined aquifer." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# import packages\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import shapely\n", "from scipy.special import i0, i1, k0, k1\n", "\n", "import timflow.steady as tfs" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Select a radius for the circular building pit." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "R = 100.0 # radius of building pit" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Specify a resolution to control the number of leaky segments used in the timflow models to approximate the exact analytical solution." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# subdivide circle into segments, increase resolution to increase no. of elements\n", "resolution = 5 # resolution=5 results in 20 segments\n", "circle = shapely.Point(0, 0).buffer(R, resolution=resolution)\n", "print(\"Number of pts :\", len(circle.exterior.xy[0]))\n", "print(\"Number of segments :\", len(circle.exterior.xy[0]) - 1)" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Show the points used to approximate the circular building pit. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "shapely.MultiPoint(shapely.points(shapely.get_coordinates(circle)))" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "To create our model we create a list of x,y-coordinates, ordered counter-clockwise." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# flip so coordinates are ordered counter clockwise\n", "xy = list(\n", " zip(\n", " shapely.get_coordinates(circle)[:, 0],\n", " shapely.get_coordinates(circle)[:, 1],\n", " strict=False,\n", " )\n", ")[::-1]" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Define model parameters:\n", "- horizontal and vertical hydraulic conductivity in m/d\n", "- top resistance of semi-confined aquifer in days \n", "- top and bottom elevations of the aquifer\n", "- resistance of the leaky wall in days\n", "- order of the elements in timflow (which specifies the no. of control points used in the solution)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# model parameters\n", "\n", "kh = 10 # m/day\n", "kv = 0.25 * kh # m/day\n", "\n", "ctop = 1000.0 # resistance top leaky layer in days\n", "\n", "ztop = 0.0 # surface elevation\n", "zbot = -20.0 # bottom elevation of the model\n", "z = np.array([ztop + 1, ztop, zbot])\n", "\n", "res = 100.0 # resistance of leaky wall, in days\n", "\n", "rw = 0.3 # well radius, in m\n", "Qw = 100.0 # well discharge, in m3/d\n", "\n", "o = 7 # order" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Build a timflow model with a circular building pit using the `LeakyWallString` \n", "element. The building pit contains a well at location $(0, 0)$ with a discharge of 100\n", "$m^3/d$.\n", "\n", "
LeakyWallString can be used to model the building pit in this\n",
"example since the aquifer properties are the same inside and outside the building pit.\n",
"If aquifer properties change inside the building pit, only the `BuildingPit` elements\n",
"can be used.\n",
"\n",
"