Pi-fusion: Physics-informed diffusion model for learning fluid dynamics

Jing Qiu, Jiancheng Huang, Xiangdong Zhang, Zeng Lin, Minglei Pan, Zengding Liu, Fen MiaoarXiv 2024 · DOI

Introduction

Simulating fluid dynamics is a fundamental challenge in engineering and medicine, traditionally governed by the Navier-Stokes (N-S) equations. While numerical solvers like Finite Element Methods provide high accuracy, they are computationally prohibitive for complex 3D geometries, often requiring thousands of CPU hours.

Recent advances in Physics-Informed Neural Networks (PINNs) have sought to bridge this gap by embedding partial differential equations (PDEs) directly into neural network loss functions. However, standard PINNs often struggle with generalization to unseen time steps, lack interpretability in high-stakes medical applications, and fail to capture the quasiperiodic nature of real-world flows, such as the rhythmic pulsatility of blood flow in human arteries. To address these limitations, this paper introduces Pi-fusion, a novel physics-informed diffusion model that treats fluid simulation as a generative task constrained by physical laws.

Methodology

Pi-fusion reimagines fluid simulation by combining the generative power of diffusion models with the structural rigor of the N-S equations. The framework consists of three core components: Physics-Informed Diffusion, a Reciprocal Learning Strategy, and a multi-component loss function.

Physics-Informed Diffusion and Guidance

Standard diffusion models learn to generate data by reversing a stochastic noise-adding process. Pi-fusion adapts this by making the denoising process "physics-aware." During the inference stage, the model employs physics-informed guidance sampling. It calculates the gradient of the PDE residuals—measuring how much a current prediction violates the N-S equations—and uses this gradient to "nudge" the denoising process toward a physically valid state. This ensures that the generated velocity and pressure fields remain consistent with fluid mechanics principles.

Figure 2: The Pi-fusion architecture, illustrating the forward diffusion process, the noise estimation network, and the two-stage reciprocal learning strategy.

Reciprocal Learning Strategy

To handle the quasiperiodic nature of hemodynamics, the authors developed a two-stage training strategy shown in Figure 2(b). In Stage 1, the model learns to predict velocity and pressure fields. In Stage 2, it learns a "period parameter" ($T$) representing the underlying cycle of motion. By alternating between these stages, the model exploits temporal patterns, significantly improving its ability to forecast future states over long sequences.

Loss Function

The training objective is a weighted sum of three components:

  1. Data Loss: Ensures accuracy against ground-truth simulation data.
  2. PDE Loss: Penalizes violations of the Navier-Stokes equations.
  3. Diffusion Loss: The standard objective for denoising score matching.

Experimental Results

The model was evaluated on three scenarios: a 2D cylinder flow (vortex shedding), a 3D hepatic portal vein, and a 3D brain artery. The 3D datasets utilized unstructured meshes with over 500,000 points to simulate complex human anatomy.

Accuracy and Generalization

In the 2D cylinder benchmark, Pi-fusion achieved an RMSE of $9 \times 10^{-3}$, outperforming standard PINNs by nearly two orders of magnitude. As shown in Figure 3, the error maps for Pi-fusion ("Ours") remain significantly lower and more uniform across time steps compared to PINN, NSFnets, and PIPN baselines. While baseline models often see their error explode when predicting unseen time steps, Pi-fusion maintains a steady, low error rate, demonstrating that its physics-informed nature helps it internalize the underlying dynamics rather than merely memorizing training data.

Figure 3: Comparison of velocity and pressure fields against ground truth and baseline models. The bottom rows highlight the significantly lower error residuals achieved by Pi-fusion.

Computational Efficiency

One of the most striking results is the speedup during inference. For 3D brain artery simulations, Pi-fusion performed inference in just 0.03 seconds, compared to 90.07 seconds for traditional numerical methods—representing a 3,000x speedup. This efficiency makes real-time hemodynamic monitoring a tangible possibility.

Conclusion and Future Work

Pi-fusion demonstrates that treating fluid dynamics as a distribution-learning task via diffusion models offers superior robustness and generalization over point-estimation methods like standard PINNs. By using N-S equations as a "GPS" during sampling, the model ensures physical consistency even in complex 3D geometries.

Future work will focus on reducing the initial data generation cost, as the model currently requires high-fidelity simulations for training. Additionally, the authors aim to improve stability over longer durations and optimize performance at complex vascular junctions where turbulent flow currently leads to slightly higher localized errors.

Summary updated

BibTeX
@misc{qiu2024pi,
  author = {Jing Qiu and Jiancheng Huang and Xiangdong Zhang and Zeng Lin and Minglei Pan and Zengding Liu and Fen Miao},
  title = {{Pi-fusion: Physics-informed diffusion model for learning fluid dynamics}},
  year = {2024},
  eprint = {2406.03711},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.03711},
}
Figure