A Convolutional Neural Network Based Framework for Linear Fluid Dynamics
Kwame Agyei-Baah, Muhammad Rizwanur Rahman, E. R. Smith
TL;DR
This work addresses the challenge of making data-driven fluid dynamics models both generalisable and interpretable by training a CNN kernel to act as a numerical operator for finite-difference schemes. By using data from the 1D diffusion problems (Couette flow and Stokes’ second problem) and testing across numerical, analytical, and molecular-dynamics data, the authors demonstrate that the CNN can recover forward-Euler stencils and generalise to unseen boundary conditions while maintaining a transparent link to FD theory. The study shows that numCNN exactly reproduces FD coefficients and generalises well, anCNN can approximate analytical solutions with some limitations, and mdCNN can learn from noisy MD data, offering potential avenues to estimate effective viscosities. The results highlight the potential of interpretable ML-driven operators to bridge ML with classical CFD, while outlining limitations that motivate future work on nonlinear dynamics, Navier–Stokes, and PINN-based constraint enhancements.
Abstract
Fluid dynamics, for its strength in describing physical phenomena across vastly different scales from the cheerios effect on the breakfast table to the evolution of cosmic and quantum systems, has been called the 'queen mother' of science (Bush, 2015). However, a central challenge remains: ensuring the generalisability, interpretability and reliability of the machine learned models when applied to physical systems. To address this, we present a transparent approach that provides insights into how data-driven fluid dynamics and machine learning (ML) work. This is achieved by training a convolutional neural network (CNN) on data from a simple laminar fluid flow to behave as an operator that exactly matches the finite-difference numerics. Importantly, the model demonstrates strong generalisation capability by reproducing the dynamics for a wide range of distinct and unseen flow conditions within the same flow category. The CNN learns the forward Euler three-point stencil weights, capturing physical principles such as consistency and symmetry despite having only three tunable weights. Going beyond pure numerical training (numCNN), the approach is shown to work when trained on analytical (anCNN) and even molecular dynamics (mdCNN) data. In some cases, the physics is not captured, and thanks to the simple and interpretable form, these CNNs provide insight into the limits, pitfalls and best practice of data-driven fluid models. Because the approach is based on finite-difference operators and demonstrated with diffusive flow, it naturally extends to many structured-grid computational fluid dynamics (CFD) problems, including turbulent, multiphase, and multiscale flows.
