Rectified Flows for Fast Multiscale Fluid Flow Modeling

Victor Armegioiu, Yannick Ramic, Siddhartha Mishra

Abstract

Simulating complex, chaotic fluid dynamics is a cornerstone of scientific computing, yet traditional numerical solvers and modern diffusion-based generative models often suffer from prohibitive computational costs. This paper introduces ReFlow, a deterministic alternative to diffusion models that leverages rectified flows to simulate multiscale fluid systems. By learning to transport probability distributions along nearly straight trajectories in an Ordinary Differential Equation (ODE) framework, ReFlow achieves high-fidelity results comparable to score-based diffusion models while offering up to a 22x speedup in inference. Evaluated on challenging 2D benchmarks, the method demonstrates superior spectral fidelity and distributional accuracy with as few as 8-10 sampling steps.

Introduction

Fluid dynamics, encompassing phenomena from atmospheric weather patterns to industrial combustion, are characterized by their chaotic and multiscale nature. In these systems, infinitesimal perturbations in initial conditions can lead to divergent outcomes, necessitating "statistical solutions" that capture the full distribution of possible states. While traditional numerical solvers provide high accuracy, they are too slow for many-query applications like uncertainty quantification or real-time control.

Generative AI, particularly conditional diffusion models, has emerged as a promising surrogate for these systems. However, diffusion models rely on a stochastic denoising process that requires hundreds of iterations, creating a significant bottleneck for high-resolution fluid modeling. This work addresses the efficiency gap by adapting rectified flows to the physical domain, straightening the transport paths to enable rapid, deterministic sampling.

Methodology: From Diffusion to Rectified Flows

The core innovation of ReFlow is the transition from stochastic denoising to a deterministic ODE. Instead of learning to reverse a random walk through noise, the model learns a "barycentric velocity field" $v_\theta$ that points directly from the source distribution (noise) to the target distribution (the fluid state).

Overview of the ReFlow framework: (a) the mapping from initial conditions to target distributions, (b) the UNet-based velocity field architecture, (c) qualitative comparison of mean and variance against FNO and Ground Truth, and (d) the evolution of probability density along the learned ODE path.

Rectified Flow Training and Sampling

As illustrated in Figure 1(b), a UNet architecture is trained to predict the velocity field $v_\theta$ conditioned on the initial state $u_i$ and the current time $\tau$. By "straightening" the transport path in probability space (Figure 1(d)), the model reduces the number of steps required to reach the target state.

To handle remaining path stiffness, the authors developed a Curvature-Aware Sampler. This sampler utilizes an Exponential Moving Average (EMA) to monitor changes in the velocity field. When the path is straight, the sampler takes larger steps; when it detects high curvature, it automatically reduces the step size and applies a Tikhonov-regularized "blending" correction to maintain numerical stability.

Experimental Results

The model was evaluated on three multiscale 2D benchmarks: Shear Layer (SL2D), Cloud-Shock Interaction (CS2D), and Richtmyer-Meshkov (RM2D). These benchmarks test the model's ability to handle incompressible vortices, compressible shocks, and turbulent mixing.

Efficiency and Fidelity

ReFlow matches the posterior statistics of state-of-the-art diffusion models using only 8–10 ODE steps, compared to the 128+ steps typically required by diffusion. Qualitatively, Figure 1(c) demonstrates that ReFlow accurately captures the mean and variance of the fluid flow, whereas deterministic baselines like the Fourier Neural Operator (FNO) suffer from "spectral collapse," producing blurry or overly noisy results.

Spectral and Distributional Accuracy

Beyond visual similarity, ReFlow excels in reproducing the energy spectra of turbulent flows, maintaining accuracy even at high wavenumbers. On the one-point Wasserstein distance metric, which measures distributional alignment at the pixel level, ReFlow consistently outperformed both standard diffusion models and deterministic surrogates. Furthermore, ReFlow proved more training-efficient, reaching higher accuracy in 120,000 iterations than diffusion baselines achieved in 500,000.

Discussion and Future Work

The success of ReFlow hinges on the principle that "straightness is efficiency." By minimizing the curvature of the transport path, the computational complexity of the simulation becomes decoupled from the physical complexity of the fluid.

However, several challenges remain. The current study focuses on 2D benchmarks; extending ReFlow to 3D flows will require addressing significantly higher memory demands. Additionally, while the model is highly effective for single-step snapshots, future research is needed to evaluate its long-term temporal stability over thousands of physical time steps. Integrating ReFlow with mesh-agnostic architectures or adaptive mesh refinement (AMR) could further enhance its utility for complex engineering geometries.

Conclusion

ReFlow represents a significant step toward practical, high-speed generative surrogates for fluid dynamics. By combining the distributional power of diffusion models with the efficiency of deterministic ODEs, it provides a robust framework for multiscale modeling that is both fast and physically faithful.

Summary updated

Abstract

The statistical modeling of fluid flows is very challenging due to their multiscale dynamics and extreme sensitivity to initial conditions. While recently proposed conditional diffusion models achieve high fidelity, they typically require hundreds of stochastic sampling steps at inference. We introduce a rectified-flow framework that learns a time-dependent velocity field, transporting input to output distributions along nearly straight trajectories. By casting sampling as solving an ordinary differential equation (ODE) along this straighter flow field, our method makes each integration step much more effective, using as few as eight steps versus (more than) 128 steps in standard score-based diffusion, without sacrificing predictive fidelity. In addition, we develop a curvature-aware integration scheme that monitors local path straightness and adaptively regularizes the velocity and step size, improving stability and accuracy at essentially no training cost. Experiments on challenging multiscale flow benchmarks show that rectified flows recover the same posterior distributions as diffusion models, preserve fine-scale features that MSE-trained baselines miss, and deliver high-resolution samples in a fraction of inference time.
BibTeX
@misc{armegioiu2025rectified,
  author = {Victor Armegioiu and Yannick Ramic and Siddhartha Mishra},
  title = {{Rectified Flows for Fast Multiscale Fluid Flow Modeling}},
  year = {2025},
  eprint = {2506.03111},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2506.03111},
}
Figure