Generative prediction of flow fields around an obstacle using the diffusion model
Jiajun Hu, Zhen Lu, Yue Yang
TL;DR
This work introduces a geometry-conditioned diffusion model (G2F) that generates 2D flow fields around obstacles by treating obstacle geometry as a prompt in a DDPM framework. A U-Net with cross-attention injection of the geometry guides the reverse diffusion to produce physically plausible flow fields, trained on simple obstacle shapes and evaluated on both interpolation and out-of-distribution geometries. Compared with CNN-based and VAE baselines, G2F more accurately captures instantaneous flow features, vortex shedding, and pressure distributions, while also providing diverse plausible realizations for a given geometry. The approach promises CFD workflow acceleration by offering high-fidelity initial flow fields and enables future extensions to time sequences and broader parameter regimes.
Abstract
We propose a geometry-to-flow diffusion model that utilizes obstacle shape as input to predict a flow field around an obstacle. The model is based on a learnable Markov transition kernel to recover the data distribution from the Gaussian distribution. The Markov process is conditioned on the obstacle geometry, estimating the noise to be removed at each step, implemented via a U-Net. A cross-attention mechanism incorporates the geometry as a prompt. We train the geometry-to-flow diffusion model using a dataset of flows around simple obstacles, including circles, ellipses, rectangles, and triangles. For comparison, two CNN-based models and a VAE model are trained on the same dataset. Tests are carried out on flows around obstacles with simple and complex geometries, representing interpolation and generalization on the geometry condition, respectively. To evaluate performance under demanding conditions, the test set incorporates scenarios including crosses and the characters `PKU.' Generated flow fields show that the geometry-to-flow diffusion model is superior to the CNN-based models and the VAE model in predicting instantaneous flow fields and handling complex geometries. Quantitative analysis of the accuracy and divergence demonstrates the model's robustness.
