Install#

Zoomy is a set of Python packages on PyPI. It runs on Linux, Windows and macOS. The JAX backend needs Linux, Windows or a Mac with Apple silicon (JAX provides no packages for Intel Macs).

Python environment#

Python 3.11 or newer (python.org, or the package manager of your system). Install Zoomy into its own virtual environment.

Linux and macOS:

python3 -m venv zoomy-env
source zoomy-env/bin/activate

Windows (PowerShell):

py -m venv zoomy-env
zoomy-env\Scripts\Activate.ps1

If PowerShell refuses to run the script, allow it once with Set-ExecutionPolicy -Scope CurrentUser RemoteSigned. A conda, mamba or pixi environment works the same way: activate it and continue with pip.

Minimal#

pip install zoomy-core zoomy-plotting jupyterlab
curl -LO https://raw.githubusercontent.com/ZoomyLab/Zoomy/main/tutorials/swe/simple_numpy.ipynb
jupyter lab simple_numpy.ipynb

On Windows write curl.exe instead of curl. Every tutorial page also has a download button (.ipynb) at the top.

JAX#

pip install zoomy-jax
curl -LO https://raw.githubusercontent.com/ZoomyLab/Zoomy/main/tutorials/swe/bump_2d.ipynb
jupyter lab bump_2d.ipynb

First JAX notebook: 2-D bump, NumPy and JAX. Sensitivities by automatic differentiation: the tutorials tagged sensitivity.

Results in ParaView: pip install zoomy-prepost, then ParaView output of the 2-D bump.

JAX on an NVIDIA GPU (Linux, on Windows inside WSL2):

pip install "zoomy-jax[cuda]"

VS Code instead of JupyterLab#

Install the extensions Python and Jupyter, open the notebook, then Select Kernel (top right) → Python Environments → zoomy-env. If it is not listed, Python: Select Interpreter → Enter interpreter path → zoomy-env/bin/python (Windows zoomy-env\Scripts\python.exe).

Other backends#

OpenFOAM, AMReX, MPI and GPU images: Containers. Which backend for what: Backends.