# 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:

$Q_{p,t}=\Delta t\cdot q_{t}$ If a lower threshold Tl,t is defined as well:

$Q_{l,t}=min(0,w_{l,t}-T_{l,t})$ If an upper threshold T_{u,t} is defined as well:

$Q_{u,t}=max(0,T_{u,t}-w_{t,u})$ If a capacity Qtotal is defined:

$Q_{c}=Q_{total}-\sum _{0..t-1}Q_{i}$ After calculating the capacities, the actual water pumped upwards is calculated. If any of the terms are undefined, they are not included.

$\Delta w={\frac {max(0,min(Q_{l,t},Q_{u,t},Q_{t},Q_{c}))}{A}}$ Case 2: Draining:
First the flow capacities are calculated.

If a negative Pump q is defined:

$Q_{p,t}=\Delta t\cdot q_{t}$ If a lower threshold Tl,t is defined as well:

$Q_{l,t}=max(0,w_{l,t}-T_{l,t})$ If an upper threshold Tu,t is defined as well:

$Q_{u,t}=min(0,T_{u,t}-w_{t,u})$ If a capacity Qtotal is defined:

$Q_{c}=Q_{total}-abs(\sum _{0..t-1}Q_{i})$ After calculating the capacities, the actual water pumped upwards is calculated. If any of the terms are undefined, they are not included.

$\Delta w={\frac {max(0,max(Q_{l,t},Q_{u,t},Q_{t},-Q_{c}))}{A}}$ Where:

• $w_{t,l}$ = The water level at the lower water level entry at time t, relative to datum.
• $w_{t,u}$ = The water level at the upper water level entry at time t, relative to datum.
• $T_{l,t}$ = The LOWER_THRESHOLD of the pump at time t.
• $T_{u,t}$ = The UPPER_THRESHOLD of the pump at time t.
• $q_{t}$ = The PUMP_Q of the pump at time t.
• $\Delta t$ = Computational timestep.
• $Q_{total}$ = The pump capacity, defined in INLET_CAPACITY of the pump.
• $Q_{0..n}$ = The calculated previous amounts of flow.
• $Q_{l,t}$ = The desired amount of water at the entry based on the pump's LOWER_THRESHOLD attribute.
• $Q_{u,t}$ = The desired amount of water at the exit based on the pump's UPPER_THRESHOLD attribute.
• $Q_{t}$ = The PUMP_Q at timestep $\Delta t$ , which is the amount of water the pump can possibly pump (or drain, when negative).
• $Q_{c}$ = The maximum amount of water flow based on the total capacity of the pump.
• $A$ = Size of the entry/exit area in $m^{2}$ , based on the amount of cells and cell size. Current implementation only has one cell.
• $\Delta w$ = The amount of water flow which takes place.

## Related

The following topics are related to this formula.

Structures
Pump
Models
Surface model