Esempio n. 1
0
@author: j.gressier
"""

import numpy                 as np
import matplotlib.pyplot     as plt
import aero.Rayleigh         as ray

npoints = 100
gam     = 1.4

fig=plt.figure(1, figsize=(10,8))
fig.suptitle('Mach number evolution when heating, $\gamma = %.1f$'%gam, fontsize=12, y=0.93)

for M0 in [.1, .2, .3, .4, .5, .6, .7, .8, .9, 1.2, 1.5, 2., 3., 4., 6., 10., 20.]:
#for M0 in [.1, .5]:
    Timax = ray.maxTiratio_Mach(M0, gam)
    Ti    = np.log10(np.logspace(1., Timax, npoints+1))
    Mach  = ray.SubMach_TiTicri(Ti/Timax, gam) if M0 < 1 else ray.SupMach_TiTicri(Ti/Timax, gam)
    plt.plot(Ti, Mach, '-', color='#ff0000')

plt.axis([1., 10, .1, 10.])
plt.ylabel('Mach number', fontsize=10)
plt.xlabel('$T_i/T_{i0}$', fontsize=10)
plt.loglog()
#plt.ticklabel_format(axis='both', style='plain')
#plt.minorticks_on()
plt.grid(which='major', linestyle=':', alpha=0.5)
plt.grid(which='minor', linestyle=':', alpha=0.5)
fig.savefig('Rayleigh-heating.pdf', bbox_inches='tight')
plt.show()
Esempio n. 2
0
plt.plot(FSalpha, FSm3, '-', color='#ff0000')

# --- (CW) conventional working state

# M8 is sonic so M4 is known
CWm4 = mf.Mach_Sigma(A3A2/A8A2, .1, gam)  # look for subsonic value

CWm3low  = sw.downstream_Mn(M3sup, gam)
alphamin = ray.Ti_Ticri(CWm4, gam)/ray.Ti_Ticri(CWm3low, gam)
CWm3high = mf.Mach_Sigma(A3A2*mf.Sigma_Mach(sw.downstream_Mn(M2, gam), gam), .1, gam)
alphamax = ray.Ti_Ticri(CWm4, gam)/ray.Ti_Ticri(CWm3high, gam)
print "           unstart of inlet throat for Ti4/Ti0 = %6.3f"%(alphamax)
print "             fully supersonic flow for Ti4/Ti0 = %6.3f"%(alphamin)

CWalpha = np.log10(np.logspace(alphamin, alphamax, npts+1))
CWm3    = ray.SubMach_TiTicri(ray.Ti_Ticri(CWm4, gam)/CWalpha, gam)
CWpi3   = mf.Sigma_Mach(CWm3, gam)/mf.Sigma_Mach(M2, gam)/A3A2
CWpi4   = CWpi3*ray.Pi_Picri(CWm4, gam)/ray.Pi_Picri(CWm3, gam)
CWm4    = np.ones(npts+1)*CWm4

plt.subplot(311)
plt.plot(CWalpha, CWpi3, '-', color='#bb0000')
plt.subplot(312)
plt.plot(CWalpha, CWpi4, '-', color='#bb0000')
plt.subplot(313)
plt.plot(CWalpha, CWm3, '-', color='#bb0000')

# --- (UC) unstarted channel (A8 is sonic)

alphamax = 1.1*alphamax
# M8 is sonic so M4 is known