Beispiel #1
0
def cl2lift(
    Cl,
    eas,
    wing_area,
    speed_units=default_speed_units,
    lift_units=default_weight_units,
    area_units=default_area_units,
    ):
    """
    Returns the lift, given coefficient of lift, equivalent airspeed, and wing
    area.
    """

    eas = U.speed_conv(eas, from_units=speed_units, to_units='m/s')
    wing_area = U.area_conv(wing_area, from_units=area_units,
                            to_units='m**2')

    lift = (((0.5 * Rho0) * eas ** 2.) * wing_area) * Cl
    if lift_units == 'kg':
        lift = U.force_conv(lift, 'N', 'lb')
        lift = U.mass_conv(lift, 'lb', 'kg')
    else:
        lift = U.force_conv(lift, 'N', lift_units)

    return lift
Beispiel #2
0
def cl2lift(
    Cl,
    eas,
    wing_area,
    speed_units=default_speed_units,
    lift_units=default_weight_units,
    area_units=default_area_units,
):
    """
    Returns the lift, given coefficient of lift, equivalent airspeed, and wing
    area.
    """

    eas = U.speed_conv(eas, from_units=speed_units, to_units='m/s')
    wing_area = U.area_conv(wing_area, from_units=area_units, to_units='m**2')

    lift = (((0.5 * Rho0) * eas**2.) * wing_area) * Cl
    if lift_units == 'kg':
        lift = U.force_conv(lift, 'N', 'lb')
        lift = U.mass_conv(lift, 'lb', 'kg')
    else:
        lift = U.force_conv(lift, 'N', lift_units)

    return lift
 def test_03(self):
     Value = U.mass_conv(100, from_units='lb', to_units='lb')
     Truth = 100
     self.failUnless(RE(Value, Truth) <= 1e-8)
 def test_02(self):
     Value = U.mass_conv(45.359237, from_units='kg', to_units='lb')
     Truth = 100
     self.failUnless(RE(Value, Truth) <= 1e-8)
 def test_01(self):
     Value = U.mass_conv(100, from_units='lb', to_units='kg')
     Truth = 45.359237
     self.failUnless(RE(Value, Truth) <= 1e-8)
 def test_03(self):
     Value = U.mass_conv(100, from_units='lb', to_units='lb')
     Truth = 100
     self.assertTrue(RE(Value, Truth) <= 1e-8)
 def test_02(self):
     Value = U.mass_conv(45.359237, from_units='kg', to_units='lb')
     Truth = 100
     self.assertTrue(RE(Value, Truth) <= 1e-8)
 def test_01(self):
     Value = U.mass_conv(100, from_units='lb', to_units='kg')
     Truth = 45.359237
     self.assertTrue(RE(Value, Truth) <= 1e-8)