Skip to content

Commit

Permalink
initial propeller efficiency model
Browse files Browse the repository at this point in the history
  • Loading branch information
mjburton committed Feb 23, 2018
1 parent 5c432bc commit ca4d658
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gpkitmodels/GP/aircraft/prop/prop_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from propeller import Propeller
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()
print sol.table()

def test():
"tests"
eta_test()

if __name__ == "__main__":
test()

34 changes: 34 additions & 0 deletions gpkitmodels/GP/aircraft/prop/propeller.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
" propeller model "
from numpy import pi
from gpkit import Model, parse_variables

class Propeller(Model):
""" Propeller Model
Variables
---------
T [N] thrust
Tc [-] coefficient of thrust
R 0.3 [m] prop radius
etaadd 0.7 [-] swirl and nonuniformity losses
etav 0.85 [-] viscous losses
etai [-] inviscid losses
eta [-] overall efficiency
z1 self.helper [-] efficiency helper 1
z2 [-] efficiency helper 2
"""

def helper(self, c):
return 2. - 1./c[self.etaadd]

def setup(self, state):
exec parse_variables(Propeller.__doc__)

V = state.V
rho = state.rho

return [eta <= etav*etai,
Tc == T/(0.5*rho*V**2*pi*R**2),
z2 >= 1 + Tc,
etai*(z1 + z2**0.5/etaadd) <= 2]

0 comments on commit ca4d658

Please sign in to comment.