DEV Community

Cover image for AI & Deep Learning for CFD Flow Prediction
Precise Simulation
Precise Simulation

Posted on • Originally published at featool.com on

AI & Deep Learning for CFD Flow Prediction

In a series of publications Prof. Thi-Thu-Huong Le, Hoyeun Kang, and
colleagues from Pusan National University (PNU) in Korea, have
successfully developed a new deep learning (DL) CFD methodology for
flow prediction using FEATool Multiphysics with AI and machine learning.

Although traditional Computational Fluid Dynamics (CFD) solvers are
becoming increasingly common tool in aerospace, automotive, and other
engineering fields, while effective, face limitations, primarily
related to high computational cost. Especially when high spatial and
temporal resolution is needed for accurate simulation, traditional CFD
solvers become computationally expensive, and can sometimes require
days or even weeks to perform accurate analysis.

Classic CFD solver compared to AI deep learning CFD solution

Deep learning have potential to offer an alternative approach that may
significantly reduce computational cost, creating an AI CFD model on
an accurate fluid dynamics dataset. The autors propose such a new CFD
model, named CFDformer, which combines a Vision Transformer (ViT)
and a U-shaped Convolutional Neural Network (U-Net) in an
encoder-decoder architecture to predict fluid flow on 2D geometries.

A DL-CFD model agent can offer a number of advantages compared to
traditional CFD simulations

  • Act as Surrogate Models - Deep learning models, trained on data
    from CFD simulations, can act as surrogate models, effectively
    approximating the solutions to the Navier-Stokes equations. This
    approach bypasses the need for computationally intensive iterative
    calculations.

  • Speed Up Simulations - Deep learning models can significantly
    reduce simulation times. For example, CFDformer, a hybrid model
    combining a Vision Transformer and a U-Net, was shown to decrease
    analysis time by up to 99.94%
    compared to standard CFD solvers.

  • Complex Flow Scenarios - Deep learning models can handle
    complex flow scenarios with relatively high accuracy, and are
    particularly well-suited for modeling flows around obstacles, such
    as found in aerodynamics applications.

  • Adapt to New Conditions - Some deep learning models can generalize
    well to new, unseen conditions not encountered during training. This
    allows them to make reasonable predictions for conditions within a
    specific range, even without explicit training data for those
    conditions.

  • Enhancing Feature Extraction - Deep learning models can be
    designed to extract both local and global features from input data,
    improving the accuracy of flow approximations. For instance,
    CFDformer uses convolutional layers to capture local spatial
    features and a Vision Transformer to analyze global flow features.

The FEATool Multiphysics toolbox was used to generate datasets of 2D
incompressible and laminar flows around various obstacles, including
cylinders, triangles, rectangles, and pentagons. In particular, as
FEATool supports multiple CFD solvers,
such as OpenFOAM, using multiple solvers is ideal way to generate
accurate and trustworthy, benchmark and validation CFD studies and
datasets
. These datasets served as the ground truth for training and
evaluating deep learning models.

Using FEATool Multiphysics for AI CFD data collection

FEATool's easy to use GUI, and integration with a MATLAB programming
and scripting API allowed for easy manipulation and analysis of the
simulation data, streamlining the process of preparing the data for
deep learning. Once FEATool completed the simulations, the researchers
extracted the velocity and pressure data at each grid point. This data
was then preprocessed and formatted as input for training deep
learning models.

Please visit https://www.featool.com for more information and toolbox download.

References

  • Kang H., et al. A new fluid flow approximation method using a vision transformer and a U-shaped convolutional neural network, AIP Advances, Volume 13, Issue 2, 2023, doi: 10.1063/5.0138515.

  • Prihatno A.T., et al. 2D Fluid Flows Prediction Based on U-Net Architecture, Proceedings of International Conference on Artificial Intelligence in Information and Communication (ICAIIC), 2023, doi: 10.1109/ICAIIC57133.2023.10066980.

  • Le T.T.H, Kang H. et al. CFD Prediction of Indoor Airflow using Deep Learning, Conference paper, 2022.

  • Le T.T.H., Kang H., Kim H. Towards Incompressible Laminar Flow Estimation Based on Interpolated Feature Generation and Deep Learning, Sustainability, 14, 11996, 2022, doi: 10.3390/su141911996.

  • Kang H. CFDformer: Novel Fluid Flow Approximation based on ViT and U-Net, GitHub repository for CFDformer MATLAB dataset generation, doi: 10.5281/zenodo.7527624, 2023.

Top comments (0)