Skip to content

Commit

Permalink
update prop unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Mar 28, 2018
1 parent 05cbb85 commit 210802e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
32 changes: 11 additions & 21 deletions gpkitmodels/GP/aircraft/prop/prop_test.py
@@ -1,30 +1,20 @@
" propelle tests "
from propeller import Propeller
#from qprop import QProp
" propeller tests "
from gpkitmodels.GP.aircraft.prop.propeller import Propeller
from gpkitmodels.GP.aircraft.wing.wing_test import FlightState
from gpkit import Model

def eta_test():

fs = FlightState()
p = Propeller(fs)
p.substitutions[p.T] = 100
p.cost = 1/p.eta
sol = p.solve()
print sol.table()

def qprop_test():

def simpleprop_test():
" test simple propeller model "
fs = FlightState()
p = QProp(fs)
p.substitutions[p.T] = 100
p.cost = 1/p.eta
sol = p.solve()
print sol.table()
p = Propeller()
pp = p.flight_model(p, fs)
m = Model(1/pp.eta, [fs, p, pp])
m.substitutions.update({"rho": 1.225, "V": 50, "T": 100})
m.solve()

def test():
"tests"
eta_test()
#qprop_test()
simpleprop_test()

if __name__ == "__main__":
test()
Expand Down
2 changes: 1 addition & 1 deletion gpkitmodels/GP/aircraft/prop/propeller.py
Expand Up @@ -45,7 +45,7 @@ class Propeller(Model):
Variables
---------
R 10 [m] prop radius
R 1 [m] prop radius
"""
#TODO add weight model
Expand Down

0 comments on commit 210802e

Please sign in to comment.