Tensorflow implementation of Deep Fluids: A Generative Network for Parameterized Fluid Simulations.
Byungsoo Kim¹, Vinicius C. Azevedo¹, Nils Thuerey², Theodore Kim³, Markus Gross¹, Barbara Solenthaler¹
¹ETH Zurich, ²Technical University of Munich, ³Pixar Animation Studios
Computer Graphics Forum (Proceedings of Eurographics 2019)
This code is tested on Windows 10 and Ubuntu 16.04 with the following requirements:
Run the following line to install packages.
$ pip install --upgrade tensorflow==1.15 tqdm matplotlib Pillow imageio
To install mantaflow
, run:
$ git clone https://bitbucket.org/mantaflow/manta.git
$ git checkout 15eaf4
and follow the instruction. Note that numpy
cmake option should be set to enable support for numpy arrays. (i.e., -DNUMPY='ON'
)
Run a script for the dataset generation using mantaflow. For instance,
$ ..\manta\build\Release\manta.exe .\scene\smoke_pos_size.py
To train:
$ python main.py
To test:
$ python main.py --is_train=False --load_path=MODEL_DIR
Please take a closer look at run.bat
for each dataset and other architectures.
In each image, the top row shows velocity profiles, and the bottom row shows vorticity profiles.
Reconstruction from each parameter after 100 epochs. (From top to bottom: in-flow velocity / buoyancy / time)
The left image shows the middle slice of xy domain, and the right image is the middle slice view of zy domain.
In each image, the top three rows are velocity profiles, and the rest rows are vorticity profiles.