Giter Club home page Giter Club logo

bnnrans's Introduction

BNNRANS

The past few years have witnessed a renewed blossoming of data-driven turbulence models. Quantification of the concomitant modeling uncertainty, however, has been mostly omitted, and the generalization performance of the data-driven models is still facing great challenges when predicting complex flows with different flow physics not seen during training. A robust data-driven Reynolds-averaged turbulence model with uncertainty quantification and non-linear correction is proposed in this work with the Bayesian deep neural network. In this model, the Reynolds stress tensor is decomposed into linear and non-linear parts. The linear part is taken as the usual linear eddy viscosity model while the non-linear counterpart is learned by a Bayesian deep neural network. Independent tensor bases of invariants and tensors constituted by mean strain rate tensor and rotation rate tensor are embedded into the neural network to effectively consider key turbulence features in different flows. The proposed model is well validated through numerical simulations of four canonical flows that significantly deviate in geometrical configurations and/or Reynolds numbers from those in the training data. With the non-linear corrections of embedded invariants and tensors representing key features of turbulence, the proposed model not only improves the predictive capabilities of Reynolds-averaged turbulence models on the same mesh but also has better generalization performance when simulating complex turbulent flows with large scale separation. In addition, this model allows to quantitatively demonstrate the confidence interval of the predicted flow quantities that are originated from the model itself.

The paper is available at https://pubs.aip.org/aip/pof/article/35/5/055119/2889073/Data-driven-Reynolds-averaged-turbulence-modeling

The framework utilized in the present work for formulating data-driven turbulence model is shown below:

BNNRANS_NN

It is shown that the built model can improve the RANS predictions:

surfaceMountedCube_streamline

Prerequisite

Ubuntu 20.04, OpenFOAM-7, Python 3.7, PyTorch 1.7, libtorch 1.7

Utilizing neural network model with OpenFOAM

See this file for using PyTorch neural network model with OpenFOAM, please.

Using docker

I have prepared a docker image with all libraries and solvers installed. You can download it here. For the usage of docker, you can get some something useful here.

Note: I changed the OpenFOAM source code when doing this work. The best way is to leave the OpenFOAM source code as it is and compile the source files as user libraries and solvers.

Acknowledge

This work is based on rans-uncertainty. Thank Dr. Nicholas Geneva for sharing the code and data.

References

Dr. Andre Weiner has written very good tutorials for using OpenFOAM with PyTorch and Docker.

Help

If you encounter problems, feel free to open an issue. You can also email me ([email protected], Hongwei Tang).

If you find this work useful for your research, please consider citing our work

@article{10.1063/5.0149547,
    author = {Tang, Hongwei and Wang, Yan and Wang, Tongguang and Tian, Linlin and Qian, Yaoru},
    title = "{Data-driven Reynolds-averaged turbulence modeling with generalizable non-linear correction and uncertainty quantification using Bayesian deep learning}",
    journal = {Physics of Fluids},
    volume = {35},
    number = {5},
    year = {2023},
    month = {05},
    issn = {1070-6631},
    doi = {10.1063/5.0149547},
    url = {https://doi.org/10.1063/5.0149547},
    note = {055119}
}

bnnrans's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.