File: cea_compare3.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 (31 lines) | stat: -rw-r--r-- 686 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
28
29
30
31

from rocketcea.cea_obj import CEA_Obj
from pylab import *

Pc = 500.0
eps = 25.0
mrMin = 1.0
mrStep = 0.05
mrMax = 2.75

for oxName,fuelName in [('N2O4','N2H4'),('N2O4','M20'),('N2O4','MMH')]:

    ispObj = CEA_Obj( oxName=oxName, fuelName=fuelName )

    ispArr = []
    MR = mrMin
    mrArr = []
    while MR < mrMax:
        ispArr.append( ispObj(Pc, MR, eps ))
        mrArr.append(MR)
        MR += mrStep
    plot(mrArr, ispArr, label='%s/%s'%(oxName,fuelName), linewidth=2)

legend(loc='best')
grid(True)
title( 'Propellant Performance Comparison at Eps=%g, Pc=%g psia'%(eps,Pc) )
xlabel( 'Mixture Ratio' )
ylabel( 'Isp ODE (sec)' )
savefig('cea_compare3.png', dpi=120)

show()