o
odinpkg.dev
packages / library / pingvin

pingvin

9f8842elibrary

Pingvin: 3D space-marching solver for simulating supersonic gas dynamics

No license · updated 2 months ago

PINGVIN: A 3D space-marching solver for simulating supersonic gas dynamics

Rowan J. Gollan 2024-09-09

busemann diffuser Mach field

Prerequisite software

Presently, Pingvin is designed to be quite minimal on dependencies. The core solver is written in the Odin programming language and some of the support tools rely on Python packages.

You will need:

  • An Odin compiler

  • Python vtk package

  • Python pyvista package

  • Python gmsh package (or another way to generate a 2D quad mesh)

  • Python scipy package

  • Python click package

  • Python tqdm package

Additionaly, on macos, install zlib via brew:

  • brew install zlib

Odin compiler

Please follow the instructions at:

Python environment

It’s convenient to set up a Python virtual environment. We’ll explain that in the installation instructions.

Setting up and installing Pingvin

  1. Download the source code from github:

    > git clone https://github.com/rjgollan-on-github/pingvin.git pingvin
  2. Build the source

    > cd pingvin
    > make install
  3. [Linux] Set your environment variables in .bashrc

    export PINGVIN=$HOME/pingvin
    export PATH=$PINGVIN/inst:$PATH

    [Macos] Set your environment variables in .zshrc

    export PINGVIN="$HOME/pingvin"
    export PATH="$PINGVIN/inst:$PATH"
    export LIBRARY_PATH="/opt/homebrew/opt/zlib/lib"
  4. Set up a Python virtual environment and install required packages

    > python(3) -m venv py-env
    > source py-env/bin/activate
    > pip install vtk
    > pip install pyvista
    > pip install gmsh
    > pip install scipy
    > pip install click

Use python3 if your system doesn’t provide a python command that points to a Python 3 installation. You might need to re-login or source the .bashrc file to get your environment properly set.

Trying things out

Navigate to the Busemann diffuser example in pingvin/examples/diffuser-busemann, and follow the README. Hopefully, you get an image something like the one at the top of this README.