Hostname: page-component-74656f9884-8rzl6 Total loading time: 0 Render date: 2026-11-05T20:29:43.744Z Has data issue: false hasContentIssue false

A practical guide to machine learning in fluid mechanics: an encoder–decoder perspective

Published online by Cambridge University Press:  21 October 2026

Kai Fukami*
Affiliation:
Department of Aerospace Engineering, Graduate School of Engineering, Tohoku University, Sendai 980-8579, Japan
Koji Fukagata
Affiliation:
Department of Mechanical Engineering, Keio University, Yokohama 223-8522, Japan
*
Corresponding author: Kai Fukami, kfukami1@tohoku.ac.jp

Abstract

Content of image described in text.

This paper discusses how machine learning could support studying fluid mechanics. We first offer the so-called encoder–decoder perspective that can accommodate a range of problem settings fluid mechanicians often tackle with data-driven techniques. Focusing on nonlinear machine-learning analyses, representative efforts on regression, data compression, prediction and system control are introduced, following the given picture of data-driven fluid mechanics. We then provide a step-by-step guideline for studying fluid flows in a data-driven manner – (i) setting the problem up, (ii) curating the data, (iii) constructing a model, (iv) training a model, (v) assessing the machine-learned outcomes, and (vi) improving the techniques – while discussing what we fluid mechanicians should be mindful of. Importantly, each step necessitates carefully incorporating prior knowledge of flow physics to appropriately design machine-learning studies for complex fluid flows, rather than naively applying black-box techniques. We further perform a case study on data-driven compression of a turbulent wake around an aerofoil, offering example approaches for investigating three-dimensional, unsteady turbulent flows. We hope that this perspective will serve as a practical guide for designing machine-learning studies in fluid mechanics.

Information

Type
JFM Perspectives
Creative Commons
Creative Common License - CCCreative Common License - BY
This is an Open Access article, distributed under the terms of the Creative Commons Attribution licence (https://creativecommons.org/licenses/by/4.0/), which permits unrestricted re-use, distribution and reproduction, provided the original article is properly cited.
Copyright
© The Author(s), 2026. Published by Cambridge University Press
Figure 0

Figure 1. Figure 1 long description.An encoder–decoder perspective of data-driven fluid mechanics.

Figure 1

Figure 2. Seminal studies on machine-learning-based analysis for fluid flows. (a)$(a)$ A single-layer perceptron-based active control for drag reduction in wall-bounded turbulence (Lee et al.1997). (b)$(b)$ A multi-layer perceptron-based compression of turbulent channel flow (Milano & Koumoutsakos 2002). Representative reconstructed flow snapshots are also depicted. Figures are reproduced from the original papers.

Figure 2

Figure 3. Nonlinear machine-learning-based estimation of the lift coefficient CL$C_L$ for a flow around a NACA0012 aerofoil with a Gurney flap at Rec=1000$\textit{Re}_c = 1000$ (Fukami et al.2020a). Four different machine-learning models F:s(t)→CL(t)${\mathcal F}:{\boldsymbol s}(t)\rightarrow C_L(t)$ are compared. Figures are reproduced from Fukami et al. (2020a).

Figure 3

Figure 4. Nonlinear autoencoder-based analysis of extreme vortex-gust aerofoil interactions (Fukami & Taira 2023; Fukami et al.2024b). (a)$(a)$ Data sets collected through direct numerical simulations, spanning over a huge gust-parameter space. (b)$(b)$ Observable-augmented convolutional autoencoder. (c)$(c)$ The identified low-order submanifold ξ$\boldsymbol \xi$. (d)$(d)$ Representative snapshots projected to the points (i)–(iv) along with the reconstructed fields through the decoder. (e)$(e)$ The estimated lift coefficients CL$C_L$ through the subnetwork. Figures are reproduced from the original papers.

Figure 4

Figure 5. Nonlinear autoencoder-based analysis of transient gust encounter with experimental measurements (Smith et al.2024). (a)$(a)$ A cyclic perspective on transient gust encounter. A birth–death plot is also presented. (b)$(b)$ The three-dimensional latent space identified by POD, a regular autoencoder and the topological autoencoder. (c)$(c)$ Representative reconstructed flow snapshots. The structural similarity index measure (SSIM) between the experimental measurement and the reconstructed flow field is reported inside each flow contour. Figures are reproduced from Smith et al. (2024).

Figure 5

Figure 6. Super-resolution reconstruction of turbulent flows with machine learning (Fukami et al.2019a, 2021a, 2023; Fukami & Taira 2024). (a)$(a)$ Sparse sensor reconstruction as a super-resolution problem, illustrated with an example machine-learning architecture of the hybrid downsampled skip-connection/multi-scale (DSC/MS) model (Fukami et al.2019a). (b)$(b)$ Super-resolution of two-dimensional decaying turbulence (Fukami et al.2019a). The L2$L_2$ reconstruction error norm is reported underneath each contour. Figures are reproduced from the original papers.

Figure 6

Figure 7. Super-resolution of turbulent channel flow (Fukami et al.2021a). (c)$(c)$ The three-dimensional view of flow fields visualised with a Q$Q$ isosurface. (d)$(d)$ The x−z$x{-}z$ sectional view. Figures are reproduced from the original papers.

Figure 7

Figure 8. Examples of generalised super-resolution for unsteady flows. (a)$(a)$ Three-dimensional reconstruction of a bluff body wake from limited sectional measurements (Matsuo et al.2024). (b)$(b)$ Sparse sensor reconstruction for industrial turbulence of flow in a pump sump (Fukami et al.2022).

Figure 8

Figure 9. Machine-learning-based reduced-order modelling of a minimal turbulent channel flow (Nakamura et al.2021). (a)$(a)$ A general framework of latent reduced-order modelling composed of a spatial dimensional compressor and a temporal latent integrator. Comparison of (b)$(b)$ attractor and (c)$(c)$ flow field between the reference simulation and the machine-learning-based prediction. Figures are reproduced from the original papers.

Figure 9

Figure 10. An example usage of machine-learned outcomes for flow control. (a)$(a)$ Reinforcement learning for control design in the latent space. (b−d)$(b-d)$ Reinforcement learning-based latent control design for plane Couette flow (Linot et al.2023): (b)$(b)$ time history of drag D$D$ and action a$a$; panels (c)$(c)$ and (d)$(d)$ show representative flow snapshots. Figures are reproduced from the original papers.

Figure 10

Figure 11. A flow chart of machine-learning-based studies for fluid flows.

Figure 11

Table 1. Example combinations of input qin${\boldsymbol q}_{\textit{in}}$ and output qout${\boldsymbol q}_{\textit{out}}$ for data-driven state estimation in fluid mechanics.Table 1 long description.

Figure 12

Figure 12. Data preparation for machine-learning analysis of fluid flows. (a)$(a)$ Time series of sensor readings or probe data is often handled as a matrix (nsensor×nt)$(n_{{sensor}} \times n_t)$. A series of flow snapshots can be treated with (b)$(b)$ a matrix (ngrid×nt$n_{{grid}} \times n_t$), or (c)$(c)$ a higher-dimensional tensor (e.g. nt×nx×ny×nz×nvariable$n_t \times n_x \times n_y \times n_z \times n_{{variable}}$), depending on the machine-learning model chosen for the analysis.

Figure 13

Figure 13. Data split for machine-learning analysis of fluid flows. (a)$(a)$ The prepared data sets are first divided into training, validation and test sets. (b)$(b)$ The relationship between the estimation error and the model complexity, monitored with the training and validation data. (c–f) Interpolation and extrapolation of machine-learning-based analysis for fluid flows. The test data preparation, such as shown in panels (c)$(c)$ and (d)$(d)$, needs to be carefully performed, depending on the flows of interest, e.g. (e)$(e)$ transient, and (f)$(f)$ statistically stationary flows.

Figure 14

Figure 14. A variety of machine-learning models that have been considered for studying fluid mechanics.

Figure 15

Figure 15. Activation functions.

Figure 16

Figure 16. Loss surface with respect to (a)$(a)$ model parameters, and (b)$(b)$ input data.

Figure 17

Figure 17. The impact of the cost function design on super-resolution reconstruction of turbulent flows (Fukami et al.2023). The value underneath the reconstructed flow fields reports an L2$L_2$ reconstruction error norm.

Figure 18

Figure 18. Selection of tuning parameters for the cost function. (a)$(a)$ Sparsity-promoting cost function: the trade-off relationship between the reconstruction term εd$\varepsilon _d$ and the weight term ||w||$||{\boldsymbol w}||$ is depicted. (b)$(b)$ Observable-augmented cost function: there exists a hot spot that can balance the reconstruction terms εd$\varepsilon _d$ for the primary interest and εp,1$\varepsilon _{p,1}$ for an observable. (c)$(c)$ An example trace of the multiple loss terms during the training process.

Figure 19

Table 2. Common error metrics for assessing machine-learning analysis of fluid flows.Table 2 long description.

Figure 20

Figure 19. Fragility of a scalar error metric for assessing fluid flows. The flow fields in the blue box report the same L2$L_2$ error reconstruction norm compared with the reference field.

Figure 21

Figure 20. Convergence check for machine-learning analysis of fluid flows. (a)$(a)$ A general relationship between the model error and data amount, including the number of training snapshots and the latent dimension. (b)$(b)$ Implicit rank minimising autoencoders (IRMAE) to find the embedding dimension of given data with singular value decay (Jing et al.2020). (c)$(c)$ Applications of IRMAE for the Kuramoto–Sivashinsky equation (Zeng et al. 2024).

Figure 22

Figure 21. Autoencoder-based compression of turbulent wake around a NACA0012 aerofoil at Rec=5000$\textit{Re}_c = 5000$ for the present case study. (a)$(a)$ A generic autoencoder formulation. An example reconstruction by the POD-MLP model with nξ=3$n_{\boldsymbol \xi } =3$ is shown. (b)$(b)$ Training/validation/test data split used for the example of a statistically stationary turbulent wake. (c)$(c)$ Three compression techniques considered in the case study.

Figure 23

Table 3. Strengths and weaknesses of data-driven compression models for fluid flows covered in the current case study.Table 3 long description.

Figure 24

Figure 22. Autoencoder-based compression for a turbulent wake around a NACA0012 aerofoil at Rec$\textit{Re}_c$ = 5000. The relationship between the latent dimension and the reconstruction errors (an L2$L_2$ error norm ε$\varepsilon$ and SSIM), along with representative reconstructions using POD, a CNN-MLP autoencoder and a POD-MLP autoencoder, is presented. The three-dimensional reconstructed fields are visualised with a Q$Q$ isosurface coloured by the spanwise vorticity ωz$\omega _z$. The spanwise-averaged reconstructed fields are also depicted.

Figure 25

Figure 23. Impact of the model complexity on compression performance. (a)$(a)$ Adjustable parameters that contribute to the number of weights nw$n_w$ inside the CNN-MLP autoencoder. (b)$(b)$ Dependence of the reconstruction error on the number of weights nw$n_w$.

Figure 26

Figure 24. Dependence of the compression performance on the nonlinear activation function. The CNN-MLP autoencoder with nξ=3$n_{\boldsymbol \xi } = 3$ is considered. Error bars correspond to the standard deviation across five-fold cross-validation.

Figure 27

Figure 25. Spanwise-averaged spectrum of the Q$Q$ criterion measured from three probes in a wake.

Figure 28

Figure 26. Sparse sensor reconstruction of a turbulent wake around a NACA0012 aerofoil via latent space. (a)$(a)$ A unification of an MLP-based latent vector estimator Fs${\mathcal F}_{\boldsymbol s}$ and the pretrained CNN-MLP decoder Fd${\mathcal F}_d$. Representative reconstructed fields with ns=6$n_s = 6$, 12 and 24 are shown. (b)$(b)$ Spanwise-averaged fields corresponding to the realisations shown in (a)$(a)$. The values underneath each contour report an L2$L_2$-reconstruction error norm.

Figure 29

Figure 27. Dependence of the sensor reconstruction performance on the number of training snapshots nsnapshot$n_{\textit{snapshot}}$ with ns=12$n_s=12$. A regular L2$L_2$ cost function and gradient-based loss are considered.

Figure 30

Table 4. A dictionary table of data-driven fluid dynamics.Table 4 long description.