Table of Contents
Fetching ...

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.

Generative prediction of flow fields around an obstacle using the diffusion model

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.
Paper Structure (12 sections, 8 equations, 18 figures)

This paper contains 12 sections, 8 equations, 18 figures.

Figures (18)

  • Figure 1: Schematic for the reverse diffusion process in the G2F diffusion model. It generates a sample by removing noises through a U-Net in steps. The geometry prompt is injected into the U-Net via an attention mechanism, which takes the geometry as the prompt to control the generation process.
  • Figure 2: Datasets for evaluating the G2F diffusion model. Elementary obstacle geometries including the circle, ellipse, rectangle, and triangle are used for training; Complex obstacle geometries including the parallelogram, cross, and characters 'PKU' are employed for testing. Each sample $\bs{z}_0 = \left[u, v, p, \omega\right]$ includes velocity, pressure, and vorticity.
  • Figure 3: Flow around a cylinder generated by the G2F, VAE, CNN-a, and CNN-s models, compared with the GT: (a) contour of $u$, (b) profiles of $u$ in the wake at $x=$ 0, 2, and 6. The vertical dashed lines in the upper left panel mark $x=$ 0, 2, and 6.
  • Figure 4: Flow around a cylinder generated by the G2F, VAE, CNN-a, and CNN-s models, compared with the GT: (a) contour of pressure $p$, and (b) pressure on the obstacle surface.
  • Figure 5: Statistical evaluation of generative models on flow around a cylinder: (a) generated samples of $u$ by the G2F diffusion model; (b) comparison of mean and standard deviation of $u$ obtained via G2F, VAE, and GT. Statistics are computed over 50 generated samples; (c) mean streamwise velocity $u$ profiles at positions $x =$ 0, 2, and 6; (d) standard deviation profiles of $u$ at $x =$ 0, 3, and 6.
  • ...and 13 more figures