Table of Contents
Fetching ...

RheOFormer: A generative transformer model for simulation of complex fluids and flows

Maedeh Saberi, Amir Barati Farimani, Safa Jamali

TL;DR

RheOFormer addresses the computational burden of simulating non-Newtonian fluids by learning a generative operator with a transformer architecture. It uses an encoder–decoder with cross-attention to map spatial fields to queries and a latent-space propagator to evolve dynamics in time, enabling long-time predictions from limited data. The framework is validated on TEVP, Giesekus, and Oldroyd-B constitutive models across rheometric and canonical flows, demonstrating accuracy and generalization to unseen $Wi$ and geometries. The resulting surrogate offers a scalable, real-time tool for digital rheometry and process optimization in soft materials.

Abstract

The ability to model mechanics of soft materials under flowing conditions is key in designing and engineering processes and materials with targeted properties. This generally requires solution of internal stress tensor, related to the deformation tensor through nonlinear and history-dependent constitutive models. Traditional numerical methods for non-Newtonian fluid dynamics often suffer from prohibitive computational demands and poor scalability to new problem instances. Developments in data-driven methods have mitigated some limitations but still require retraining across varied physical conditions. In this work, we introduce Rheological Operator Transformer (RheOFormer), a generative operator learning method leveraging self-attention to efficiently learn different spatial interactions and features of complex fluid flows. We benchmark RheOFormer across a range of different viscometric and non-viscometric flows with different types of viscoelastic and elastoviscoplastic mechanics in complex domains against ground truth solutions. Our results demonstrate that RheOFormer can accurately learn both scalar and tensorial nonlinear mechanics of different complex fluids and predict the spatio-temporal evolution of their flows, even when trained on limited datasets. Its strong generalization capabilities and computational efficiency establish RheOFormer as a robust neural surrogate for accelerating predictive complex fluid simulations, advancing data-driven experimentation, and enabling real-time process optimization across a wide range of applications.

RheOFormer: A generative transformer model for simulation of complex fluids and flows

TL;DR

RheOFormer addresses the computational burden of simulating non-Newtonian fluids by learning a generative operator with a transformer architecture. It uses an encoder–decoder with cross-attention to map spatial fields to queries and a latent-space propagator to evolve dynamics in time, enabling long-time predictions from limited data. The framework is validated on TEVP, Giesekus, and Oldroyd-B constitutive models across rheometric and canonical flows, demonstrating accuracy and generalization to unseen and geometries. The resulting surrogate offers a scalable, real-time tool for digital rheometry and process optimization in soft materials.

Abstract

The ability to model mechanics of soft materials under flowing conditions is key in designing and engineering processes and materials with targeted properties. This generally requires solution of internal stress tensor, related to the deformation tensor through nonlinear and history-dependent constitutive models. Traditional numerical methods for non-Newtonian fluid dynamics often suffer from prohibitive computational demands and poor scalability to new problem instances. Developments in data-driven methods have mitigated some limitations but still require retraining across varied physical conditions. In this work, we introduce Rheological Operator Transformer (RheOFormer), a generative operator learning method leveraging self-attention to efficiently learn different spatial interactions and features of complex fluid flows. We benchmark RheOFormer across a range of different viscometric and non-viscometric flows with different types of viscoelastic and elastoviscoplastic mechanics in complex domains against ground truth solutions. Our results demonstrate that RheOFormer can accurately learn both scalar and tensorial nonlinear mechanics of different complex fluids and predict the spatio-temporal evolution of their flows, even when trained on limited datasets. Its strong generalization capabilities and computational efficiency establish RheOFormer as a robust neural surrogate for accelerating predictive complex fluid simulations, advancing data-driven experimentation, and enabling real-time process optimization across a wide range of applications.

Paper Structure

This paper contains 14 sections, 8 equations, 5 figures.

Figures (5)

  • Figure 1: Schematic representation of the RheOFormer architecture for operator learning in complex fluid flows. The model takes spatially distributed input fields (e.g., velocity, stress) and processes them through a feed-forward network and self-attention encoder to capture spatial dependencies. Query locations are encoded and passed through a decoder where cross-attention mechanisms integrate information from the encoded inputs and output points. A latent time-marching propagator then recursively evolves the system through time in latent space, and the final latent representation is decoded to produce the predicted output field (e.g., velocity or stress). An example prediction is shown for flow past a triangular obstacle.
  • Figure 2: RheOFormer training and predictions for the TEVP constitutive model. (a) Sample shear rate profiles $\dot{\gamma}_{12}(t)$ drawn from a Gaussian Random Field (GRF) used as training inputs. (b) Corresponding predicted shear stress response $\sigma_{12}(t)$ (solid lines) compared with exact solutions (dashed) for each input case. (c) Applied oscillatory shear rate profile $\dot{\gamma}_{12}(t)$ over extended time. (d) Predicted shear stress $\sigma_{12}$ versus strain $\gamma$ under oscillatory shear (solid red), compared with ground truth solution (dashed black).
  • Figure 3: RheOFormer predictions for the tensorial stress response of the Giesekus model under pure extensional (a–c) and simple shear flows (d–f). Panels (a, d) show the applied constant deformation rate inputs. Panels (b, e) display the evolution of the first normal stress difference $N_1 = \sigma_{11} - \sigma_{22}$ over time, while (c, f) show the corresponding shear stress component $\sigma_{12}(t)$. Solid lines show RheOFormer predictions and dashed lines show the ground truth values.
  • Figure 4: Comparison of RheOFormer predictions and ground truth solutions for viscoelastic flows through a 4:1 planar contraction channel. (a) Velocity magnitude field $|\mathbf{u}|$ for the Oldroyd-B fluid at the final time; (b) Corresponding results for the Giesekus fluid. In each figure, the upper half displays the numerically simulated ground truth solutions and the lower half shows the RheOFormer predictions.
  • Figure 5: RheOFormer prediction of an Oldroyd-B fluid's wake dynamics behind a triangular obstacle. (a) Ground truth velocity, $u_x$, map at $Wi=0.94$, and (b) RheOFormer predictions at the same $Wi$.