
Φ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.
![]() |
![]() |
![]() |
![]() |
| Backward facing step | Heat flow | Mesh construction | Wake flow |
![]() |
![]() |
![]() |
![]() |
| SPH | FLIP | Streamlines | Terrain |
![]() |
![]() |
![]() |
|
| Gravity | Billiards | Ropes |
![]() |
![]() |
![]() |
![]() |
| Gradient Descent | Optimize throw | Learning to throw | PIV |
![]() |
![]() |
![]() |
|
| Close packing | Learning Φ(x,y) | Differentiable pressure |
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 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.
$ claude mcp add PhiFlow \
-- python -m otcore.mcp_server <graph>