Example #1
0
    def estimate_Ambient_Isp(self, Pc=100.0, MR=1.0, eps=40.0, Pamb=14.7):
        """::

        #: return the tuple (IspAmb, mode)
        #: Use throat gam to run ideal separation calculations.
        #: mode is a string containing, UnderExpanded, OverExpanded, or Separated
        #: MR is only used for ox/fuel combos.
        """

        self.setupCards(Pc=Pc, MR=MR, eps=eps)

        IspVac = py_cea.rockt.vaci[2]
        mw, gam = py_cea.prtout.wm[1], py_cea.prtout.gammas[1]  # throat gamma

        Cf, CfOverCfvac, mode = ambientCf(gam=gam,
                                          epsTot=eps,
                                          Pc=Pc,
                                          Pamb=Pamb)

        IspAmb = IspVac * CfOverCfvac

        return IspAmb, mode
Example #2
0
Nsteps = 20

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

IspODE, Cstar, Tcomb, mw, gam = ispObj.get_IvacCstrTc_ChmMwGam(Pc=pc,
                                                               MR=mr,
                                                               eps=eps)

pcArr = [100.0, 150.0, 200.0]

rs = [['Pamb', 'Cf/Cfvac', 'Pc', 'mode']]
for pc in pcArr:
    for i in range(Nsteps + 1):
        Pamb = 14.7 * i / Nsteps
        Cf, CfOverCfvac, mode = separated_Cf.ambientCf(gam=gam,
                                                       epsTot=eps,
                                                       Pc=pc,
                                                       Pamb=Pamb)

        rs.append([Pamb, CfOverCfvac, pc, mode])
    rs.append(['', '', '', ''])

xl = xlChart.xlChart()
xl.xlApp.DisplayAlerts = 0  # Allow Quick Close without Save Message

myTitle = "%s/%s Ambient Performance at Area Ratio=%.1f\n"%(oxName, fuelName, eps) +\
    "Pc Range = %g - %g psia"%(min(pcArr), max(pcArr))
xl.makeChart(rs,
             title=myTitle,
             nCurves=1,
             chartName="Performance",
             sheetName="FillData",