InfoTwin · Tutorial
Rain & Flood Simulation
How to use the simulation panel step by step: parameters, formulas and methods, data sources, validation and limits.
Contents: What it is · Quick start · Parameters (panel reference) · Report · Stop & clear map · Scenarios and display · Methods and formulas · Data sources · Validation and limits · Tips and troubleshooting · References
What the tool does
The Rain & flood simulation panel on the InfoTwin map simulates how surface water moves over the terrain around the map centre. You can let rain fall, raise a river above its normal level, add a breach or inflow point, and watch the water depth and flow speed develop in time on the map. It is meant for understanding where water collects and flows during heavy rain and river floods, and for comparing the result with the official hazard maps. The settings and the result can be written to a text report, and one button clears everything from the map again.
Important: this is a simplified, illustrative model. It is not a calibrated hydraulic model, not a flood forecast and not suitable for risk assessment or planning decisions. See Validation and limits.
Quick start (step by step)
- Open /infotwin/. Move and zoom the map so the place you are interested in is in the centre of the map. The simulated square is always centred on the map centre. For street-level detail zoom to about level 15–16.
- Open the simulation panel (top right, blue header Rain & flood simulation). Under 1 · Area & terrain choose the Area size (1–20 km) and Resolution, then press Set area at map centre & load terrain. A dashed line shows the area. The status box reports the cell size, elevation range, number of building, river and tree-canopy cells, closed basins found, and the terrain source. Loading takes a few seconds (up to about a minute for 20 km at the highest resolution).
- Choose the rain under 2 · Rain: intensity (mm/h) with the presets Light, Moderate, Heavy, Extreme, and the duration in minutes.
- Optional: tune 3 · Ground & flow (infiltration, sewer capacity, roughness, pumps, trees) and 4 · River flood / breach inflow (river level rise, inflow points).
- Choose how to show the result under 5 · Display: water depth, maximum depth so far, or flow velocity, and the colour scale maximum.
- Press ▶ Start in 7 · Run. The simulation runs faster than real time (default 60 simulated seconds per real second; change with Simulation speed). The status box shows the simulated time, rain so far, maximum depth, flooded area, water volumes and the deepest spot. Use ⏸ Pause to stop and Reset water to empty the area again.
- Compare with the official maps in 6 · Official hazard maps (river flood HQ10–50, HQ100, extreme; heavy rain 100-year and extreme 90 mm/h). Hover over the map to read depth, speed and direction at a point.
- Document the result with 9 · Report: a text report with the area, the settings, the result, the data sources and the limits, to copy, download or print as PDF.
- When you are done press ■ Stop & clear map at the bottom of the panel: it stops the run and removes the area, the water, the canopy, pumps, inflows, river layers and legends from the map.
Tip: to start from a known situation use the scenario buttons Heavy rain only, River flood only and Rain + river flood (see Scenarios and display).
Parameters (panel reference)
1 · Area & terrain
| Parameter | Values (default) | Meaning |
|---|---|---|
| Area size | 1, 2 (default), 3, 5, 6, 7, 8, 9, 10, 15, 20 km | Edge length of the simulated square around the map centre. 10–20 km give regional overview with 30–60 m cells. |
| Resolution | 200², 320² (default), 480², 640² cells | Number of grid cells per side. Cell size = area ÷ resolution (2 km at 320² ≈ 6.3 m; 20 km at 640² ≈ 31 m). Higher resolution is more detailed but slower (cost grows with the square of the resolution). |
| Buildings block water | on | Building footprints from the map data are raised by 25 m so water flows around them and never through them. No infiltration is applied on buildings. |
| Rivers & lakes drain water | on | Water bodies from the map data are treated as a fixed water level; water reaching them leaves the land surface (see river handling). |
| Tree canopy | on | Trees intercept rain and increase infiltration. From the NRW laser-scan surface model (DOM minus DGM) where available, otherwise from OpenStreetMap woodland. |
| Confirm canopy with colour-infrared photo | on | Uses the NRW colour-infrared orthophoto to remove non-vegetation (bridges, vehicles, walls) from the laser-scan canopy. |
| Open edges | on | Water that reaches the border can leave the area. Switch off to make the border a closed wall. |
Canopy options and basins are detected when the area is loaded: press Set area again after changing them.
2 · Rain
| Parameter | Range (default) | Meaning |
|---|---|---|
| Rain intensity | 0–200 mm/h (50) | Uniform rain over the whole area. Presets: Light 5, Moderate 20, Heavy 50, Extreme 100 mm/h. |
| Rain duration | 1–360 min (60) | Rain falls from time 0 until this duration, then stops; the simulation continues so you see the water drain or pond. |
3 · Ground & flow
| Parameter | Range (default) | Meaning |
|---|---|---|
| Infiltration (soil) | 0–60 mm/h (5) | Constant rate at which water soaks into the ground on all non-building cells. Set 0 for sealed surfaces or saturated soil. |
| Sewer drainage capacity | 0–60 mm/h (10) | Constant rate removed by the sewer system on all non-building cells while there is water. Set 0 to see the case with failed or overloaded sewers. |
| Roughness (Manning n) | 0.01–0.15 (0.035) | Surface roughness. Larger values slow the flow (typical order of magnitude: 0.02 smooth surfaces, 0.035 default urban, 0.1 dense vegetation; see Chow, 1959). |
| Max flow velocity | 1–10 m/s (5) | Upper limit of the flow speed, for numerical stability. |
| Pumps at closed basins / underpasses | on | Places a pump at each detected closed depression (purple dots). |
| Pump capacity per basin | 0–3 m³/s (0.3) | Water removed per second at each basin while it holds water. |
| Canopy interception capacity | 0–5 mm (1.5) | Rain that a fully covered cell can hold on leaves before it reaches the ground. |
| Infiltration under trees | 1–5 × (2) | Multiplier of the soil infiltration rate under full canopy cover. |
4 · River flood / breach inflow
| Parameter | Range (default) | Meaning |
|---|---|---|
| River level rise | 0–20 m (0) | Raises the river water level above its level in the terrain data. Water then spreads over the banks wherever the land is lower. The panel shows the base level and the raised level in m a.s.l. |
| Presets (Frequent HQ10-like, HQ100-like, Extreme-like) | 44.5 / 45 / 50 m a.s.l. | River levels calibrated against the official NRW maps for the Rhine in central Cologne (base level about 39 m). They only work for that river; set the rise manually elsewhere. |
| Inflow discharge | 0–1000 m³/s (50) | Discharge of the next inflow point you place. |
| Add inflow point / Clear inflows | Click the map to place a point source (for example a dike breach or burst pipe); the discharge is spread over the 3×3 cells around the point. Points on a building or river are moved to the nearest free cell. |
5 · Display
| Parameter | Values (default) | Meaning |
|---|---|---|
| Show | Water depth (default), Maximum depth so far, Flow velocity | Depth now, the maximum depth reached in each cell since the start, or the current flow speed. |
| Colour scale maximum | 0.2–5 (1.5) | Depth in m (or speed in m/s) that gets the darkest colour. The scale is square-root shaped so shallow water stays visible. |
| Opacity | 20–100 % (80) | Transparency of the water layer. |
| Rain animation | on | Draws falling rain while it is raining. |
| Show tree canopy | off | Green overlay of the canopy; darker means denser cover. |
6 · Official hazard maps
Overlays the official maps for comparison: river flood frequent (HQ10–50), HQ100 and extreme (Hochwassergefahrenkarten NRW, LANUV) and heavy rain, rare (100-year) and extreme 90 mm/h (BKG Starkregengefahrenhinweiskarte). The overlay opacity slider and the legend are shown below the selector. The official maps are available for Germany (river flood maps for NRW).
7 · Run
| Control | Meaning |
|---|---|
| Simulation speed (5–600 s/s, default 60) | Simulated seconds per real second. The tool shows when your computer cannot keep up. |
| ▶ Start / ⏸ Pause | Starts or pauses the run. |
| Reset water | Empties the area and sets time, volumes and maximum depths back to zero. |
The status box shows: simulated time, rain so far, maximum depth, flooded area above 5 cm and 50 cm, pumped volume, intercepted volume, water on the ground, volume drained to rivers, volume entering from rivers, volume that left the area, and the deepest spot with its coordinates and a note whether it is a closed basin, an underpass or a closed pocket such as a courtyard.
8 · About & accuracy
Short summary of the comparison with the official NRW and BKG maps for central Cologne (flooded-area overlap for the extreme river flood, HQ100 and the extreme heavy rain), and of the limits outside NRW. See also Validation and limits.
9 · Report
| Control | Meaning |
|---|---|
| Generate report | Writes a text report: centre and size of the area, cell size, terrain source, buildings, rivers, canopy and basins; rain, ground and flow settings; river rise and inflow points; the display and official overlay; the result in the status box including the deepest spot; the maximum depth and the area flooded deeper than 5 cm and 50 cm over the whole run; method, data sources and limits. |
| Copy | Copies the report to the clipboard. |
| Download .txt | Saves the report as a plain text file. |
| Print / save as PDF | Opens the report with a picture of the current map view in a new window and starts the print dialog; choose Save as PDF there. Allow pop-ups for this site. |
Create the report after the run (or pause it) so that it contains the final numbers; press Generate report again to refresh it.
Stop & clear map
The button ■ Stop & clear map is always visible at the bottom of the panel. It stops the simulation and removes everything it put on the map: the area frame, the water, the canopy and pump layers, inflow points, the river and flow add-on layers, the official overlay and the legends. The settings stay as they are; press Set area to start again.
Working with the panel
- Each step is a section that you can fold and unfold with the triangle in front of its heading; steps 1, 2 and 7 are open at the start.
- Pause keeps the water where it is; Reset water empties the area but keeps it loaded, so you can run another rain or river scenario at once; ■ Stop & clear map removes the area and everything on the map.
- The flood panel and the urban heat panel are independent: each has its own report and its own Stop & clear map, and clearing one does not clear the other.
Scenarios and display
Three scenario buttons at the top of the panel set the rain and river level in one click and reset the water:
- Heavy rain only: 50 mm/h for 60 min, river at its normal level.
- River flood only: no rain, river raised to an HQ100-like level (Rhine, Cologne). For other rivers the level is set 1 m above the local bank.
- Rain + river flood: both together (a compound event). Local rain does not raise a large river by itself, which is why the two are separate inputs.
The legend (bottom left of the map) shows the colour scale and the active rain and river scenario. While the simulation is loaded, hovering over the map shows depth, speed and flow direction at the pointer, or the river level over a river. The 3D buildings are shown from OpenStreetMap footprints on any basemap.
Methods and formulas
Shallow-water model
The terrain is a regular grid of cells (size Δx) with ground elevation z. Each cell holds a water depth h. Water moves between neighbouring cells with a local-inertial simplification of the shallow-water equations (Bates et al., 2010), which is stable at large time steps and widely used for flood inundation modelling.
Flow between two cells i and j (per unit width, updated every time step Δt):
h_f = max(z_i + h_i, z_j + h_j) − max(z_i, z_j) q_new = ( q − g * h_f * Δt * (η_j − η_i)/Δx ) / ( 1 + g * Δt * n² * |q| / h_f^(7/3) ) η = z + h (water surface), |q| ≤ v_max * h_f
g = 9.81 m/s² is gravity, n the Manning roughness and h_f the flow depth between the cells. Flow is zero when h_f is below 1 mm. The flux out of a cell is limited so a cell can never lose more water than it holds.
Depth update (mass balance) for each cell:
h_new = h + (Δt/Δx) * (Σ q_in − Σ q_out) + rain_eff*Δt − (I_eff + S)*Δt
with rain in m/s = intensity (mm/h) ÷ (3.6 * 10⁶), infiltration I and sewer drainage S in m/s likewise, and depth never below zero.
Time step: Δt = min(5 s, 0.7 * Δx / √(g * h_max)), adapted every step to the deepest water in the area (CFL condition).
Rain, trees, infiltration and sewers
- Rain is uniform in space and constant in time until the chosen duration.
- Each land cell has a canopy fraction c (0–1). A canopy store of size c * C (C = interception capacity) is filled first from the rain; only the rest reaches the ground. The interception volume is reported in the status box.
- Infiltration on non-building cells: I_eff = I * (1 + c * (f − 1)), where I is the soil rate and f the tree multiplier.
- Sewer drainage S is a constant sink on non-building cells; neither infiltration nor sewer capacity depends on soil saturation or on the real sewer network.
Buildings
Building footprints are rasterised to the grid and raised by 25 m. Water cannot enter, and rain falling on them runs off at their edges.
Rivers and lakes
Water bodies (connected groups of at least 40 cells, about 1500 m²; smaller ponds and pools are treated as land) are held at a fixed level. The level surface is a plane z = a + b*x + c*y fitted by trimmed least squares to the terrain under the main water body (robust against sandbars and terraces, slope limited to 5 m/km), plus the river level rise. Water reaching a river cell leaves the land surface; when the level is raised above the banks, water enters from the river cell by cell. Cells whose terrain is far from the fitted surface are treated as land.
Closed basins and pumps
Depressions that cannot drain are found by a priority-flood fill of the terrain (Barnes et al., 2014). A depression is a basin when its fill depth is at least 15 cm, its deepest part at least 0.4 m, its area at most 2 ha, and it is not a building or water cell. Up to the 150 deepest basins get a pump at their lowest cell, each removing the pump capacity (m³/s) from the water in the basin.
Inflow points and open edges
An inflow of Q m³/s adds Q*Δt / (9*Δx²) metres of depth to each of the 3×3 cells around the point every step. At open edges, water leaves with the critical-flow rate min(v_max, √(g*h)) * h.
Display
Depth and speed are drawn as a colour ramp of √(value / scale maximum). Depths below 2 mm (1 cm for speed), buildings and (unless the river is raised) river cells are not drawn. Speed is the cell-centre flow q/h limited to v_max.
Data sources
| Data | Source | Licence |
|---|---|---|
| Terrain (NRW) | Geobasis NRW digital terrain model DGM1 (1 m laser scan) via WCS | dl-de/zero-2.0 |
| Terrain (elsewhere) | Mapterhorn open terrain tiles (Copernicus GLO-30 DEM and national lidar); AWS Terrain Tiles as fallback | Copernicus DEM, © DLR e.V. and © Airbus Defence and Space GmbH; open data |
| Tree canopy | Geobasis NRW digital surface model DOM minus DGM1; colour-infrared orthophoto (iDOP CIR) for confirmation; OSM woodland where there is no laser scan | dl-de/zero-2.0, dl-de/by-2-0, ODbL |
| Buildings, water bodies, woodland | OpenStreetMap via OpenFreeMap vector tiles | ODbL, © OpenStreetMap contributors |
| Official river flood maps | Hochwassergefahrenkarten NRW (LANUV NRW) | dl-de/zero-2.0 |
| Official heavy-rain maps | Starkregengefahrenhinweiskarte (BKG) | dl-de/by-2-0 |
| Basemaps and 3D buildings | OpenFreeMap, OpenStreetMap, basemap.de LoD2 (BKG) and others as listed in the map attribution | see map |
The model runs entirely in your browser; no simulation data is sent to a server.
Validation and limits
The tool was compared with the official NRW and BKG maps for central Cologne (2 km, NRW laser terrain), using the flooded-area overlap (intersection over union, IoU):
- River flood, extreme scenario: IoU 0.78 at a river level of 50 m a.s.l.
- River flood, HQ100: IoU 0.50 at 45 m a.s.l. (like the model, the official river flood maps assume no technical flood protection).
- Heavy rain, extreme 90 mm/h (no sewers, no infiltration): IoU 0.40 for depths ≥ 10 cm and 0.34 for ≥ 30 cm; the simulated flooded areas are within about 20 % of the official ones.
Limitations
- This is an illustrative model. It is not calibrated for a specific site, it is not a forecast, and it must not be used as a basis for risk assessment.
- Uniform rain and constant infiltration and sewer rates; no real sewer network, culverts, bridges, dikes or flood walls other than what is in the terrain model.
- Terrain is a gridded surface model: small features (kerbs, walls, narrow gaps) are smoothed; at 10–20 km the cells are 30–60 m.
- Buildings and rivers come from the loaded map tiles: if the map is zoomed out when you press Set area, there may be no building or river data. Zoom in, wait for the map to finish loading, then set the area.
- Outside NRW the terrain is coarser (about 30 m), there is no laser-scan canopy, and the official river maps do not exist. The river presets are calibrated for the Rhine in Cologne only.
Tips and troubleshooting
- No buildings or river in the status text: zoom to level 14–16 on the area, wait until the map tiles are drawn, then press Set area again.
- Slow or stuttering: reduce the resolution or area size, or lower the Simulation speed. Close other tabs that use the graphics card.
- Water ponds in a street or underpass: this is a closed depression. Check the deepest-spot note; increase the pump capacity or the sewer capacity to see the effect.
- River floods nothing: check that an area with a river was loaded and raise the River level rise (or use the HQ100-like preset in Cologne).
- Compare with official maps: switch the display to Maximum depth so far, run the full rain event, then open step 6.
- Another run in the same area: press Reset water, change the rain or river settings and press Start. You do not need to load the area again unless you changed options in step 1.
- Report is empty or shows no result: load an area and run (or pause) the simulation first, then press Generate report in step 9. If the print window does not open, allow pop-ups for this site.
- Map goes white or the 3D layer disappears: reload the page; this happens when the browser runs out of graphics memory.
References
Literature
Barnes, R., Lehman, C., Mulla, D. (2014). Priority-Flood: An optimal depression-filling and watershed-labeling algorithm for digital elevation models. Computers & Geosciences, 62, 117–127. https://doi.org/10.1016/j.cageo.2013.04.024
Bates, P. D., Horritt, M. S., Fewtrell, T. J. (2010). A simple inertial formulation of the shallow water equations for efficient two-dimensional flood inundation modelling. Journal of Hydrology, 387(1–2), 33–45. https://doi.org/10.1016/j.jhydrol.2010.03.027
Chow, V. T. (1959). Open-Channel Hydraulics. McGraw-Hill, New York.
Data and services
BKG: Starkregengefahrenhinweiskarte (heavy-rain hazard indication map), WMS service of the Federal Agency for Cartography and Geodesy, dl-de/by-2-0, https://www.bkg.bund.de.
Copernicus DEM GLO-30, produced using Copernicus WorldDEM-30 © DLR e.V. 2010–2014 and © Airbus Defence and Space GmbH 2014–2018 provided under COPERNICUS by the European Union and ESA; all rights reserved. https://registry.opendata.aws/copernicus-dem/
Geobasis NRW: digital terrain model DGM1, digital surface model DOM and colour-infrared orthophotos, https://www.opengeodata.nrw.de.
LANUV NRW: Hochwassergefahrenkarten NRW (river flood hazard maps), WMS service, dl-de/zero-2.0.
Mapterhorn open terrain tiles, https://mapterhorn.com/attribution/.
OpenStreetMap contributors (ODbL), https://www.openstreetmap.org/copyright; vector tiles from OpenFreeMap, https://openfreemap.org.

