Ejemplo n.º 1
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.alt_temp2density_ratio(8000, -0.8496)
        Truth = 0.06011 / 0.076474
        self.failUnless(RE(Value, Truth) <= 1e-5)
Ejemplo n.º 2
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.alt_temp2density_ratio(8000, -0.8496)
        Truth = 0.06011 / 0.076474
        self.assertTrue(RE(Value, Truth) <= 1e-5)
Ejemplo n.º 3
0
    def test_03(self):

        # truth value calculated from program at:
        # http://www.sworld.com.au/steven/space/atmosphere/

        Value = SA.alt_temp2density_ratio(1999, 275.1565, alt_units="m", temp_units="K")
        Truth = 0.82168
        self.failUnless(RE(Value, Truth) <= 5e-5)
Ejemplo n.º 4
0
    def test_03(self):

        # truth value calculated from program at:
        # http://www.sworld.com.au/steven/space/atmosphere/

        Value = SA.alt_temp2density_ratio(1999,
                                          275.1565,
                                          alt_units='m',
                                          temp_units='K')
        Truth = .82168
        self.assertTrue(RE(Value, Truth) <= 5e-5)
Ejemplo n.º 5
0
def power_alt(ff, n, Hp, OAT, k=.00283, k2=.007, ff_units='USG/h', temp_units = 'F'):
    """
    Alternate, simplified method to determine power.  Assume that the fuel 
    flow for peak EGT varies linearly with density ratio and rpm.  Then use 
    the main power method to calculate power for cases where there is not a 
    good indication of fuel flow at peak EGT.  Only applicable to Lycoming 
    IO-360A series engines.  Based on a very limited set of flight test data, 
    so the accuracy of the fuel flow at peak EGT has not been established 
    under all conditions.
    """
    oat = U.temp_conv(OAT, from_units='F', to_units='R')
    dr = SA.alt_temp2density_ratio(Hp, OAT, temp_units='F')
    ff_peak_EGT = k * dr * n + k2 * oat
    p = power(ff, ff_peak_EGT, n)
    
    return p
Ejemplo n.º 6
0
def power_alt(ff,
              n,
              Hp,
              OAT,
              k=.00283,
              k2=.007,
              ff_units='USG/h',
              temp_units='F'):
    """
    Alternate, simplified method to determine power.  Assume that the fuel 
    flow for peak EGT varies linearly with density ratio and rpm.  Then use 
    the main power method to calculate power for cases where there is not a 
    good indication of fuel flow at peak EGT.  Only applicable to Lycoming 
    IO-360A series engines.  Based on a very limited set of flight test data, 
    so the accuracy of the fuel flow at peak EGT has not been established 
    under all conditions.
    """
    oat = U.temp_conv(OAT, from_units='F', to_units='R')
    dr = SA.alt_temp2density_ratio(Hp, OAT, temp_units='F')
    ff_peak_EGT = k * dr * n + k2 * oat
    p = power(ff, ff_peak_EGT, n)

    return p
Ejemplo n.º 7
0
 def test_01(self):
     PR = SA.alt_temp2density_ratio(0, 59, temp_units='F')
     self.assertEqual(PR, 1)
Ejemplo n.º 8
0
 def test_01(self):
     PR = SA.alt_temp2density_ratio(0, 59, temp_units="F")
     self.assertEqual(PR, 1)
Ejemplo n.º 9
0
def ffp(Hp, OAT, n, k=.00283, k2=.007):
    oat = U.temp_conv(OAT, from_units='F', to_units='R')
    dr = SA.alt_temp2density_ratio(Hp, OAT, temp_units='F')
    ff_peak_EGT = k * dr * n + k2 * oat
    return ff_peak_EGT
Ejemplo n.º 10
0
def ffp(Hp, OAT, n, k=.00283, k2=.007):
    oat = U.temp_conv(OAT, from_units='F', to_units='R')
    dr = SA.alt_temp2density_ratio(Hp, OAT, temp_units='F')
    ff_peak_EGT = k * dr * n + k2 * oat
    return ff_peak_EGT