Solvers

turbigen is CFD-solver agnostic, in that all all pre- and post-processing is done by native code. Adding a new solver only requires routines to save the internal grid data to a CFD input file, execute the solver, and read back the flow solution.

Each CFD solver accepts different configuration options. Solver options and their default values are listed below; override the defaults using the solver section of the config.yaml file.

Turbostream 3

Turbostream 3 is a multi-block structured, GPU-accelerated Reynolds-averaged Navier–Stokes code developed by [Brandvik and Pullan, 2011].

class TS3Config(**kwargs)[source]

Override default parameters using keyword args.

atol_eta = 0.005

Absolute tolerance on drift in isentropic efficiency.

cfl = 0.4

Courant–Friedrichs–Lewy number, reduce for more stability.

dampin = 25.0

Negative feedback factor, reduce for more stability.

environment_script = '/usr/local/software/turbostream/ts3610_a100/bashrc_module_ts3610_a100'

Setup environment shell script to be sourced before running.

facsecin = 0.005

Fourth-order smoothing feedback factor, increase for more stability.

fmgrid = 0.2

Multigrid factor, reduce for more stability.

ilos = 2

Turbulence model, 1 for mixing-length, 2 for Spalart-Allmaras.

Lref_xllim = 'pitch'

Mixing length characteristic dimension, “pitch” or “span”.

nchange = 2000

At start of simulation, ramp smoothing and damping over this many time steps.

nstep = 10000

Number of time steps.

nstep_avg = 5000

Average over the last nstep_avg steps of the calculation.

rfmix = 0.0

Mixing plane relaxation factor, reduce for more stability.

rtol_mdot = 0.01

Relative tolerance on mass flow conservation error and drift.

sfin = 0.5

Proportion of second-order smoothing, increase for more stability.

tvr = 10.0

Initial guess of turbulent viscosity ratio.

xllim = 0.03

Mixing length limit as a fraction of characteristic dimension.

Turbostream 4

Turbostream 4 is an unstructured, GPU-accelerated Reynolds-averaged Navier–Stokes code.

class TS4Config(**kwargs)[source]

Override default parameters using keyword args.

cfl = 25.0

Courant–Friedrichs–Lewy number, reduce for more stability.

cfl_ramp_nstep = 500

Ramp the CFL number up over the first cfl_ramp_nstep steps.

cfl_ramp_st = 1.0

Starting value for CFL ramp.

custom_pipeline = ''

Specify a custom pipeline to convert Turbostream 3 to 4 input file. Should run using pvpython and take two command-line arguments like pvpython custom_pipeline.py input_ts3.hdf5 input_ts4

environment_script = '/usr/local/software/turbostream/ts42111/bashrc_module_ts42111_a100'

Setup environment shell script to be sourced before running.

implicit_scheme = 1

Whether to use implicit time-marching scheme.

nstep = 5000

Number of time steps for the calculation.

nstep_avg = 1000

Number of time steps to average over.

nstep_ts3 = 0

Number of steps for a Turbostream 3 initial guess

spf_probe = []

List of span fractions to place probes.

point_probe = []

Specify point probes.

logical_probe = []

Specify logical probes.

tables_path = ''

Path to gas tables for real working fluids.

body_force_template = ''

Path to a body_force.ofp definition file template.

body_force_params = {}

Parameters to be added to body force template.

viscous_model = 2

Turbulence model, 0 for inviscid, 1 for laminar, 2 for Spalart-Allmaras.

outlet_tag = 'Outlet'

Identifier string for the outlet patch.

monitor_script = ''

Path to a monitoring script, given the workdir as an argument.