Ejemplo n.º 1
0
def cp2bhp(Cp,
           rpm,
           density,
           dia,
           power_units='hp',
           density_units='lb/ft**3',
           dia_units='in'):
    """
    Returns the bhp, given propeller power coefficient (Cp), revolutions per 
    minute (rpm), and propeller diameter.

    The power units may be specified as "hp", "ft-lb/mn", "ft-lb/s", "W"
    (watts) or "kW" (kilowatts), but default to "hp" if not specified.

    The density units may be specified as "lb/ft**3", "slug/ft**3" or 
    "kg/m**3", but default to "lb/ft**3" if not specified.

    The diameter units may be specified as "in", "ft", or "m", but default
    to inches if not specified.
    """
    # bhp = U.power_conv(bhp, from_units = power_units, to_units = 'W')
    density = U.density_conv(density,
                             from_units=density_units,
                             to_units='kg/m**3')
    dia = U.length_conv(dia, from_units=dia_units, to_units='m')

    bhp = Cp * (density * ((rpm / 60.)**3) * dia**5)
    bhp = U.power_conv(bhp, from_units='W', to_units=power_units)

    return bhp
Ejemplo n.º 2
0
def BMEP(bhp, rpm, disp, power_units=default_power_units, vol_units=default_vol_units, press_units=default_press_units):
    """
    Return brake mean effective pressure, given brake power, rpm and displacement.
    
    Rpm is revolutions per minute.
    """
    bhp = U.power_conv(bhp, power_units, 'hp')
    disp = U.vol_conv(disp, vol_units, 'in**3')
    bmep = 2 * bhp * 33000. * 12 / (rpm * disp)

    return bmep
Ejemplo n.º 3
0
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)
Ejemplo n.º 4
0
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)
Ejemplo n.º 5
0
def BMEP(bhp,
         rpm,
         disp,
         power_units=default_power_units,
         vol_units=default_vol_units,
         press_units=default_press_units):
    """
    Return brake mean effective pressure, given brake power, rpm and displacement.
    
    Rpm is revolutions per minute.
    
    Example:
    >>> BMEP(200, 2700, 360, vol_units="in**3") 
    162.96296296296296
    """
    bhp = U.power_conv(bhp, power_units, 'hp')
    disp = U.vol_conv(disp, vol_units, 'in**3')
    bmep = 2 * bhp * 33000. * 12 / (rpm * disp)

    return bmep
Ejemplo n.º 6
0
def bhp2Cp(bhp, rpm, density, dia, power_units="hp", density_units="lb/ft**3", dia_units="in"):
    """
    Returns the propeller power coefficient, Cp, given power, revolutions per 
    minute (rpm), and propeller diameter.

    The power units may be specified as "hp", "ft-lb/mn", "ft-lb/s", "W"
    (watts) or "kW" (kilowatts), but default to "hp" if not specified.

    The density units may be specified as "lb/ft**3", "slug/ft**3" or 
    "kg/m**3", but default to "lb/ft**3" if not specified.

    The diameter units may be specified as "in", "ft", or "m", but default
    to inches if not specified.
    """
    bhp = U.power_conv(bhp, from_units=power_units, to_units="W")
    density = U.density_conv(density, from_units=density_units, to_units="kg/m**3")
    dia = U.length_conv(dia, from_units=dia_units, to_units="m")

    Cp = bhp / (density * ((rpm / 60.0) ** 3) * dia ** 5)

    return Cp
 def test_04(self):
     Value = U.power_conv(0.74569987, from_units='kW',
                          to_units='ft-lb/s')
     Truth = 550
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_03(self):
     Value = U.power_conv(550, from_units='ft-lb/s', to_units='kW')
     Truth = 0.74569987
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_02(self):
     Value = U.power_conv(33000, from_units='ft-lb/mn', to_units='hp'
                          )
     Truth = 1
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_01(self):
     Value = U.power_conv(1, from_units='hp', to_units='ft-lb/mn')
     Truth = 33000
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_04(self):
     Value = U.power_conv(0.74569987, from_units='kW', to_units='ft-lb/s')
     Truth = 550
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_03(self):
     Value = U.power_conv(550, from_units='ft-lb/s', to_units='kW')
     Truth = 0.74569987
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_02(self):
     Value = U.power_conv(33000, from_units='ft-lb/mn', to_units='hp')
     Truth = 1
     self.failUnless(RE(Value, Truth) <= 1e-5)
 def test_01(self):
     Value = U.power_conv(1, from_units='hp', to_units='ft-lb/mn')
     Truth = 33000
     self.failUnless(RE(Value, Truth) <= 1e-5)