Skip to main content

Lightweight utility for constructing compressible flow states and reference conditions

Project description

flow_state

Compressible flow state calculations for Python.

License Python Ruff

Install

pip install flow-state-calculator

Quick Start

from flow_state import solve

# From Mach and altitude
state = solve(mach=2.0, altitude=10000)

# From Mach and stagnation conditions (wind tunnel)
state = solve(mach=6, pres_stag=(140, "psi"), temp_stag=420)

# From Mach and target unit Reynolds number
state = solve(mach=5.3, re1=12.8e6)

# Access results
print(state)  # Full summary
print(state.pres, state.temp, state.re1)

Features

  • Smart solver: Automatically selects the right equations based on your inputs
  • Unit support: Use SI or provide tuples like (30000, "ft"), (140, "psi")
  • Atmosphere models: US Standard Atmosphere 1976 and CIRA-86
  • Gas models: Perfect gas (air, nitrogen, custom)
  • Transport: Sutherland viscosity law
  • Output: JSON, TOML, or legacy .dat format

CLI

# Create a config template
flow-state init

# Edit flow_config.toml, then solve
flow-state solve

Atmosphere Models

from flow_state import solve, atmosphere

# Default: US Standard Atmosphere 1976
state = solve(mach=2, altitude=10000)

# CIRA-86 with latitude and month
state = solve(mach=2, altitude=10000, atm=atmosphere.CIRA86(latitude=70, month=1))

Documentation

Full documentation: https://uahypersonics.github.io/flow_state

Citation

If you use flow_state in your research, please cite it using the "Cite this repository" button on GitHub, or:

@software{flow_state,
  title = {flow_state: Compressible Flow State Calculations},
  author = {Hader, Christoph},
  year = {2026},
  url = {https://github.com/uahypersonics/flow_state}
}

License

BSD-3-Clause. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flow_state_calculator-0.1.1.tar.gz (49.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flow_state_calculator-0.1.1-py3-none-any.whl (46.7 kB view details)

Uploaded Python 3

File details

Details for the file flow_state_calculator-0.1.1.tar.gz.

File metadata

  • Download URL: flow_state_calculator-0.1.1.tar.gz
  • Upload date:
  • Size: 49.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for flow_state_calculator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3c8ae13350314e5e9e4104a92efd0c113aa262f127f5258c17a049610c59e6ac
MD5 b1d0f92768888fd7179c14fbb501c373
BLAKE2b-256 efa8fa226afdda30cfa0ddeb5954154b9976e1a6777d83bd2b882e925863354e

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_state_calculator-0.1.1.tar.gz:

Publisher: publish.yml on uahypersonics/flow_state

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flow_state_calculator-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flow_state_calculator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4a6fda4fd8a5d308dbf7197109cf07dafb12417ce75559c710757237d0094cda
MD5 5cf33d0a6f6e903152da728ea2efe4f6
BLAKE2b-256 32ce00b285a90d16bb2b09c63398535f7a8aadc2be23c695606b5f87c1719d2f

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_state_calculator-0.1.1-py3-none-any.whl:

Publisher: publish.yml on uahypersonics/flow_state

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page