Skip to content

hanfengzhai/BubbleNet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: this work was partially developed from my undergraduate thesis.

DOI DOI

BubbleNet is a deep learning framework building on top of PINN for inferring bubble flow in microfluids.

Intro

BubbleNet consists of three parts: I. three SubNets of deep neural nets for learning and predicting , respectively. II. the physics-informed part: inferring velocitites from with . (for BubbleNet v.2.0: we added the governing equation from inferred into the loss function. III. the time discretized normalizer (TDN): a function that can normalize the training data per time step.

BubbleNet is a powerful tool not only for bubble flow, but also for multiphase flow & other fluid dynamics problems.

Here, we show that \textsc{BubbleNet} are able to predict the bubbles' movements and the related physics fields (). Due to page limites, we only show how well BubbleNet can work on bubble movements compared with traditional DNNs.

Deep learning predictions compared with original CFD results for single bubble case.

Deep learning predictions compared with original CFD results for multiple bubbles case.

To see more results & the technical details of BubbleNet, visit 2105.07179.

Tutorials

BubbleNet is a deep learning package building on top of TensorFlow, install tf before using BubbleNet:

pip install tensorflow

To use BubbleNet, you first need to download the code through GitHub (on your customized directory):

git clone https://github.com/hanfengzhai/BubbleNet.git

In our practice, we trained our NNs on Beijing Super Cloud Computing Center, (BLSC). Based on the first author's personal experience, most supercomuting environment use Slurm system, i.e. Cornell G2, XSEDE, etc. Here, you can try out the single bubble case and train both the DNN and BubbleNet using the slurm command:

I. For SC users, please run

sbatch super-computer.sub

II. If you are using the work station at your lab or home:

bash work-station.sh

III. Or just execute the py files directly:

python bubble_DNN.py # run it on traditional deep neural net
python bubble_PhysNet.py # run it on BubbleNet

Similarly, training the bubbly flow with multiple bubbles case on NN, run:

# directly execute the python files
python bubblesys_DNN.py # run it on traditional deep neural net
python bubblesys_PhysNet.py # run it on BubbleNet

After the training, you will see the losses callbacks on your command lines, & the accuracy for the NNs. You will also see the saved files of both the DNN & BubbleNet predictions in your directory. Open these '.txt' files with matlab and convert them into '.mat' numerical matrix files.

Then, execute the '.m' files to generate figures for the final results, either with MATLAB or Octave:

figure_preparation.m 
figure_generation.m 

Now, sort out all the figures and you've already utilize most of BubbleNet! :)

Tech Info

If you are a developer wishing to custume your own BubbleNet for predictions, please refer the following details of the algorithms.

Reference & Citation

The authors are more than happy if you refer the following works:

Hanfeng Zhai, Quan Zhou, and Guohui Hu , "Predicting micro-bubble dynamics with semi-physics-informed deep learning", AIP Advances 12, 035153 (2022) https://doi.org/10.1063/5.0079602

For (La)TeX users:

@article{Zhai2022,
  doi = {10.1063/5.0079602},
  url = {https://doi.org/10.1063/5.0079602},
  year = {2022},
  month = mar,
  publisher = {{AIP} Publishing},
  volume = {12},
  number = {3},
  pages = {035153},
  author = {Hanfeng Zhai and Quan Zhou and Guohui Hu},
  title = {Predicting micro-bubble dynamics with semi-physics-informed deep learning},
  journal = {{AIP} Advances}
}
@software{zhai_hanfeng_2021_4769081,
  author       = {Zhai, Hanfeng},
  title        = {{Data for BubbleNet code \& micro-bubbles system 
                   dynamics simulation}},
  month        = mar,
  year         = 2021,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.4769081},
  url          = {https://doi.org/10.5281/zenodo.4769081}
}