business.groundwater package

This package models the borehole and the acquifer as a whole.

Classes

  • BoreholeCheck:

    performs hydraulic check calculations once the hydraulic hardware is set

  • BoreholeDesign:

    allows to design the borehole the once the demand and the environmental data are set

Exceptions: (see exceptions)

exceptions raised by the Borehole are intercepted by the PumpStation during the execution of hydraulic design and hydraulic check calculations.

Submodules

business.groundwater.boreholes module

Models how much water may be abstracted from a borehole.

class business.groundwater.boreholes.BaseBorehole(**kwargs)

Bases: business.groundwater.plots.PerformancePlotMixin, business.commons.loggers.InitLogger

Represent (simplistically) a borehole.

Functionality: the class takes in account only two parameters: * the flow-dwl relationship * the drilled bore

Notes

More specifically, other parameters are not included in this model: * drilled depth * depth of solid casing * depth of screen. These shall be included in a future version.

Also, the flow-dwl relation is passed as a tuple of 2-tuples. This version does not include any study of step-tests, recoveryand continuous discharge test. The maximum licensed abstraction is assumerd to be the highest flow for which the flow-dwl relation was provided.

When the pump is started the water in the borehole lowers its level. This model is in charge of evaluating the flow vs. drawdown curve. The greater the flow rate through the pump, the larger the drop in water table elevation in the borehole.

_get_max_allowed_water_flow : Quantity("volume/time")

get the maximum amount of water that may be abstracted,

get_pump_depth_down_the_hole : Quantity("length")

get the depth of the pump below ground surface,

water_flow : Quantity("volume/time")

get the abstracted water flow.

property dwl

Return the current drawdown.

Returns

Return type

Quantity(“length”)

property get_flow_range

Return a sequence of equidistant water flows.

The range of water flows spans from ‘zero’ to the maximum sustainable yield from the borehole (i.e.: from the water source).

The return values are rounded since this appeared to be necessary during the hydraulic friction calculations (refer to methods _darcy_weisbach and _gs042)

Returns

an array of dimensional values (Quantity(“volume/time”)) with np.float64 magnitudes and rounded.

Return type

np.array

property water_flow

Get or set the current pumped water flow.

Setting the flow to a new value will reconfigure the borehole and evaluate a new value of drawdown and pump setting.

Raises

AquiferDepletion – if the proposed water flow exceeds the limits imposed by _get_max_allowed_water_flow.

class business.groundwater.boreholes.BoreholeCheck(**kwargs)

Bases: business.groundwater.boreholes.BaseBorehole

Override a borehole and add functionalities to solve the hydraulic check problem.

Note

A check borehole does not need the drilled bore (unlike the design borehole) because in the check problem the riser bore is already known from input data. The drilled bore is therefore useless for the hydraulic check calculations.

property get_pump_depth_down_the_hole

Return the pump depth set by the input data of the hydraulic check problem.

Note

This method is present in both BoreholeCheck and BoreholeDesign but the two implementations differ, rerlecting the different nature of the hydraulic design and hydraulic check problems.

Returns

the input data.

Return type

Quantity(“length”)

property water_flow

Get or set the current pumped water flow.

Setting the flow to a new value will reconfigure the borehole and evaluate a new value of drawdown and pump setting.

Raises

AquiferDepletion – if the proposed water flow exceeds the limits imposed by _get_max_allowed_water_flow.

class business.groundwater.boreholes.BoreholeDesign(**kwargs)

Bases: business.groundwater.boreholes.BaseBorehole

Borehole for calculations during the ‘hydraulic design’.

A ‘design’ borehole has a known dwl curve; therefore it has also a known drilled bore. More precisely, a ‘design’ borehole is a borehole considered for a ‘hydraulic design problem’ of a water supply system, but it is assumed that the borehole itsef was already drilled, and its aquifer studied through the pumpin test.

property get_pump_depth_down_the_hole

Return the suitable pump depth compatible with the pumped flow.

Returns

the minimum suitable depth of the pump body. Positive values point ‘into’ the ground.

Return type

Quantity(“length”)

class business.groundwater.boreholes.DwlVsFlowPoint(water_flow: pint.quantity.build_quantity_class.<locals>.Quantity, dwl: pint.quantity.build_quantity_class.<locals>.Quantity)

Bases: tuple

Represent a point in the 2-d planee whose coordinates are “_water_flow” and “dwl”.

_water_flow - the abscissa: abstracted _water_flow from borehole dwl - the ordinate: observed water level when pumping at _water_flow rate.

Units of measure:
  • _water_flow: Quantity(“volume/time”)

  • dwl: Quantity(“length”)

property dwl

Alias for field number 1

property water_flow

Alias for field number 0

business.groundwater.constants module

Collection of constants used and exported by ‘groundwater’ package.

business.groundwater.constants.DEFAULT_SUBMERGENCE = <Quantity(3, 'meter')>

Prescribes the minimum difference between the pump depth and the drawdown.

business.groundwater.exceptions module

Collection of the exceptions raised inside groundwater package.

exception business.groundwater.exceptions.AquiferDepletion

Bases: business.groundwater.exceptions.UnadvisableExploitation

A BaseBorehole is set with exaggerate _water_flow.

exception business.groundwater.exceptions.CorruptedDrawdownData

Bases: business.groundwater.exceptions.ImproperlyConfiguredBorehole

A drawdown csv file can be read but the data make no logical sense.

Example

  • the csv columns contain string instead of positive floats,

  • the csv columns are unexpectedly empty.

exception business.groundwater.exceptions.ImproperlyConfiguredBorehole

Bases: business.commons.exceptions.ImproperlyConfiguredWaterSystem

Some data needed to describe the BaseBorehole (and its derived classes) are missing.

exception business.groundwater.exceptions.NonsensicalDrawdownData

Bases: business.groundwater.exceptions.ImproperlyConfiguredBorehole

A file can be read but the data make no logical sense.

Raised when the csv data are not monotonic, where expected.

exception business.groundwater.exceptions.PumpRunningDry

Bases: business.groundwater.exceptions.UnadvisableExploitation

A BaseBorehole is set with _water_flow so high that the water level descreases and leaves the pump run dry.

exception business.groundwater.exceptions.SwlDataMissing

Bases: business.groundwater.exceptions.ImproperlyConfiguredBorehole

The static water level could not be inferred from anay data.

Raised when the first row of a csv drawdown file does not bear the value 0 for the water flow.

exception business.groundwater.exceptions.UnadvisableExploitation

Bases: business.commons.exceptions.UnadvisableDuty

The rate of pumping is excessive and may damage the borehole.

This exceptions may be raised when too much water is abstracted from the borehole. The classes that ovveride this exception detail the various problems that may occur with excessive abstraction of water. HAESTADT

business.groundwater.plots module

Provide matplotlib functionalities to plot the data.

Notes

This module is based on third-party <matplotlib> library.

class business.groundwater.plots.PerformancePlotMixin

Bases: object

A mixin class used to lookup drawdown data and then format them according to matplotlib interface.

get_dwl_curve_as_matplotlib()

returns the drawdown curve

property get_dwl_curve_as_matplotlib

Return the drawdown vs. the water flow.

The drawdown curve is a collection of (flow, drawdown) discrete points.

Returns

  • 2-tuple of N-tuples

  • first N-tuple (Quantity(“length”))

  • second N-tuple (Quantity(“volume/time”)) – the first tuple is the sequence of discrete values of drawdown the second tuple is the sequence of discrete values of water flows

business.groundwater.units module

Collection of the units used by groundwater package. PIERGIORGIO2: è giusto dire che groundwater è un package?

business.groundwater.units.DWL_UNITS = <Unit('meter')>

Prescribes the units to measure the water level in inside the borehole.

business.groundwater.units.SWL_UNIT = <Unit('meter')>

Prescribes the units to measure the water level in inside the borehole.