Skip to content

Commit

Permalink
added new documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Feb 11, 2019
1 parent f6feab6 commit c88b367
Show file tree
Hide file tree
Showing 37 changed files with 496 additions and 213 deletions.
83 changes: 50 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,68 @@
# Welcome to AnaFlow

AnaFlow: A python-package containing analytical solutions for the groundwater flow equation
===========================================================================================
[![DOI](https://zenodo.org/badge/116264578.svg)](https://zenodo.org/badge/latestdoi/116264578)
[![PyPI version](https://badge.fury.io/py/anaflow.svg)](https://badge.fury.io/py/anaflow)
[![Documentation Status](https://readthedocs.org/projects/docs/badge/?version=latest)](https://anaflow.readthedocs.io/en/latest/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

Contents
--------
Anaflow provides several analytical and semi-analytical solutions for the
groundwater-flow-equation.
<p align="center">
<img src="https://raw.githubusercontent.com/GeoStat-Framework/AnaFlow/master/docs/source/pics/AnaFlow.png" alt="AnaFlow-LOGO" width="251px"/>
</p>

Functions
---------
The following functions are provided directly
## Purpose

- `thiem ` -- Thiem solution for steady state pumping
- `theis ` -- Theis solution for transient pumping
- `ext_thiem2D` -- extended Thiem solution in 2D
- `ext_theis2D` -- extended Theis solution in 2D
- `ext_thiem3D` -- extended Thiem solution in 3D
- `ext_theis3D` -- extended Theis solution in 3D
- `diskmodel ` -- Solution for a diskmodel
- `stehfest ` -- Stehfest algorithm for laplace inversion
AnaFlow provides several analytical and semi-analytical solutions for the
groundwater-flow equation.

Subpackages
-----------
Using any of these subpackages requires an explicit import.
For example: ``import anaflow.helper``

- `gwsolutions` -- Solutions for the groundwater flow equation
- `laplace ` -- Functions concerning the laplace-transform
- `helper ` -- Several helper-functions
## Installation

Installation
------------
Just download the code an run the following command from the
source code directory:
You can install the latest version with the following command:

pip install -U .
pip install anaflow

It is highly recomended to install the scipy-scikit `umfpack` to get a solver
for sparse linear systems:

pip install -U scikit-umfpack
pip install scikit-umfpack

Have a look at: https://github.com/scikit-umfpack/scikit-umfpack


## Documentation for AnaFlow

You can find the documentation under [geostat-framework.readthedocs.io][doc_link].


## Provided Functions

The following functions are provided directly

```python
anaflow.thiem # Thiem solution for steady state pumping
anaflow.theis # Theis solution for transient pumping
anaflow.ext_thiem2D # extended Thiem solution in 2D
anaflow.ext_theis2D # extended Theis solution in 2D
anaflow.ext_thiem3D # extended Thiem solution in 3D
anaflow.ext_theis3D # extended Theis solution in 3D
```


## Requirements

- [NumPy >= 1.10.0](https://www.numpy.org)
- [SciPy >= 0.19.0](https://www.scipy.org)


## Contact

You can contact us via <info@geostat-framework.org>.


Have a look at: https://pypi.python.org/pypi/scikit-umfpack
## License

[![ForTheBadge built-with-science](http://ForTheBadge.com/images/badges/built-with-science.svg)](https://GitHub.com/Naereen/)
[GPL][gpl_link] © 2018-2019

Created December 2017, Copyright Sebastian Mueller 2017
[gpl_link]: https://github.com/GeoStat-Framework/AnaFlow/blob/master/LICENSE
[ogs5_link]: https://www.opengeosys.org/ogs-5/
[doc_link]: https://geostat-framework.readthedocs.io/projects/anaflow/en/latest/
16 changes: 8 additions & 8 deletions anaflow/flow/heterogeneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ def ext_thiem2D(rad, Rref, TG, sig2, corr, Qw, href=0.0, Twell=None, prop=1.6):
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> ext_thiem2D([1,2,3], 10, 0.001, 1, 10, -0.001)
array([-0.53084596, -0.35363029, -0.25419375])
"""
Expand Down Expand Up @@ -201,8 +201,8 @@ def ext_thiem3D(
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> ext_thiem3D([1,2,3], 10, 0.001, 1, 10, 1, -0.001, 1)
array([-0.48828026, -0.31472059, -0.22043022])
"""
Expand Down Expand Up @@ -358,8 +358,8 @@ def ext_theis2D(
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> ext_theis2D([1,2,3], [10,100], 0.001, 1, 10, 0.001, -0.001)
array([[-0.3381231 , -0.17430066, -0.09492601],
[-0.58557452, -0.40907021, -0.31112835]])
Expand Down Expand Up @@ -559,8 +559,8 @@ def ext_theis3D(
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> ext_theis3D([1,2,3], [10,100], 0.001, 1, 10, 1, 0.001, -0.001, 1)
array([[-0.32845576, -0.16741654, -0.09134294],
[-0.54238241, -0.36982686, -0.27754856]])
Expand Down
8 changes: 4 additions & 4 deletions anaflow/flow/homogeneous.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def thiem(rad, Rref, T, Qw, href=0.0):
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> thiem([1,2,3], 10, 0.001, -0.001)
array([-0.3664678 , -0.25615 , -0.19161822])
"""
Expand Down Expand Up @@ -154,8 +154,8 @@ def theis(
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> theis([1,2,3], [10,100], 0.001, 0.001, -0.001)
array([[-0.24959541, -0.14506368, -0.08971485],
[-0.43105106, -0.32132823, -0.25778313]])
Expand Down
12 changes: 6 additions & 6 deletions anaflow/flow/laplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The following functions are provided
.. autosummary::
lap_transgwflow_cyl
lap_trans_flow_cyl
grf_laplace
"""

Expand Down Expand Up @@ -93,8 +93,8 @@ def lap_trans_flow_cyl(
lap_transgwflow_cyl : :class:`numpy.ndarray`
Array with all values in laplace-space
Example
-------
Examples
--------
>>> lap_transgwflow_cyl([5,10],[1,2,3],[0,2,10],[1e-3,1e-3],[1e-3,2e-3],-1)
array([[ -2.71359196e+00, -1.66671965e-01, -2.82986917e-02],
[ -4.58447458e-01, -1.12056319e-02, -9.85673855e-04]])
Expand Down Expand Up @@ -279,7 +279,7 @@ def grf_laplace(
Given radii separating the disks as well as starting- and endpoints
Kpart : :class:`numpy.ndarray` of length N
Given conductivity values for each disk
Spart : :class:`numpy.ndarray`of length N
Spart : :class:`numpy.ndarray` of length N
Given storativity values for each disk
Qw : :class:`float`
Pumpingrate at the well
Expand All @@ -291,8 +291,8 @@ def grf_laplace(
grf_laplace : :class:`numpy.ndarray`
Array with all values in laplace-space
Example
-------
Examples
--------
>>> grf_laplace([5,10],[1,2,3], 2, 1, [0,2,10],[1e-3,1e-3],[1e-3,2e-3],-1)
array([[ -2.71359196e+00, -1.66671965e-01, -2.82986917e-02],
[ -4.58447458e-01, -1.12056319e-02, -9.85673855e-04]])
Expand Down
4 changes: 2 additions & 2 deletions anaflow/flow/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def diskmodel(
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> diskmodel([1,2,3], [10, 100], [1e-3, 2e-3], [1e-3, 1e-3], [2], -1e-3)
array([[-0.20312814, -0.09605675, -0.06636862],
[-0.29785979, -0.18784251, -0.15582597]])
Expand Down
24 changes: 12 additions & 12 deletions anaflow/tools/coarse_graining.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def T_CG(rad, TG, sig2, corr, prop=1.6, Twell=None):
pumping tests in heterogeneous aquifers.''
Water resources research, 44(4), 2008
Example
-------
Examples
--------
>>> T_CG([1,2,3], 0.001, 1, 10, 2)
array([ 0.00061831, 0.00064984, 0.00069236])
"""
Expand Down Expand Up @@ -115,8 +115,8 @@ def T_CG_inverse(T, TG, sig2, corr, prop=1.6, Twell=None):
rad : :class:`numpy.ndarray`
Array containing the radii belonging to the given transmissivity values
Example
-------
Examples
--------
>>> T_CG_inverse([7e-4,8e-4,9e-4], 0.001, 1, 10, 2)
array([ 3.16952925, 5.56935826, 9.67679026])
"""
Expand Down Expand Up @@ -160,8 +160,8 @@ def T_CG_error(err, TG, sig2, corr, prop=1.6, Twell=None):
rad : :class:`float`
Radial point, where the relative error is less than the given one.
Example
-------
Examples
--------
>>> T_CG_error(0.01, 0.001, 1, 10, 2)
34.910450167790387
"""
Expand Down Expand Up @@ -229,8 +229,8 @@ def K_CG(rad, KG, sig2, corr, e, prop=1.6, Kwell="KH"):
for the sedimentary basin of Thuringia.''
PhD thesis, Friedrich-Schiller-Universität Jena, 2013
Example
-------
Examples
--------
>>> K_CG([1,2,3], 0.001, 1, 10, 1, 2)
array([ 0.00063008, 0.00069285, 0.00077595])
"""
Expand Down Expand Up @@ -282,8 +282,8 @@ def K_CG_inverse(K, KG, sig2, corr, e, prop=1.6, Kwell="KH"):
rad : :class:`numpy.ndarray`
Array containing the radii belonging to the given conductivity values
Example
-------
Examples
--------
>>> K_CG_inverse([7e-4,8e-4,9e-4], 0.001, 1, 10, 1, 2)
array([ 2.09236867, 3.27914996, 4.52143956])
"""
Expand Down Expand Up @@ -339,8 +339,8 @@ def K_CG_error(err, KG, sig2, corr, e, prop=1.6, Kwell="KH"):
rad : :class:`float`
Radial point, where the relative error is less than the given one.
Example
-------
Examples
--------
>>> K_CG_error(0.01, 0.001, 1, 10, 1, 2)
19.612796453639845
"""
Expand Down
4 changes: 2 additions & 2 deletions anaflow/tools/laplace.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ def stehfest(func, time, bound=12, arg_dict=None, **kwargs):
The algorithm gets unstable for ``bound`` values above 20.
Example
-------
Examples
--------
>>> f = lambda x: x**-1
>>> stehfest(f, [1,10,100])
array([ 1., 1., 1.])
Expand Down
12 changes: 6 additions & 6 deletions anaflow/tools/mean.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def rad_amean_func(func, val_arr, arg_dict=None, **kwargs):
If the last value in val_arr is "inf", the given function should provide
a value for "inf" as input: ``func(float("inf"))``
Example
-------
Examples
--------
>>> f = lambda x: x**2
>>> rad_amean_func(f, [1,2,3])
array([ 2.33588885, 6.33423311])
Expand Down Expand Up @@ -175,8 +175,8 @@ def rad_gmean_func(func, val_arr, arg_dict=None, **kwargs):
If the last value in val_arr is "inf", the given function should provide
a value for "inf" as input: ``func(float("inf"))``
Example
-------
Examples
--------
>>> f = lambda x: x**2
>>> rad_gmean_func(f, [1,2,3])
array([ 2.33588885, 6.33423311])
Expand Down Expand Up @@ -382,8 +382,8 @@ def rad_pmean_func(func, val_arr, p=1.0, arg_dict=None, **kwargs):
If the last value in val_arr is "inf", the given function should provide
a value for "inf" as input: ``func(float("inf"))``
Example
-------
Examples
--------
>>> f = lambda x: x**2
>>> rad_pmean_func(f, [1,2,3])
array([ 2.33588885, 6.33423311])
Expand Down
20 changes: 10 additions & 10 deletions anaflow/tools/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ def radii(parts, rwell=0.0, rinf=np.inf, rlast=500.0, typ="log"):
f_rad : :class:`numpy.ndarray`
Array containing the function-evaluation points within each disk
Example
-------
Examples
--------
>>> radii(2)
(array([ 0., 500., inf]), array([ 0., inf]))
"""
Expand Down Expand Up @@ -136,8 +136,8 @@ def specialrange(val_min, val_max, steps, typ="log"):
:class:`numpy.ndarray`
Array containing the special range
Example
-------
Examples
--------
>>> specialrange(1,10,4)
array([ 1. , 2.53034834, 5.23167968, 10. ])
"""
Expand Down Expand Up @@ -204,8 +204,8 @@ def specialrange_cut(val_min, val_max, steps, val_cut=np.inf, typ="log"):
:class:`numpy.ndarray`
Array containing the special range
Example
-------
Examples
--------
>>> specialrange_cut(1,10,4)
array([ 1. , 2.53034834, 5.23167968, 10. ])
"""
Expand Down Expand Up @@ -244,8 +244,8 @@ def aniso(e):
.. [R2] Dagan, G., ''Flow and Transport on Porous Formations'',
Springer Verlag, New York, 1989.
Example
-------
Examples
--------
>>> aniso(0.5)
0.23639985871871511
"""
Expand Down Expand Up @@ -330,8 +330,8 @@ def well_solution(rad, time, T, S, Qw, struc_grid=True, hinf=0.0):
If you want to use cartesian coordiantes, just use the formula
``r = sqrt(x**2 + y**2)``
Example
-------
Examples
--------
>>> well_solution([1,2,3], [10,100], 0.001, 0.001, -0.001)
array([[-0.24959541, -0.14506368, -0.08971485],
[-0.43105106, -0.32132823, -0.25778313]])
Expand Down

0 comments on commit c88b367

Please sign in to comment.