anaflow.tools.special¶
Anaflow subpackage providing special functions.
The following functions are provided
|
A class to reshape radius-time input-output in a good way. |
|
Callalbe step function. |
|
Surface of the d-dimensional sphere. |
|
Calculation of special point ranges. |
|
Calculation of special point ranges. |
|
The anisotropy function. |
|
The classical Theis solution. |
|
The general radial flow (GRF) model for a pumping test. |
|
The (upper) incomplete gamma function. |
|
Hyp_2F1 for the TPL CG model. |
|
The apparent transmissivity from Neuman 2004. |
- class Shaper(time=0, rad=0, struc_grid=True)[source]¶
Bases:
object
A class to reshape radius-time input-output in a good way.
- Parameters
time (
numpy.ndarray
orfloat
, optional) – Array with all time-points where the function should be evaluated. Default: 0rad (
numpy.ndarray
orfloat
, optional) – Array with all radii where the function should be evaluated. Default: 0struc_grid (
bool
, optional) – If this is set toFalse
, the rad and time array will be merged and interpreted as single, r-t points. In this case they need to have the same shapes. Otherwise a structured t-r grid is created. Default:True
Methods
reshape
(result)Reshape a time-rad result according to the input shape.
- aniso(e)[source]¶
The anisotropy function.
Known from ‘’Dagan (1989)’’[R2].
- Parameters
e (
float
) – Anisotropy-ratio of the vertical and horizontal corralation-lengths- Returns
aniso – Value of the anisotropy function for the given value.
- Return type
- Raises
ValueError – If the Anisotropy-ratio
e
is not within 0 and 1.
References
- R2
Dagan, G., ‘’Flow and Transport on Porous Formations’’, Springer Verlag, New York, 1989.
Examples
>>> aniso(0.5) 0.2363998587187151
- grf_solution(time, rad, storage, conductivity, dim=2, lat_ext=1.0, rate=- 0.0001, h_bound=0.0, struc_grid=True)[source]¶
The general radial flow (GRF) model for a pumping test.
- Parameters
time (
numpy.ndarray
) – Array with all time-points where the function should be evaluated.rad (
numpy.ndarray
) – Array with all radii where the function should be evaluated.storage (
float
) – Storage coefficient of the aquifer.conductivity (
float
) – Conductivity of the aquifer.dim (
float
, optional) – Fractional dimension of the aquifer. Default:2.0
lat_ext (
float
, optional) – Lateral extend of the aquifer. Default:1.0
rate (
float
, optional) – Pumpingrate at the well. Default: -1e-4h_bound (
float
, optional) – Reference head at the outer boundary at infinity. Default:0.0
struc_grid (
bool
, optional) – If this is set to “False”, the “rad” and “time” array will be merged and interpreted as single, r-t points. In this case they need to have the same shapes. Otherwise a structured r-t grid is created. Default:True
- Returns
head – Array with all heads at the given radii and time-points.
- Return type
- Raises
ValueError – If
rad
is not positiv.ValueError – If
time
is negative.ValueError – If shape of
rad
andtime
differ in case ofstruc_grid
isTrue
.ValueError – If
conductivity
is not positiv.ValueError – If
storage
is not positiv.
- inc_gamma(s, x)[source]¶
The (upper) incomplete gamma function.
Given by:
- Parameters
s (
float
) – exponent in the integralx (
numpy.ndarray
) – input values
- neuman2004_trans(rad, trans_gmean, var, len_scale)[source]¶
The apparent transmissivity from Neuman 2004.
- Parameters
rad (
numpy.ndarray
) – Array with all radii where the function should be evaluatedtrans_gmean (
float
) – Geometric-mean transmissivity.var (
float
) – Variance of log-transmissivity.len_scale (
float
) – Correlation-length of log-transmissivity.
- specialrange(val_min, val_max, steps, typ='exp')[source]¶
Calculation of special point ranges.
- Parameters
val_min (
float
) – Starting value.val_max (
float
) – Ending valuesteps (
int
) – Number of steps.typ (
str
orfloat
, optional) –Setting the kind of range-distribution. One can choose between
"exp"
: for exponential behavior"log"
: for logarithmic behavior"geo"
: for geometric behavior"lin"
: for linear behavior"quad"
: for quadratic behavior"cub"
: for cubic behaviorfloat
: here you can specifi any exponent (“quad” would be equivalent to 2)
Default:
"exp"
- Returns
Array containing the special range
- Return type
Examples
>>> specialrange(1,10,4) array([ 1. , 2.53034834, 5.23167968, 10. ])
- specialrange_cut(val_min, val_max, steps, val_cut=None, typ='exp')[source]¶
Calculation of special point ranges.
Calculation of special point ranges with a cut-off value.
- Parameters
val_min (
float
) – Starting value.val_max (
float
) – Ending valuesteps (
int
) – Number of steps.val_cut (
float
, optional) – Cutting value, if val_max is bigger than this value, the last interval will be between val_cut and val_max. Default: 100.0typ (
str
orfloat
, optional) –Setting the kind of range-distribution. One can choose between
"exp"
: for exponential behavior"log"
: for logarithmic behavior"geo"
: for geometric behavior"lin"
: for linear behavior"quad"
: for quadratic behavior"cub"
: for cubic behaviorfloat
: here you can specifi any exponent (“quad” would be equivalent to 2)
Default:
"exp"
- Returns
Array containing the special range
- Return type
Examples
>>> specialrange_cut(1,10,4) array([ 1. , 2.53034834, 5.23167968, 10. ])
- well_solution(time, rad, storage, transmissivity, rate=- 0.0001, h_bound=0.0, struc_grid=True)[source]¶
The classical Theis solution.
The classical Theis solution for transient flow under a pumping condition in a confined and homogeneous aquifer.
This solution was presented in ‘’Theis 1935’’[R9].
- Parameters
time (
numpy.ndarray
) – Array with all time-points where the function should be evaluated.rad (
numpy.ndarray
) – Array with all radii where the function should be evaluated.storage (
float
) – Storage of the aquifer.transmissivity (
float
) – Transmissivity of the aquifer.rate (
float
, optional) – Pumpingrate at the well. Default: -1e-4h_bound (
float
, optional) – Reference head at the outer boundary at infinity. Default:0.0
struc_grid (
bool
, optional) – If this is set to “False”, the “rad” and “time” array will be merged and interpreted as single, r-t points. In this case they need to have the same shapes. Otherwise a structured r-t grid is created. Default:True
- Returns
head – Array with all heads at the given radii and time-points.
- Return type
- Raises
ValueError – If
rad
is not positiv.ValueError – If
time
is negative.ValueError – If shape of
rad
andtime
differ in case ofstruc_grid
isTrue
.ValueError – If
transmissivity
is not positiv.ValueError – If
storage
is not positiv.
References
- R9
Theis, C., ‘’The relation between the lowering of the piezometric surface and the rate and duration of discharge of a well using groundwater storage’’, Trans. Am. Geophys. Union, 16, 519-524, 1935
Notes
The parameters
rad
,T
andS
will be checked for positivity. If you want to use cartesian coordiantes, just use the formular = sqrt(x**2 + y**2)
Examples
>>> well_solution([10,100], [1,2,3], 0.001, 0.001, -0.001) array([[-0.24959541, -0.14506368, -0.08971485], [-0.43105106, -0.32132823, -0.25778313]])