SkillAgentSearch skills...

PhiFlow

A differentiable PDE solving framework for machine learning

Install / Use

/learn @tum-pbs/PhiFlow
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

PhiFlow

Build Status PyPI pyversions PyPI license Code Coverage Google Collab Book

Φ<sub>Flow</sub> 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.

Examples

Grids

<table> <tbody> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Fluid_Logo.html"><img src="docs/figures/examples/grids/Fluid_Logo.gif"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Wake_Flow.html"><img src="docs/figures/examples/grids/Wake_Flow.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Lid_Driven_Cavity.html"><img src="docs/figures/examples/grids/Lid_Driven_Cavity.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Taylor_Green.html"><img src="docs/figures/examples/grids/Taylor_Green.jpg"></a></td> </tr> <tr> <td align="center">Fluid logo</td> <td align="center">Wake flow</td> <td align="center">Lid-driven cavity</td> <td align="center">Taylor-Green</td> </tr> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Smoke_Plume.html"><img src="docs/figures/examples/grids/Smoke_Plume.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Variable_Boundaries.html"><img src="docs/figures/examples/grids/Variable_Boundaries.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Batched_Smoke.html"><img src="docs/figures/examples/grids/Batched_Smoke.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Moving_Obstacles.html"><img src="docs/figures/examples/grids/Moving_Obstacles.png"></a></td> </tr> <tr> <td align="center">Smoke plume</td> <td align="center">Variable boundaries</td> <td align="center">Parallel simulations</td> <td align="center">Moving obstacles</td> </tr> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Rotating_Bar.html"><img src="docs/figures/examples/grids/Rotating_Bar.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Multi_Grid_Fluid.html"><img src="docs/figures/examples/grids/Multi_Grid_Fluid.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Higher_order_Kolmogorov.html"><img src="docs/figures/examples/grids/Higher_Order_Kolmogorov.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Heat_Flow.html"><img src="docs/figures/examples/grids/Heat_Flow.png"></a></td> </tr> <tr> <td align="center">Rotating bar</td> <td align="center">Multi-grid fluid</td> <td align="center">Higher-order Kolmogorov</td> <td align="center">Heat flow</td> </tr> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Burgers.html"><img src="docs/figures/examples/grids/Burgers.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Reaction_Diffusion.html"><img src="docs/figures/examples/grids/Reaction_Diffusion.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Waves.html"><img src="docs/figures/examples/grids/Waves.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/grids/Julia_Set.html"><img src="docs/figures/examples/grids/Julia_Set.png"></a></td> </tr> <tr> <td align="center">Burgers' equation</td> <td align="center">Reaction-diffusion</td> <td align="center">Waves</td> <td align="center">Julia Set</td> </tr> </tbody> </table>

Mesh

<table> <tbody> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/mesh/FVM_BackStep.html"><img src="docs/figures/examples/mesh/FVM_BackStep.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/mesh/FVM_Heat.html"><img src="docs/figures/examples/mesh/FVM_Heat.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/mesh/Build_Mesh.html"><img src="docs/figures/examples/mesh/Build_Mesh.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/mesh/FVM_Cylinder_GMsh.html"><img src="docs/figures/examples/mesh/FVM_Cylinder_GMsh.png"></a></td> </tr> <tr> <td align="center">Backward facing step</td> <td align="center">Heat flow</td> <td align="center">Mesh construction</td> <td align="center">Wake flow</td> </tr> </tbody> </table>

Particles

<table> <tbody> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/SPH.html"><img src="docs/figures/examples/particles/SPH.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/FLIP.html"><img src="docs/figures/examples/particles/FLIP.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/Streamlines.html"><img src="docs/figures/examples/particles/Streamlines.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/Terrain.html"><img src="docs/figures/examples/particles/Terrain.jpg"></a></td> </tr> <tr> <td align="center">SPH</td> <td align="center">FLIP</td> <td align="center">Streamlines</td> <td align="center">Terrain</td> </tr> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/Gravity.html"><img src="docs/figures/examples/particles/Gravity.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/Billiards.html"><img src="docs/figures/examples/particles/Billiards.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/particles/Ropes.html"><img src="docs/figures/examples/particles/Ropes.png"></a></td> </tr> <tr> <td align="center">Gravity</td> <td align="center">Billiards</td> <td align="center">Ropes</td> </tr> </tbody> </table>

Optimization & Networks

<table> <tbody> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Gradient_Descent.html"><img src="docs/figures/examples/optim/Gradient_Descent.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Optimize_Throw.html"><img src="docs/figures/examples/optim/Optimize_Throw.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Learn_Throw.html"><img src="docs/figures/examples/optim/Learn_Throw.jpg"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/PIV.html"><img src="docs/figures/examples/optim/PIV.jpg"></a></td> </tr> <tr> <td align="center">Gradient Descent</td> <td align="center">Optimize throw</td> <td align="center">Learning to throw</td> <td align="center">PIV</td> </tr> <tr> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Close_Packing.html"><img src="docs/figures/examples/optim/Close_Packing.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Learn_Potential.html"><img src="docs/figures/examples/optim/Learn_Potential.png"></a></td> <td style="width: 25%;"><a href="https://tum-pbs.github.io/PhiFlow/examples/optim/Differentiable_Pressure.html"><img src="docs/figures/examples/optim/Differentiable_Pressure.jpg"></a></td> </tr> <tr> <td align="center">Close packing</td> <td align="center">Learning Φ(x,y)</td> <td align="center">Differentiable pressure</td> </tr> </tbody> </table>

Installation

Installation with pip on Python 3.6 and above:

$ pip install phiflow

Install PyTorch, [TensorFlow](https://www.te

Related Skills

View on GitHub
GitHub Stars1.8k
CategoryEducation
Updated2d ago
Forks224

Languages

Python

Security Score

100/100

Audited on Mar 24, 2026

No findings