Skip to content

Commit

Permalink
address comments @mbakker7
Browse files Browse the repository at this point in the history
- label section comparing areasink to inhom areasink solutions.
- add deprecation warning that XsectionAreaSink is for testing purposes only.
  • Loading branch information
dbrakenhoff committed Dec 20, 2024
1 parent 328bb23 commit 8738791
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 17 deletions.
34 changes: 21 additions & 13 deletions docs/04xsections/timml_xsection.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x750d76837b10>"
"<matplotlib.legend.Legend at 0x7a127c78b490>"
]
},
"execution_count": 2,
Expand Down Expand Up @@ -216,7 +216,7 @@
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x750d75b61a10>]"
"[<matplotlib.lines.Line2D at 0x7a127c371c50>]"
]
},
"execution_count": 6,
Expand Down Expand Up @@ -323,6 +323,7 @@
"metadata": {},
"source": [
"## Impermeable wall\n",
"\n",
"Flow from left to right in three-layer aquifer with impermeable wall in bottom 2 layers"
]
},
Expand All @@ -343,7 +344,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x750d751bbf90>"
"<matplotlib.legend.Legend at 0x7a127c3c6790>"
]
},
"execution_count": 8,
Expand Down Expand Up @@ -419,6 +420,15 @@
"ml.vcontoursf1D(x1=-200, x2=200, nx=100, levels=20)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Infiltration\n",
"\n",
"Comparing solution with `Xsection` inhomogeneities to `XsectionAreaSink` solution."
]
},
{
"cell_type": "code",
"execution_count": 10,
Expand All @@ -437,14 +447,12 @@
]
},
{
"data": {
"text/plain": [
"[<matplotlib.lines.Line2D at 0x750d746cd310>]"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
"name": "stderr",
"output_type": "stream",
"text": [
"/tmp/ipykernel_795394/4034037745.py:39: DeprecationWarning: XsectionAreaSink is only for testing purposes. It is recommended to add infiltration through XsectionMaq or Xsection3D and specifing 'N'.\n",
" tml.XsectionAreaSink(ml2, -50, 50, 0.001)\n"
]
},
{
"data": {
Expand Down Expand Up @@ -526,7 +534,7 @@
"plt.plot(x, ml.headalongline(x, 0)[0], \"C0\")\n",
"plt.plot(x, ml.headalongline(x, 0)[1], \"C0\")\n",
"plt.plot(x, ml2.headalongline(x, 0)[0], \"--C1\")\n",
"plt.plot(x, ml2.headalongline(x, 0)[1], \"--C1\")"
"plt.plot(x, ml2.headalongline(x, 0)[1], \"--C1\");"
]
},
{
Expand Down Expand Up @@ -724,7 +732,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x750d74415d10>"
"<matplotlib.legend.Legend at 0x7a127c204850>"
]
},
"execution_count": 15,
Expand Down
15 changes: 11 additions & 4 deletions timml/stripareasink.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import numpy as np

from timml.element import Element
import warnings


class XsectionAreaSinkInhom(Element):
Expand Down Expand Up @@ -31,8 +32,8 @@ def __init__(
name="XsectionAreaSink",
label=None,
):
Element.__init__(
self, model, nparam=1, nunknowns=0, layers=layer, name=name, label=label
super().__init__(
model, nparam=1, nunknowns=0, layers=layer, name=name, label=label
)
self.xleft = xleft
self.xright = xright
Expand Down Expand Up @@ -131,8 +132,14 @@ def __init__(
name="XsectionAreaSink",
label=None,
):
Element.__init__(
self, model, nparam=1, nunknowns=0, layers=layer, name=name, label=label
warnings.warn(
"XsectionAreaSink is only for testing purposes. It is recommended to add "
"infiltration through XsectionMaq or Xsection3D and specifing 'N'.",
DeprecationWarning,
stacklevel=2,
)
super().__init__(
model, nparam=1, nunknowns=0, layers=layer, name=name, label=label
)
self.xleft = xleft
self.xright = xright
Expand Down

0 comments on commit 8738791

Please sign in to comment.