Skip to content

Commit

Permalink
Deleted everything unnecessary from prop_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
courtin committed Apr 17, 2018
1 parent 31afe0d commit bb8347f
Showing 1 changed file with 1 addition and 43 deletions.
44 changes: 1 addition & 43 deletions gpkitmodels/GP/aircraft/prop/prop_test.py
@@ -1,6 +1,6 @@
" propeller tests "
from gpkitmodels.GP.aircraft.prop.propeller import Propeller, ActuatorProp
from gpkitmodels.GP.aircraft.prop.propeller import SimpleQProp, Multi_Element_Propeller


from gpkitmodels.GP.aircraft.wing.wing_test import FlightState
from gpkit import units, Model
Expand All @@ -17,52 +17,10 @@ def simpleprop_test():
sol = m.solve()
#print sol.table()

def OE_eta_test():
" simple qprop test "

fs = FlightState()
Propeller.flight_model = SimpleQProp
p = Propeller()
pp = p.flight_model(p, fs)
pp.substitutions[pp.T] = 100
pp.substitutions[pp.AR_b] = 12
m = Model(1/pp.eta + pp.Q/(10.*units("N*m"))+ p.W/(100.*units("lbf")),
[pp, p])
#m.debug()
sol = m.localsolve()
#print sol.table()

def ME_eta_test():

fs = FlightState()
p = Multi_Element_Propeller()
p.substitutions[p.T_m] = 100
#p.substitutions[p.R] = 2
pp = p.flight_model(p,fs)
pp.substitutions[pp.T] = 100

#pp.substitutions[pp.omega] = 500

#pp.substitutions[pp.omega] = 1000
pp.cost = 1./pp.eta + pp.Q/(100.*units("N*m"))
#sol = pp.debug()
sol = pp.localsolve(iteration_limit = 400)
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"
OE_eta_test()
simpleprop_test()
ME_eta_test()
if __name__ == "__main__":
test()

0 comments on commit bb8347f

Please sign in to comment.