Fluid Flow Approximation using Machine Learning

A project focused on approximating fluid flow using machine learning techniques.

Source code will be made available soon.

Overview

This project aims to approximate fluid flow using machine learning techniques. Simulating fluid dynamics can be computationally expensive, and machine learning offers a promising alternative for faster approximations. The original goal of this project was to create an approximator for the use in topology optimization. Finding a suitable topology for a given problem often requires numerous simulations, making it a time-consuming process. By leveraging machine learning, we can hopefully significantly speed up this process.

Fluid Flow Approximation

This project is still a work in progress, and the source code will be made available after its completion. It has been developed by me in collaboration with Ing. Lucie Kubíčková and Ing. Martin Isoz, Ph.D., both from the Institute of Thermomechanics at the Czech Academy of Sciences.

What are we looking at?

Bitmap example

The image above shows an example of a bitmap representation of a topology. The white areas represent solid material, while the black areas represent voids. The goal of our machine learning model is to predict the fluid flow and pressure fields through such topologies. This case is a fluid mixer, where fluid enters from the left and exits on the right. The model needs to learn how the fluid behaves as it navigates through the complex geometry. The resulting velocity and pressure field are shown in the images below.

Flow field example Pressure field example

Project Details

The project involved several key steps:

  1. Data Generation: We generated a dataset of fluid flow simulations using OpenFOAM. This dataset serves as the ground truth for training our machine learning models.
  2. Model Development: We experimented with various machine learning architectures (for almost a year), including RBF, MLP, CNNs, Autoencoders, U-Net architectures and more, to find the most effective model for approximating fluid flow and other helpful properties.
  3. Training and Evaluation: We trained the models on the generated dataset and evaluated their performance using metrics and visual inspection of the predicted flow and pressure fields on topologies never before seen by the model.
  4. Iteration: Based on the evaluation results, we iterated on the model architecture and training process to improve accuracy and generalization.

This means the project is still ongoing, and we are continuously working to refine our models and improve their performance.

Lately, we have been focusing on refining the loss functions, incorporating physics-informed neural networks (PINNs). We need to ensure that the model not only fits the training data but also adheres to the underlying physical laws governing fluid dynamics.

Technologies Used

  • Python
  • PyTorch
  • NumPy
  • Matplotlib
  • Jupyter Notebooks
  • Hydra (for configuration management)
  • MLflow (for experiment tracking)