Installation

This page describes how to install turbigen. Lines prefixed with $ are to be run at the Linux terminal.

Warning

turbigen is only tested on Linux — expect issues if running on Windows.

Prerequisites

The program requires a working Python installation, version 3.9 or greater. Check your Python version by running,

$ python3 -V
Python 3.11.2

If your Python version is below 3.9, you need to install a more recent version. You will also need the virtualenv module to make an installation separate from your system Python modules; this may require an extra package, e.g. sudo apt install python3-virtualenv in Debian. Check for the virtualenv module by running,

$ python3 -c 'import virtualenv; print("virtualenv installed")'
virtualenv installed

Obtain the code

The code is available to download from the University of Cambridge GitLab instance.

$ git clone https://gitlab.developers.cam.ac.uk/jb753/turbigen.git
$ cd turbigen
$ source setup.sh

This will create a Python virtualenv using your system interpreter, to hold turbigen and it’s dependencies in isolation from your operating system Python installation.

Basic usage

Note

Each time you start a session of turbigen in a new terminal, you must setup the environment by running $ source setup.sh again. Failing to do so will result in errors like turbigen: command not found.

To run a case, use,

$ turbigen INPUT_FILE

where INPUT_FILE is a yaml configuration file. The manual contains a list of all Command-line options. Several specimen configuration files are provided in the examples directory.

Test case

As a test to verify the installation has completed sucessfully, run the configuration examples/cascade_test.yaml. This should design and mesh a turbine cascade, but not run the CFD, producing the following output:

TURBIGEN v1.10.1
Starting at 2024-07-18T13:32:29
Working directory: /builds/jb753/turbigen/doc/runs/cascade
Inlet: PerfectState(P=1.000 bar, T=300.0 K)
Designing a cascade...
MeanLine(
    Po=[1.    0.975] bar,
    To=[300. 300.] K,
    Ma=[0.336 0.6  ],
    Vx=[88.4 85.1],
    Vr=[0. 0.],
    Vt=[  74.2 -182.4],
    Vt_rel=[  74.2 -182.4],
    Al=[ 40. -65.],
    Al_rel=[ 40. -65.],
    rpm=[0. 0.],
    mdot=[57.95 57.95] kg/s
    )
Checking mean-line conservation...
Checking mean-line inversion...
Designing annulus...
Annulus(
    xmid=[-3.7438e-12  6.8750e-02],
    rmid=[0.95 0.95],
    span=[0.1  0.12]
    )
Re_surf/10^5=[11.6]
Nblade=[99], s_cm=[0.88], tip=[0.]
Generating an H-mesh...
Mesh Npts/10^6=1.57
Applying boundary conditions...
Setting intial guess...
Calculating wall distance...
No solver specified, continuing with initial guess...
Post-processing...
Mixed-out CFD result:
MeanLine(
    Po=[1.     0.9748] bar,
    To=[300. 300.] K,
    Ma=[0.336 0.6  ],
    Vx=[88.4 85.1],
    Vr=[-1.6e-13  0.0e+00],
    Vt=[  74.2 -182.3],
    Vt_rel=[  74.2 -182.3],
    Al=[ 39.99 -64.98],
    Al_rel=[ 39.99 -64.98],
    rpm=[0. 0.],
    mdot=[57.95 57.95] kg/s
    )
Design variable Nom    CFD    
------------------------------
Alpha1          40.000 39.986 
Alpha2          -65.00 -64.98 
Ma2             0.6000 0.5996 
Yh              0.1000 0.1010 
htr             0.9000 0.9000 
span1           0.1000 0.1000 
span2           0.1200 0.1200 
eta_tt=0.000, eta_ts=0.000
Elapsed time 0.22 min.