Skip to main content

Lightweight utility for computing flow states

Project description

flow_state

Compressible flow state calculations for Python.

Test codecov DOI PyPI Docs Webapp License Python Ruff

Install

pip install flow-state-calculator

Quick Start

API:

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)

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

CLI:

flow-state init    # Create a config template
flow-state solve   # Solve from flow_config.toml

Documentation

Full documentation: https://uahypersonics.github.io/flow-state

Citation

If you use flow_state in your research, please cite it:

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

Code Style

This project follows established Python community conventions so that contributors can focus on the physics rather than inventing formatting rules.

Convention What it covers Reference
PEP 8 Code formatting, naming, whitespace Python standard style guide
PEP 257 Docstring structure (triple-quoted, imperative mood) Python standard docstring conventions
numpydoc Docstring sections (Parameters, Returns, Attributes) NumPy/SciPy docstring standard — the norm for scientific Python
Ruff Automated linting and formatting Enforces PEP 8 compliance automatically
typing / TYPE_CHECKING Type hints for IDE support and static analysis Python standard library

Releasing

This project uses Semantic Versioning (vMAJOR.MINOR.PATCH):

  • MAJOR (v1.0.0, v2.0.0): Breaking API changes
  • MINOR (v0.3.0, v0.4.0): New features, backward-compatible
  • PATCH (v0.3.1, v0.3.2): Bug fixes, minor corrections

To publish a new version to PyPI:

  1. Regenerate the API architecture diagram:
    pydeps src/flow_state --noshow --max-bacon=4 --cluster -o docs/assets/architecture.svg
    
  2. Commit and push to main
  3. Tag and push:
    git tag -a vMAJOR.MINOR.PATCH -m "Release vMAJOR.MINOR.PATCH"
    git push origin vMAJOR.MINOR.PATCH
    

The GitHub Actions workflow will automatically build and publish to PyPI via Trusted Publishing.

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.5.1.tar.gz (1.6 MB 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.5.1-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: flow_state_calculator-0.5.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flow_state_calculator-0.5.1.tar.gz
Algorithm Hash digest
SHA256 598efeff9a52a9b45aa4da3c7f82fec9f0a9f09c3f6cd345d3257109b24447b5
MD5 f999b23ca786ff60268dfa9bff32da0c
BLAKE2b-256 15295e52307538a22a94ccf6928352d8f0f4b786fe2bbaa400ff7190b9f6a242

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_state_calculator-0.5.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.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flow_state_calculator-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2899e0f647b82f08e463de75327366be07ab84c084773e18cb30d3ec0f099bc5
MD5 1e14ad4f4167d1b5af4a3e8c5e7934cc
BLAKE2b-256 6240400771c97e5c43a0d4f418f0e749fdcef90574e4ea8226436a7cd8d9da24

See more details on using hashes here.

Provenance

The following attestation bundles were made for flow_state_calculator-0.5.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