The flow approaches an elongated teardrop shape, point at the rear, which is the airfoil. At first, the flow is shown in blue running over the top, and red running under the bottom. Midway across the airfoil, the blue curls into a cylinder—a vortex peeling away from the wing—with another cylinder beyond the point, breaking into fragments as it extends further away. The red hugs the bottom of the teardrop shape, waving as it extends behind before breaking into rough cylinders and fragments. Blue fragments dominate the top of the flow, while red fragments are close to the aerofoil surface.

HydroGym trains, assesses AI for actively controlling fluid dynamics

With more than 60 environments, the simulated proving ground aims to speed the development of AI controllers that optimize drag, lift, noise and heat management.

A graphic design featuring a series of circles connected by lines, representing a neural network.

Artificial Intelligence

Explore the forefront of AI
at Michigan Engineering

  • Controlling the flow of fluids is critical to many fields of science and engineering, but with complex physics and many variables, these flows usually can’t be directly predicted.
  • By demonstrating the success of a drag-reducing strategy trained in a simple scenario and applied to a simulated airplane wing, the team showed the potential for HydroGym to advance broadly applicable flow control models.
  • The collaboration includes the University of Washington, University of Michigan, RWTH Aachen University and the Technical University of Munich.

A platform for training and comparing machine learning models for actively reducing drag, improving lift, cutting noise and managing heat has been launched by an international team including researchers at the University of Washington, University of Michigan Engineering, RWTH Aachen University and the Technical University of Munich.

“Fluid flows are central to several trillion-dollar industries, including energy, transportation, health and defense. An improved ability to understand and control these flows could have an immense economic and ecological impact, helping us to enable a better future,” said Steven Brunton, senior co-corresponding author of the study in Nature and the Boeing Professor in AI & Data-Driven Engineering within UW mechanical engineering. 

The large number of variables typically makes it impossible to directly calculate fluid behaviors in realistic scenarios. Now, the international team has built a platform focused on solving this problem through reinforcement learning, a form of machine learning that has already revolutionized fields like protein folding and nuclear fusion by training AI agents through interactions with their environments.

Proving ground for reinforcement learning controllers

By incorporating physics knowledge into the training of AI agents that actively modify fluid flows over surfaces, the new platform reduced the amount of trial-and-error needed to optimize reinforcement learning control strategies by as much as 65%. Called HydroGym, it also compares control strategies on a level playing field, helping identify the best available approaches for solving problems such as improving the efficiency of airplanes and wind turbines, making jet engines quieter and cooling supercomputers.

Along the wall, the flow appears mostly in blue, with red stripes parallel to the edge of the cavity. The blue forms waves over the top and breaks into fragments along the wall at the far side of the cavity. In the cavity, the blue breaks into fragments running down the far wall, while the red fragments are along the bottom and up the near wall.
Open cavity flow modeled in HydroGym, displaying rolling shear layers over the cavity and strong circular flows inside it. This environment tests reinforcement learning agents on stabilizing acoustic and pressure oscillations. Credit: Christian Lagemann, University of Washington.

“I hope this helps move the field from individual demonstrations towards a more systematic and collaborative approach to discovering general principles for controlling complex flows,” said Christian Lagemann, first author of the study and former postdoctoral researcher at UW under Brunton, the HydroGym principal investigator.

“Instead of developing controllers for isolated flow problems with no common framework for comparison, we can now study how control strategies transfer across different geometric shapes and types of flow, or train in inexpensive surrogate environments and test in much more realistic scenarios.”

HydroGym focuses on training and testing active methods for controlling fluid flows, such as shape morphing, tiny flaps or spinning elements, or systems of jets that counter or redirect turbulence. Its development was primarily funded by the U.S. National Science Foundation and the Boeing Co., with additional funding from the University of Michigan and others.

From simple flows to realistic applications

In one demonstration, the team explored how a channel formed of two flat surfaces, peppered with holes like air hockey tables, could keep surface friction to a minimum. They trained a machine learning model to control the air entering and exiting the holes, disrupting the turbulent flows that increase friction while always keeping the incoming and outgoing air in balance.

The flow approaches an elongated teardrop shape. At first, it is shown in blue while running over the top, breaking into fragments as it rises further from the surface (boundary layer separation). Blue fragments dominate the top of the flow, while red fragments are close to the aerofoil surface.
High-Reynolds-number turbulent flow over an airfoil (airplane wing shape) at a low angle of attack (normal flight). HydroGym tests AI-driven flow control on boundary-layer separation and complex wake vortex shedding to optimize lift and efficiency. Credit: Christian Lagemann, University of Washington.
The flow approaches an elongated teardrop shape, point at the rear, which is the airfoil. At first, the flow is shown in blue running over the top, and red running under the bottom. Midway across the airfoil, the blue curls into a cylinder—a vortex peeling away from the wing—with another cylinder beyond the point, breaking into fragments as it extends further away. The red hugs the bottom of the teardrop shape, waving as it extends behind before breaking into rough cylinders and fragments. Blue fragments dominate the top of the flow, while red fragments are close to the aerofoil surface.
A HydroGym benchmark environment simulating 3D stalled flow over an airfoil (shape of an airplane wing) at a high angle of attack (as if the plane’s nose were pointed too high). The visualization shows vortex structures (colored by rotational direction: blue for clockwise, red for counter-clockwise) observed by reinforcement learning agents that learn how to suppress turbulence and prevent aerodynamic stall. Credit: Christian Lagemann, University of Washington.

The researchers then applied the controller to a much more complex scenario: a section of a simulated airplane wing. It reduced the surface friction across the wing by 38% and the overall drag by 11%, while training in a simpler scenario was 100 times faster and 10,000 times cheaper than training directly on the wing. 

“One of the key findings is zero-shot transfer: in other words, learning in simple geometries to distill the key physics, and deploying the models in very complex geometries with very high control performance,” said Ricardo Vinuesa, co-corresponding author of the study and a U-M associate professor of aerospace engineering. 

He served as co-principal investigator of the HydroGym project with Wolfgang Schröder, professor of fluid mechanics at RWTH Aachen, and Nikolaus Adams, professor of aerodynamics and fluid mechanics at TUM.

The ability to apply the model to a new situation without additional training indicates the potential for progress toward a single model of fluid dynamics—one that captures enough physics to apply to different levels of turbulence, on any surface shape, and to liquid and gas flows or even a mixture of the two.

More than 60 environments for training and comparison

HydroGym is not restricted to models that run as one central “brain.” It can also train and test distributed control systems in which individual controllers manage regions of a surface while coordinating with their neighbors. This is important because on large surfaces, there is too much information for a centralized model to manage. A system of smaller controllers, trained through multi-agent reinforcement learning, takes advantage of the fact that though the flow may differ in time and space, it follows the same rules over the whole surface.

The flow approaches a cylinder laying on its side, shown in blue over the top and red under the bottom. At first, both flows are smooth, extending beyond the cylinder. Then, they fragment into red and blue where they come back together and mix.
A benchmark simulation of turbulent flow past a circular cylinder. HydroGym uses this classic benchmark to train AI controllers to manage alternating vortex shedding and wake turbulence to reduce drag.Credit: Christian Lagemann, University of Washington.

Rather than drawing from historical datasets for model training, HydroGym generates simulated datasets on the fly, enabling users to choose from multiple physics modeling strategies, including lattice Boltzmann, finite-volume, spectral-element and finite-element. Because several of these solvers—including JAX-Fluids—support automatic differentiation, they can be embedded directly into HydroGym’s training loop, opening the door to gradient-based and hybrid optimization strategies alongside standard reinforcement learning. 

Computational Science and Engineering

Explore the forefront of digital engineering
at Michigan Engineering

The team prepared more than 60 testing environments—with various control strategies, surfaces and flows—in which HydroGym users can train their models and compare them against the competition. HydroGym’s code, documentation and full set of environments are freely available on GitHub, and the team is actively growing the platform together with the wider fluid-dynamics community.

The team includes researchers from Inha University, South Korea; KTH Royal Institute of Technology, Sweden; HESAM University, France; Mediatek Research, U.K.; and the German Center for Neurodegenerative Disease.

Adams is also director of the Munich Institute of Integrated Materials, Energy and Process Engineering. Schröder is also dean of mechanical engineering at RWTH Aachen.

Additional funding was provided by the U.S. Army Research Office, the German Research Foundation and the European Research Council.

Brunton introduces HydroGym on YouTube.