Learning Fluid Flow with AI-Enabled Virtual Wind Tunnels

Share post:

There’s never enough time to do everything, even in engineering education. Employers want engineers capable of wielding simulation tools to expedite iterative research, design, and development. Some instructors try to address this by teaching for weeks or months, on derivations of numerical methods, approaches to discretization, the intricacies of turbulence models, and more. 

Unfortunately, focusing on fundamentals leaves little or no time to help develop higher-level skills and intuition with simulation-driven engineering, which is what employers want and need.

Others have tried to address this through an applied approach. Instructing and mentoring students as they work through software tutorials and more complex projects, which initially appears to be a solution. 

It’s a trap. Instead of learning the fundamentals, we ask students to dive into software packages with complex interfaces and infinite settings, designed and developed to suit any and all special use cases. This gives students some familiarity with navigating simulation projects and software, but sacrifices understanding of the numerical method fundamentals. This approach also fails to deliver the skills employers are seeking.

The following is a brief overview of the approach which I developed: an automated computational fluid dynamics (CFD) workflow that is more intuitive and powerful for engineering students.

This simulation tool uses a numerical solver around arbitrary objects to generate the dataset for training an AI model using NVIDIA Modulus as the underlying framework. The AI surrogate model is used for exploring design variants providing students with an easy-to-use experimental platform for developing an intuitive understanding and developing analysis skills. 

As an educator, I teach engineers to be objective and reflective. Reflecting on the use of simulation tools from a mechanical engineering perspective, finite element analysis and computational fluid dynamics are tools created to improve on and expedite design and analysis work. 

The importance of simulation tools has not been lost on the field, as educators have devoted entire courses to learning the intricacies and applications of both. Unfortunately, elevating education on simulation tools to standalone courses has exacerbated the problem.

Engineering simulation tools should not have standalone courses in undergraduate education. They should be embedded within all courses, ever-present. Providing students with challenges of varying complexity and from different perspectives to develop knowledge and familiarity. Providing instructors with the time needed to help students develop the higher-level skills and intuition sought by future employers.

Reframing the way simulation tools are taught and incorporated in undergraduate engineering education would have a significant impact. Students would learn the simulation tools at the onset of their programs. It would be so fundamental to this reframed model that it would be easy to fall for the same original trap: devote an entire course to teaching about simulation tools.

Given what appears to be the start of an infinite loop that leads to the same logical solution, what can be done? Engineers must ask for more from simulation software and technology.

Fast. Accurate. Effortless. These are the characteristics that engineers should expect from their tools. These also are the characteristics of tools that enable instructors to weave their use throughout engineering education curriculums and help create future engineers.

Rather than try to address all possible fluid flow problems, I set a goal to develop a simulation tool for our students that embodied these characteristics. 

Historically, most fluid– and aero-related senior design projects at MSOE have involved external flows around ground or air vehicles. To address these use cases, I built an automated CFD workflow that simulates the flow around arbitrary objects but also does so for a group of geometric variants. The generated dataset is used as the training and validation sets for a MeshGraphNet (MGN), which is then used to infer surface stresses and forces on hundreds of additional geometric variants.

Using NVIDIA Modulus as the physics-ML training platform, I explored a few approaches. While an initial version of the automated workflow used physics-Iinformed neural networks (PINNs), the reduced memory usage and speedups provided by using an MGN were perfect fits for the problem. 

Just as the Ahmed Body AeroGraphNet example uses the mesh surface, surface pressure, surface shear stress, Reynolds number, and important geometric parameters as inputs into the model, the virtual wind tunnel uses the same, with programmatically modified geometric parameters that work with any arbitrary 3D model. 

As more novel architectures emerge in the future, I will use Modulus to seamlessly improve the surrogate models.

Removing barriers for students

I used MSOE’s compute cluster Rosie, and its student portal Open OnDemand, to create a simple web submission page for students to launch simulations. Open OnDemand enables more traditional command-line interface (CLI) submissions but also provides a platform for improved interfaces and interactivity.

Students upload a 3D model, specify a Reynolds number,  and specify whether the vehicle is air– or ground-based and if they want AI-enabled feedback. After launching the simulations, the students are emailed when the job is complete. 

The email contains drag, lift, and lateral forces, center of pressure information, automatically generated streamline plots and videos, and a file containing surface stress data in case they want to make additional plots. Using inferred results, they also get images and videos of where they can modify their design to achieve changes in aerodynamic forces and centers of pressure.

Learning Fluid Flow with AI-Enabled Virtual Wind Tunnels
Figure 1. Submission form for HPC and AI engineering simulations

While a simple webform and email may seem archaic compared to generative aerodynamic suggestions, it reframes the interaction. Students don’t need training. They don’t need high-performance computing (HPC) or CLI knowledge. They perform a simple calculation of the Reynolds number for their 3D model and flow. Not completely effortless, but it’s getting closer.

AI-enabled, end-to-end simulation pipeline

Instead of creating a programmatic solution to modify arbitrary, triangulated meshes while guaranteeing valid geometries, I chose a different route. 

Student-supplied models are used as the source for generating a volumetric or voxelated copy. This volumetric copy is then modified by adding and removing material over its surface to create hundreds or thousands of modified variants. The volumetric variants are then remeshed and used during training, validation, and inference.

The original geometry and a training and validation set are used as the models for input into a traditional CFD solver, OpenFOAM. Generated object meshes are typically in the range of 15–20M total cells with 70–90K surface cells and solvers complete 500 iterations. 

The output from OpenFOAM includes the surface stresses, pressure, and shear, for the original model and all of the variants. This dataset is then used as input into the Modulus training pipeline using MGN along with relevant geometric modification parameters.

Instead of comparing inferred results from trained MGN to OpenFOAM results when creating feedback images and video, inference is completed for the training, validation, and test sets. The inferred results are then compared to each other to generate image and video feedback to be emailed to students. 

While each parallelized OpenFOAM solution can take over an hour to complete, training on a DGX-1 system takes approximately four hours and inference on a loaded mesh takes less than one second. 

I designed the virtual wind tunnel to use parallel jobs of parallel-CPU OpenFOAM runs to generate the dataset and then perform training and inference on four NVIDIA V100 GPUs. Rosie was recently upgraded to include NVIDIA H100 GPUs, which I look forward to using for additional acceleration of the wind tunnel.

GIF shows six screenshots of rotating visuals for geometric modifications and how their changes impacted drag, lift, and lateral forces.
Figure 2. Comparison of inferred Modulus results quickly performed on an array of geometric modifications

Accessible CFD simulations

To see how students would use the solution,  I made the initial OpenFOAM-only version of the virtual wind tunnel available to students last academic year. After students increased their use of the toolchain, I made available the automatic generation of variants, training, and inference.

The overall endeavor appears to have paid off. More CFD analyses and wind tunnel experiments were carried out last academic year than senior design groups have completed in almost a decade, combined. This enabled students to focus on using the available system as an easy-to-use experimental platform, rather than secondary challenges that they had to overcome. I am advising three additional aero-focused design projects this year and look forward to seeing what they can design and develop.

Recent advances in AI software and technology have made leaps forward in engineering tools and simulations almost tangible. There’s no better time to be reimagining how we interact with the engineering simulation tools. We need the next generation of tools to be designed for novices, for students, and even for our youngest learners, starting in elementary school. 

Instead of focusing on computational fluid dynamics, we can teach iterative design of winglet shapes, biomimicry-inspired features in an underbody venturi, intuition, and high-level analysis skills, and the name and feel of the wind.

Get started 

Educators around the world can get started with their AI journey with the free Deep Learning for Science and Engineering Teaching Kit by joining the NVIDIA DLI Teaching Kit Program. The entire lecture part of the course is also openly available through NVIDIA On-Demand for educators and students everywhere.

For researchers interested in exploring AI, the /NVIDIA/modulus GitHub repo has excellent resources for getting started.

Related articles

Pascari Branding and Accelerating AI

At FMS 2024, Phison devoted significant...

Google Expands NotebookLM with Business Pilot and AI Audio Customization

Google’s NotebookLM, got a big upgrade, giving users more control over its AI-generated audio conversations in podcast style....

AI Sabotage: Anthropic’s New Tests Show Just How Real the Threat Is

Anthropic has kicked off a fresh wave of AI safety evaluations, pushing its Claude models to the edge...