1 Star 1 Fork 2

xjtu-forge / PhiFlow

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

PhiFlow

Build Status PyPI pyversions PyPI license Code Coverage Google Collab Book

ΦFlow is an open-source simulation toolkit built for optimization and machine learning applications. It is written mostly in Python and can be used with NumPy, PyTorch, Jax or TensorFlow. The close integration with these machine learning frameworks allows it to leverage their automatic differentiation functionality, making it easy to build end-to-end differentiable functions involving both learning models and physics simulations.

Fluids Tutorial   •   ΦFlow to Blender Animation Gallery   •   Solar System   •   Learning to Throw

Features

  • Variety of built-in PDE operations with focus on fluid phenomena, allowing for concise formulation of simulations.
  • Tight integration with PyTorch, Jax and TensorFlow for straightforward neural network training with fully differentiable simulations that can run on the GPU.
  • Flexible, easy-to-use web interface featuring live visualizations and interactive controls that can affect simulations or network training on the fly.
  • Object-oriented, vectorized design for expressive code, ease of use, flexibility 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.
  • High-level linear equation solver with automated sparse matrix generation.

Installation

Installation with pip on Python 3.6 and above:

$ pip install phiflow

Install PyTorch, TensorFlow or Jax in addition to ΦFlow to enable machine learning capabilities and GPU execution. To enable the web UI, also install Dash. For optimal GPU performance, you may compile the custom CUDA operators, see the detailed installation instructions.

You can verify your installation by running

$ python3 -c "import phi; phi.verify()"

This will check for compatible PyTorch, Jax and TensorFlow installations as well.

Documentation and Tutorials

Documentation Overview   •   ▶ YouTube Tutorials   •   API   •   Demos   •   Playground

Φ-Flow builds on the tensor functionality from ΦML. To understand how ΦFlow works, check named and typed dimensions first.

To get started, check out our YouTube tutorial series and the following Jupyter notebooks:

  • Tensors: Introduction to tensors.
  • Fluids: Introduction to core classes and fluid-related functions.
  • Solar System: Visualize a many-body system with Newtonian gravity.
  • Learn to Throw: Train a neural network to hit a target, comparing supervised and differentiable physics losses.

If you like to work with an IDE, like PyCharm or VS Code, the following demos will also be helpful:

  • smoke_plume.py runs a smoke simulation and displays it in the web interface.
  • optimize_pressure.py uses TensorFlow to optimize a velocity field and displays it in the web interface.

Publications

We will upload a whitepaper, soon. In the meantime, please cite the ICLR 2020 paper.

Benchmarks & Data Sets

ΦFlow has been used in the creation of various public data sets, such as PDEBench and PDEarena.

See more packages that use ΦFlow

Version History

The Version history lists all major changes since release. The releases are also listed on PyPI.

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.

MIT License Copyright (c) 2019 TUM Physics-based Simulation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

【镜像】可微分的偏微分方程求解框架 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/xjtu-forge/PhiFlow.git
git@gitee.com:xjtu-forge/PhiFlow.git
xjtu-forge
PhiFlow
PhiFlow
master

搜索帮助

14c37bed 8189591 565d56ea 8189591