コード例 #1
0
    def test_03(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(.088035 / 1.225, alt_units='m')
        Truth = 20000
        self.assertTrue(RE(Value, Truth) <= 1e-5)
コード例 #2
0
    def test_03(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(.088035 / 1.225, alt_units='m')
        Truth = 20000
        self.failUnless(RE(Value, Truth) <= 1e-5)
コード例 #3
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(0.78601648829428272)
        Truth = 8000
        self.assertTrue(RE(Value, Truth) <= 1e-5)
コード例 #4
0
    def test_02(self):

        # Truth values from NASA RP 1046

        Value = SA.density_ratio2alt(0.78601648829428272)
        Truth = 8000
        self.failUnless(RE(Value, Truth) <= 1e-5)
コード例 #5
0
ファイル: io360a.py プロジェクト: khorton/AeroCalc_Package
def _hp_at_MP_and_altitude(rpm, MP):
    """ 
    Returns the power and density ratio at a given rpm and MP at full throttle.
    """
    # get density ratio for this MP and altitude, at full throttle
    DR = _DR_FT_from_MP(rpm, MP)

    # get power at this condition
    altitude = SA.density_ratio2alt(DR)
    hp = _hp_at_FT(rpm, altitude)

    return hp, DR
コード例 #6
0
def _hp_at_MP_and_altitude(rpm, MP):
    """ 
    Returns the power and density ratio at a given rpm and MP at full throttle.
    """
    # get density ratio for this MP and altitude, at full throttle
    DR = _DR_FT_from_MP(rpm, MP)
    
    # get power at this condition
    altitude = SA.density_ratio2alt(DR)
    hp = _hp_at_FT(rpm, altitude)
    
    return hp, DR
コード例 #7
0
 def test_01(self):
     PR = SA.density_ratio2alt(1)
     self.assertEqual(PR, 0)
コード例 #8
0
 def test_01(self):
     PR = SA.density_ratio2alt(1)
     self.assertEqual(PR, 0)