From 2a3eb656533556d680d5b6d835c1851d0cf519c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20M=C3=BCller?= Date: Fri, 18 Jun 2021 12:25:27 +0200 Subject: [PATCH] doc: move to sphinx gallery (#8) * doc: move to sphinx gallery * doc: auto generate toc-tree for flow submodule * doc: gitignore generated examples * doc: remove generated examples --- .gitignore | 2 + anaflow/__init__.py | 6 +- anaflow/flow/__init__.py | 17 +- docs/source/conf.py | 28 +++ docs/source/contents.rst | 2 +- docs/source/flow.ext_grf_model.rst | 11 - docs/source/flow.heterogeneous.rst | 11 - docs/source/flow.homogeneous.rst | 11 - docs/source/flow.rst | 3 - docs/source/tutorial_01_call.rst | 32 --- docs/source/tutorial_02_extended_theis.rst | 59 ------ docs/source/tutorial_03_extended_theis3d.rst | 65 ------ docs/source/tutorial_04_ext_theis_tpl.rst | 71 ------- docs/source/tutorial_05_neuman2004.rst | 70 ------- docs/source/tutorial_06_comparison.rst | 200 ------------------ docs/source/tutorial_07_convergence.rst | 139 ------------ docs/source/tutorial_08_advanced.rst | 209 ------------------- docs/source/tutorials.rst | 18 -- examples/01_call_theis.py | 10 +- examples/02_call_ext_theis2d.py | 56 +++-- examples/03_call_ext_theis3d.py | 75 +++++-- examples/04_call_ext_theis_tpl.py | 62 ++++-- examples/05_call_neuman2004.py | 58 +++-- examples/06_compare_extthiem2d_grfsteady.py | 30 ++- examples/07_compare_extthiem3d_grfsteady.py | 36 +++- examples/08_compare_extthiem2d_neuman.py | 28 ++- examples/09_compare_exttheis2d_neuman.py | 41 +++- examples/10_convergence_ext_theis_tpl.py | 39 ++-- examples/11_convergence_ext_grf.py | 28 ++- examples/12_compare_theis_quasi_steady.py | 28 ++- examples/13_self_defined_transmissivity.py | 47 ++++- examples/14_interval_theis.py | 14 +- examples/15_accruing_theis.py | 13 +- examples/README.rst | 9 + pyproject.toml | 4 +- 35 files changed, 487 insertions(+), 1045 deletions(-) delete mode 100644 docs/source/flow.ext_grf_model.rst delete mode 100644 docs/source/flow.heterogeneous.rst delete mode 100644 docs/source/flow.homogeneous.rst delete mode 100644 docs/source/tutorial_01_call.rst delete mode 100755 docs/source/tutorial_02_extended_theis.rst delete mode 100755 docs/source/tutorial_03_extended_theis3d.rst delete mode 100755 docs/source/tutorial_04_ext_theis_tpl.rst delete mode 100755 docs/source/tutorial_05_neuman2004.rst delete mode 100755 docs/source/tutorial_06_comparison.rst delete mode 100755 docs/source/tutorial_07_convergence.rst delete mode 100755 docs/source/tutorial_08_advanced.rst delete mode 100644 docs/source/tutorials.rst create mode 100644 examples/README.rst diff --git a/.gitignore b/.gitignore index b943921..3991d94 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,8 @@ .spyproject/ __pycache__/ docs/build/ +docs/source/generated/ +docs/source/examples/ info/ #_build #_static diff --git a/anaflow/__init__.py b/anaflow/__init__.py index 67ad3c5..cc2b8f9 100644 --- a/anaflow/__init__.py +++ b/anaflow/__init__.py @@ -19,7 +19,7 @@ Homogeneous ^^^^^^^^^^^ -.. currentmodule:: anaflow.flow.homogeneous +.. currentmodule:: anaflow.flow Solutions for homogeneous aquifers @@ -31,8 +31,6 @@ Heterogeneous ^^^^^^^^^^^^^ -.. currentmodule:: anaflow.flow.heterogeneous - Solutions for heterogeneous aquifers .. autosummary:: @@ -50,8 +48,6 @@ Extended GRF ^^^^^^^^^^^^ -.. currentmodule:: anaflow.flow.ext_grf_model - The extended general radial flow model. .. autosummary:: diff --git a/anaflow/flow/__init__.py b/anaflow/flow/__init__.py index 7364780..fff0b58 100644 --- a/anaflow/flow/__init__.py +++ b/anaflow/flow/__init__.py @@ -8,9 +8,6 @@ .. currentmodule:: anaflow.flow .. autosummary:: - homogeneous - heterogeneous - ext_grf_model laplace Solutions @@ -19,11 +16,11 @@ Homogeneous ~~~~~~~~~~~ -.. currentmodule:: anaflow.flow.homogeneous - Solutions for homogeneous aquifers .. autosummary:: + :toctree: generated + thiem theis grf @@ -31,11 +28,11 @@ Heterogeneous ~~~~~~~~~~~~~ -.. currentmodule:: anaflow.flow.heterogeneous - Solutions for heterogeneous aquifers .. autosummary:: + :toctree: generated + ext_thiem_2d ext_thiem_3d ext_thiem_tpl @@ -43,18 +40,18 @@ ext_theis_2d ext_theis_3d ext_theis_tpl - ext_thiem_tpl_3d + ext_theis_tpl_3d neuman2004 neuman2004_steady Extended GRF ~~~~~~~~~~~~ -.. currentmodule:: anaflow.flow.ext_grf_model - The extended general radial flow model. .. autosummary:: + :toctree: generated + ext_grf ext_grf_steady """ diff --git a/docs/source/conf.py b/docs/source/conf.py index d1e1679..546ce39 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -54,6 +54,7 @@ def setup(app): "sphinx.ext.autosummary", "sphinx.ext.napoleon", # parameters look better than with numpydoc only "numpydoc", + "sphinx_gallery.gen_gallery", ] # autosummaries from source-files @@ -242,3 +243,30 @@ def setup(app): "NumPy": ("http://docs.scipy.org/doc/numpy/", None), "SciPy": ("http://docs.scipy.org/doc/scipy/reference", None), } + +# -- Sphinx Gallery Options +from sphinx_gallery.sorting import FileNameSortKey + +sphinx_gallery_conf = { + # only show "print" output as output + "capture_repr": (), + # path to your examples scripts + "examples_dirs": ["../../examples"], + # path where to save gallery generated examples + "gallery_dirs": ["examples"], + # Pattern to search for example files + "filename_pattern": "/.*.py", + # "ignore_pattern": "", + # Remove the "Download all examples" button from the top level gallery + "download_all_examples": False, + # Sort gallery example by file name instead of number of lines (default) + "within_subsection_order": FileNameSortKey, + # directory where function granular galleries are stored + "backreferences_dir": None, + # Modules for which function level galleries are created. In + "doc_module": "AnaFlow", + # "image_scrapers": ('pyvista', 'matplotlib'), + # "first_notebook_cell": ("%matplotlib inline\n" + # "from pyvista import set_plot_theme\n" + # "set_plot_theme('document')"), +} diff --git a/docs/source/contents.rst b/docs/source/contents.rst index a168096..9160e69 100644 --- a/docs/source/contents.rst +++ b/docs/source/contents.rst @@ -7,5 +7,5 @@ Contents :maxdepth: 3 index - tutorials + examples/index package diff --git a/docs/source/flow.ext_grf_model.rst b/docs/source/flow.ext_grf_model.rst deleted file mode 100644 index f2337fd..0000000 --- a/docs/source/flow.ext_grf_model.rst +++ /dev/null @@ -1,11 +0,0 @@ -anaflow.flow.ext_grf_model -========================== - -.. automodule:: anaflow.flow.ext_grf_model - :members: - :undoc-members: - :show-inheritance: - -.. raw:: latex - - \clearpage \ No newline at end of file diff --git a/docs/source/flow.heterogeneous.rst b/docs/source/flow.heterogeneous.rst deleted file mode 100644 index b20e3dd..0000000 --- a/docs/source/flow.heterogeneous.rst +++ /dev/null @@ -1,11 +0,0 @@ -anaflow.flow.heterogeneous -========================== - -.. automodule:: anaflow.flow.heterogeneous - :members: - :undoc-members: - :show-inheritance: - -.. raw:: latex - - \clearpage \ No newline at end of file diff --git a/docs/source/flow.homogeneous.rst b/docs/source/flow.homogeneous.rst deleted file mode 100644 index e7d47e0..0000000 --- a/docs/source/flow.homogeneous.rst +++ /dev/null @@ -1,11 +0,0 @@ -anaflow.flow.homogeneous -======================== - -.. automodule:: anaflow.flow.homogeneous - :members: - :undoc-members: - :show-inheritance: - -.. raw:: latex - - \clearpage \ No newline at end of file diff --git a/docs/source/flow.rst b/docs/source/flow.rst index 8677c9d..f59acd6 100644 --- a/docs/source/flow.rst +++ b/docs/source/flow.rst @@ -10,7 +10,4 @@ anaflow.flow .. toctree:: :hidden: - flow.homogeneous.rst - flow.heterogeneous.rst - flow.ext_grf_model.rst flow.laplace.rst diff --git a/docs/source/tutorial_01_call.rst b/docs/source/tutorial_01_call.rst deleted file mode 100644 index 3046cde..0000000 --- a/docs/source/tutorial_01_call.rst +++ /dev/null @@ -1,32 +0,0 @@ -Tutorial 1: The Theis solution -============================== - -In the following the well known Theis function is called an plotted for three -different time-steps. - -Reference: `Theis 1935 `__ - - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis - - - time = [10, 100, 1000] - rad = np.geomspace(0.1, 10) - - head = theis(time=time, rad=rad, storage=1e-4, transmissivity=1e-4, rate=-1e-4) - - for i, step in enumerate(time): - plt.plot(rad, head[i], label="Theis(t={})".format(step)) - - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/01_call_theis.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_02_extended_theis.rst b/docs/source/tutorial_02_extended_theis.rst deleted file mode 100755 index 4b0cc46..0000000 --- a/docs/source/tutorial_02_extended_theis.rst +++ /dev/null @@ -1,59 +0,0 @@ -Tutorial 2: The extended Theis solution in 2D -============================================= - -We provide an extended theis solution, that incorporates the effectes of a -heterogeneous transmissivity field on a pumping test. - -In the following this extended solution is compared to the standard theis -solution for well flow. You can nicely see, that the extended solution represents -a transition between the theis solutions for the geometric- and harmonic-mean -transmissivity. - -Reference: `Zech et. al. 2016 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis, ext_theis_2d - - - time_labels = ["10 s", "10 min", "10 h"] - time = [10, 600, 36000] # 10s, 10min, 10h - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - var = 0.5 # variance of the log-transmissivity - len_scale = 10.0 # correlation length of the log-transmissivity - TG = 1e-4 # the geometric mean of the transmissivity - TH = TG * np.exp(-var / 2.0) # the harmonic mean of the transmissivity - S = 1e-4 # storativity - rate = -1e-4 # pumping rate - - head_TG = theis(time, rad, S, TG, rate) - head_TH = theis(time, rad, S, TH, rate) - head_ef = ext_theis_2d(time, rad, S, TG, var, len_scale, rate) - time_ticks=[] - for i, step in enumerate(time): - label_TG = "Theis($T_G$)" if i == 0 else None - label_TH = "Theis($T_H$)" if i == 0 else None - label_ef = "extended Theis" if i == 0 else None - plt.plot(rad, head_TG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_TH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) - time_ticks.append(head_ef[i][-1]) - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - ylim = plt.gca().get_ylim() - plt.gca().set_xlim([0, rad[-1]]) - ax2 = plt.gca().twinx() - ax2.set_yticks(time_ticks) - ax2.set_yticklabels(time_labels) - ax2.set_ylim(ylim) - plt.tight_layout() - plt.show() - - -.. image:: pics/02_call_ext_theis.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_03_extended_theis3d.rst b/docs/source/tutorial_03_extended_theis3d.rst deleted file mode 100755 index 4abfd9a..0000000 --- a/docs/source/tutorial_03_extended_theis3d.rst +++ /dev/null @@ -1,65 +0,0 @@ -Tutorial 3: The extended Theis solution in 3D -============================================= - -We provide an extended theis solution, that incorporates the effectes of a -heterogeneous conductivity field on a pumping test. -It also includes an anisotropy ratio of the horizontal and vertical length -scales. - -In the following this extended solution is compared to the standard theis -solution for well flow. You can nicely see, that the extended solution represents -a transition between the theis solutions for the effective and harmonic-mean -conductivity. - -Reference: `Müller 2015 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis, ext_theis_3d - from anaflow.tools.special import aniso - - - time_labels = ["10 s", "10 min", "10 h"] - time = [10, 600, 36000] # 10s, 10min, 10h - rad = np.geomspace(0.05, 4) # radial distance from the pumping well in [0, 4] - var = 0.5 # variance of the log-conductivity - len_scale = 10.0 # correlation length of the log-conductivity - anis = 0.75 # anisotropy ratio of the log-conductivity - KG = 1e-4 # the geometric mean of the conductivity - Kefu = KG*np.exp(var*(0.5-aniso(anis))) # the effective conductivity for uniform flow - KH = KG*np.exp(-var/2.0) # the harmonic mean of the conductivity - S = 1e-4 # storage - rate = -1e-4 # pumping rate - L = 1.0 # vertical extend of the aquifer - - head_Kefu = theis(time, rad, S, Kefu*L, rate) - head_KH = theis(time, rad, S, KH*L, rate) - head_ef = ext_theis_3d(time, rad, S, KG, var, len_scale, anis, L, rate) - time_ticks=[] - for i, step in enumerate(time): - label_TG = "Theis($K_{efu}$)" if i == 0 else None - label_TH = "Theis($K_H$)" if i == 0 else None - label_ef = "extended Theis 3D" if i == 0 else None - plt.plot(rad, head_Kefu[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_KH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) - time_ticks.append(head_ef[i][-1]) - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - ylim = plt.gca().get_ylim() - plt.gca().set_xlim([0, rad[-1]]) - ax2 = plt.gca().twinx() - ax2.set_yticks(time_ticks) - ax2.set_yticklabels(time_labels) - ax2.set_ylim(ylim) - plt.tight_layout() - plt.show() - - -.. image:: pics/03_call_ext_theis3d.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_04_ext_theis_tpl.rst b/docs/source/tutorial_04_ext_theis_tpl.rst deleted file mode 100755 index 0e27423..0000000 --- a/docs/source/tutorial_04_ext_theis_tpl.rst +++ /dev/null @@ -1,71 +0,0 @@ -Tutorial 4: The extended Theis solution for truncated power laws -================================================================ - -We provide an extended theis solution, that incorporates the effectes of a -heterogeneous conductivity field following a truncated power law. -In addition, it incorporates the assumptions of the general radial flow model -and provides an arbitrary flow dimension. - -In the following this extended solution is compared to the standard theis -solution for well flow. You can nicely see, that the extended solution represents -a transition between the theis solutions for the well- and farfield-conductivity. - -Reference: (not yet published) - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis, ext_theis_tpl - - - time_ticks = [] - time_labels = ["10 s", "10 min", "10 h"] - time = [10, 600, 36000] # 10s, 10min, 10h - rad = np.geomspace(0.05, 4) # radial distance from the pumping well in [0, 4] - S = 1e-4 # storage - KG = 1e-4 # the geometric mean of the conductivity - len_scale = 20.0 # upper bound for the length scale - hurst = 0.5 # hurst coefficient - var = 0.5 # variance of the log-conductivity - rate = -1e-4 # pumping rate - KH = KG * np.exp(-var / 2) # the harmonic mean of the conductivity - - head_KG = theis(time, rad, S, KG, rate) - head_KH = theis(time, rad, S, KH, rate) - head_ef = ext_theis_tpl( - time=time, - rad=rad, - storage=S, - cond_gmean=KG, - len_scale=len_scale, - hurst=hurst, - var=var, - rate=rate, - ) - for i, step in enumerate(time): - label_TG = "Theis($K_G$)" if i == 0 else None - label_TH = "Theis($K_H$)" if i == 0 else None - label_ef = "extended Theis TPL 2D" if i == 0 else None - plt.plot(rad, head_KG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_KH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) - time_ticks.append(head_ef[i][-1]) - - plt.xscale("log") - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - ylim = plt.gca().get_ylim() - plt.gca().set_xlim([rad[0], rad[-1]]) - ax2 = plt.gca().twinx() - ax2.set_yticks(time_ticks) - ax2.set_yticklabels(time_labels) - ax2.set_ylim(ylim) - plt.tight_layout() - plt.show() - - -.. image:: pics/04_call_ext_theis_tpl.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_05_neuman2004.rst b/docs/source/tutorial_05_neuman2004.rst deleted file mode 100755 index 678fb93..0000000 --- a/docs/source/tutorial_05_neuman2004.rst +++ /dev/null @@ -1,70 +0,0 @@ -Tutorial 5: The transient heterogeneous Neuman solution from 2004 -================================================================= - -We provide the transient pumping solution for the apparent transmissivity from -Neuman 2004. -This solution is build on the apparent transmissivity from Neuman 2004, -which represents a mean drawdown in an ensemble of pumping tests in -heterogeneous transmissivity fields following an exponential covariance. - -In the following this solution is compared to the standard theis -solution for well flow. You can nicely see, that the extended solution represents -a transition between the theis solutions for the well- and farfield-conductivity. - -Reference: `Neuman 2004 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis, neuman2004 - - - time_labels = ["10 s", "10 min", "10 h"] - time = [10, 600, 36000] # 10s, 10min, 10h - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - var = 0.5 # variance of the log-transmissivity - len_scale = 10.0 # correlation length of the log-transmissivity - TG = 1e-4 # the geometric mean of the transmissivity - TH = TG*np.exp(-var/2.0) # the harmonic mean of the transmissivity - S = 1e-4 # storativity - rate = -1e-4 # pumping rate - - head_TG = theis(time, rad, S, TG, rate) - head_TH = theis(time, rad, S, TH, rate) - head_ef = neuman2004( - time=time, - rad=rad, - trans_gmean=TG, - var=var, - len_scale=len_scale, - storage=S, - rate=rate, - ) - time_ticks = [] - for i, step in enumerate(time): - label_TG = "Theis($T_G$)" if i == 0 else None - label_TH = "Theis($T_H$)" if i == 0 else None - label_ef = "transient Neuman [2004]" if i == 0 else None - plt.plot(rad, head_TG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_TH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) - time_ticks.append(head_ef[i][-1]) - - plt.xscale("log") - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - ylim = plt.gca().get_ylim() - plt.gca().set_xlim([rad[0], rad[-1]]) - ax2 = plt.gca().twinx() - ax2.set_yticks(time_ticks) - ax2.set_yticklabels(time_labels) - ax2.set_ylim(ylim) - plt.tight_layout() - plt.show() - - -.. image:: pics/05_call_neuman2004.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_06_comparison.rst b/docs/source/tutorial_06_comparison.rst deleted file mode 100755 index 7af4207..0000000 --- a/docs/source/tutorial_06_comparison.rst +++ /dev/null @@ -1,200 +0,0 @@ -Tutorial 6: Comparison of different solutions -============================================= - -In the following we compare a set of different solutions of the groundwater -flow equation. - -1. extended Thiem 2D vs. steady solution for coarse graining transmissivity ---------------------------------------------------------------------------- - -The extended Thiem 2D solutions is the analytical solution of the groundwater -flow equation for the coarse graining transmissivity for pumping tests. -Therefore the results should coincide. - -References: - -- `Schneider & Attinger 2008 `__ -- `Zech & Attinger 2016 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_thiem_2d, ext_grf_steady - from anaflow.tools.coarse_graining import T_CG - - - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - r_ref = 2.0 # reference radius - var = 0.5 # variance of the log-transmissivity - len_scale = 10.0 # correlation length of the log-transmissivity - TG = 1e-4 # the geometric mean of the transmissivity - rate = -1e-4 # pumping rate - - head1 = ext_thiem_2d(rad, r_ref, TG, var, len_scale, rate) - head2 = ext_grf_steady(rad, r_ref, T_CG, rate=rate, trans_gmean=TG, var=var, len_scale=len_scale) - - plt.plot(rad, head1, label="Ext Thiem 2D") - plt.plot(rad, head2, label="grf(T_CG)", linestyle="--") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/06_compare_extthiem2d_grfsteady.png - :width: 400px - :align: center - - -2. extended Thiem 3D vs. steady solution for coarse graining conductivity -------------------------------------------------------------------------- - -The extended Thiem 3D solutions is the analytical solution of the groundwater -flow equation for the coarse graining conductivity for pumping tests. -Therefore the results should coincide. - -Reference: `Zech et. al. 2012 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_thiem_3d, ext_grf_steady - from anaflow.tools.coarse_graining import K_CG - - - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - r_ref = 2.0 # reference radius - var = 0.5 # variance of the log-transmissivity - len_scale = 10.0 # correlation length of the log-transmissivity - KG = 1e-4 # the geometric mean of the transmissivity - anis = 0.7 # aniso ratio - rate = -1e-4 # pumping rate - - head1 = ext_thiem_3d(rad, r_ref, KG, var, len_scale, anis, 1, rate) - head2 = ext_grf_steady(rad, r_ref, K_CG, rate=rate, cond_gmean=KG, var=var, len_scale=len_scale, anis=anis) - - plt.plot(rad, head1, label="Ext Thiem 3D") - plt.plot(rad, head2, label="grf(K_CG)", linestyle="--") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/07_compare_extthiem3d_grfsteady.png - :width: 400px - :align: center - - -3. extended Thiem 2D vs. steady solution for apparent transmissivity from Neuman --------------------------------------------------------------------------------- - -Both, the extended Thiem and the Neuman solution, represent an effective steady -drawdown in a heterogeneous aquifer. -In both cases the heterogeneity is represented by two point statistics, -characterized by mean, variance and length scale of the log transmissivity field. -Therefore these approaches should lead to similar results. - -References: - -- `Neuman 2004 `__ -- `Zech & Attinger 2016 `__ - - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_thiem_2d, neuman2004_steady - - - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - r_ref = 30.0 # reference radius - var = 0.5 # variance of the log-transmissivity - len_scale = 10.0 # correlation length of the log-transmissivity - TG = 1e-4 # the geometric mean of the transmissivity - rate = -1e-4 # pumping rate - - head1 = ext_thiem_2d(rad, r_ref, TG, var, len_scale, rate) - head2 = neuman2004_steady(rad, r_ref, TG, var, len_scale, rate) - - plt.plot(rad, head1, label="extended Thiem 2D") - plt.plot(rad, head2, label="Steady Neuman 2004", linestyle="--") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/08_compare_extthiem2d_neuman.png - :width: 400px - :align: center - - -4. extended Theis 2D vs. transient solution for apparent transmissivity from Neuman ------------------------------------------------------------------------------------ - -Both, the extended Theis and the Neuman solution, represent an effective transient -drawdown in a heterogeneous aquifer. -In both cases the heterogeneity is represented by two point statistics, -characterized by mean, variance and length scale of the log transmissivity field. -Therefore these approaches should lead to similar results. - -References: - -- `Neuman 2004 `__ -- `Zech et. al. 2016 `__ - - - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_theis_2d, neuman2004 - - - time_labels = ["10 s", "10 min", "10 h"] - time = [10, 600, 36000] # 10s, 10min, 10h - rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] - TG = 1e-4 # the geometric mean of the transmissivity - var = 0.5 # correlation length of the log-transmissivity - len_scale = 10.0 # variance of the log-transmissivity - S = 1e-4 # storativity - rate = -1e-4 # pumping rate - - head1 = ext_theis_2d(time, rad, S, TG, var, len_scale, rate) - head2 = neuman2004(time, rad, S, TG, var, len_scale, rate) - time_ticks=[] - for i, step in enumerate(time): - label1 = "extended Theis 2D" if i == 0 else None - label2 = "Transient Neuman 2004" if i == 0 else None - plt.plot(rad, head1[i], label=label1, color="C"+str(i)) - plt.plot(rad, head2[i], label=label2, color="C"+str(i), linestyle="--") - time_ticks.append(head1[i][-1]) - - plt.title("$T_G={}$, $\sigma^2={}$, $\ell={}$, $S={}$".format(TG, var, len_scale, S)) - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - ylim = plt.gca().get_ylim() - plt.gca().set_xlim([0, rad[-1]]) - ax2 = plt.gca().twinx() - ax2.set_yticks(time_ticks) - ax2.set_yticklabels(time_labels) - ax2.set_ylim(ylim) - plt.tight_layout() - plt.show() - - -.. image:: pics/09_compare_exttheis2d_neuman.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_07_convergence.rst b/docs/source/tutorial_07_convergence.rst deleted file mode 100755 index 66b7a82..0000000 --- a/docs/source/tutorial_07_convergence.rst +++ /dev/null @@ -1,139 +0,0 @@ -Tutorial 7: Convergence of different solutions -============================================== - -In the following we analyze the convergence of some solutions of the groundwater -flow equation. - -1. Convergence of the extended Theis solutions for truncated power laws ------------------------------------------------------------------------ - -Here we set an outer boundary to the transient solution, so this condition -coincides with the references head of the steady solution. - -Reference: (not yet published) - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_theis_tpl, ext_thiem_tpl - - time = 1e4 # time point for steady state - rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4] - r_ref = 10.0 # reference radius - KG = 1e-4 # the geometric mean of the transmissivity - len_scale = 5.0 # correlation length of the log-transmissivity - hurst = 0.5 # hurst coefficient - var = 0.5 # variance of the log-transmissivity - rate = -1e-4 # pumping rate - dim = 1.5 # using a fractional dimension - - head1 = ext_thiem_tpl(rad, r_ref, KG, len_scale, hurst, var, dim=dim, rate=rate) - head2 = ext_theis_tpl(time, rad, 1e-4, KG, len_scale, hurst, var, dim=dim, rate=rate, r_bound=r_ref) - - plt.plot(rad, head1, label="Ext Thiem TPL") - plt.plot(rad, head2, label="Ext Theis TPL (t={})".format(time), linestyle="--") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/10_convergence_ext_theis_tpl.png - :width: 400px - :align: center - - -2. Convergence of the general radial flow model (GRF) ------------------------------------------------------ - -The GRF model introduces an arbitrary flow dimension and was presented to -analyze groundwater flow in rock formations. -In the following we compare the bounded transient solution for late times, -the unbounded quasi steady solution and the steady state. - -Reference: `Barker 1988 `__ - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import ext_grf, ext_grf_steady, grf - - time = 1e4 # time point for steady state - rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4] - r_ref = 10.0 # reference radius - K = 1e-4 # the geometric mean of the transmissivity - rate = -1e-4 # pumping rate - dim = 1.5 # using a fractional dimension - - head1 = ext_grf_steady(rad, r_ref, K, dim=dim, rate=rate) - head2 = ext_grf(time, rad, [1e-4], [K], [0, r_ref], dim=dim, rate=rate) - head3 = grf(time, rad, 1e-4, K, dim=dim, rate=rate) - head3 -= head3[-1] # quasi-steady - - plt.plot(rad, head1, label="Ext GRF steady") - plt.plot(rad, head2, label="Ext GRF (t={})".format(time), linestyle="--") - plt.plot(rad, head3, label="GRF quasi-steady (t={})".format(time), linestyle=":") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/11_convergence_ext_grf.png - :width: 400px - :align: center - - -3. Quasi steady Theis vs. Thiem -------------------------------- - -Since a lot of pumping test analysis is done by interpreting the so called -quasi steady state, we will compare the quasi steady state of theis, a late -time head of the bounded theis and the thiem solution. - -References: - -- `Theis 1935 `__ -- `Thiem 1906 `__ - - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis, thiem - - - time = [10, 100, 1000] - rad = np.geomspace(0.1, 10) - r_ref = 10.0 - - head_ref = theis(time, np.full_like(rad, r_ref), storage=1e-3, transmissivity=1e-4, rate=-1e-4) - head1 = theis(time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4) - head_ref - head2 = theis(time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4, r_bound=r_ref) - head3 = thiem(rad, r_ref, transmissivity=1e-4, rate=-1e-4) - - for i, step in enumerate(time): - label_1 = "Theis quasi steady" if i == 0 else None - label_2 = "Theis bounded" if i == 0 else None - plt.plot(rad, head1[i], label=label_1, color="C"+str(i), linestyle="--") - plt.plot(rad, head2[i], label=label_2, color="C"+str(i)) - - plt.plot(rad, head3, label="Thiem", color="k", linestyle=":") - - plt.xlabel("r in [m]") - plt.ylabel("h in [m]") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/12_compare_theis_quasi_steady.png - :width: 400px - :align: center diff --git a/docs/source/tutorial_08_advanced.rst b/docs/source/tutorial_08_advanced.rst deleted file mode 100755 index 674ec5e..0000000 --- a/docs/source/tutorial_08_advanced.rst +++ /dev/null @@ -1,209 +0,0 @@ -Tutorial 8: Advanced stuff -========================== - -Beside the implementations of solutions form literatur, AnaFlow provides -some advanced features to pimp the solutions for the groundwater flow equation. - -1. Self defined radial conductivity or transmissivity ------------------------------------------------------ - -All heterogeneous solutions of AnaFlow are derived by calculating an equivalent -step function of a radial symmetric transmissivity resp. conductivity function. - -The following code shows how to apply this workflow to a self defined -transmissivity function. The function in use represents a linear transition -from a local to a far field value of transmissivity within a given range. - -The step function is calculated as the harmonic mean within given bounds, -since the groundwater flow under a pumping condition is perpendicular to the -different annular regions of transmissivity. - -Reference: (not yet published) - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - import matplotlib.gridspec as gridspec - from anaflow import ext_grf, ext_grf_steady - from anaflow.tools import specialrange_cut, annular_hmean, step_f - - - def cond(rad, K_far, K_well, len_scale): - """Conductivity with linear increase from K_well to K_far.""" - return np.minimum(np.abs(rad) / len_scale, 1.0) * (K_far - K_well) + K_well - - - time_labels = ["10 s", "100 s", "1000 s"] - time = [10, 100, 1000] - rad = np.geomspace(0.1, 6) - S = 1e-4 - K_well = 1e-5 - K_far = 1e-4 - len_scale = 5.0 - rate = -1e-4 - dim = 1.5 - - cut_off = len_scale - parts = 30 - r_well = 0.0 - r_bound = 50.0 - - # calculate a disk-distribution of "trans" by calculating harmonic means - R_part = specialrange_cut(r_well, r_bound, parts, cut_off) - K_part = annular_hmean(cond, R_part, ann_dim=dim, K_far=K_far, K_well=K_well, len_scale=len_scale) - S_part = np.full_like(K_part, S) - # calculate transient and steady heads - head1 = ext_grf(time, rad, S_part, K_part, R_part, dim=dim, rate=rate) - head2 = ext_grf_steady(rad, r_bound, cond, dim=dim, rate=-1e-4, K_far=K_far, K_well=K_well, len_scale=len_scale) - - # plotting - gs = gridspec.GridSpec(2, 1, height_ratios=[1, 3]) - ax1 = plt.subplot(gs[0]) - ax2 = plt.subplot(gs[1], sharex=ax1) - time_ticks=[] - for i, step in enumerate(time): - label = "Transient" if i == 0 else None - ax2.plot(rad, head1[i], label=label, color="C"+str(i)) - time_ticks.append(head1[i][-1]) - - ax2.plot(rad, head2, label="Steady", color="k", linestyle=":") - - rad_lin = np.linspace(rad[0], rad[-1], 1000) - ax1.plot(rad_lin, step_f(rad_lin, R_part, K_part), label="step Conductivity") - ax1.plot(rad_lin, cond(rad_lin, K_far, K_well, len_scale), label="Conductivity") - ax1.set_yticks([K_well, K_far]) - ax1.set_ylabel(r"$K$ in $[\frac{m}{s}]$") - plt.setp(ax1.get_xticklabels(), visible=False) - ax1.legend() - ax2.set_xlabel("r in [m]") - ax2.set_ylabel("h in [m]") - ax2.legend() - ax2.set_xlim([0, rad[-1]]) - ax3 = ax2.twinx() - ax3.set_yticks(time_ticks) - ax3.set_yticklabels(time_labels) - ax3.set_ylim(ax2.get_ylim()) - - plt.tight_layout() - plt.show() - - -.. image:: pics/13_self_defined_transmissivity.png - :width: 400px - :align: center - - -2. Accruing pumping rate ------------------------- - -AnaFlow provides different representations for the pumping condition. -One is an accruing pumping rate represented by the error function. -This could be interpreted as that the water pump needs a certain time to -reach its constant rate state. - -.. code-block:: python - - import numpy as np - from scipy.special import erf - from matplotlib import pyplot as plt - import matplotlib.gridspec as gridspec - from anaflow import theis - - - time = np.geomspace(1, 600) - rad = [1, 5] - - # Q(t) = Q * erf(t / a) - a = 120 - lap_kwargs = {"cond": 4, "cond_kw": {"a": a}} - head1 = theis( - time=time, - rad=rad, - storage=1e-4, - transmissivity=1e-4, - rate=-1e-4, - lap_kwargs=lap_kwargs, - ) - head2 = theis( - time=time, - rad=rad, - storage=1e-4, - transmissivity=1e-4, - rate=-1e-4, - ) - gs = gridspec.GridSpec(2, 1, height_ratios=[1, 3]) - ax1 = plt.subplot(gs[0]) - ax2 = plt.subplot(gs[1], sharex=ax1) - - for i, step in enumerate(rad): - ax2.plot( - time, - head1[:, i], - color="C" + str(i), - label="accruing Theis(r={})".format(step), - ) - ax2.plot( - time, - head2[:, i], - color="C" + str(i), - label="constant Theis(r={})".format(step), - linestyle="--" - ) - ax1.plot(time, 1e-4 * erf(time / a), label="accruing Q") - ax2.set_xlabel("t in [s]") - ax2.set_ylabel("h in [m]") - ax1.set_ylabel(r"|Q| in [$\frac{m^3}{s}$]") - ax1.legend() - ax2.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/15_accruing_theis.png - :width: 400px - :align: center - - -3. Interval pumping -------------------- - -Another case often discussed in literatur is interval pumping, where -the pumping is just done in a certain time frame. - -Unfortunatly the Stehfest algorithm is not suitable for this kind of solution, -which is demonstrated in the following script. - -.. code-block:: python - - import numpy as np - from matplotlib import pyplot as plt - from anaflow import theis - - - time = np.linspace(10, 200) - rad = [1, 5] - - # Q(t) = Q * characteristic([0, T]) - lap_kwargs = {"cond": 3, "cond_kw": {"a": 100}} - head = theis( - time=time, - rad=rad, - storage=1e-4, - transmissivity=1e-4, - rate=-1e-4, - lap_kwargs=lap_kwargs, - ) - - for i, step in enumerate(rad): - plt.plot(time, head[:, i], label="Theis(r={})".format(step)) - - plt.title("The Stehfest algorithm is not suitable for this!") - plt.legend() - plt.tight_layout() - plt.show() - - -.. image:: pics/14_interval_theis.png - :width: 400px - :align: center diff --git a/docs/source/tutorials.rst b/docs/source/tutorials.rst deleted file mode 100644 index 12560fe..0000000 --- a/docs/source/tutorials.rst +++ /dev/null @@ -1,18 +0,0 @@ -================ -AnaFlow Tutorial -================ - -In the following you will find several Tutorials on how to use AnaFlow to -explore its whole beauty and power. - -.. toctree:: - :maxdepth: 1 - - tutorial_01_call.rst - tutorial_02_extended_theis.rst - tutorial_03_extended_theis3d.rst - tutorial_04_ext_theis_tpl.rst - tutorial_05_neuman2004.rst - tutorial_06_comparison.rst - tutorial_07_convergence.rst - tutorial_08_advanced.rst \ No newline at end of file diff --git a/examples/01_call_theis.py b/examples/01_call_theis.py index c55dc0a..dd8e5ce 100644 --- a/examples/01_call_theis.py +++ b/examples/01_call_theis.py @@ -1,4 +1,12 @@ -# -*- coding: utf-8 -*- +r""" +The Theis solution +================== + +In the following the well known Theis function is called an plotted for three +different time-steps. + +Reference: `Theis 1935 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis diff --git a/examples/02_call_ext_theis2d.py b/examples/02_call_ext_theis2d.py index 2cc5466..8aaa867 100644 --- a/examples/02_call_ext_theis2d.py +++ b/examples/02_call_ext_theis2d.py @@ -1,30 +1,62 @@ -# -*- coding: utf-8 -*- +r""" +The extended Theis solution in 2D +================================= + +We provide an extended theis solution, that incorporates the effectes of a +heterogeneous transmissivity field on a pumping test. + +In the following this extended solution is compared to the standard theis +solution for well flow. You can nicely see, that the extended solution represents +a transition between the theis solutions for the geometric- and harmonic-mean +transmissivity. + +Reference: `Zech et. al. 2016 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis, ext_theis_2d +############################################################################### +# We use three time steps: 10s, 10min, 10h time_labels = ["10 s", "10 min", "10 h"] -time = [10, 600, 36000] # 10s, 10min, 10h -rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -var = 0.5 # variance of the log-transmissivity -len_scale = 10.0 # correlation length of the log-transmissivity -TG = 1e-4 # the geometric mean of the transmissivity +time = [10, 600, 36000] # 10s, 10min, 10h + +############################################################################### +# Radius from the pumping well should be in [0, 4]. + +rad = np.geomspace(0.05, 4) + +############################################################################### +# Parameters of heterogeneity, storage and pumping rate. + +var = 0.5 # variance of the log-transmissivity +len_scale = 10.0 # correlation length of the log-transmissivity +TG = 1e-4 # the geometric mean of the transmissivity TH = TG * np.exp(-var / 2.0) # the harmonic mean of the transmissivity -S = 1e-4 # storativity -rate = -1e-4 # pumping rate + +S = 1e-4 # storativity +rate = -1e-4 # pumping rate + +############################################################################### +# Now let's compare the extended Theis solution to the classical solutions +# for the near and far field values of transmissivity. head_TG = theis(time, rad, S, TG, rate) head_TH = theis(time, rad, S, TH, rate) head_ef = ext_theis_2d(time, rad, S, TG, var, len_scale, rate) -time_ticks=[] +time_ticks = [] for i, step in enumerate(time): label_TG = "Theis($T_G$)" if i == 0 else None label_TH = "Theis($T_H$)" if i == 0 else None label_ef = "extended Theis" if i == 0 else None - plt.plot(rad, head_TG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_TH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) + plt.plot( + rad, head_TG[i], label=label_TG, color="C" + str(i), linestyle="--" + ) + plt.plot( + rad, head_TH[i], label=label_TH, color="C" + str(i), linestyle=":" + ) + plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i)) time_ticks.append(head_ef[i][-1]) plt.xlabel("r in [m]") diff --git a/examples/03_call_ext_theis3d.py b/examples/03_call_ext_theis3d.py index 22e5837..b711de4 100644 --- a/examples/03_call_ext_theis3d.py +++ b/examples/03_call_ext_theis3d.py @@ -1,34 +1,71 @@ -# -*- coding: utf-8 -*- +r""" +The extended Theis solution in 3D +================================= + +We provide an extended theis solution, that incorporates the effectes of a +heterogeneous conductivity field on a pumping test. +It also includes an anisotropy ratio of the horizontal and vertical length +scales. + +In the following this extended solution is compared to the standard theis +solution for well flow. You can nicely see, that the extended solution represents +a transition between the theis solutions for the effective and harmonic-mean +conductivity. + +Reference: `Müller 2015 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis, ext_theis_3d from anaflow.tools.special import aniso +############################################################################### +# We use three time steps: 10s, 10min, 10h + time_labels = ["10 s", "10 min", "10 h"] -time = [10, 600, 36000] # 10s, 10min, 10h -rad = np.geomspace(0.05, 4) # radial distance from the pumping well in [0, 4] -var = 0.5 # variance of the log-conductivity -len_scale = 10.0 # correlation length of the log-conductivity -anis = 0.75 # anisotropy ratio of the log-conductivity -KG = 1e-4 # the geometric mean of the conductivity -Kefu = KG*np.exp(var*(0.5-aniso(anis))) # the effective conductivity for uniform flow -KH = KG*np.exp(-var/2.0) # the harmonic mean of the conductivity -S = 1e-4 # storage -rate = -1e-4 # pumping rate -L = 1.0 # vertical extend of the aquifer - -head_Kefu = theis(time, rad, S, Kefu*L, rate) -head_KH = theis(time, rad, S, KH*L, rate) +time = [10, 600, 36000] # 10s, 10min, 10h + +############################################################################### +# Radius from the pumping well should be in [0, 4]. + +rad = np.geomspace(0.05, 4) + +############################################################################### +# Parameters of heterogeneity, storage, extend and pumping rate. + +var = 0.5 # variance of the log-conductivity +len_scale = 10.0 # correlation length of the log-conductivity +anis = 0.75 # anisotropy ratio of the log-conductivity +KG = 1e-4 # the geometric mean of the conductivity +Kefu = KG * np.exp( + var * (0.5 - aniso(anis)) +) # the effective conductivity for uniform flow +KH = KG * np.exp(-var / 2.0) # the harmonic mean of the conductivity + +S = 1e-4 # storage +L = 1.0 # vertical extend of the aquifer +rate = -1e-4 # pumping rate + +############################################################################### +# Now let's compare the extended Theis solution to the classical solutions +# for the near and far field values of transmissivity. + +head_Kefu = theis(time, rad, S, Kefu * L, rate) +head_KH = theis(time, rad, S, KH * L, rate) head_ef = ext_theis_3d(time, rad, S, KG, var, len_scale, anis, L, rate) -time_ticks=[] +time_ticks = [] for i, step in enumerate(time): label_TG = "Theis($K_{efu}$)" if i == 0 else None label_TH = "Theis($K_H$)" if i == 0 else None label_ef = "extended Theis 3D" if i == 0 else None - plt.plot(rad, head_Kefu[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_KH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) + plt.plot( + rad, head_Kefu[i], label=label_TG, color="C" + str(i), linestyle="--" + ) + plt.plot( + rad, head_KH[i], label=label_TH, color="C" + str(i), linestyle=":" + ) + plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i)) time_ticks.append(head_ef[i][-1]) plt.xlabel("r in [m]") diff --git a/examples/04_call_ext_theis_tpl.py b/examples/04_call_ext_theis_tpl.py index 7e23e87..060ad5a 100755 --- a/examples/04_call_ext_theis_tpl.py +++ b/examples/04_call_ext_theis_tpl.py @@ -1,20 +1,49 @@ -# -*- coding: utf-8 -*- +r""" +The extended Theis solution for truncated power laws +==================================================== + +We provide an extended theis solution, that incorporates the effectes of a +heterogeneous conductivity field following a truncated power law. +In addition, it incorporates the assumptions of the general radial flow model +and provides an arbitrary flow dimension. + +In the following this extended solution is compared to the standard theis +solution for well flow. You can nicely see, that the extended solution represents +a transition between the theis solutions for the well- and farfield-conductivity. + +Reference: (not yet published) +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis, ext_theis_tpl -time_ticks = [] +############################################################################### +# We use three time steps: 10s, 10min, 10h + time_labels = ["10 s", "10 min", "10 h"] -time = [10, 600, 36000] # 10s, 10min, 10h -rad = np.geomspace(0.05, 4) # radial distance from the pumping well in [0, 4] -S = 1e-4 # storage -KG = 1e-4 # the geometric mean of the conductivity -len_scale = 20.0 # upper bound for the length scale -hurst = 0.5 # hurst coefficient -var = 0.5 # variance of the log-conductivity -rate = -1e-4 # pumping rate -KH = KG * np.exp(-var / 2) # the harmonic mean of the conductivity +time = [10, 600, 36000] # 10s, 10min, 10h + +############################################################################### +# Radius from the pumping well should be in [0, 4]. + +rad = np.geomspace(0.05, 4) + +############################################################################### +# Parameters of heterogeneity, storage and pumping rate. + +var = 0.5 # variance of the log-conductivity +len_scale = 20.0 # upper bound for the length scale +hurst = 0.5 # hurst coefficient +KG = 1e-4 # the geometric mean of the conductivity +KH = KG * np.exp(-var / 2) # the harmonic mean of the conductivity + +S = 1e-4 # storage +rate = -1e-4 # pumping rate + +############################################################################### +# Now let's compare the extended Theis TPL solution to the classical solutions +# for the near and far field values of transmissivity. head_KG = theis(time, rad, S, KG, rate) head_KH = theis(time, rad, S, KH, rate) @@ -28,13 +57,18 @@ var=var, rate=rate, ) +time_ticks = [] for i, step in enumerate(time): label_TG = "Theis($K_G$)" if i == 0 else None label_TH = "Theis($K_H$)" if i == 0 else None label_ef = "extended Theis TPL 2D" if i == 0 else None - plt.plot(rad, head_KG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_KH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) + plt.plot( + rad, head_KG[i], label=label_TG, color="C" + str(i), linestyle="--" + ) + plt.plot( + rad, head_KH[i], label=label_TH, color="C" + str(i), linestyle=":" + ) + plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i)) time_ticks.append(head_ef[i][-1]) plt.xscale("log") diff --git a/examples/05_call_neuman2004.py b/examples/05_call_neuman2004.py index fc74967..0da212c 100755 --- a/examples/05_call_neuman2004.py +++ b/examples/05_call_neuman2004.py @@ -1,18 +1,48 @@ -# -*- coding: utf-8 -*- +r""" +The transient heterogeneous Neuman solution from 2004 +===================================================== + +We provide the transient pumping solution for the apparent transmissivity from +Neuman 2004. +This solution is build on the apparent transmissivity from Neuman 2004, +which represents a mean drawdown in an ensemble of pumping tests in +heterogeneous transmissivity fields following an exponential covariance. + +In the following this solution is compared to the standard theis +solution for well flow. You can nicely see, that the extended solution represents +a transition between the theis solutions for the well- and farfield-conductivity. + +Reference: `Neuman 2004 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis, neuman2004 +############################################################################### +# We use three time steps: 10s, 10min, 10h time_labels = ["10 s", "10 min", "10 h"] -time = [10, 600, 36000] # 10s, 10min, 10h -rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -var = 0.5 # variance of the log-transmissivity -len_scale = 10.0 # correlation length of the log-transmissivity -TG = 1e-4 # the geometric mean of the transmissivity -TH = TG*np.exp(-var/2.0) # the harmonic mean of the transmissivity -S = 1e-4 # storativity -rate = -1e-4 # pumping rate +time = [10, 600, 36000] # 10s, 10min, 10h + +############################################################################### +# Radius from the pumping well should be in [0, 4]. + +rad = np.geomspace(0.05, 4) + +############################################################################### +# Parameters of heterogeneity, storage and pumping rate. + +var = 0.5 # variance of the log-transmissivity +len_scale = 10.0 # correlation length of the log-transmissivity +TG = 1e-4 # the geometric mean of the transmissivity +TH = TG * np.exp(-var / 2.0) # the harmonic mean of the transmissivity + +S = 1e-4 # storativity +rate = -1e-4 # pumping rate + +############################################################################### +# Now let's compare the apparent Neuman solution to the classical solutions +# for the near and far field values of transmissivity. head_TG = theis(time, rad, S, TG, rate) head_TH = theis(time, rad, S, TH, rate) @@ -30,9 +60,13 @@ label_TG = "Theis($T_G$)" if i == 0 else None label_TH = "Theis($T_H$)" if i == 0 else None label_ef = "transient Neuman [2004]" if i == 0 else None - plt.plot(rad, head_TG[i], label=label_TG, color="C"+str(i), linestyle="--") - plt.plot(rad, head_TH[i], label=label_TH, color="C"+str(i), linestyle=":") - plt.plot(rad, head_ef[i], label=label_ef, color="C"+str(i)) + plt.plot( + rad, head_TG[i], label=label_TG, color="C" + str(i), linestyle="--" + ) + plt.plot( + rad, head_TH[i], label=label_TH, color="C" + str(i), linestyle=":" + ) + plt.plot(rad, head_ef[i], label=label_ef, color="C" + str(i)) time_ticks.append(head_ef[i][-1]) plt.xscale("log") diff --git a/examples/06_compare_extthiem2d_grfsteady.py b/examples/06_compare_extthiem2d_grfsteady.py index 2e51173..5a45256 100755 --- a/examples/06_compare_extthiem2d_grfsteady.py +++ b/examples/06_compare_extthiem2d_grfsteady.py @@ -1,4 +1,16 @@ -# -*- coding: utf-8 -*- +r""" +extended Thiem 2D vs. steady solution for coarse graining transmissivity +======================================================================== + +The extended Thiem 2D solutions is the analytical solution of the groundwater +flow equation for the coarse graining transmissivity for pumping tests. +Therefore the results should coincide. + +References: + +- `Schneider & Attinger 2008 `__ +- `Zech & Attinger 2016 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_thiem_2d, ext_grf_steady @@ -6,14 +18,18 @@ rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -r_ref = 2.0 # reference radius -var = 0.5 # variance of the log-transmissivity -len_scale = 10.0 # correlation length of the log-transmissivity -TG = 1e-4 # the geometric mean of the transmissivity -rate = -1e-4 # pumping rate +r_ref = 2.0 # reference radius + +var = 0.5 # variance of the log-transmissivity +len_scale = 10.0 # correlation length of the log-transmissivity +TG = 1e-4 # the geometric mean of the transmissivity + +rate = -1e-4 # pumping rate head1 = ext_thiem_2d(rad, r_ref, TG, var, len_scale, rate) -head2 = ext_grf_steady(rad, r_ref, T_CG, rate=rate, trans_gmean=TG, var=var, len_scale=len_scale) +head2 = ext_grf_steady( + rad, r_ref, T_CG, rate=rate, trans_gmean=TG, var=var, len_scale=len_scale +) plt.plot(rad, head1, label="Ext Thiem 2D") plt.plot(rad, head2, label="grf(T_CG)", linestyle="--") diff --git a/examples/07_compare_extthiem3d_grfsteady.py b/examples/07_compare_extthiem3d_grfsteady.py index c5d9bcd..71a635d 100755 --- a/examples/07_compare_extthiem3d_grfsteady.py +++ b/examples/07_compare_extthiem3d_grfsteady.py @@ -1,4 +1,13 @@ -# -*- coding: utf-8 -*- +r""" +extended Thiem 3D vs. steady solution for coarse graining conductivity +====================================================================== + +The extended Thiem 3D solutions is the analytical solution of the groundwater +flow equation for the coarse graining conductivity for pumping tests. +Therefore the results should coincide. + +Reference: `Zech et. al. 2012 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_thiem_3d, ext_grf_steady @@ -6,15 +15,26 @@ rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -r_ref = 2.0 # reference radius -var = 0.5 # variance of the log-transmissivity -len_scale = 10.0 # correlation length of the log-transmissivity -KG = 1e-4 # the geometric mean of the transmissivity -anis = 0.7 # aniso ratio -rate = -1e-4 # pumping rate +r_ref = 2.0 # reference radius + +var = 0.5 # variance of the log-transmissivity +len_scale = 10.0 # correlation length of the log-transmissivity +KG = 1e-4 # the geometric mean of the transmissivity +anis = 0.7 # aniso ratio + +rate = -1e-4 # pumping rate head1 = ext_thiem_3d(rad, r_ref, KG, var, len_scale, anis, 1, rate) -head2 = ext_grf_steady(rad, r_ref, K_CG, rate=rate, cond_gmean=KG, var=var, len_scale=len_scale, anis=anis) +head2 = ext_grf_steady( + rad, + r_ref, + K_CG, + rate=rate, + cond_gmean=KG, + var=var, + len_scale=len_scale, + anis=anis, +) plt.plot(rad, head1, label="Ext Thiem 3D") plt.plot(rad, head2, label="grf(K_CG)", linestyle="--") diff --git a/examples/08_compare_extthiem2d_neuman.py b/examples/08_compare_extthiem2d_neuman.py index d7f05d4..4245f8a 100755 --- a/examples/08_compare_extthiem2d_neuman.py +++ b/examples/08_compare_extthiem2d_neuman.py @@ -1,15 +1,31 @@ -# -*- coding: utf-8 -*- +r""" +extended Thiem 2D vs. steady solution for apparent transmissivity from Neuman +============================================================================= + +Both, the extended Thiem and the Neuman solution, represent an effective steady +drawdown in a heterogeneous aquifer. +In both cases the heterogeneity is represented by two point statistics, +characterized by mean, variance and length scale of the log transmissivity field. +Therefore these approaches should lead to similar results. + +References: + +- `Neuman 2004 `__ +- `Zech & Attinger 2016 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_thiem_2d, neuman2004_steady rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -r_ref = 30.0 # reference radius -var = 0.5 # variance of the log-transmissivity -len_scale = 10.0 # correlation length of the log-transmissivity -TG = 1e-4 # the geometric mean of the transmissivity -rate = -1e-4 # pumping rate +r_ref = 30.0 # reference radius + +var = 0.5 # variance of the log-transmissivity +len_scale = 10.0 # correlation length of the log-transmissivity +TG = 1e-4 # the geometric mean of the transmissivity + +rate = -1e-4 # pumping rate head1 = ext_thiem_2d(rad, r_ref, TG, var, len_scale, rate) head2 = neuman2004_steady(rad, r_ref, TG, var, len_scale, rate) diff --git a/examples/09_compare_exttheis2d_neuman.py b/examples/09_compare_exttheis2d_neuman.py index 1f6ef02..ed37df9 100755 --- a/examples/09_compare_exttheis2d_neuman.py +++ b/examples/09_compare_exttheis2d_neuman.py @@ -1,29 +1,48 @@ -# -*- coding: utf-8 -*- +r""" +extended Theis 2D vs. transient solution for apparent transmissivity from Neuman +================================================================================ + +Both, the extended Theis and the Neuman solution, represent an effective transient +drawdown in a heterogeneous aquifer. +In both cases the heterogeneity is represented by two point statistics, +characterized by mean, variance and length scale of the log transmissivity field. +Therefore these approaches should lead to similar results. + +References: + +- `Neuman 2004 `__ +- `Zech et. al. 2016 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_theis_2d, neuman2004 time_labels = ["10 s", "10 min", "10 h"] -time = [10, 600, 36000] # 10s, 10min, 10h +time = [10, 600, 36000] # 10s, 10min, 10h + rad = np.geomspace(0.05, 4) # radius from the pumping well in [0, 4] -TG = 1e-4 # the geometric mean of the transmissivity -var = 0.5 # correlation length of the log-transmissivity -len_scale = 10.0 # variance of the log-transmissivity -S = 1e-4 # storativity -rate = -1e-4 # pumping rate + +TG = 1e-4 # the geometric mean of the transmissivity +var = 0.5 # correlation length of the log-transmissivity +len_scale = 10.0 # variance of the log-transmissivity + +S = 1e-4 # storativity +rate = -1e-4 # pumping rate head1 = ext_theis_2d(time, rad, S, TG, var, len_scale, rate) head2 = neuman2004(time, rad, S, TG, var, len_scale, rate) -time_ticks=[] +time_ticks = [] for i, step in enumerate(time): label1 = "extended Theis 2D" if i == 0 else None label2 = "Transient Neuman 2004" if i == 0 else None - plt.plot(rad, head1[i], label=label1, color="C"+str(i)) - plt.plot(rad, head2[i], label=label2, color="C"+str(i), linestyle="--") + plt.plot(rad, head1[i], label=label1, color="C" + str(i)) + plt.plot(rad, head2[i], label=label2, color="C" + str(i), linestyle="--") time_ticks.append(head1[i][-1]) -plt.title("$T_G={}$, $\sigma^2={}$, $\ell={}$, $S={}$".format(TG, var, len_scale, S)) +plt.title( + "$T_G={}$, $\sigma^2={}$, $\ell={}$, $S={}$".format(TG, var, len_scale, S) +) plt.xlabel("r in [m]") plt.ylabel("h in [m]") plt.legend() diff --git a/examples/10_convergence_ext_theis_tpl.py b/examples/10_convergence_ext_theis_tpl.py index fb6efdc..b208b7b 100755 --- a/examples/10_convergence_ext_theis_tpl.py +++ b/examples/10_convergence_ext_theis_tpl.py @@ -1,20 +1,35 @@ -# -*- coding: utf-8 -*- +r""" +Convergence of the extended Theis solutions for truncated power laws +==================================================================== + +Here we set an outer boundary to the transient solution, so this condition +coincides with the references head of the steady solution. + +Reference: (not yet published) +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_theis_tpl, ext_thiem_tpl -time = 1e4 # time point for steady state +time = 1e4 # time point for steady state rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4] -r_ref = 10.0 # reference radius -KG = 1e-4 # the geometric mean of the transmissivity -len_scale = 5.0 # correlation length of the log-transmissivity -hurst = 0.5 # hurst coefficient -var = 0.5 # variance of the log-transmissivity -rate = -1e-4 # pumping rate -dim = 1.5 # using a fractional dimension - -head1 = ext_thiem_tpl(rad, r_ref, KG, len_scale, hurst, var, dim=dim, rate=rate) -head2 = ext_theis_tpl(time, rad, 1e-4, KG, len_scale, hurst, var, dim=dim, rate=rate, r_bound=r_ref) +r_ref = 10.0 # reference radius + +KG = 1e-4 # the geometric mean of the transmissivity +len_scale = 5.0 # correlation length of the log-transmissivity +hurst = 0.5 # hurst coefficient +var = 0.5 # variance of the log-transmissivity +dim = 1.5 # using a fractional dimension + +S = 1e-4 # storativity +rate = -1e-4 # pumping rate + +head1 = ext_thiem_tpl( + rad, r_ref, KG, len_scale, hurst, var, dim=dim, rate=rate +) +head2 = ext_theis_tpl( + time, rad, S, KG, len_scale, hurst, var, dim=dim, rate=rate, r_bound=r_ref +) plt.plot(rad, head1, label="Ext Thiem TPL") plt.plot(rad, head2, label="Ext Theis TPL (t={})".format(time), linestyle="--") diff --git a/examples/11_convergence_ext_grf.py b/examples/11_convergence_ext_grf.py index cd1a1ad..a3d7fe8 100755 --- a/examples/11_convergence_ext_grf.py +++ b/examples/11_convergence_ext_grf.py @@ -1,14 +1,26 @@ -# -*- coding: utf-8 -*- +r""" +Convergence of the general radial flow model (GRF) +================================================== + +The GRF model introduces an arbitrary flow dimension and was presented to +analyze groundwater flow in rock formations. +In the following we compare the bounded transient solution for late times, +the unbounded quasi steady solution and the steady state. + +Reference: `Barker 1988 `__ +""" import numpy as np from matplotlib import pyplot as plt from anaflow import ext_grf, ext_grf_steady, grf -time = 1e4 # time point for steady state +time = 1e4 # time point for steady state rad = np.geomspace(0.1, 10) # radius from the pumping well in [0, 4] -r_ref = 10.0 # reference radius -K = 1e-4 # the geometric mean of the transmissivity -rate = -1e-4 # pumping rate -dim = 1.5 # using a fractional dimension +r_ref = 10.0 # reference radius + +K = 1e-4 # the geometric mean of the transmissivity +dim = 1.5 # using a fractional dimension + +rate = -1e-4 # pumping rate head1 = ext_grf_steady(rad, r_ref, K, dim=dim, rate=rate) head2 = ext_grf(time, rad, [1e-4], [K], [0, r_ref], dim=dim, rate=rate) @@ -17,7 +29,9 @@ plt.plot(rad, head1, label="Ext GRF steady") plt.plot(rad, head2, label="Ext GRF (t={})".format(time), linestyle="--") -plt.plot(rad, head3, label="GRF quasi-steady (t={})".format(time), linestyle=":") +plt.plot( + rad, head3, label="GRF quasi-steady (t={})".format(time), linestyle=":" +) plt.xlabel("r in [m]") plt.ylabel("h in [m]") diff --git a/examples/12_compare_theis_quasi_steady.py b/examples/12_compare_theis_quasi_steady.py index 7f5a257..0439e28 100755 --- a/examples/12_compare_theis_quasi_steady.py +++ b/examples/12_compare_theis_quasi_steady.py @@ -1,4 +1,10 @@ -# -*- coding: utf-8 -*- +r""" +Quasi steady convergence +======================== + +The quasi steady is reached, when the radial shape of the drawdown in not +changing anymore. +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis, thiem @@ -8,16 +14,26 @@ rad = np.geomspace(0.1, 10) r_ref = 10.0 -head_ref = theis(time, np.full_like(rad, r_ref), storage=1e-3, transmissivity=1e-4, rate=-1e-4) -head1 = theis(time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4) - head_ref -head2 = theis(time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4, r_bound=r_ref) +head_ref = theis( + time, + np.full_like(rad, r_ref), + storage=1e-3, + transmissivity=1e-4, + rate=-1e-4, +) +head1 = ( + theis(time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4) - head_ref +) +head2 = theis( + time, rad, storage=1e-3, transmissivity=1e-4, rate=-1e-4, r_bound=r_ref +) head3 = thiem(rad, r_ref, transmissivity=1e-4, rate=-1e-4) for i, step in enumerate(time): label_1 = "Theis quasi steady" if i == 0 else None label_2 = "Theis bounded" if i == 0 else None - plt.plot(rad, head1[i], label=label_1, color="C"+str(i), linestyle="--") - plt.plot(rad, head2[i], label=label_2, color="C"+str(i)) + plt.plot(rad, head1[i], label=label_1, color="C" + str(i), linestyle="--") + plt.plot(rad, head2[i], label=label_2, color="C" + str(i)) plt.plot(rad, head3, label="Thiem", color="k", linestyle=":") diff --git a/examples/13_self_defined_transmissivity.py b/examples/13_self_defined_transmissivity.py index 272264c..f060d5c 100755 --- a/examples/13_self_defined_transmissivity.py +++ b/examples/13_self_defined_transmissivity.py @@ -1,4 +1,20 @@ -# -*- coding: utf-8 -*- +r""" +Self defined radial conductivity or transmissivity +================================================== + +All heterogeneous solutions of AnaFlow are derived by calculating an equivalent +step function of a radial symmetric transmissivity resp. conductivity function. + +The following code shows how to apply this workflow to a self defined +transmissivity function. The function in use represents a linear transition +from a local to a far field value of transmissivity within a given range. + +The step function is calculated as the harmonic mean within given bounds, +since the groundwater flow under a pumping condition is perpendicular to the +different annular regions of transmissivity. + +Reference: (not yet published) +""" import numpy as np from matplotlib import pyplot as plt import matplotlib.gridspec as gridspec @@ -14,13 +30,15 @@ def cond(rad, K_far, K_well, len_scale): time_labels = ["10 s", "100 s", "1000 s"] time = [10, 100, 1000] rad = np.geomspace(0.1, 6) -S = 1e-4 + K_well = 1e-5 K_far = 1e-4 len_scale = 5.0 -rate = -1e-4 dim = 1.5 +rate = -1e-4 +S = 1e-4 + cut_off = len_scale parts = 30 r_well = 0.0 @@ -28,27 +46,40 @@ def cond(rad, K_far, K_well, len_scale): # calculate a disk-distribution of "trans" by calculating harmonic means R_part = specialrange_cut(r_well, r_bound, parts, cut_off) -K_part = annular_hmean(cond, R_part, ann_dim=dim, K_far=K_far, K_well=K_well, len_scale=len_scale) +K_part = annular_hmean( + cond, R_part, ann_dim=dim, K_far=K_far, K_well=K_well, len_scale=len_scale +) S_part = np.full_like(K_part, S) # calculate transient and steady heads head1 = ext_grf(time, rad, S_part, K_part, R_part, dim=dim, rate=rate) -head2 = ext_grf_steady(rad, r_bound, cond, dim=dim, rate=-1e-4, K_far=K_far, K_well=K_well, len_scale=len_scale) +head2 = ext_grf_steady( + rad, + r_bound, + cond, + dim=dim, + rate=-1e-4, + K_far=K_far, + K_well=K_well, + len_scale=len_scale, +) # plotting gs = gridspec.GridSpec(2, 1, height_ratios=[1, 3]) ax1 = plt.subplot(gs[0]) ax2 = plt.subplot(gs[1], sharex=ax1) -time_ticks=[] +time_ticks = [] for i, step in enumerate(time): label = "Transient" if i == 0 else None - ax2.plot(rad, head1[i], label=label, color="C"+str(i)) + ax2.plot(rad, head1[i], label=label, color="C" + str(i)) time_ticks.append(head1[i][-1]) ax2.plot(rad, head2, label="Steady", color="k", linestyle=":") rad_lin = np.linspace(rad[0], rad[-1], 1000) ax1.plot(rad_lin, step_f(rad_lin, R_part, K_part), label="step Conductivity") -ax1.plot(rad_lin, cond(rad_lin, K_far, K_well, len_scale), label="Conductivity") +ax1.plot( + rad_lin, cond(rad_lin, K_far, K_well, len_scale), label="Conductivity" +) ax1.set_yticks([K_well, K_far]) ax1.set_ylabel(r"$K$ in $[\frac{m}{s}]$") plt.setp(ax1.get_xticklabels(), visible=False) diff --git a/examples/14_interval_theis.py b/examples/14_interval_theis.py index af42e11..da4bc48 100755 --- a/examples/14_interval_theis.py +++ b/examples/14_interval_theis.py @@ -1,4 +1,13 @@ -# -*- coding: utf-8 -*- +r""" +Interval pumping +================ + +Another case often discussed in literatur is interval pumping, where +the pumping is just done in a certain time frame. + +Unfortunatly the Stehfest algorithm is not suitable for this kind of solution, +which is demonstrated in the following script. +""" import numpy as np from matplotlib import pyplot as plt from anaflow import theis @@ -7,8 +16,9 @@ time = np.linspace(10, 200) rad = [1, 5] -# Q(t) = Q * characteristic([0, T]) +# Q(t) = Q * characteristic([0, a]) lap_kwargs = {"cond": 3, "cond_kw": {"a": 100}} + head = theis( time=time, rad=rad, diff --git a/examples/15_accruing_theis.py b/examples/15_accruing_theis.py index 634ec7d..62564a4 100755 --- a/examples/15_accruing_theis.py +++ b/examples/15_accruing_theis.py @@ -1,4 +1,12 @@ -# -*- coding: utf-8 -*- +r""" +Accruing pumping rate +===================== + +AnaFlow provides different representations for the pumping condition. +One is an accruing pumping rate represented by the error function. +This could be interpreted as that the water pump needs a certain time to +reach its constant rate state. +""" import numpy as np from scipy.special import erf from matplotlib import pyplot as plt @@ -12,6 +20,7 @@ # Q(t) = Q * erf(t / a) a = 120 lap_kwargs = {"cond": 4, "cond_kw": {"a": a}} + head1 = theis( time=time, rad=rad, @@ -43,7 +52,7 @@ head2[:, i], color="C" + str(i), label="constant Theis(r={})".format(step), - linestyle="--" + linestyle="--", ) ax1.plot(time, 1e-4 * erf(time / a), label="accruing Q") ax2.set_xlabel("t in [s]") diff --git a/examples/README.rst b/examples/README.rst new file mode 100644 index 0000000..ef1b4a9 --- /dev/null +++ b/examples/README.rst @@ -0,0 +1,9 @@ +================ +AnaFlow Tutorial +================ + +In the following you will find several Tutorials on how to use AnaFlow to +explore its whole beauty and power. + +Gallery +======= diff --git a/pyproject.toml b/pyproject.toml index 1972ced..de68c82 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,9 +13,7 @@ local_scheme = "no-local-version" fallback_version = "0.0.0.dev0" [tool.black] -exclude = """ -^/( ( examples ) /| anaflow/_version.py ) -""" +exclude = "_version.py" line-length = 79 target-version = [ "py36",