File: cea_cstar_plot.py

package info (click to toggle)
rocketcea 1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 39,944 kB
  • sloc: fortran: 23,152; python: 9,235; pascal: 370; makefile: 168; sh: 9
file content (27 lines) | stat: -rw-r--r-- 534 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27


from rocketcea.cea_obj import CEA_Obj
from pylab import *

pcL = [ 2000., 500., 70.]

ispObj = CEA_Obj(propName='', oxName='LOX', fuelName="LH2")

for Pc in pcL:
    cstarArr = []
    MR = 2.0
    mrArr = []
    while MR < 8.0:
        cstarArr.append( ispObj.get_Cstar( Pc=Pc, MR=MR) )
        mrArr.append(MR)
        MR += 0.05
    plot(mrArr, cstarArr, label='Pc=%g psia'%Pc)

legend(loc='best')
grid(True)
title( ispObj.desc )
xlabel( 'Mixture Ratio' )
ylabel( 'Cstar (ft/sec)' )
savefig('cea_cstar_plot.png', dpi=120)

show()