Anchored-Branched Steady-state WInd Flow Transformer (AB-SWIFT): a metamodel for 3D atmospheric flow in urban environments
Authors: Armand de Villeroché, Rem-Sophia Mouradi, Vincent Le Guen, Sibo Cheng, Marc Bocquet, Alban Farchi, Patrick Armand, Patrick Massin
Organizations: CEREA, ENPC, EDF R&D, Institut Polytechnique de Paris, Île-de-France, France · EDF R&D, Île-de-France, France · SINCLAIR AI Laboratory, Saclay, Île-de-France, France · CEA, DAM, DIF, F-91297 Arpajon, France
Air flow modeling at a local scale is essential for applications such as pollutant dispersion modeling or wind farm modeling. To circumvent costly Computational Fluid Dynamics (CFD) computations, deep learning surrogate models have recently emerged as promising alternatives. However, in the context of urban air flow, deep learning models struggle to adapt to the high variations of the urban geometry and to large mesh sizes. To tackle these challenges, we introduce Anchored Branched Steady-state WInd Flow Transformer (AB-SWIFT), a transformer-based model with an internal branched structure uniquely designed for atmospheric flow modeling. We train our model on a specially designed database of atmospheric simulations around randomised urban geometries and with a mixture of unstable, neutral, and stable atmospheric stratifications. Our model reaches the best accuracy on all predicted fields compared to state-of-the-art transformers and graph-based models. Our code and data is available at https://github.com/cerea-daml/abswift.
Figures & tables
Figure 1: Our proposed model architecture. AB-SWIFT separately encodes the terrain and obstacles to yield one embedded geometry sequence, and encodes the physical context and the volume prediction points. The geometry and encoded prediction points are then processed together. Finally the decoder predicts physical fields from processed latent states of volume points.
Name
Description
Value
AB-SWIFT specific parameters
d
Hidden dimension of the latent states
192
nobs
Number of points describing obstacles
4096
ngnd
Number of points describing the terrain
4096
nobs-sn
Number of obstacles supernodes
1024
robs
Radius for obstacles’ supernodes pooling
1
Table 1: AB-SWIFT hyperparameters and used values.
Figure 2: Left: 4 building configuration, taken from the 210 different configurations present in our dataset. Right: used values of 1/Lmo and z0 . Purple points represent the training split, blue the validation split, and yellow the test split.
unstable
neutral
stable
total
training
53
15
70
138
validation
6
1
3
10
test
35
11
34
80
Table 2: Dataset split between training, validation and test samples with stability repartition for each split.
Input format
Input features
AB-SWIFT
Terrain, obstacles and volume point clouds
Atmospheric profiles 1/Lmo and z0 in the terrain point cloud
AB-UPT
Geometry and volume point clouds
1/Lmo and z0 in the geometry point cloud
GAOT
Volume point cloud
1/Lmo,z0 , one-hot encoded point type
Transolver
Volume point cloud
1/Lmo,z0 , one-hot encoded point type
BSMGN
Graph from volume mesh connectivity
1/Lmo,z0 , one-hot encoded node type
Table 3: Inputs format and used features of our different tested models. For all models outputs are v,θ,p,logk,andlogϵ .
model (# of trainable parameters)
training time (one epoch)
training VRAM requirement
inference time (one sample)
AB-SWIFT (6.5M)
8s
1.21Gb
0.39s
AB-UPT (6.5M)
7.5s
1.20Gb
0.43s
GAOT (6.6M)
17s
10Gb
0.23s
Transolver (6.0M)
27s
23Gb
0.31s
BSMGN (0.4M)
90s
36Gb
0.60s
Table 4: Resource requirements of all models for training and inference. Training and inference speeds are measured on a A100 GPU with 40Gb of VRAM. Memory cost is shown for a batch size of 1 .
AB-SWIFT (ours)
AB-UPT
GAOT
Transolver
BSMGN
v
NMSE
0.3±0.4
0.8±1.3
13.1±7.4
2.1±1.5
0.8±1.0
L1 err
2.2±1.3
5.3±3.9
20.4±8.0
5.6±2.4
4.6±2.7
L2 err
3.7±1.8
6.2±3.8
29.3±9.1
9.8±3.7
6.3±3.2
p
NMSE
2.0±3.5
5.7±6.7
96.8±412.3
14.5±25.3
6.4±9.4
L1 err
9.3±7.8
22.1±14.2
62.3±76.5
23.9±18.6
20.2±13.7
L2 err
9.8±9.2
18.5±12.5
64.2±68.4
26.4±24.1
18.6±14.6
Table 5: Benchmark results of AB-SWIFT and literature baselines. NMSE is in percent of the variance over a given simulation, and L1 and L2 errors are in percent of the ground truth value. We report mean and standard deviation of metrics computed on the test split of the dataset for all trained models. For all metrics, the best model is shown in bold, and the second best in italic. *NMSE for θ is computed on stable and unstable cases only.
Figure 3: Norm of the velocity field predicted by all models, 2m above ground, for an unstable stratification (Left), a neutral stratification (Middle left), and two stable stratifications (Middle right and Right). All shown geometries and stability parameters are from the test split of the dataset.
Figure 4: Horizontal slice at height h=2\text{,}\mathrm{m}$$ of the fields predicted by AB-SWIFT for a stable stratification ( 1/Lmo=0.15\text{,}{\mathrm{m}}^{-1},z0=0.06\text{,}\mathrm{m}) . Buildings are shown in teal color.
Step 0
Step 1
Step 2
Step 3
Step 4
AB-UPT
AB-SWIFT
v
NMSE
1.5±1.5
0.6±0.6
0.6±1.4
0.4±0.5
0.3±0.4
L1 error
8.5±5.3
3.7±2.5
3.5±3.5
2.5±1.6
2.2±1.3
L2 error
8.9±4.7
5.1±2.6
4.8±3.4
4.3±2.2
3.7±1.8
p
NMSE
8.5±12.6
4.8±7.3
3.8±6.9
2.7±4.5
2.0±3.5
L1 error
26.6±19.9
16.2±13.0
14.1±10.7
10.9±8.9
9.3±7.7
Table 6: Ablation study results. Starting from AB-UPT, we build AB-SWIFT step by step. Step 1: we merge the geometry and surface branches. Step 2: we encode separately obstacles and terrain. Step 3: we encode profiles directly. Step 4: we split the final decoder layer per predicted fields, resulting in the final AB-SWIFT proposed model. Reported metrics are the mean and standard deviation for each trained intermediate model over the test split of the dataset. NMSE is in percent of the variance over a given simulation, and L1 and L2 errors are in percent of the ground truth value.
Appendix figures & tables5 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 5: Mesh arrangements used to generate database samples. Buildings are clustered in the black area. For machine learning, only the dark blue zone of interest with an horizontal refinement up to 5m is kept and up to a height of 50m to reduce the mesh size.
Description
Value
Number of input points for the geometry, randomly subsampled from mesh points adjacent to the ground and buildings
8192
Number of supernodes for the geometry
2048
Number of anchor points in the surface point cloud, randomly subsampled from mesh points adjacent to the ground and buildings
2048
Hidden dimension
192
Number of anchor points in the volume point cloud, randomly subsampled from mesh cell centers
8192
Number of attention heads
3
Appendix
Table 7: AB-UPT’s chosen hyperparameters values
Description
Value
Number of latent tokens in x , y , and z dimensions
32,32,8
Multiscale radii in the MAGNO encoder and decoder
1,5,10,20,50
Learnable scale weights in the MAGNO encoder and decoder
True
Number of MLP layers at the end of the MAGNO encoder
Urban microclimate, encompassing wind and temperature fields shaped by building geometry, strongly affects building energy use, pedestrian wind comfort, pollutant dispersion, the urban heat island, and public health. Conventional Computational Fluid Dynamics (CFD) is computationally prohibitive for rapid assessments, while many deep learning approaches require extensive training data and struggle with generalization to unseen configurations. In this work, we present the Fast Localized Urban Microclimate Emulator (FLUME), a rapid, data-efficient, and geometry-aware framework based on a Fourier neural operator for predicting three-dimensional wind and temperature fields. FLUME assumes that, under prescribed inflow and thermal forcing, much of the spatial variation of these mean fields is controlled by surrounding building geometry. The framework introduces a Multi-Directional Distance Feature (MDDF), which captures geometry over adaptive, visibility-defined spatial scales. By decomposing simulations of only 23 urban blocks into smaller 3D patches enriched with precomputed MDDF information, FLUME enables learning from limited CFD data. The model achieves mean absolute errors of 0.2 m/s for streamwise velocity and 0.19∘C for temperature on unseen urban configurations. A deep ensemble provides a practical proxy for epistemic uncertainty, and conformal prediction transforms these estimates into calibrated prediction intervals. Ensemble spread is positively related to local prediction error, with greater uncertainty in roof-level shear layers, building wakes, and vertical velocity near the ground. These results indicate FLUME's potential for rapid scenario assessment in urban design and urban climate studies.
Shaoxiang Qin, Theodore Potsis, Dongxue Zhan +3
Department of Building, Civil and Environmental Engineering, Cetner Zero Energy Building Studies, Concordia University, Montreal, Canada · School of Computer Science, McGill University, Montreal, Canada · Mohamed bin Zayed University of Artificial Intelligence, Abu Dhabi, United Arab Emirates
Computational fluid dynamics (CFD) provides high-fidelity simulations of fluid flows but remains computationally expensive for many-query applications. In recent years deep learning (DL) has been used to construct data-driven fluid-dynamic surrogate models. In this work we consider a different learning paradigm and embrace generative modelling as a framework for constructing scalable fluid-dynamics surrogate models. We introduce FluidFlow, a generative model based on conditional flow-matching, a recent alternative to diffusion models that learns deterministic transport maps between noise and data distributions. FluidFlow is specifically designed to operate directly on CFD data defined on both structured and unstructured meshes alike, without the needs to perform any mesh interpolation pre-processing and preserving geometric fidelity. We assess the capabilities of FluidFlow using two different core neural network architectures, a U-Net and diffusion transformer (DiT), and condition their learning on physically meaningful parameters. The methodology is validated on two benchmark problems of increasing complexity: prediction of pressure coefficients along an airfoil boundary across different operating conditions, and prediction of pressure and friction coefficients over a full three-dimensional aircraft geometry discretized on a large unstructured mesh. In both cases, FluidFlow outperform strong multilayer perceptron baselines, achieving significantly lower error metrics and improved generalisation across operating conditions. Notably, the transformer-based architecture enables scalable learning on large unstructured datasets while maintaining high predictive accuracy. These results demonstrate that flow-matching generative models provide an effective and flexible framework for surrogate modelling in fluid dynamics, with potential for realistic engineering and scientific applications.
David Ramos, Lucas Lacasa, Fermín Gutiérrez +2
ETSIAE-UPM-School of Aeronautics, Universidad Politécnica de Madrid, Plaza Cardenal Cisneros 3, E-28040 Madrid, Spain · Institute for Cross-Disciplinary Physics and Complex Systems (IFISC, CSIC-UIB), 07122 Palma de Mallorca (Spain) · Center for Computational Simulation, Universidad Politécnica de Madrid, Campus de Montegancedo, Boadilla del Monte, 28660 Madrid, Spain
Designing urban spaces that provide pedestrian wind comfort and safety requires time-resolved Computational Fluid Dynamics (CFD) simulations, but their current computational cost makes extensive design exploration impractical. We introduce WinDiNet (Wind Diffusion Network), a pretrained video diffusion model that is repurposed as a fast, differentiable surrogate for this task. Starting from LTX-Video, a 2B-parameter latent video transformer, we fine-tune on 10,000 2D incompressible CFD simulations over procedurally generated building layouts. A systematic study of training regimes, conditioning mechanisms, and VAE adaptation strategies, including a physics-informed decoder loss, identifies a configuration that outperforms purpose-built neural PDE solvers. The resulting model generates full 112-frame rollouts in under a second. As the surrogate is end-to-end differentiable, it doubles as a physics simulator for gradient-based inverse optimization: given an urban footprint layout, we optimize building positions directly through backpropagation to improve wind safety as well as pedestrian wind comfort. Experiments on single- and multi-inlet layouts show that the optimizer discovers effective layouts even under challenging multi-objective configurations, with all improvements confirmed by ground-truth CFD simulations.
Janne Perini, Rafael Bischof, Moab Arar +4
1Computational Design Lab, ETH Zurich, Switzerland · 2Tel Aviv University, Israel · 3Architecture and Building Systems, ETH Zurich, Switzerland +2