Skip to content

Commit

Permalink
added torque constraint to prop testing
Browse files Browse the repository at this point in the history
  • Loading branch information
courtin committed Mar 28, 2018
1 parent d4adcda commit a3d2084
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
26 changes: 14 additions & 12 deletions gpkitmodels/GP/aircraft/prop/prop_test.py
@@ -1,25 +1,27 @@
" propelle tests "
from propeller import Propeller
from gpkit import units
#from qprop import QProp
from gpkitmodels.GP.aircraft.wing.wing_test import FlightState

def eta_test():

fs = FlightState()
p = Propeller(fs)
p.substitutions[p.T] = 100
p.cost = 1/p.eta
sol = p.solve()
p = Propeller()
pp = p.flight_model(fs)
pp.substitutions[pp.T] = 100
pp.cost = 1/pp.eta + pp.Q/(100.*units("N*m"))
sol = pp.solve()
print sol.table()

def qprop_test():

fs = FlightState()
p = QProp(fs)
p.substitutions[p.T] = 100
p.cost = 1/p.eta
sol = p.solve()
print sol.table()
#def qprop_test():
#
# fs = FlightState()
# p = QProp(fs)
# p.substitutions[p.T] = 100
# p.cost = 1/p.eta
# sol = p.solve()
# print sol.table()

def test():
"tests"
Expand Down
2 changes: 1 addition & 1 deletion gpkitmodels/GP/aircraft/prop/propeller.py
Expand Up @@ -41,7 +41,7 @@ class Propeller_Performance(Model):
CP [-] power coefficient
Q [N*m] torque
omega [rpm] propeller rotation rate
omega_max 10000 [rpm] max rotation rate
omega_max 10000 [rpm] max rotation rate
P_shaft [kW] shaft power
M_tip .5 [-] Tip mach number
a 295 [m/s] Speed of sound at altitude
Expand Down

0 comments on commit a3d2084

Please sign in to comment.