Technical Article

Types of Machine Learning (ML) Algorithms for Modeling and Controlling Fluid Dynamics

August 11, 2021 by Muhammad Asim Niazi

Fluid flow and control are often used in the wastewater, food and beverage, and chemical industries. Which types of machine learning (ML) algorithms are best suited for fluid dynamics?

Machine learning (ML) is the ability of a system to make decisions with little or no human involvement. The system does not require programming to gather and utilize data. The programming defines the data collection procedure, describes how to acquire relevant information, and determines the model that ML uses to predict behavior.

To make effective decisions, it fetches data from the target and predicts its behavior. The structured data or the input data set are the only requirements for ML techniques. The algorithms for ML can be categorized into supervised, semi-supervised, and unsupervised learning.

ML for fluid dynamics can be challenging compared to other applications such as image processing. Other applications are stable in their domain, and there is little chance of drifting from their defined behavior. On the other hand, fluid flow is characterized by multi-dimensional, nonlinear, and complex factors that remain under the testing phase. The fluid flow’s behavior is often unsteady. It can be complicated to develop the ML algorithm for these unsteady flows.

Fluid dynamics are used in various fields such as transportation and energy generation. These functions remain entirely different from each other. Also, the ML techniques must be interoperable in all fields to provide application requirements for diverse areas. 


Modeling Flow Dynamics

Modeling flow control means simulating actual fluid flow behavior to provide real-world fluid characteristics. These characteristics develop a prototype that can be implemented in a basic problem-solving technique. The modes must be accurate, without any deviations in depicting real-world challenges and problems.


Figure 1. Fluid behavior simulation in a jet propulsion system.


Some modeling techniques used in flow dynamics include neural network modeling, dynamic mode decomposition, and parsimonious nonlinear modeling.


Neural Network Modeling

Neural network (NN) is the supervised learning technique. The NN technique mimics how the brain processes data. It consists of interconnected units activated during the problem-solving process, known as neurons. Depending upon the problem's complexity and requirements, the NN technique can combine more than one neuron to perform a specific task or application.


Figure 2. A neural network.


It comprises a layering system with three layers: input, hidden, and output. The input layer feeds the input variables to the neurons. The hidden layer consists of neurons processing the data, and the values propagate from one neuron to another. The output layer represents the target field delivering the results.

Applications such as heat transfer mechanisms and energy transfer using fluids in compressors often use NN. It can also model turbulence in fluids and resistance faced by airplanes or flying objects.

NN is often faced with specific challenges, and among them is overfitting. Overfitting occurs when the model copies its trained data exactly. If the input data goes outside the trained data values, the NN cannot perform effectively. This limits the NN’s purpose, decreasing ML’s efficiency advantage.


Dynamic Mode Decomposition (DMD) 

DMD is a modeling technique that breaks down the dynamic flow into fundamental components. These components correspond to both space and time characteristics. These features include periodicity, damping, (temporal) segmentation, and airflow long-time behavior.

DMD is used for linear fluid characteristics because DMD uses linear flow field measurements. For this purpose, DMD cannot be used to model nonlinear characteristics.

To model nonlinear fluid dynamics, the Extended DMD has been created. The Extended DMD is capable of modeling nonlinear fluid dynamics by using kernel Methods and dictionary learning.


Parsimonious Nonlinear Models 

Parsimonious nonlinear models simulate fluid dynamics. This model has simple applications and uses minimum parameters. The technique only uses necessary predictive parameters and avoids additional ones.

Parsimonious nonlinear models help prevent overfitting. This model can also be used in more than one fluid dynamic environment and can effectively interoperate.


Controlling Flow Dynamics

Controlling fluid according to requirements is an essential factor in fluid dynamics. The purpose of model development and other ML in fluid dynamics is useless if the fluid is not controlled to the user requirements.

Controlling fluid means manipulating fluid flow to change its properties. In aerodynamics, properties include lift and drag. These properties can be successfully controlled and improved using an ML algorithm.

ML algorithms to control fluid flow include NN and genetic algorithms (GA).


Neural Networks (NN)

NN is an essential algorithm for ML in fluid control, especially in aerodynamics. In NN, the skin friction drag, friction between the fluid and surface of a solid object in a liquid, is minimized.


Figure 3. Fluid flow sensors from SICK. Image used courtesy of SICK


NN algorithms require a high amount of training data, and the environment may be nonlinear. It can also require substantial sensor or actuator data for its implementation in fluid dynamics.


Genetic Algorithms (GA)

Genetic algorithms (GA) solve nonlinear systems and optimization by mimicking biology. They start with generating possible solutions. These solutions are analyzed for problem-solving against the selection criteria. The approved solutions then generate another era, and this process is continued.

GA has been used in fluid control applications. Examples include multifrequency open-loop systems, more than one sensor feedback application, and distributed control systems (DCS).

In the GA, the learning time increases with the increase in input parameters, making it challenging for a fluid system with non-linearity, multiple sensors, or historical factors.

Modeling fluid dynamics to provide real-world characteristics can prevent issues from occurring. But when fluid dynamics is nonlinear, it can be hard to determine which algorithm is best-suited for the process. Algorithms such as NN and GA solve nonlinear problems well, are built for these types of systems, and are relatively easy to learn. Do you use an algorithm other than these in your fluid dynamics simulation?