4 releases
| 0.2.0 | Feb 10, 2026 |
|---|---|
| 0.1.2 | Dec 20, 2024 |
| 0.1.1 | Apr 15, 2024 |
| 0.1.0 | Apr 14, 2024 |
#319 in Simulation
30KB
457 lines
Compressible Flow
comp-flow is a collection of functions for basic compressible flow relations.
The included functions have no input checking or error handling whatsoever. Invalid (non-physical) inputs such as mach < 1 for a shock relation or gamma < 1 may produce non-sensical outputs.
comp-flow
About
This library contains functions for basic compressible flow relations.
The naming of the API is heavily inspired by the python library compflow.
The included functions have no input checking or error handling whatsoever. Invalid (non-physical) inputs such as mach < 1 for a shock relation or gamma < 1 may produce non-sensical outputs.
Usage
Add this to your Cargo.toml:
[dependencies]
comp-flow = "0.2"
For API documentation, see docs.rs
Features
- Isentropic relations calculated from Mach numbers.
- Inverse isentropic relations calculating Mach numbers.
- Normal shock relations.
- Weak oblique shock relations.
To Do
- Fanno Flow
- Rayleigh Flow
- Conical Shock Relations
Contributing
Contributions are welcome, particularly optimizing the functions that make use of Newton's method. If a particular relation that you use is not included, feel free to add it.
Dependencies
~3.5MB
~67K SLoC