Skip to content

Examples

Practical examples of using flow_state for common tasks.

Python API

Wind Tunnel Conditions

The Boeing/AFOSR Mach 6 Quiet Tunnel at Purdue:

from flow_state import solve
from flow_state.io import summary

# BAM6QT typical quiet conditions
# p0 = 140 psi, T0 = 420 K
state = solve(
    mach=6.0,
    pres_stag=(140.0, "psi"),
    temp_stag=420.0,
)

print(summary(state))

Arnold Engineering Development Complex Tunnel 9 (White Oak):

from flow_state import solve
from flow_state.io import summary

# AEDC T9 high-enthalpy conditions
# Mach 10, p0 = 1800 psi, T0 = 1000 K, nitrogen
state = solve(
    mach=10.0,
    pres_stag=(1800.0, "psi"),
    temp_stag=1000.0,
    gas="n2",
)

print(summary(state))

University of Alabama Ludwieg Tube 5:

from flow_state import solve
from flow_state.io import summary

# UA LT5 typical conditions
# Mach 5, p0 = 100 psi, T0 = 375 K
state = solve(
    mach=5.0,
    pres_stag=(100.0, "psi"),
    temp_stag=375.0,
)

print(summary(state))

Flight Conditions

Sounding Rocket Transition (STORT) trajectory point using US Standard Atmosphere:

from flow_state import solve
from flow_state.io import summary

# STORT trajectory point
# Mach 6, altitude 30 km
state = solve(
    mach=6.0,
    altitude=30_000,
    atm="ussa76",
)

print(summary(state))

Same STORT trajectory point using CIRA-86 with latitude/month:

from flow_state import solve, atmosphere
from flow_state.io import summary

# STORT trajectory point with CIRA-86
# Mach 6, altitude 30 km, mid-latitude summer
cira = atmosphere.CIRA86(latitude=35, month=7)
state = solve(
    mach=6.0,
    altitude=30_000,
    atm=cira,
)

print(summary(state))

Hypersonic International Flight Research Experimentation (HIFiRE-1):

from flow_state import solve
from flow_state.io import summary

# HIFiRE-1 trajectory point
# Mach 7, altitude 25 km
state = solve(
    mach=7.0,
    altitude=25_000,
)

print(summary(state))

CLI

Direct Options

flow-state solve --mach 6 --pres-stag 140 --pres-stag-unit psi --temp-stag 420
flow-state solve --mach 10 --pres-stag 1800 --pres-stag-unit psi --temp-stag 1000 --gas n2
flow-state solve --mach 7 --altitude 25000

Config Files

bam6qt.toml
1
2
3
mach = 6.0
pres_stag = [140, "psi"]
temp_stag = 420

Download

aedc_t9.toml
1
2
3
4
mach = 10.0
pres_stag = [1800, "psi"]
temp_stag = 1000
gas = "n2"

Download

hifire1.toml
mach = 7.0
altitude = 25000

Download

stort_cira.toml
1
2
3
4
5
6
7
mach = 6.0
altitude = 30000

[atmosphere]
model = "cira86"
latitude = 35
month = 7

Download

Run with:

flow-state solve --config <filename>.toml

See CLI Usage and Config Files for more details.