Search

Search papers and lessons

Machine Learning for Fluid Mechanics

Steven Brunton, Bernd Noack, Petros Koumoutsakos · 2019

Brunton, Noack and Koumoutsakos survey how machine learning extracts flow features, models fluid dynamics and controls flows, and where its limits lie.

On this page

  • Colour = topic mix
  • Linear algebra
  • Probability
  • Discrete math
  • Calculus
  • Neural network basics
  • Learning basics
  • Sign in to see your progress

TL;DR

Fluid mechanics now produces data at scale, from experiments, field measurements and large simulations. Brunton, Noack and Koumoutsakos's 2019 review surveys how machine learning can extract flow features, model flow dynamics, add closures to turbulence models and help control flows. Its central argument is that fluid mechanics, unlike many fields where machine learning is used, has known physics, so the best methods combine learning with first principles.

Where you'll see it: in reduced-order models of wind-tunnel and simulation data, in turbulence closures for aircraft and engine design, and in the processing of particle image velocimetry (PIV) images that measure how fluid moves.

The problem

Fluid flows are high-dimensional and nonlinear. At high Reynolds numbers, a simulation that resolves every scale of the Navier-Stokes equations is beyond current computing, so engineers use approximations, experiments and models instead. Those are expensive to repeat for design optimization, and simulations are often too slow for real-time control. The classical tools, such as proper orthogonal decomposition and Galerkin projection, need expert effort to set up for each new system.

The review's observation is that the situation has changed. Data are now plentiful in fluid mechanics, and the equations are known, which is unusual. Machine learning is built for the first condition and has to be adapted to the second. The question the article takes up is how learning algorithms can extract understanding and usable models from flow data, what they can and cannot be trusted to do, and how physical knowledge should be built into them.

The historical context helps. The review points out that fluid mechanics met learning ideas early. Rechenberg and Schwefel's wind-tunnel experiments in the 1960s adjusted plate angles using random variations, an early form of the evolution strategies the review discusses in its optimization section.

Key idea

The review treats machine learning as a way of choosing a function that performs well on data. The generic learning problem is to pick parameters w\mathbf{w} for a model ϕ\phi so that a loss LL, which measures how wrong a prediction is, is small on average over data drawn from a distribution pp. The average is the risk. Learning means minimizing the risk using a finite set of observations, and the choice of loss, model and data distribution determines what the learned function can do.

Algorithms are sorted by how much supervision they receive:

flowchart LR
  A[Learning from data] --> B[Supervised: labelled input-output pairs]
  A --> C[Unsupervised: patterns without labels]
  A --> D[Semi-supervised: partial labels or rewards]
  B --> B1[Neural networks, SVMs, random forests]
  C --> C1[PCA and POD, autoencoders, clustering]
  D --> D1[GANs, reinforcement learning]

The article's sharpest claim is about what makes fluid mechanics different. In image recognition, data are abundant, and a model is judged on how well it interpolates among examples. In fluids, the governing equations are known, experiments are hard to repeat, and simulations are expensive. The authors therefore argue for hybrid methods that combine learned models with first principles, and they point out that a learned model is often best judged by whether it respects symmetries, conservation laws and boundary conditions.

The method

The review has two main parts. Section 3 covers the fundamentals of supervised, unsupervised, semi-supervised and optimization methods. Section 4 applies them to flow modeling, split into feature extraction (4.1) and dynamics (4.2). Each part is a survey, so the "method" here is the set of mathematical ideas that the reader needs to follow the applications.

The loss, the risk and the autoencoder

For supervised learning, the review uses the squared loss L=∥y−ϕ(x)∥2L = \lVert \mathbf{y} - \phi(\mathbf{x}) \rVert^2, which penalizes the squared distance between the prediction and the label. For classification it uses a loss that is 0 when the class is right and 1 when it is wrong. Minimizing the average squared loss over training data is the standard route to fitting a model, as discussed in Empirical Risk Minimization and Loss Function.

Unsupervised dimensionality reduction is where the review draws its most useful link. A linear autoencoder compresses a data vector x\mathbf{x} of dimension DD into a latent vector z\mathbf{z} of dimension M≪DM \ll D with a linear encoder U\mathbf{U}, then reconstructs it with a linear decoder V\mathbf{V}. The training goal is to make the reconstruction x^=VUx\hat{\mathbf{x}} = \mathbf{V}\mathbf{U}\mathbf{x} close to x\mathbf{x}. The review states that this network, trained by stochastic gradient descent, is an algorithmic route to the same answer as the eigenvalue problem for proper orthogonal decomposition, or principal component analysis (PCA) as it is known in statistics. Adding nonlinear activations to the encoder and decoder gives nonlinear embeddings, which is where the deep learning version begins.

Example
Tiny: PCA on four points on a line

Take four two-dimensional data points, (1,1)(1,1), (2,2)(2,2), (3,3)(3,3) and (4,4)(4,4).

  1. The mean is (2.5,2.5)(2.5, 2.5). Subtracting it gives the centred points −1.5-1.5, −0.5-0.5, 0.50.5 and 1.51.5 along the diagonal.
  2. Every centred point lies on the diagonal line through the origin in direction (1,1)(1,1). The covariance matrix is 14(5555)\frac{1}{4}\begin{pmatrix} 5 & 5 \\ 5 & 5 \end{pmatrix}, which has eigenvalues 2.52.5 and 00.
  3. The leading eigenvector is (1,1)/2(1,1)/\sqrt{2}. One latent coordinate, z=(x−xˉ)⋅(1,1)/2z = (\mathbf{x} - \bar{\mathbf{x}}) \cdot (1,1)/\sqrt{2}, reconstructs every point exactly.
  4. The variance captured by that mode is 2.52.5, and the residual is 00.

Interpretation: a linear autoencoder with one latent unit finds the same direction, and a reconstruction error of zero shows the data are effectively one-dimensional.

Flow feature extraction

Section 4.1 is about turning measurements into modes. The POD basis is an orthogonal basis built from snapshots of a flow. The review notes that Sirovich's snapshot POD reduces the calculation to a singular value decomposition of the snapshot data, which is why Singular Value Decomposition (SVD) matters here. Sparse and randomized linear algebra, such as Compressed Sensing, lower the cost of the same calculation when the data are sparse or low rank.

Clustering supports a different kind of feature extraction. Kaiser and co-authors used kk-means clustering to split the phase space of a fluid mixing layer into a small number of states, and then built Markov transition models between them. The cluster centroids are actual flow fields, which is what gives the method interpretability. Classification with neural networks, kk-nearest neighbours and other methods is applied to recognise flow regimes such as wake topologies behind a pitching airfoil.

Super-resolution is the reverse task. A network infers a high-resolution field from low-resolution measurements, using statistical structure learned from high-resolution training data. The review cites a convolutional network that reconstructs turbulent flow with the energy spectrum preserved, and notes the cost of such methods as the main drawback.

Modeling flow dynamics

Section 4.2 covers models of how a flow evolves. The dynamic mode decomposition (DMD) fits a linear model to time-series data of a flow. The review connects DMD to the Koopman Operator, an infinite-dimensional linear operator describing how every measurement of the system evolves. Its limitation is that it works on linear measurements, so nonlinear transients can be missed. Extended DMD and deep architectures learn nonlinear measurements in which the dynamics look linear.

Neural networks have been used to model dynamics for three decades, including as solvers for ordinary and partial differential equations. The review's caution is that they are fundamentally interpolative: a network approximates the function well inside the span of its training data, and it can fail when asked to extrapolate. Overfitting is a constant risk, so models must be cross-validated on data withheld from training.

Sparse regression offers a different route. Given a library of candidate terms, the method keeps only a few and identifies the governing equations, using a Pareto analysis to balance complexity against accuracy. When the physics is known, the review reports, it can recover the correct equations.

Closure models address turbulence. Resolving all scales is out of reach for industrial configurations, so small scales are modelled through the Reynolds stress tensor of a Reynolds-averaged model. Machine learning has been used to find and correct discrepancies in that tensor. A deep network with a multiplicative layer, the review notes, can build Galilean invariance into the predicted stresses, which is an example of embedding a known physical symmetry in the architecture.

Example
Standard: how many numbers does a snapshot data matrix hold?

Suppose a two-dimensional velocity field is measured on a 100×50100 \times 50 grid, with two components uu and vv at each point. The numbers below are illustrative, and the article does not use them.

  1. One snapshot has 100×50×2=10,000100 \times 50 \times 2 = 10{,}000 numbers.
  2. Collect 300300 snapshots as columns of a matrix. It is 10,000×30010{,}000 \times 300, with 3,000,0003{,}000{,}000 numbers in total.
  3. The matrix has rank at most 300300, but if the energy of the flow concentrates in a few modes, a POD basis of 1010 modes may hold most of it. Each snapshot is then described by 1010 coefficients instead of 10,00010{,}000 numbers, a reduction of 10001000 to 11.

Interpretation: the data are high-dimensional on paper but low-dimensional in practice. That gap is what makes POD, autoencoders and sparse methods useful for flow data.

Optimization and control

The review also covers optimization and control. Evolution strategies and genetic algorithms search over designs by adapting a probability distribution of candidate designs, which connects them to estimation of distribution methods. Reinforcement learning, which learns a policy from rewards through trial and error, is discussed as a route to control. The authors note its cost: many episodes are needed, which may be affordable in games and prohibitive in experiments and flow simulations. Long-term credit assignment, where a reward arrives long after the action that caused it, is named as a core difficulty. The control material is best read alongside Markov Decision Process and Reinforcement Learning.

Results

The review reports no experiments of its own. Its results are the successes it surveys and the open problems it identifies. The successes are spread across the sections above: low-order models from POD and autoencoders, cluster-based state models, super-resolution of turbulent fields, sparse discovery of governing equations, and corrected turbulence closures. The open problems are equally specific: few convergence guarantees for many learning algorithms, weak extrapolation, the difficulty of training generative adversarial networks to an equilibrium, and the lack of fluid databases large enough for the deep-learning paradigm that has succeeded in images.

Why it mattered

The review did much to set the agenda for machine learning in fluid mechanics. It gave a shared map of methods, grouped by supervision, and tied each to the fluid problems it could address. It also established two recurring themes: that learned models should be judged for interpretability, generalizability and physical consistency, not only accuracy, and that hybrid methods combining learning with the governing equations are the most promising direction. It has been widely cited, with roughly 3,800 citations on OpenAlex at the time of writing.

Its warnings are as useful as its claims. Neural networks interpolate, so a model trained at one set of conditions may fail at another. Overfitting is a constant risk when data are scarce, and cross-validation on withheld data is the minimum check. Many learning methods have no convergence guarantee, which matters when a model will guide a design or a control law. The review asks that these be treated as design constraints, not footnotes.

Reading guide

Read the review in its own order. For each part, these prerequisites matter most:

  1. Section 1 and the historical overview. Feedforward Neural Network and Backpropagation for the perceptron, its limits, and the late-1980s revival of multi-layer networks.
  2. Section 2, challenges. Navier–Stokes Equations for the governing equations the review contrasts with data, and Overfitting and Cross-Validation for the warnings about generalizability.
  3. Section 3.1, supervised learning. Supervised Learning, Loss Function, Empirical Risk Minimization and Stochastic Gradient Descent for the risk functional and how it is minimized.
  4. Section 3.1.1, neural networks. Convolutional Neural Network and Recurrent Neural Network for the architectures the review names, with Backpropagation for training.
  5. Section 3.1.2, support vector machines and random forests. Support Vector Machine and Random Forest.
  6. Section 3.2, unsupervised learning. Principal Component Analysis and Autoencoder for the linear autoencoder that matches POD, and K-Means Clustering for clustering and quantization.
  7. Section 3.3, semi-supervised learning. Generative Adversarial Network for the adversarial game, and Reinforcement Learning with Markov Decision Process for learning from rewards.
  8. Section 4.1, feature extraction. Proper Orthogonal Decomposition and Singular Value Decomposition (SVD) for the modal basis, and Compressed Sensing for sparse acquisition.
  9. Section 4.2, dynamics and closures. Dynamic Mode Decomposition and Koopman Operator for linear models of nonlinear flows, System Identification for sparse identification of equations, and Turbulence with Reynolds-Averaged Navier–Stokes for the closure problem.

Check yourself

QuestionIn the linear autoencoder that the review relates to POD, what is the training goal, and what does the trained encoder find?Show answer

The goal is to make the reconstruction x^=VUx\hat{\mathbf{x}} = \mathbf{V}\mathbf{U}\mathbf{x} close to the input x\mathbf{x}, where U\mathbf{U} compresses to a latent vector of dimension MM and V\mathbf{V} expands it back. With linear activations, the best solution spans the same subspace as the leading eigenvectors of the covariance matrix, which are the principal components, or POD modes. So the trained network learns the same linear modes that the eigenvalue problem gives, but by gradient descent.

QuestionUsing the four-point example, what fraction of the variance does the first mode capture, and what is the residual after one latent coordinate?Show answer

The total variance of the four centred points along the diagonal is 2.52.5 in the normalised covariance, and the first eigenvalue is 2.52.5, so the first mode captures all of it. The residual is 00, because the points lie exactly on the line through (1,1)(1,1) and (4,4)(4,4). The example is a sanity check: a dataset that is one-dimensional in disguise needs one coordinate.

QuestionWhy does the review warn against trusting a trained neural network when the flow changes regime, even if it fits the training data closely?Show answer

Neural networks are fundamentally interpolative. They approximate the function well within the span, or the probability distribution, of the training data. A new regime, such as a different Reynolds number or a different boundary condition, can lie outside that span, so the network is extrapolating, which it does poorly. The review therefore asks for validation on withheld data and for models that respect known physical constraints.

QuestionYou have 300300 snapshots of a flow on a 100×50100 \times 50 grid with two velocity components. Why does a low-rank method help, and how many numbers describe each snapshot after a 10-mode POD?Show answer

Each snapshot has 10,00010{,}000 numbers and the data matrix is 10,000×30010{,}000 \times 300. If the flow's energy is concentrated in a few modes, a 10-mode POD describes each snapshot with 10 coefficients, so a low-rank method exploits structure that the raw grid hides. The price is that the basis must represent the flow you will meet later, which connects back to the extrapolation warning above.

Sources

Read the full paper

Steven Brunton, Bernd Noack, Petros Koumoutsakos, 2019. arXiv:1905.11075