welltestpy.data.testslib

welltestpy subpackage providing flow datastructures for tests on a fieldsite.

The following classes and functions are provided

Test(name[, description, timeframe]) General class for a well based test.
PumpingTest(name, pumpingwell, pumpingrate) Class for a pumping test.
class Test(name, description='no description', timeframe=None)[source]

Bases: object

General class for a well based test.

This is a class for a well based test on a field site. It has a name, a descrition and a timeframe string.

Parameters:
  • name (str) – Name of the test.
  • description (str, optional) – Description of the test. Default: "no description"
  • timeframe (str, optional) – Timeframe of the test. Default: None
Attributes:
testtype

str: String containing the test type.

Methods

plot(wells[, exclude, fig, ax]) Generate a plot of the pumping test.
plot(wells, exclude=None, fig=None, ax=None, **kwargs)[source]

Generate a plot of the pumping test.

This will plot the test on the given figure axes.

Parameters:
  • ax (Axes) – Axes where the plot should be done.
  • wells (dict) – Dictonary containing the well classes sorted by name.
  • exclude (list, optional) – List of wells that should be excluded from the plot. Default: None

Notes

This will be used by the Campaign class.

testtype

String containing the test type.

Type:str
class PumpingTest(name, pumpingwell, pumpingrate, observations=None, aquiferdepth=1.0, aquiferradius=inf, description='Pumpingtest', timeframe=None)[source]

Bases: welltestpy.data.testslib.Test

Class for a pumping test.

This is a class for a pumping test on a field site. It has a name, a descrition, a timeframe and a pumpingwell string.

Parameters:
  • name (str) – Name of the test.
  • pumpingwell (str) – Pumping well of the test.
  • pumpingrate (float or Variable) – Pumping rate of at the pumping well. If a float is given, it is assumed to be given in m^3/s.
  • observations (dict, optional) – Observations made within the pumping test. The dict-keys are the well names of the observation wells or the pumpingwell. Values need to be an instance of Observation Default: None
  • aquiferdepth (float or Variable, optional) – Aquifer depth at the field site. If a float is given, it is assumed to be given in m. Default: 1.0
  • aquiferradius (float or Variable, optional) – Aquifer radius ot the field site. If a float is given, it is assumed to be given in m. Default: inf
  • description (str, optional) – Description of the test. Default: "Pumpingtest"
  • timeframe (str, optional) – Timeframe of the test. Default: None
Attributes:
aquiferdepth

float: aquifer depth at the field site.

aquiferradius

float: aquifer radius at the field site.

constant_rate

bool: state if this is a constant rate test.

depth

float: aquifer depth at the field site.

observations

dict: observations made at the field site.

observationwells

tuple of str: all well names.

pumpingrate

float: pumping rate variable at the pumping well.

radius

float: aquifer radius at the field site.

rate

float: pumping rate at the pumping well.

testtype

str: String containing the test type.

wells

tuple of str: all well names.

Methods

add_observations(obs) Add some specified observations.
add_steady_obs(well, observation[, description]) Add steady drawdown observations.
add_transient_obs(well, time, observation[, …]) Add transient drawdown observations.
del_observations(obs) Delete some specified observations.
make_steady([time]) Convert the pumping test to a steady state test.
plot(wells[, exclude, fig, ax]) Generate a plot of the pumping test.
save([path, name]) Save a pumping test to file.
state([wells]) Get the state of observation.
add_observations(obs)[source]

Add some specified observations.

Parameters:obs (dict, list, Observation) – Observations to be added.
add_steady_obs(well, observation, description='Steady State Drawdown observation')[source]

Add steady drawdown observations.

Parameters:
  • well (str) – well where the observation is made.
  • observation (Variable) – Observation.
  • description (str, optional) – Description of the Variable. Default: "Steady observation"
add_transient_obs(well, time, observation, description='Transient Drawdown observation')[source]

Add transient drawdown observations.

Parameters:
  • well (str) – well where the observation is made.
  • time (Variable) – Time points of observation.
  • observation (Variable) – Observation.
  • description (str, optional) – Description of the Variable. Default: "Drawdown observation"
del_observations(obs)[source]

Delete some specified observations.

This will delete observations from the pumping test. You can give a list of observations or a single observation by name.

Parameters:obs (list of str or str) – Observations to be deleted.
make_steady(time='latest')[source]

Convert the pumping test to a steady state test.

Parameters:time (str or float, optional) – Selected time point for steady state. If “latest”, the latest common time point is used. If None, it takes the last observation per well. If float, it will be interpolated. Default: “latest”
plot(wells, exclude=None, fig=None, ax=None, **kwargs)[source]

Generate a plot of the pumping test.

This will plot the pumping test on the given figure axes.

Parameters:
  • ax (Axes) – Axes where the plot should be done.
  • wells (dict) – Dictonary containing the well classes sorted by name.
  • exclude (list, optional) – List of wells that should be excluded from the plot. Default: None

Notes

This will be used by the Campaign class.

save(path='', name=None)[source]

Save a pumping test to file.

This writes the variable to a csv file.

Parameters:
  • path (str, optional) – Path where the variable should be saved. Default: ""
  • name (str, optional) – Name of the file. If None, the name will be generated by "Test_"+name. Default: None

Notes

The file will get the suffix ".tst".

state(wells=None)[source]

Get the state of observation.

Either None, “steady”, “transient” or “mixed”.

Parameters:wells (list, optional) – List of wells, to check the observation state at. Default: all
aquiferdepth

aquifer depth at the field site.

Type:float
aquiferradius

aquifer radius at the field site.

Type:float
constant_rate

state if this is a constant rate test.

Type:bool
depth

aquifer depth at the field site.

Type:float
observations

observations made at the field site.

Type:dict
observationwells

all well names.

Type:tuple of str
pumpingrate

pumping rate variable at the pumping well.

Type:float
radius

aquifer radius at the field site.

Type:float
rate

pumping rate at the pumping well.

Type:float
wells

all well names.

Type:tuple of str