File: ambient_Cf.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 (15 lines) | stat: -rw-r--r-- 508 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from rocketcea.cea_obj import CEA_Obj

Pc=1000.0
MR=6.0
Pamb=14.7

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

# get nozzle area ratio that has Pexit equal to Pamb
eps_pamb = ispObj.get_eps_at_PcOvPe(Pc=Pc, MR=MR, PcOvPe=Pc/Pamb)

# run under-expanded, Pexit equals Pambient, over-expanded and separated flow
for eps in [4., eps_pamb, 12., 40.]:
    CFcea, CFamb, mode = ispObj.get_PambCf( Pamb=Pamb, Pc=Pc, MR=MR, eps=eps)
    print('eps=%7g, CFcea=%7g, CFamb=%7g, mode=%s'%(eps, CFcea, CFamb, mode) )