def tip_mach(tas, rpm, temperature, dia, speed_units='kt', temp_units='C', dia_units='in'): """ Returns the mach number of the propeller blade tip, given the true airspeed (tas), revolutions per minute (rpm), temperature and propeller diameter. The speed units may be specified as "kt", "mph", "km/h" or "ft/s", but default to "kt" if not specified. The temperature units may be specified as "C", "F", "K" or "R", but default to deg C if not specified. The diameter units may be specified as "in", "ft", or "m", but default to inches if not specified. """ dia = U.length_conv(dia, from_units=dia_units, to_units='m') tas = U.speed_conv(tas, from_units=speed_units, to_units='m/s') speed_of_sound = SA.temp2speed_of_sound(temperature, temp_units=temp_units, speed_units='m/s') rotation_speed = dia * rpm * np.pi / 60 tip_speed = np.sqrt(tas**2 + rotation_speed**2) tip_mach = tip_speed / speed_of_sound return tip_mach
def eff2thrust(eff, bhp, TAS, power_units='hp', speed_units='kt', thrust_units='lb'): """ Returns thrust, given prop efficiency, true airspeed and brake power. Matches the results from the Hartzell prop map program fairly closely. """ TAS = U.speed_conv(TAS, from_units=speed_units, to_units='m/s') bhp = U.power_conv(bhp, from_units=power_units, to_units='W') thrust = eff * bhp / TAS return U.force_conv(thrust, from_units='N', to_units=thrust_units)
def advance_ratio(tas, rpm, dia, speed_units='kt', dia_units='in'): """ Returns the propeller advance ratio, J, given the revolutions per minute (rpm), true airspeed (tas), temperature and propeller diameter. The advance ratio is the forward distance that the propeller advances during one revolution, divided by the diameter of the propeller. The diameter units may be specified as "in", "ft", or "m", but default to inches if not specified. """ tas = U.speed_conv(tas, from_units=speed_units, to_units='m/s') dia = U.length_conv(dia, from_units=dia_units, to_units='m') advance_ratio = tas * 60. / (rpm * dia) return advance_ratio
def test_05(self): Value = U.speed_conv(1, from_units='ft/s', to_units='kt') Truth = 3600. / (1852. / 0.3048) self.assertLessEqual(RE(Value, Truth), 1e-8)
def test_04(self): Value = U.speed_conv(1, from_units='m/s', to_units='ft/s') Truth = 1 / 0.3048 self.assertLessEqual(RE(Value, Truth), 1e-8)
def test_03(self): Value = U.speed_conv(1, from_units='km/h', to_units='m/s') Truth = 1000 / 3600. self.assertLessEqual(RE(Value, Truth), 1e-8)
def test_02(self): Value = U.speed_conv(1, from_units='mph', to_units='km/h') Truth = (5280 * 0.3048) / 1000 self.assertLessEqual(RE(Value, Truth), 1e-8)
def test_01(self): Value = U.speed_conv(1, from_units='kt', to_units='mph') Truth = (1852. / 0.3048) / 5280 self.assertLessEqual(RE(Value, Truth), 1e-8)