star-gasdynamics 0.1.0
Isentropic flow and normal shock of a perfect gas
Public state: Released & Verified. The registry label is RELEASED. What the states mean →
Apache-2.0 Released & Verified single file
Summary
Isentropic flow ratios, Mach number from area ratio on either branch and normal-shock jump of a calorically perfect gas; within 1.2e-15 of scikit-aero and fluids on 600 cases for the relations they provide; reproduces the NACA Report 1135 tables; density, temperature and total-pressure ratios across the shock rest on the published table and the conservation laws only.
Run in your browser
Edit the code and press Run (or Ctrl+Enter). Python runs in your browser with this package's published code. The first run downloads Python once (about 12 MB).
Runs in the browser: all 116 tests pass in the browser's Python (Pyodide 314.0.7, Python 3.14.2), measured on 20 October 2026.
Use it on your computer
No account and no GitHub needed. Download, then install with one command:
- Install file · star_gasdynamics-0.1.0-py3-none-any.whl 3 kB
- Single file — copy it alongside your code · star_gasdynamics.py 4 kB
- Source code (.zip) 21 kB
python -m pip install star_gasdynamics-0.1.0-py3-none-any.whlIn Python: import star_gasdynamics
Cite it, and its bill of materials
For a paper, a report or a supplier file: the citation in two formats, and the software bill of materials (SBOM) in the two standard formats, with the fingerprint of the wheel.
@software{cavazzini_star_gasdynamics_0_1_0,
author = {Cavazzini, Andrea},
title = {{star-gasdynamics}: Isentropic flow and normal shock of a perfect gas},
version = {0.1.0},
year = {2026},
url = {https://andrea07072000.github.io/S.T.A.R.-/software/star_gasdynamics/},
note = {Apache-2.0. Source: https://github.com/Andrea07072000/S.T.A.R.-, commit dc09f61d}
}
For developers
Install directly from the public repository:
python -m pip install "star-gasdynamics @ git+https://github.com/Andrea07072000/S.T.A.R.-.git@dc09f61dcee098d518f070d6a23a8815defc1109#subdirectory=packages/star_gasdynamics"
Technical sheet
Requirements
- R1
isentropic(mach, gamma): T/T0, p/p0, rho/rho0 and A/A* of a calorically perfect gas (NACA Report 1135). Reproduces the published table for gamma = 1.4 at Mach 0.5, 2, 3 and 5. - R2
mach_from_area_ratio(area_ratio, gamma, supersonic): the inverse on the branch asked for, by bisection to the last bit.normal_shock(mach1, gamma): M2 and the four ratios; reproduces the published table at Mach 2, 3 and 5 and satisfies the conservation of mass, momentum and energy across the shock. - R3 Measured on 600 cases (Mach 0.01 to 20, gamma 1.05 to 1.67): T/T0, p/p0, A/A*, M2 and p2/p1 within 1.2e-15 relative of scikit-aero; the pressure-temperature relation and the sonic ratios within 1.2e-15 of fluids; the Mach number from the area ratio within 2e-12 of scikit-aero where its root finder converged to the right branch.
- R4 Every function returns finite floats (A/A* is infinite at Mach 0) or raises
ValueError: non-numeric, boolean, NaN or infinite input, Mach outside [0, 50] (shock: [1, 50]), gamma outside [1.01, 3], an area ratio below 1 or beyond the branch,supersonicnot a bool.
Limits (what is not claimed)
A calorically perfect gas only: no real-gas effects, no dissociation, no variable gamma, so the results are not valid for hot hypersonic flows whatever the Mach limit accepted. rho2/rho1, T2/T1 and p02/p01 have NO library lineage: no installed library computes them; they rest on the published table and on the conservation laws. scikit-aero's inverse of the area ratio did not converge, or converged to the other branch, in about a quarter of the 600 cases (451 and 460 usable roots per branch): those cases were not compared; recorded as a candidate observation about a third-party library, not investigated and not reported. No oblique shocks, no Prandtl–Meyer expansion, no Fanno or Rayleigh flow.
Release gate
Computed by the registry from the result files, with the same function that decides RELEASED.
- Mutation score, latest measure of each module (needs at least 0.850)
- star_gasdynamics.py 0.979 (2026-10-06)
- Independent implementations written by others (needs 2)
- fluids.compressible (stagnation pressure relation, sonic ratios), scikit-aero skaero.gasdynamics (isentropic ratios, area ratio and its inverse, normal-shock M2 and p2/p1)
- Also compared with, not counted
- published values: NACA Report 1135 tables
- Result
- Released & Verified
Evidence in the registry
| Check | Status | Recorded | What was observed |
|---|---|---|---|
| Unit tests | VERIFIED | 2026-10-06 | 116 passed in 0.53s |
| Review | VERIFIED | 2026-10-06 | Requirements, interface, units, data provenance, dependency surface and failure behaviour reviewed |
| Review | VERIFIED | 2026-10-06 | Re-running the cross-check gives a byte-identical evidence file |
| Reference value | VERIFIED | 2026-10-06 | 0.55556, 0.12780, 0.23005, 1.68750; 0.57735, 4.50000, 2.66667, 1.68750, 0.72087: every value within the four printed figures (suite: 116 passed in 0.53s) |
| Cross-check with independent libraries | VERIFIED | 2026-10-06 | star_gasdynamics reproduces the isentropic relations and the normal-shock Mach number and pressure ratio of an independent library for any gamma |
| Benchmark | VERIFIED | 2026-10-06 | direct relations 1.1e-15; inverse of the area ratio 1.8e-12 |
| Clean install from the release tag | VERIFIED | 2026-10-06 | pytest outside the tree: 116 passed in 0.27s |
Fingerprints (SHA-256)
| star_gasdynamics-0.1.0-py3-none-any.whl | 963345570acc0a9acb5b0707b2da5603bd57f3fb4d986a27325f688995a16882 |
| star_gasdynamics.py | 6a7dab40d85811ce82ac4e3f45eef5f09477444c7e35eca8a43878abad1cd09c |
| star_gasdynamics-0.1.0-source.zip | e9c358cbebee484ec3afad43fa626d96f8e2716fc6dfe05b33c82c7c239e958f |
