Updated version 2.0, 11/11/12
Thanks for all the comments!
Based on feedback there are some new features:
1) The isentropic tab now contains the 'nozzle solve' option in terms of A/A*, and additional buttons have been added to allow to solve for all properties as a function of either M (as before), P0/P, Rho0/Rho, T0/T or A/A*. Whichever you want, just input the value and then hit the appropriate button. Stagnation ratios must be >1 (a value <1 would be nonsensical).
2) Using the added space, an extra tab has been included for calculating the 2D critical Mach number Mcrit from the minimum pressure coefficient Cpmin. This is done using three compressibility corrections - (1) Prandtl-Glauert, (2) Laitone and (3) Karman-Tsien. They all give broadly comparable results. If you want to know Mcrit for an aerofoil, compute the most negative pressure coefficient at the incidence of interest (using a panel code like Xfoil, or else you can get this from experimental data), then input Cpmin here. Cpmin must be negative (Cpmin=0 would be equivalent to a flat plate at zero incidence, so then Mcrit=Minf=1). The more negative Cpmin is, the lower Mcrit. Remember this is only for 2D critical Mach numbers; it is not valid in 3D (except perhaps for high aspect ratio wings).
3) A settings tab has been added for changing gamma (ratio of specific heats). Input your new gamma value, then hit 'update' (this action sets the preferences across all activities) and all calculations will now use the new gamma value. The program defaults to 1.403 (air) when opening, so you only need to change this if you want a gas other than air. Gamma needs to be >1.
With gamma being an input, there is an extra element of risk in the iterative methods. If a very strange value is used (like a large number >>1), you might see problems. However, within the common range of gamma values (1-2) it should work.
Post any further content suggestions and I'll try to incorporate.
Initial version 1.0, 23/01/12
CompFlow is a tool for finding quantities useful in 2D compressible flow calculations for air (currently gamma is hard-set to 1.403).
The program is arranged into 5 tabs that deal with:
1) Isentropic compressible flow - simple 1 line equations for P0/P, T0/T, rho0/rho, A/A*, nu
2) Nozzle flow - this calculates the subsonic and supersonic solutions as a function of A/A*
3) Normal shocks - the algebraic relations for normal shocks
4) Oblique shocks - an iterative solution for shock angle as a function of Mach number and deflection angle, as well as a calculation of the maximum deflection angle
5) Expansion fans - iterative inverse Prandtl-Meyer function to find the Mach number from the value of the Prandtl-Meyer function
This program is suitable for aerodynamics students wishing to check their tables calculations rapidly, or wishing to set their own problems to solve for practice. It serves in the role of the compressible flow tables.
Note: iterative routines are hard-set to 300 iterations. Use this tool at your own risk; no liabilities accepted.