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 Config(skip: bool = False, soft_start: bool = False, ntask: int = 1, nnode: int = 1, _name: str = 'base', workdir: pathlib.Path = None, environment_script: pathlib.Path = PosixPath('/usr/local/software/turbostream/ts3610_a100/bashrc_module_ts3610_a100'), atol_eta: float = 0.005, cfl: float = 0.4, dampin: float = 25.0, facsecin: float = 0.005, fmgrid: float = 0.2, ilos: int = 2, Lref_xllim: str = 'pitch', nchange: int = 2000, nstep: int = 10000, nstep_avg: int = 5000, rfmix: float = 0.0, rtol_mdot: float = 0.01, sfin: float = 0.5, tvr: float = 10.0, xllim: float = 0.03, rfin: float = 0.5, nstep_soft: int = 0, sa_helicity_option: int = 0, smooth_scale_dts_option: int = 0, show_yplus: bool = False, laminar: bool = False, fac_st0: float = 1.0, ipout: int = 3, convert_sliding: bool = False, precon: int = 0, dts: int = 0, nstep_cycle: int = 72, nstep_inner: int = 200, ncycle: int = 0, frequency: float = 0.0, nstep_save_probe: int = 0, nstep_save_start_probe: int = 0, xllim_free: float = 0.1, free_turb: float = 0.05, turbvis_lim: float = 3000.0, sa_ch1: float = 0.71, sa_ch2: float = 0.6)[source]
workdir: Path = None

Working directory to run the simulation in.

environment_script: Path = PosixPath('/usr/local/software/turbostream/ts3610_a100/bashrc_module_ts3610_a100')

Setup environment shell script to be sourced before running.

atol_eta: float = 0.005

Absolute tolerance on drift in isentropic efficiency.

cfl: float = 0.4

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

dampin: float = 25.0

Negative feedback factor, reduce for more stability.

facsecin: float = 0.005

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

fmgrid: float = 0.2

Multigrid factor, reduce for more stability.

ilos: int = 2

Viscous model, 0 for inviscid, 1 for mixing-length, 2 for Spalart-Allmaras.

Lref_xllim: str = 'pitch'

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

nchange: int = 2000

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

nstep: int = 10000

Number of time steps.

nstep_avg: int = 5000

Average over the last nstep_avg steps of the calculation.

rfmix: float = 0.0

Mixing plane relaxation factor.

rtol_mdot: float = 0.01

Relative tolerance on mass flow conservation error and drift.

sfin: float = 0.5

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

tvr: float = 10.0

Initial guess of turbulent viscosity ratio.

xllim: float = 0.03

Mixing length limit as a fraction of characteristic dimension.

rfin: float = 0.5

Inlet relaxation factor, reduce for low-Mach flows.

nstep_soft: int = 0

Number of steps for soft start precursor simulation.

sa_helicity_option: int = 0

Spalart–Allmaras turbulence model helicity correction.

laminar: bool = False

Enable laminar boundary layers on all walls.

Turbostream 4

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

class Config(skip: bool = False, soft_start: bool = False, ntask: int = 1, nnode: int = 1, _name: str = 'base', workdir: Path = None, environment_script: Path = PosixPath('/usr/local/software/turbostream/ts42111/bashrc_module_ts42111_a100'), cfl: float = 25.0, cfl_ramp_nstep: int = 500, cfl_ramp_st: int = 1.0, custom_pipeline: str = '', implicit_scheme: int = 1, nstep: int = 5000, nstep_avg: int = 1000, nstep_ts3: int = 0, nstep_soft: int = 5000, spf_probe: list = None, point_probe: list = None, logical_probe: list = None, tables_path: str = '', body_force_template: str = '', viscous_model: int = 2, outlet_tag: str = 'Outlet', area_avg_pout: bool = True, pout_fac_ramp_nstep: int = 0, inlet_relax_fac: float = 0.5, nstep_save_start_probe_1d: int = 0, nstep_save_probe_1d: int = 100, nstep_save_start_probe_2d: int = 0, nstep_save_probe_2d: int = 100, cfl_turb_fac: float = 0.5, precon: int = 0, precon_fac_ramp_nstep: int = 100, precon_fac_ramp_st: float = 0.1, precon_fac_ramp_en: float = 1.0, precon_sigma_pgr: float = 3.0, halo_implementation: int = 1, interpolation_update: int = 1)[source]

Settings with default values for the TS4 solver.

workdir: Path = None

Working directory to run the simulation in.

environment_script: Path = PosixPath('/usr/local/software/turbostream/ts42111/bashrc_module_ts42111_a100')

Setup environment shell script to be sourced before running.

cfl: float = 25.0

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

cfl_ramp_nstep: int = 500

Ramp the CFL number up over the first cfl_ramp_nstep steps.

cfl_ramp_st: int = 1.0

Starting value for CFL ramp.

custom_pipeline: str = ''

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

implicit_scheme: int = 1

Whether to use implicit time-marching scheme.

nstep: int = 5000

Number of time steps for the calculation.

nstep_avg: int = 1000

Number of time steps to average over.

nstep_ts3: int = 0

Number of steps for a Turbostream 3 initial guess

nstep_soft: int = 5000

Number of time steps for soft start.

spf_probe: list = None

List of span fractions to place probes.

point_probe: list = None

Specify point probes.

logical_probe: list = None

Specify logical probes.

tables_path: str = ''

Path to gas tables for real working fluids.

body_force_template: str = ''

Path to a body_force.ofp definition file template.

body_force_params = {}

Parameters to be added to body force template.

viscous_model: int = 2

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

outlet_tag: str = 'Outlet'

Identifier string for the outlet patch.