GithubHelp home page GithubHelp logo

maxwells-daemons / deltaflow Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 2.0 899 KB

A GPU-accelerated differentiable fluid simulator written in JAX.

License: MIT License

Python 100.00%
fluid-simulation jax differentiable-programming

deltaflow's Introduction

DeltaFlow

Open In Colab Documentation Status License shield

DeltaFlow is a GPU-accelerated differentiable fluid simulator written in JAX.

By taking derivatives through the entire simulation, you can optimize simulation inputs with gradient descent. For example, you could find initial velocities that carefully orchestrate fluid particles to form an image. Take that, entropy!

Since it's end-to-end JAX, it's composable with other differentiable JAX components. For example, you could use Haiku to train a neural network to interact with the fluid simulator, and since the environment is fully differentiable you wouldn't need reinforcement learning.

Also, it's fast. On a recent GPU, DeltaFlow can run a 4K simulation at 40 FPS. Smaller simulations often achieve hundreds of frames per second, even when computing gradients.

Usage

The main API is two functions: simulate(), which runs a fluid simulation, and step(), which runs a single step. Both are differentiable with respect to their vector field inputs.

For detailed usage examples, see the notebooks under examples/.

Documentation

Documentation is hosted on Read the Docs.

Installation

For a CPU-only installation, clone the repository, then pip install ..

For GPU support, you'll need to first install the version of jaxlib appropriate for your python, CUDA, and CuDNN versions. See the jaxlib install instructions for more details.

deltaflow's People

Contributors

maxwells-daemons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  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.