Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pumping test notebooks #60

Merged
merged 25 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
9a70792
Adding files with completed notebooks for tracking (Testing, some fix…
vcantarella Aug 27, 2021
b3fdef6
Adding README, first version
vcantarella Aug 27, 2021
852cf48
Correcting English and adding extra images to the unconfined notes + …
vcantarella Oct 5, 2021
f310aa3
Corrected English in notebooks and minor change in aquifer.py to avoi…
vcantarella Oct 13, 2021
bdcc9f9
Reruning the outputs and correcting english
vcantarella Oct 15, 2021
c5697db
Accepted changes in the pumping test folder and removed previous modi…
vcantarella Dec 31, 2023
cc80585
adding pumpingtest folders
vcantarella Dec 31, 2023
3dfe059
merged change in pumping test notebook (dont know why it dind merge b…
vcantarella Dec 31, 2023
bac9f47
removing unwanted files
mbakker7 Dec 31, 2023
9b23caf
revert all files in docs directory
mbakker7 Dec 31, 2023
fbcf0e5
last files to remove
mbakker7 Dec 31, 2023
7d29d86
Update confined1_oude_korendijk.ipynb
mbakker7 Dec 31, 2023
32cad42
remove fitm
mbakker7 Jan 2, 2024
bda77ea
modified confined pumpingtest notebooks according to https://github.c…
vcantarella Jan 3, 2024
11b83dd
Merge pull request #58 from vcantarella/master
dbrakenhoff Feb 13, 2024
41a1f80
move updated pumping test noteboks
dbrakenhoff Feb 13, 2024
106b48e
update tutorials
dbrakenhoff Feb 13, 2024
6b1ab4f
move elements to concepts (from howto section)
dbrakenhoff Feb 13, 2024
a378c62
move elements to concepts (from howto section)
dbrakenhoff Feb 13, 2024
3d562e9
delete old pumping test notebooks
dbrakenhoff Feb 13, 2024
ed96324
remove url visited date from bib file
dbrakenhoff Feb 13, 2024
e692b7e
ruff formatting
dbrakenhoff Feb 13, 2024
6554954
organize examples in docs
dbrakenhoff Feb 13, 2024
00ef06b
ruff format notebooks
dbrakenhoff Feb 13, 2024
6719c6c
display inline math in notebooks in docs
dbrakenhoff Feb 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/00tutorials/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ TTim tutorials.

.. toctree::
:maxdepth: 3
:hidden:
:glob:

models.rst
File renamed without changes.
8 changes: 0 additions & 8 deletions docs/01howto/getting_started/index.rst

This file was deleted.

230 changes: 113 additions & 117 deletions docs/01howto/howto_pumpingtest.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import ttim as ttm\n",
"\n",
"#\n",
"plt.rcParams['figure.figsize'] = (4, 3) # set default figure size\n",
"plt.rcParams['font.size'] = 8 # set default font size"
"plt.rcParams[\"figure.figsize\"] = (4, 3) # set default figure size\n",
"plt.rcParams[\"font.size\"] = 8 # set default font size"
]
},
{
Expand Down Expand Up @@ -65,22 +66,26 @@
}
],
"source": [
"data = np.loadtxt('data/oudekorendijk_h30.dat')\n",
"data = np.loadtxt(\"data/oudekorendijk_h30.dat\")\n",
"to1 = data[:, 0] / 60 / 24\n",
"ho1 = -data[:, 1]\n",
"ro1 = 30\n",
"print(f'first measurement time: {np.min(to1):.2e}, last measurement time: {np.max(to1):.2e} d')\n",
"print(\n",
" f\"first measurement time: {np.min(to1):.2e}, last measurement time: {np.max(to1):.2e} d\"\n",
")\n",
"\n",
"drawdown = np.loadtxt('data/oudekorendijk_h90.dat')\n",
"drawdown = np.loadtxt(\"data/oudekorendijk_h90.dat\")\n",
"to2 = drawdown[:, 0] / 60 / 24\n",
"ho2 = -drawdown[:, 1]\n",
"ro2 = 90\n",
"print(f'first measurement time: {np.min(to2):.2e}, last measurement time: {np.max(to2):.2e} d')\n",
"print(\n",
" f\"first measurement time: {np.min(to2):.2e}, last measurement time: {np.max(to2):.2e} d\"\n",
")\n",
"\n",
"plt.plot(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.plot(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.plot(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand Down Expand Up @@ -121,17 +126,8 @@
}
],
"source": [
"ml = ttm.ModelMaq(kaq=60, \n",
" z=(-18, -25), \n",
" Saq=1e-4, \n",
" tmin=1e-5, \n",
" tmax=1)\n",
"w = ttm.Well(model=ml, \n",
" xw=0, \n",
" yw=0, \n",
" rw=0.1, \n",
" tsandQ=[(0, 788)], \n",
" layers=0)\n",
"ml = ttm.ModelMaq(kaq=60, z=(-18, -25), Saq=1e-4, tmin=1e-5, tmax=1)\n",
"w = ttm.Well(model=ml, xw=0, yw=0, rw=0.1, tsandQ=[(0, 788)], layers=0)\n",
"ml.solve()"
]
},
Expand All @@ -154,12 +150,12 @@
"source": [
"hm1 = ml.head(ro1, 0, to1)\n",
"hm2 = ml.head(ro2, 0, to2)\n",
"plt.plot(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.plot(to1, hm1[0], 'C0')\n",
"plt.plot(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.plot(to2, hm2[0], 'C1')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.plot(to1, hm1[0], \"C0\")\n",
"plt.plot(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.plot(to2, hm2[0], \"C1\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand Down Expand Up @@ -191,16 +187,17 @@
}
],
"source": [
"cal = ttm.Calibrate(model=ml) # create Calibration object\n",
"cal.set_parameter(name='kaq0', initial=20) # \n",
"cal.set_parameter(name='Saq0', initial=1e-4)\n",
"cal.series(name='obs1', # user specified name\n",
" x=ro1, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to1, # observation times\n",
" h=ho1 # observed heads\n",
" )\n",
"cal = ttm.Calibrate(model=ml) # create Calibration object\n",
"cal.set_parameter(name=\"kaq0\", initial=20) #\n",
"cal.set_parameter(name=\"Saq0\", initial=1e-4)\n",
"cal.series(\n",
" name=\"obs1\", # user specified name\n",
" x=ro1, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to1, # observation times\n",
" h=ho1, # observed heads\n",
")\n",
"cal.fit(report=False)"
]
},
Expand Down Expand Up @@ -311,8 +308,8 @@
}
],
"source": [
"print('k of model: ', ml.aq.kaq)\n",
"print('Ss of model: ', ml.aq.Saq)"
"print(\"k of model: \", ml.aq.kaq)\n",
"print(\"Ss of model: \", ml.aq.Saq)"
]
},
{
Expand Down Expand Up @@ -340,10 +337,10 @@
],
"source": [
"hm1 = ml.head(ro1, 0, to1)\n",
"plt.plot(to1, ho1, 'k.', label='r=30 m')\n",
"plt.plot(to1, hm1[0], 'C0', label='fit')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"k.\", label=\"r=30 m\")\n",
"plt.plot(to1, hm1[0], \"C0\", label=\"fit\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand Down Expand Up @@ -452,33 +449,31 @@
}
],
"source": [
"ml2 = ttm.ModelMaq(kaq=60, \n",
" z=(-17, -18, -25), \n",
" Saq=1e-4, \n",
" c=[1000],\n",
" Sll=0,\n",
" topboundary='semi',\n",
" tmin=1e-5, \n",
" tmax=1)\n",
"w = ttm.Well(model=ml2, \n",
" xw=0, \n",
" yw=0, \n",
" rw=0.1, \n",
" tsandQ=[(0, 788)], \n",
" layers=0)\n",
"ml2 = ttm.ModelMaq(\n",
" kaq=60,\n",
" z=(-17, -18, -25),\n",
" Saq=1e-4,\n",
" c=[1000],\n",
" Sll=0,\n",
" topboundary=\"semi\",\n",
" tmin=1e-5,\n",
" tmax=1,\n",
")\n",
"w = ttm.Well(model=ml2, xw=0, yw=0, rw=0.1, tsandQ=[(0, 788)], layers=0)\n",
"ml2.solve()\n",
"#\n",
"cal2 = ttm.Calibrate(model=ml2) # create Calibration object\n",
"cal2.set_parameter(name='kaq0', initial=20) # \n",
"cal2.set_parameter(name='Saq0', initial=1e-4)\n",
"cal2.set_parameter(name='c0', initial=1000)\n",
"cal2.series(name='obs1', # user specified name\n",
" x=ro1, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to1, # observation times\n",
" h=ho1 # observed heads\n",
" )\n",
"cal2 = ttm.Calibrate(model=ml2) # create Calibration object\n",
"cal2.set_parameter(name=\"kaq0\", initial=20) #\n",
"cal2.set_parameter(name=\"Saq0\", initial=1e-4)\n",
"cal2.set_parameter(name=\"c0\", initial=1000)\n",
"cal2.series(\n",
" name=\"obs1\", # user specified name\n",
" x=ro1, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to1, # observation times\n",
" h=ho1, # observed heads\n",
")\n",
"cal2.fit(report=False)\n",
"display(cal2.parameters)"
]
Expand Down Expand Up @@ -509,11 +504,11 @@
"source": [
"hm1 = ml.head(ro1, 0, to1)\n",
"hm2 = ml2.head(ro1, 0, to1)\n",
"plt.plot(to1, ho1, 'k.', label='r=30 m')\n",
"plt.plot(to1, hm1[0], label='fit 2 params')\n",
"plt.plot(to1, hm2[0], label='fit 3 params')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"k.\", label=\"r=30 m\")\n",
"plt.plot(to1, hm1[0], label=\"fit 2 params\")\n",
"plt.plot(to1, hm2[0], label=\"fit 3 params\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand All @@ -540,8 +535,8 @@
}
],
"source": [
"print(f'rmse 2 params: {cal.rmse():.3f} m')\n",
"print(f'rmse 3 params: {cal2.rmse():.3f} m')"
"print(f\"rmse 2 params: {cal.rmse():.3f} m\")\n",
"print(f\"rmse 3 params: {cal2.rmse():.3f} m\")"
]
},
{
Expand Down Expand Up @@ -651,16 +646,16 @@
}
],
"source": [
"cal.series(name='obs2', # user specified name\n",
" x=ro2, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to2, # observation times\n",
" h=ho2 # observed heads\n",
" )\n",
"cal.series(\n",
" name=\"obs2\", # user specified name\n",
" x=ro2, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to2, # observation times\n",
" h=ho2, # observed heads\n",
")\n",
"cal.fit(report=False)\n",
"display(cal.parameters)\n",
"print"
"display(cal.parameters)"
]
},
{
Expand Down Expand Up @@ -758,13 +753,14 @@
}
],
"source": [
"cal2.series(name='obs2', # user specified name\n",
" x=ro2, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to2, # observation times\n",
" h=ho2 # observed heads\n",
" )\n",
"cal2.series(\n",
" name=\"obs2\", # user specified name\n",
" x=ro2, # x=location of observation well\n",
" y=0, # y-location of obsevation well\n",
" layer=0, # layer number\n",
" t=to2, # observation times\n",
" h=ho2, # observed heads\n",
")\n",
"cal2.fit(report=False)\n",
"display(cal2.parameters)"
]
Expand All @@ -784,8 +780,8 @@
}
],
"source": [
"print(f'rmse 2 params: {cal.rmse():.3f} m')\n",
"print(f'rmse 3 params: {cal2.rmse():.3f} m')"
"print(f\"rmse 2 params: {cal.rmse():.3f} m\")\n",
"print(f\"rmse 3 params: {cal2.rmse():.3f} m\")"
]
},
{
Expand All @@ -809,24 +805,24 @@
"plt.subplot(121)\n",
"hm1 = ml.head(ro1, 0, to1)\n",
"hm2 = ml.head(ro2, 0, to2)\n",
"plt.plot(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.plot(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.plot(to1, hm1[0], 'C0', label='fit 2 params')\n",
"plt.plot(to2, hm2[0], 'C1', label='fit 2 params')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.plot(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.plot(to1, hm1[0], \"C0\", label=\"fit 2 params\")\n",
"plt.plot(to2, hm2[0], \"C1\", label=\"fit 2 params\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()\n",
"#\n",
"plt.subplot(122)\n",
"hm1 = ml2.head(ro1, 0, to1)\n",
"hm2 = ml2.head(ro2, 0, to2)\n",
"plt.plot(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.plot(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.plot(to1, hm1[0], 'C0', label='fit 3 params')\n",
"plt.plot(to2, hm2[0], 'C1', label='fit 3 params')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.plot(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.plot(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.plot(to1, hm1[0], \"C0\", label=\"fit 3 params\")\n",
"plt.plot(to2, hm2[0], \"C1\", label=\"fit 3 params\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand Down Expand Up @@ -859,24 +855,24 @@
"plt.subplot(121)\n",
"hm1 = ml.head(ro1, 0, to1)\n",
"hm2 = ml.head(ro2, 0, to2)\n",
"plt.semilogx(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.semilogx(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.semilogx(to1, hm1[0], 'C0', label='fit 2 params')\n",
"plt.semilogx(to2, hm2[0], 'C1', label='fit 2 params')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.semilogx(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.semilogx(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.semilogx(to1, hm1[0], \"C0\", label=\"fit 2 params\")\n",
"plt.semilogx(to2, hm2[0], \"C1\", label=\"fit 2 params\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()\n",
"#\n",
"plt.subplot(122)\n",
"hm1 = ml2.head(ro1, 0, to1)\n",
"hm2 = ml2.head(ro2, 0, to2)\n",
"plt.semilogx(to1, ho1, 'C0.', label='r=30 m')\n",
"plt.semilogx(to2, ho2, 'C1.', label='r=90 m')\n",
"plt.semilogx(to1, hm1[0], 'C0', label='fit 3 params')\n",
"plt.semilogx(to2, hm2[0], 'C1', label='fit 3 params')\n",
"plt.xlabel('time (d)')\n",
"plt.ylabel('head (m)')\n",
"plt.semilogx(to1, ho1, \"C0.\", label=\"r=30 m\")\n",
"plt.semilogx(to2, ho2, \"C1.\", label=\"r=90 m\")\n",
"plt.semilogx(to1, hm1[0], \"C0\", label=\"fit 3 params\")\n",
"plt.semilogx(to2, hm2[0], \"C1\", label=\"fit 3 params\")\n",
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"head (m)\")\n",
"plt.legend()\n",
"plt.grid()"
]
Expand Down
2 changes: 0 additions & 2 deletions docs/01howto/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ This section contains how to guides on building groundwater models with TTim.
.. toctree::
:maxdepth: 1

getting_started/index.rst
elements/index.rst
howto_pumpingtest
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion docs/02concepts/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ This section contains explanations of some basic concepts that are used in TTim.
.. toctree::
:maxdepth: 3


elements/index.rst
pathlines.rst
Loading
Loading