# Pump formula (Water Overlay)

Pumps are hydraulic structures can pump water from one location to another.

The direction the pump pumps in is based on the water level at either end of the pump. A pump pumps water from the area with a lower water level to the area with a higher water level. If no (differing) water levels are defined, the surface height is used instead. The direction is determined during the initialization phase of the hydrological model, and does not change during the calculation even when water levels change.

A negative pump speed is also allowed. This will cause the pump to be "draining", rather than "pumping". This will cause water to be moved in the opposite direction.

The amount being pumped or drained is dependent on the water levels on both sides of the pump.

*Case 1: Pumping:*

First the flow capacities are calculated.

If a positive Pump q is defined:

If a lower threshold T_{l,t} is defined as well:

If an upper threshold T_{u,t} is defined as well:

If a capacity Q_{total} is defined:

After calculating the capacities, the actual water pumped upwards is calculated. If any of the terms are undefined, they are not included.

*Case 2: Draining:*

First the flow capacities are calculated.

If a negative Pump q is defined:

If a lower threshold T_{l,t} is defined as well:

If an upper threshold T_{u,t} is defined as well:

If a capacity Q_{total} is defined:

After calculating the capacities, the actual water pumped upwards is calculated. If any of the terms are undefined, they are not included.

Where:

- = The water level at the lower water level entry at time t, relative to datum.
- = The water level at the upper water level entry at time t, relative to datum.
- = The LOWER_THRESHOLD of the pump at time t.
- = The UPPER_THRESHOLD of the pump at time t.
- = The PUMP_Q of the pump at time t.
- = Computational timestep.
- = The pump capacity, defined in INLET_CAPACITY of the pump.
- = The calculated previous amounts of flow.
- = The desired amount of water at the entry based on the pump's LOWER_THRESHOLD attribute.
- = The desired amount of water at the exit based on the pump's UPPER_THRESHOLD attribute.
- = The PUMP_Q at time for timestep , which is the amount of water the pump can possibly pump (or drain, when negative).
- = The maximum amount of water flow based on the total capacity of the pump.
- = Size of the entry/exit area in , based on the amount of cells and cell size. Current implementation only has one cell.
- = The amount of water flow which takes place.

## Related

The following topics are related to this formula.

- Structures
- Pump
- Models
- Surface model