anaflow.tools.special¶
Anaflow subpackage providing special functions.
The following functions are provided
Shaper ([time, rad, struc_grid]) |
A class to reshape radius-time input-output in a good way. |
step_f (rad, r_part, f_part) |
Callalbe step function. |
sph_surf (dim) |
Surface of the d-dimensional sphere. |
specialrange (val_min, val_max, steps[, typ]) |
Calculation of special point ranges. |
specialrange_cut (val_min, val_max, steps[, …]) |
Calculation of special point ranges. |
aniso (e) |
The anisotropy function. |
well_solution (time, rad, storage, transmissivity) |
The classical Theis solution. |
grf_solution (time, rad, storage, conductivity) |
The general radial flow (GRF) model for a pumping test. |
inc_gamma (s, x) |
The (upper) incomplete gamma function. |
tpl_hyp (rad, dim, hurst, corr, prop) |
Hyp_2F1 for the TPL CG model. |
neuman2004_trans (rad, trans_gmean, var, …) |
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: 0 - rad (
numpy.ndarray
orfloat
, optional) – Array with all radii where the function should be evaluated. Default: 0 - struc_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. - time (
-
specialrange
(val_min, val_max, steps, typ='exp')[source]¶ Calculation of special point ranges.
Parameters: - val_min (
float
) – Starting value. - val_max (
float
) – Ending value - steps (
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. ])
- val_min (
-
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 value - steps (
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.0 - 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_cut(1,10,4) array([ 1. , 2.53034834, 5.23167968, 10. ])
- val_min (
-
aniso
(e)[source]¶ The anisotropy function.
Known from ‘’Dagan (1989)’’[R2].
Parameters: e ( float
) – Anisotropy-ratio of the vertical and horizontal corralation-lengthsReturns: aniso – Value of the anisotropy function for the given value. Return type: float
Raises: ValueError
– If the Anisotropy-ratioe
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
-
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-4 - h_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
– Ifrad
is not positiv.ValueError
– Iftime
is negative.ValueError
– If shape ofrad
andtime
differ in case ofstruc_grid
isTrue
.ValueError
– Iftransmissivity
is not positiv.ValueError
– Ifstorage
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]])
- time (
-
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-4 - h_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
– Ifrad
is not positiv.ValueError
– Iftime
is negative.ValueError
– If shape ofrad
andtime
differ in case ofstruc_grid
isTrue
.ValueError
– Ifconductivity
is not positiv.ValueError
– Ifstorage
is not positiv.
- time (
-
inc_gamma
(s, x)[source]¶ The (upper) incomplete gamma function.
Given by:
Parameters: - s (
float
) – exponent in the integral - x (
numpy.ndarray
) – input values
- s (
-
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 evaluated - trans_gmean (
float
) – Geometric-mean transmissivity. - var (
float
) – Variance of log-transmissivity. - len_scale (
float
) – Correlation-length of log-transmissivity.
- rad (