Undosa is a high performance cross-platform simulator for physical phenomena based on the Taichi programming language.
Please note that only 64-bit Python 3.8 is supported at the moment (e.g. ARM, 32-bit architecture, Python 3.9 are not supported).
If you are on Linux, please also install the ncurses library:
sudo yum install ncurses-compat-libs # Fedora and RHEL derivatives
sudo apt install libtinfo5 # Debian derivatives
This application has been tested on Fedora 33 with Python 3.8.9, Fedora 34 with Python 3.8.8, and Windows 10 with Python 3.8.9.
An example setup using virtual environment is outlined below:
-
Bash (Linux & macOS)
python --version # make sure you are using python 3.8 python -m venv .env source .env/bin/activate pip install -r requirements.txt -
PowerShell (Windows)
python.exe --version # make sure you are using python 3.8 python.exe -m venv .env .\.env\Scripts\activate pip install -r requirements.txt
To run the scene squashed.json:
python undosa/main.py scenes/squashed.json
To run the scene snow-drop.json with the same parameters as in the demo:
python undosa/main.py -p 20000 -g 128 -t 2e-4 scenes/snow-drop.json
usage: main.py [-h] [-p particles] [-g grids] [-t dt] [-q {low,high,ultra}]
[-r RESOLUTION] [--ply] [--img] [--tina]
scene
Run the fluid simulator.
positional arguments:
scene path to your JSON scene
optional arguments:
-h, --help show this help message and exit
-p particles number of particles, more is better
-g grids number of grids, more is better
-t dt dt, less is better
-q {low,high,ultra}, --quality {low,high,ultra}
preset for p, g, t
-r RESOLUTION, --resolution RESOLUTION
gui resolution, also affects image output
--ply enable ply output
--img enable img output
--tina enable rendering with tina (experimental, CUDA only)