File size: 11,098 Bytes
3e5b689
 
b6f453a
 
 
 
 
 
8aa520d
b6f453a
 
 
 
 
3e5b689
b6f453a
8aa520d
b6f453a
8aa520d
b6f453a
8aa520d
 
 
b6f453a
 
 
 
 
 
 
 
8aa520d
 
 
 
b6f453a
 
 
8aa520d
 
 
 
 
b6f453a
 
 
8aa520d
b6f453a
 
 
 
 
8aa520d
b6f453a
 
 
8aa520d
b6f453a
 
 
8aa520d
b6f453a
 
 
 
 
8aa520d
b6f453a
8aa520d
b6f453a
 
 
 
 
8aa520d
b6f453a
8aa520d
 
 
b6f453a
8aa520d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b6f453a
 
 
8aa520d
b6f453a
8aa520d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b6f453a
 
 
 
 
8aa520d
 
b6f453a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8aa520d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
---
license: apache-2.0
library_name: onnx
pipeline_tag: image-to-image
tags:
- urban-wind
- pedestrian-wind
- wind-comfort
- wind-field
- cfd
- lattice-boltzmann
- surrogate-model
- u-net
- onnx
---

# Sreda ML 0.6.2: wind around buildings from 0 to 6 m

Sreda ML predicts the time-averaged wind around buildings from their footprints and heights: the mean speed and the three mean velocity components on eight layers from the ground to 6 m, and from them the wind speed at pedestrian level, 1.75 m above the ground. It is a neural surrogate of the Sreda lattice Boltzmann solver (D3Q27, cumulant collision, large eddy simulation): it was trained on solver results for real and synthetic city blocks and answers in one to two seconds per 150 × 150 m window on a laptop, where the solver needs from tens of minutes to a few hours on a desktop GPU.

From version 0.6.2 one network gives both the pedestrian wind map and the field above it; earlier versions (up to 0.6.1, previous commits of this repository) predicted the pedestrian level only.

**Status: preview.** Version 0.6.2 did not pass its own acceptance test, written down before training (details in Evaluation). Use it for early design studies and for comparing options. Do not use it to approve a design or to certify wind comfort; check important decisions with a full simulation or a wind tunnel test.

## Quick start

```bash
pip install numpy onnxruntime
python sreda_ml_example.py model.onnx 270 5
```

`sreda_ml_example.py` builds the model inputs from building footprints the same way as the Sreda web app (frame, context raster and mirror), runs the model and returns, on a 0.75 m grid with the x, y coordinates of every cell:

- `predict`: K at 1.75 m, the pedestrian wind map of the Sreda app. Wind speed in m/s: `K × 0.494 × U10`, where U10 is the wind speed at 10 m.
- `predict_field`: all eight layers: mean speed and u, v, w, and the horizontal mean velocity turned to the scene axes x, y.

## What the model predicts

Eight layers 0.75 m thick, centred at 0.375, 1.125, 1.875, 2.625, 3.375, 4.125, 4.875, 5.625 m above the ground. In every cell: the time-averaged speed ⟨|U|⟩ and the time-averaged velocity components u (downstream), v (across the flow) and w (up), each divided by U_in, the speed of the undisturbed inflow at 1.75 m. The inflow is a logarithmic profile with roughness length z0 = 0.5 m, so U_in = 0.494 U10.

K at 1.75 m is the mean speed interpolated linearly between the layers at 1.125 m and 1.875 m: K = (1/6) ⟨|U|⟩(1.125 m) + (5/6) ⟨|U|⟩(1.875 m). The Sreda app draws its pedestrian map with the same formula.

Neutral atmosphere, flat ground, one wind direction per prediction, mean values only (no gusts).

## Inputs and output

All rasters are in wind axes: columns run downstream, rows run across the flow (the downstream axis turned by +90°). Cell size 0.75 m. Batch of two: the frame and its mirror (rows reversed); the prediction is the mean of the first output and the second output with its rows reversed back and the sign of v changed.

| Tensor | Shape | Content |
|---|---|---|
| `frames` | float32 [2, 3, 288, 352] | 216 m across × 264 m along the wind, from 96 m upwind to 18 m downwind of the window and 33 m to each side. Channels: building mask; building height / 30 m; signed distance to the nearest wall / 10 m, clipped to [−2, 5], negative inside buildings |
| `ctx` | float32 [2, 3, 100, 88] | Surroundings on a 6 m grid around the window centre: 435 m upwind to 93 m downwind, ±300 m across. Channels: built fraction; mean height of the built part / 30 m; maximum height / 30 m |
| `field` | float32 [2, 32, 288, 352] | Channel 8q + k: quantity q (0 mean speed, 1 u, 2 v, 3 w), layer k (0 to 7, from the ground up), divided by U_in; valid only in the 150 × 150 m window, rows 44 to 243 and columns 128 to 327 |

Sites larger than one window: windows on a 120 m grid, blended with weights that fall towards the window edges (implemented in the example). Buildings standing on the ground only; bridges and raised volumes are not seen.

Ensemble of 3 U-Nets (seeds 0, 1, 2), 18.2 M parameters, ONNX opset 17, 72.8 MB. One call (one window, frame and mirror) takes about 1.5 s on a laptop CPU with onnxruntime.

## Training data

Labels come from the Sreda solver: flat ground, 6 m base grid refined to 0.75 m near buildings and in the 150 m window from the ground to 6 m, turbulent logarithmic inflow (z0 = 0.5 m, 5 m/s at 10 m), mean values averaged over the simulated time. One wind direction per scene. Part of the labels were computed by a CUDA port of the same solver; it passed a calibration against the WebGPU solver within seed-to-seed noise before its labels were used.

| Source | Scenes | Data licence |
|---|---|---|
| Synthetic building arrays generated by Sreda | 312 | Own data |
| Japanese cities, 3D city models of Project PLATEAU | 110 | Project PLATEAU, MLIT Japan (PLATEAU terms of use, compatible with CC BY 4.0) |
| Cities of Russia and Belarus, buildings from OpenStreetMap | 344 | OpenStreetMap contributors (ODbL 1.0) |
| European cities: Berlin, Amsterdam, Rotterdam, Paris | 104 | Berlin LoD2 (dl-de/zero-2-0), 3DBAG by tudelft3d and 3DGI (CC BY 4.0), IGN BD TOPO (Licence Ouverte 2.0) |
| **Total** | **870** | |

Heights of Russian and Belarusian buildings are OpenStreetMap levels × 3 m; sites were taken where heights are known for at least 98 % of the built area. Test cities and test sites were never used in training.

## Evaluation

### Pedestrian level, 1.75 m

Correlation coefficient r of K between the model and the Sreda solver over the whole window, averaged over scenes; version 0.6.2 next to version 0.6.1, the previous release, on the same scenes.

| Test set (not in training) | Scenes | 0.6.2 | 0.6.1 |
|---|---|---|---|
| Cities of Kazakhstan, Belarus and Russia: Astana, Minsk, Yekaterinburg | 18 | 0.846 | 0.831 |
| · high-rise | 3 | 0.828 | 0.824 |
| · historic centres | 3 | 0.872 | 0.839 |
| · low-rise | 3 | 0.889 | 0.888 |
| · microdistricts (large-panel housing estates) | 3 | 0.858 | 0.832 |
| · mid-rise | 3 | 0.711 | 0.705 |
| · mixed | 3 | 0.916 | 0.896 |
| · Astana | 6 | 0.825 | 0.797 |
| · Minsk | 6 | 0.885 | 0.870 |
| · Yekaterinburg | 6 | 0.827 | 0.825 |
| Japanese cities held out from training | 18 | 0.882 | 0.881 |
| · high-rise | 4 | 0.856 | 0.851 |
| · low-rise, low density | 4 | 0.915 | 0.913 |
| · mid-rise | 5 | 0.850 | 0.853 |
| · blocks similar to the AIJ Niigata district | 5 | 0.909 | 0.907 |
| Osaka | 10 | 0.870 | 0.884 |
| · high-rise | 2 | 0.750 | 0.818 |
| · low-rise, low density | 2 | 0.888 | 0.893 |
| · mid-rise | 3 | 0.895 | 0.890 |
| · blocks similar to the AIJ Niigata district | 3 | 0.913 | 0.916 |

Against wind-tunnel measurements of the Architectural Institute of Japan (AIJ benchmark cases): correlation coefficient C.C. of the speed ratio at the measurement points.

| Case | 0.6.2 | 0.6.1 |
|---|---|---|
| Niigata (AIJ Case E), wind W | 0.868 | 0.868 |
| Niigata (AIJ Case E), wind NNE | 0.681 | 0.665 |
| AIJ Case C, 0H, 0° | 0.955 | 0.954 |
| AIJ Case C, 0H, 22.5° | 0.902 | 0.896 |
| AIJ Case C, 0H, 45° | 0.891 | 0.915 |
| AIJ Case C, 1H, 0° | 0.916 | 0.910 |
| AIJ Case C, 1H, 22.5° | 0.900 | 0.909 |
| AIJ Case C, 1H, 45° | 0.879 | 0.891 |
| AIJ Case C, 2H, 0° | 0.816 | 0.880 |
| AIJ Case C, 2H, 22.5° | 0.770 | 0.806 |
| AIJ Case C, 2H, 45° | 0.885 | 0.911 |
| AIJ Case D, 0° | 0.815 | 0.859 |
| AIJ Case D, 22.5° | 0.883 | 0.869 |
| AIJ Case D, 45° | 0.865 | 0.873 |

### Field, 0 to 6 m

Against the Sreda solver on the same test scenes. Correlation coefficient r of the mean speed ⟨|U|⟩ over the window, per layer, averaged over scenes:

| Test set | 0.375 m | 1.125 m | 1.875 m | 2.625 m | 3.375 m | 4.125 m | 4.875 m | 5.625 m |
|---|---|---|---|---|---|---|---|---|
| Cities of Kazakhstan, Belarus and Russia | 0.815 | 0.833 | 0.847 | 0.853 | 0.862 | 0.836 | 0.815 | 0.803 |
| Japanese cities held out from training | 0.864 | 0.875 | 0.882 | 0.887 | 0.890 | 0.890 | 0.892 | 0.891 |
| Osaka | 0.847 | 0.859 | 0.871 | 0.880 | 0.891 | 0.880 | 0.879 | 0.879 |

Direction of the horizontal mean velocity, angle to the solver's direction in cells where the solver's mean horizontal speed is at least 0.2 U_in (median and 90th percentile, all cells of the set); streamlines at 1.75 m, 30 m long, started every 10 m in the same cells: separation from the solver's streamline averaged along the line and at its end (median and 90th percentile, metres):

| Test set | Angle at 1.125 m | Angle at 4.875 m | Streamline, along the line | Streamline, at the end |
|---|---|---|---|---|
| Cities of Kazakhstan, Belarus and Russia | 9.5° / 34.9° | 7.6° / 29.8° | 2.2 / 8.7 m | 3.9 / 18.7 m |
| Japanese cities held out from training | 10.9° / 48.8° | 8.9° / 49.1° | 3.3 / 13.0 m | 6.0 / 26.1 m |
| Osaka | 9.9° / 33.9° | 7.6° / 28.9° | 2.3 / 8.5 m | 4.0 / 17.5 m |

### Acceptance test

Written down before training:

**Not passed:**

- Pedestrian level, test cities of Kazakhstan, Belarus and Russia: mean r 0.846, required 0.87; mid-rise 0.711, required at least 0.80.
- AIJ wind tunnel: C.C. fell by more than 0.02 against 0.6.1 in Case C (0H 45°, 2H 0°, 2H 22.5°, 2H 45°) and Case D (0°).
- Field 0 to 6 m against the previous field model (0.5, used in the Sreda app, not published here): r of the mean speed fell by more than 0.02 in Osaka, high-rise blocks, from 1.125 to 5.625 m; Osaka, low-rise, low density blocks, from 4.125 to 5.625 m.

## Limitations

- Buildings only: no terrain, trees or water; ground is flat.
- Weakest in high-rise and dense mid-rise districts; towers above 133 m were not in the training data.
- Field up to 6 m above the ground only. Mean values only; no gusts, turbulence intensity or comfort classes.
- Where the mean speed is low (wakes behind buildings), the direction of the mean flow is uncertain in the solver and in the model.
- Heights from OpenStreetMap levels carry their own errors; the model cannot correct its input.

## Licence and attribution

The model weights and the example code are released under the Apache License 2.0. The training labels were computed on building data from:

- © OpenStreetMap contributors. Contains information from OpenStreetMap, which is made available under the Open Database License (ODbL).
- 3D city models of Project PLATEAU, Ministry of Land, Infrastructure, Transport and Tourism of Japan (MLIT); terms compatible with CC BY 4.0.
- 3DBAG by tudelft3d and 3DGI, CC BY 4.0.
- IGN, BD TOPO, Licence Ouverte 2.0.
- Geoportal Berlin, 3D building models LoD2, dl-de/zero-2-0.
- Copernicus DEM GLO-30 (used to select flat sites): © 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.

AIJ wind tunnel data were used only to evaluate the model and are not distributed here.

## Links

- Sreda, wind simulation in the browser: https://sredapp.com

SHA-256 of `model.onnx`: `4528a35fd028d8031f2cac67afabfacb945bd77b7b977f1711d1ce3fd366bc17`