Giter VIP home page Giter VIP logo

deepflame-dev's Introduction

DeepFlame v0.1.0

DeepFlame is a computational fluid dynamics suite for single or multiphase, laminar or turbulent reacting flows at all speeds with machine learning capabilities. It aims to provide an open-source platform bringing together the individual strengths of OpenFOAM, Cantera and pyTorch libraries for machine learning assisted reacting flow simulations. It is also has the scope to incorporate next-generation heterogenous supercomputing and AI acceleration infrustructures such as GPU and FPGAs.

Dependencies

OpenFOAM-7, Cantera C++ lib 2.6.0, Torch C++ lib 1.11.0

Features

  • Native Cantera reader for chemical mechanisms in .cti, .xml or .ymal formats
  • Full compatiblity with Cantera's UnityLewis, Mix and Multi transport models
  • Zero-dimensional constant pressure or constant volume reactor solver df0DFoam
  • Pressued-based low-Mach number reacting flow solver dfLowMachFoam
  • Density-based high-speed reacting flow solver dfHighSpeedFoam
  • Two-phase Lagrangian/Euler spray reacting flow solver dfSprayFoam
  • Cantera's native SUNDIALS CVODE solver for chemical reaction rate evaluation
  • Torch's tensor operation functionality for neutral network I/O and calculation
  • Interface for DNN model to obtain chemical reaction rates
  • Multiple example and tutorial cases with Allrun and Allclean scripts
    • 0D Perfectly Stirred Reactor
    • 1D Freely Propagating Premixed Flame
    • 2D Lifted Partially Premixed Triple Flame
    • 3D Taylor-Green Vortex with Flame
    • 1D Detotation Wave in Homogeneous Premixed Mixture
    • 3D Aachen Bomb Spray Flame

How to install

The installation of DeepFlame is simple and requires OpenFOAM-7, LibCantera and LibTorch .

  1. Install OpenFOAM-7 (if not already installed)
  2. Source your OpenFOAM via the default path below (or your own path for OpenFOAM bashrc)
source $HOME/OpenFOAM/OpenFOAM-7/etc/bashrc 
  1. Install LibCantera via conda
conda create -n libcantera

conda activate libcantera

conda install -c conda-forge boost fmt libcantera-devel

Note: Check your Miniconda3/envs/libcantera directory and make sure the install was successful (lib/ include/ etc. exist).

  1. Clone the DeepFlame repository
git clone https://github.com/deepmodeling/deepflame-dev.git

cd deepflame-dev
  1. Install precompiled LibTorch
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-1.11.0%2Bcpu.zip

unzip libtorch-cxx11-abi-shared-with-deps-1.11.0+cpu.zip -d thirdParty
  1. Install DeepFlame
. install.sh

Note: Some compiling issues may happen due to system compatability. Instead of using conda installed Cantera C++ lib and the downloaded Torch C++ lib, try to compile your own Cantera and Torch C++ libraries.

Running DeepFlame examples

  1. Source your OpenFOAM, for example (depends on your OpenFOAM path):
source $HOME/OpenFOAM/OpenFOAM-7/etc/bashrc 
  1. Source deepflame-dev/bashrc, for example (depends on your DeepFlame path):
source $HOME/deepflame-dev/bashrc
  1. Go to an example case directory, for example:
cd $HOME/deepflame-dev/examples/zeroD_cubicReactor/H2/cvodeSolver

./Allrun

Note: For the example cases with torchSolver, an additional DNN model file in the .pt format is required. Please contact the developers if you would like a test run.

Citing DeepFlame

If you use DeepFlame for a publication, please use the citation:

DeepFlame: A computational fluid dynamics suite for multiphase turbulent reacting flows at all speeds with machine learning. URL:https://github.com/deepmodeling/deepflame-dev, 2022.

deepflame-dev's People

Contributors

zhixchen avatar openfoamfans avatar deepflamecfd avatar

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.