Compressible Flow Calculator (CFC)
Copyright (C) 2018 Ariel Mordoch
See LICENSE for license details
This Python program was built to solve problems related to compressible flow aerodynamics, specifically: isentropic flow with area change, normal and oblique shock analysis, and Prandtl-Meyer expansion fans.
Several other libraries do already exist which do the same thing as CFC, but better (caeroc). CFC is mostly intended to be a personal project and learning experience.
Installation is pretty simple. Download either the source code from the releases section
or the wheel/tarball directly out of dist/ and run the following
in your terminal:
-
If you downloaded the wheel:
pip install compressible_flow_calc-0.1-py3-none-any.whl -
If you downloaded the tarball:
pip install compressible_flow_calc-0.1.tar.gz
A release to PyPi is planned.
CFC requires numpy. If you install with pip it will be installed automatically if you don't already have it.
You can use compressible_flow_calc in several ways:
-
Directly from the command line:
python -m compressible_flow_calc -
As a package:
yourmodule.py
>>> import compressible_flow_calc as cfc >>> cfc.calc.A_over_Astar(M=2, gamma=1.4) 1.6875
-
Directly executing cli.py:
you@yourcomputer:/path/to/lib$ python cli.py
For options 1 and 3, CFC has its own "CLI" built in which will allow you to do simple mathematical analyses. For more complex programs, CFC exposes its mathematical functions as an importable Python package.
...Currently doesn't really exist. But so far, there is not much functionality anyway so feel free to take a look at the comments.
So far, all functions implemented are ratios -- which are unitless by definition. Use whatever unit system you prefer.
Theorectically there should be no problems with using values with units defines by pint, but this is not tested.