Machine Learning – Fluid Mechanics

Posted on January 11, 2024

Neville Dubash headshot

This post was originally published in two parts which have been combined below.


Part 1

 

One of Coanda’s core areas of expertise—going all the way back to its start in the 1990’s—is fluid mechanics. Since then, Coanda has been expanding into other areas, one of which is machine learning. So how about machine learning applications in fluid mechanics?

Machine learning (ML) models have state-of-the-art performance in a wide range of applications. And more recently there has been an increasing interest in ML techniques in scientific and engineering fields. In fluid mechanics specifically, there already exist well defined and understood physical equations that govern fluid behavior (the Navier-Stokes equations) as well as well-developed method for solving these equations (e.g., finite difference, spectral methods). So why would ML be necessary? Why use a “black box”, data-driven model when you have the actual physical equations and numerical methods to solve them?

The main advantage of ML models is speed. Once trained, a forward pass of a model to generate a prediction can be many orders of magnitude faster than the traditional numerical methods used to solve fluid mechanics problems. A disadvantage of “vanilla” ML models is that they are purely data driven and do not know that there are physical rules governing the process; they must somehow infer these rules form data. This disadvantage has been partly overcome by physics-informed machine learning (PIML), which is a framework that can account for and incorporate physical knowledge and equations into the various stages of the ML. With PIML, physics can be infused through various methods—physics-informed features and inputs, physics informed architectures, and/or physics-informed loss functions. Though younger than other ML application areas, PIML is developing rapidly and has been shown to perform well, with high accuracy on certain types of problem.

In our next post we will examine some specific examples where PIML could be used and where it can help perform tasks that would otherwise not be possible with traditional computational fluid dynamics.


Part 2

Previously we introduced physics-informed machine learning (PIML), where physical knowledge and physical equations can be incorporated into machine learning models. In a field where the physics are well understood and numerical methods to solve the physical equations are well-developed, the primary advantage of the PIML models is speed. Compared to traditional numerical methods to solve the Navier-Stokes equations, PIML models can be many orders of magnitude faster. Two key areas where PIML could be useful are

-Solving inverse problems. For example, determining various physical or model parameters from measured flow data. Currently this can be prohibitively computationally intensive using traditional computational fluid dynamics (CFD). The speed of PIML models allows for a rapid search and optimization over the parameter space. Even if the models are not as accurate as the conventional CFD models, they can identify regimes of the parameter space for which full CFD simulations should be performed.
-Solving problems where approximations are already being made. For example, turbulence is often not modelled directly, it is effectively approximated using closure models. As well, complex flows with phase transitions or chemical reactions with many species involved will usually involve some simplifying “closure” model approximation to make the problem tractable for traditional CFD. With these types of problems, the CFD results already have some small but significant error; hence, in principle switching to a PIML model (also with small but significant error) is less of a concern. With PIML models you get a great speed advantage and potentially also a reduction in error.

Nonetheless, with literally centuries of work going into the physics of motion and nearing a century of work on numerical methods, machine learning models for fluid mechanics will have a high bar to surpass before they become more mainstream.