Code Monkey home page Code Monkey logo

phiflow's Introduction

ΦFlow

Build Status PyPI pyversions PyPI license Google Collab Book

Gui

ΦFlow is a research-oriented, open-source PDE solving toolkit that is fully differentiable. It is written mostly in Python and can use both NumPy, TensorFlow and PyTorch for execution.

Having all functionality of a fluid simulation running in a deep learning framework opens up the possibility of back-propagating gradients through the simulation as well as running the simulation on GPUs.

Features

  • Variety of built-in fully-differentiable simulations, ranging from Burgers and Navier-Stokes to the Schrödinger equation.
  • Tight integration with TensorFlow and PyTorch (experimental) allowing for straightforward neural network training with fully differentiable simulations that run on the GPU.
  • Object-oriented architecture enabling concise and expressive code, designed for ease of use and extensibility.
  • Reusable simulation code, independent of backend and dimensionality, i.e. the exact same code can run a 2D fluid sim using NumPy and a 3D fluid sim on the GPU using TensorFlow or PyTorch.
  • Flexible, easy-to-use web interface featuring live visualizations and interactive controls that can affect simulations or network training on the fly.

Publications

Installation

To install ΦFlow with its web interface, run:

$ pip install phiflow[gui]

Install TensorFlow or PyTorch in addition to ΦFlow to enable machine learning capabilities and GPU execution.

See the detailed installation instructions on how to compile the custom CUDA operators and verify your installation.

Documentation and Guides

Index Demos / Tests Source Fluids Tutorial / Playground

If you would like to get right into it and have a look at some code, check out the tutorial notebook on Google Colab. It lets you run fluid simulations with ΦFlow in the browser.

The following introductory demos are also helpful to get started with writing your own app using ΦFlow:

  • simpleplume.py: Runs a fluid simulation and displays it in the browser
  • optimize_pressure.py: Uses TensorFlow to optimize a velocity channel. TensorBoard can be started from the GUI and displays the loss.

Running simulations

The simulation overview explains how to run predefined simulations using either the NumPy or TensorFlow backend. It also introduces the GUI.

To learn how specific simulations are implemented, check out the documentation for Fluids or read about staggered grids or pressure solvers.

The ΦFlow Web Interface guide introduces the high-level classes and explains how to launch and configure the built-in web interface for displaying simulations and interactive network training.

For I/O and data management, see the data documentation.

Optimization and Learning

For training machine learning models, this document gives an introduction into writing a GUI-enabled application.

Architecture

The simulation code design documentation provides a deeper look into the object-oriented code design of simulations.

All simulations of continuous systems are based on the Field API and underlying all states is the struct API.

The software architecture documentation shows the building blocks of ΦFlow and the module dependencies.

Version History

The Version history lists all major changes since release.

Known Issues

TensorBoard: Live supervision does not work when running a local app that writes to a remote directory.

Resampling / Advection: NumPy interpolation handles the boundaries slightly differently than TensorFlow.

Contributions

Contributions are welcome! Check out this document for guidelines.

Acknowledgements

This work is supported by the ERC Starting Grant realFlow (StG-2015-637014) and the Intel Intelligent Systems Lab.

phiflow's People

Contributors

danielzie avatar holl- avatar mmichelis avatar the-rccg avatar thunil 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.