Science and engineering

Machine learning for fluid mechanics

Fluid dynamicists use machine learning to predict lift, drag and pressure fields far faster than CFD, to improve turbulence closures, and to reconstruct full flows from sparse sensors. Trained surrogates make rapid design exploration and optimisation practical.

How machine learning is used in fluid mechanics

Fast flow-field surrogates

Networks trained on CFD results predict pressure and velocity fields, or lift and drag, for new shapes and flow conditions in a fraction of solver time. This makes large design sweeps and shape optimisation practical.

Real exampleDeep learning for RANS airfoil flows (Thuerey et al., 2018)Trained U-net models to infer Reynolds-averaged Navier-Stokes pressure and velocity distributions around airfoils, and studied how training data size and network size affect accuracy.

Learned corrections inside CFD solvers

Machine learning can replace or correct the parts of a simulation that are expensive or poorly modelled, such as subgrid stresses and turbulence closures, while the solver keeps the rest of the physics. Hybrid models can run on coarser grids with accuracy closer to finer ones.

Real exampleMachine learning accelerated CFD (Kochkov et al., 2021)Used end-to-end deep learning to improve the approximations inside a fluid solver for two-dimensional turbulent flows, matching the accuracy of baseline solvers run at much finer resolution.

Reconstructing flows from limited measurements

Physics-informed networks can infer full velocity and pressure fields from sparse sensors or flow visualisations by requiring the result to satisfy the Navier-Stokes equations. This turns qualitative images into quantitative fields.

Real exampleHidden fluid mechanics (Raissi, Yazdani and Karniadakis)Encoded the Navier-Stokes equations in a deep learning framework to infer velocity and pressure fields from visualisations of a passive scalar such as dye or smoke.

Can you learn machine learning for fluid mechanics?

Yes. If you have studied fluid mechanics or run CFD, you already have the hard domain part. Learn Python, linear algebra including the SVD, regression and neural networks, then practise on CFD datasets on regular grids before tackling unstructured meshes and turbulence.

  1. Python and array programmingLoad CFD fields into NumPy arrays and plot them; most flow machine learning papers release Python code.Learn it in Python
  2. Linear algebra and the SVDProper orthogonal decomposition and DMD, the classic data-driven flow methods, are both built on the SVD.Learn it in Maths
  3. Regression and reduced-order modelsFit simple models on POD coefficients before moving on to deep networks.Learn it in Machine Learning
  4. Convolutional and graph networksU-nets suit structured grids, and graph networks handle unstructured CFD meshes.Learn it in Deep Learning
  5. Physics checksTest learned models for mass conservation, behaviour at unseen Reynolds numbers and stability over long rollouts.

Moving into machine learning for fluid dynamics

If you already work in the field

CFD engineers already know meshing, boundary conditions and what a plausible flow looks like, and they can generate training data. Add Python and PyTorch, build a surrogate for lift and drag on a family of shapes you have simulated, and compare it with the solver on held-out cases. Aerospace, automotive and energy companies have growing teams doing this work.

If you come from data science or ML

Machine learning practitioners need the Navier-Stokes equations, nondimensional numbers such as the Reynolds number and the basics of turbulence and CFD. An introductory fluids text and the review 'Machine Learning for Fluid Mechanics' by Brunton, Noack and Koumoutsakos are good starting points.

Roles that do this workCFD engineerAerodynamics engineerScientific machine learning engineerResearch scientist, fluid dynamics

Tools you will use

ToolWhat you use it for
OpenFOAMRun reference CFD simulations that generate training data and validate surrogates.
NVIDIA PhysicsNeMoTrain neural operators and graph networks on simulated flow fields.
Neural OperatorTrain Fourier neural operators that map boundary conditions to flow solutions.
AirfRANS libraryLoad aerofoil RANS simulations and compute force coefficients from predicted fields.
PyTorchBuild custom convolutional and graph surrogates for velocity and pressure fields.

Public data to practise on

  • AirfRANS: RANS simulations of flow around aerofoils for predicting velocity, pressure and force coefficients.
  • Johns Hopkins Turbulence Databases: Direct numerical simulations of turbulent flows, queryable online, for turbulence modelling and super-resolution.

Your first project

Download AirfRANS, predict the lift coefficient from angle of attack, inlet velocity and aerofoil shape parameters with gradient boosting, and compare it with thin-aerofoil theory (2πα) using mean absolute error on held-out aerofoils.

Common questions

Can machine learning replace CFD?

Not for most engineering decisions yet. Learned surrogates are fast within the range they were trained on, but CFD remains the reference for new configurations and certification. The common pattern is CFD to generate data and validate, and machine learning to explore quickly.

Is machine learning used for turbulence modelling?

Yes. Researchers train models to correct RANS closures or predict subgrid stresses for large-eddy simulation. Making these models generalise across flows and stay stable inside a solver is still an active research problem.

What data do I need to train a flow surrogate?

A set of solved cases covering the shapes and conditions you care about, from CFD or experiments. Public benchmarks such as PDEBench let you practise before generating your own data.

Which is better for flows, PINNs or data-driven surrogates?

They solve different problems. Data-driven surrogates need many solved cases and then predict quickly. Physics-informed networks use the governing equations and help when data is sparse, as in flow reconstruction, but for routine forward problems a conventional solver is usually faster.

Courses for these skills

New to programming or maths? Start with Python, or follow the machine learning path in order. Published lessons are free to read; compare Free and Pro.