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

${\displaystyle Q_{p,t}=\Delta t\cdot q_{t}}$

If a lower threshold Tl,t is defined as well:

${\displaystyle Q_{l,t}=min(0,w_{l,t}-T_{l,t})}$

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

${\displaystyle Q_{u,t}=max(0,T_{u,t}-w_{t,u})}$

If a capacity Qtotal is defined:

${\displaystyle 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.

${\displaystyle \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:

${\displaystyle Q_{p,t}=\Delta t\cdot q_{t}}$

If a lower threshold Tl,t is defined as well:

${\displaystyle Q_{l,t}=max(0,w_{l,t}-T_{l,t})}$

If an upper threshold Tu,t is defined as well:

${\displaystyle Q_{u,t}=min(0,T_{u,t}-w_{t,u})}$

If a capacity Qtotal is defined:

${\displaystyle 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.

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

Where:

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

## Related

The following topics are related to this formula.

Structures
Pump
Models
Surface model