Beispiel #1
0
Plot of Rayleigh curves in several diagrams
@author: j.gressier
"""

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

npoints = 200
gam     = 1.4

Mmin = 0.1
Mmax = 4.

Mach = np.log10(np.logspace(Mmin, Mmax, npoints+1))
Tparam = ray.maxTiratio_Mach(Mach, gam)
Ts     = ray.Ts_Tscri(Mach, gam)
Ti     = ray.Ti_Ticri(Mach, gam)
Ps     = ray.Ps_Pscri(Mach, gam)
Pi     = ray.Pi_Picri(Mach, gam)
V      = ray.V_Vcri(Mach, gam)
dS     = ray.NormdS(Mach, gam)

fig=plt.figure(1, figsize=(10,8))
fig.suptitle('Ratio to critical state, $\gamma = %.1f$'%gam, fontsize=12, y=0.93)
#plt.plot(Mach, Tparam, 'k--')
plt.plot(Mach, Ti, '-', color='#ff0000')
plt.plot(Mach, Ts, '-', color='#882222')
plt.plot(Mach, Pi, '-', color='#0000ff')
plt.plot(Mach, Ps, '-', color='#222288')
plt.plot(Mach, V,  '-', color='#009999')
Beispiel #2
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()
Beispiel #3
0
Plot of Rayleigh curves in several diagrams
@author: j.gressier
"""

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

npoints = 200
gam = 1.4

Mmin = 0.1
Mmax = 4.

Mach = np.log10(np.logspace(Mmin, Mmax, npoints + 1))
Tparam = ray.maxTiratio_Mach(Mach, gam)
Ts = ray.Ts_Tscri(Mach, gam)
Ti = ray.Ti_Ticri(Mach, gam)
Ps = ray.Ps_Pscri(Mach, gam)
Pi = ray.Pi_Picri(Mach, gam)
V = ray.V_Vcri(Mach, gam)
dS = ray.NormdS(Mach, gam)

fig = plt.figure(1, figsize=(10, 8))
fig.suptitle('Ratio to critical state, $\gamma = %.1f$' % gam,
             fontsize=12,
             y=0.93)
#plt.plot(Mach, Tparam, 'k--')
plt.plot(Mach, Ti, '-', color='#ff0000')
plt.plot(Mach, Ts, '-', color='#882222')
plt.plot(Mach, Pi, '-', color='#0000ff')
Beispiel #4
0
plt.grid(which='major', linestyle=':', alpha=0.5)

plt.subplot(312)
plt.ylabel('$p_{i4}/p_{i0}$', fontsize=10)
plt.grid(which='major', linestyle=':', alpha=0.5)

plt.subplot(313)
plt.ylabel('$T_{i4}/T_{i3}$', fontsize=10)
plt.ylabel('$M_{3}$', fontsize=10)
plt.grid(which='major', linestyle=':', alpha=0.5)

# --- (FS) fully supersonic flow (not expected on design)

M3sup    = mf.Mach_Sigma(A3A2*mf.Sigma_Mach(M2, gam), gam)
M4max    = mf.Mach_Sigma(A3A2/A8A2, 2., gam)  # look for supersonic value
alphamax = ray.Ti_Ticri(M4max, gam)/ray.Ti_Ticri(M3sup, gam)
print "unchoking of fully supersonic flow for Ti4/Ti0 = %6.3f"%(alphamax)

FSalpha = np.log10(np.logspace(1., alphamax, npts+1))
FSm4    = ray.SupMach_TiTicri(FSalpha/alphamax*ray.Ti_Ticri(M4max, gam), gam)
FSpi4   = ray.Pi_Picri(FSm4, gam)/ray.Pi_Picri(M3sup, gam)
FSpi3   = np.ones(npts+1)
FSm3    = M3sup*np.ones(npts+1)

plt.subplot(311)
plt.plot(FSalpha, FSpi3, '-', color='#ff0000')
plt.subplot(312)
plt.plot(FSalpha, FSpi4, '-', color='#ff0000')
plt.subplot(313)
plt.plot(FSalpha, FSm3, '-', color='#ff0000')
Beispiel #5
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()