Skip to content

Commit

Permalink
Updated propeller to base and performance class
Browse files Browse the repository at this point in the history
  • Loading branch information
courtin committed Mar 25, 2018
1 parent 129cd22 commit eb7c39d
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions gpkitmodels/GP/aircraft/prop/propeller.py
Expand Up @@ -14,7 +14,7 @@ class Propeller(Model):
def setup(self):
exec parse_variables(Propeller.__doc__)

def performance(state):
def performance(self,state):
return Propeller_Performance(self, state)

class Propeller_Performance(Model):
Expand All @@ -30,14 +30,19 @@ class Propeller_Performance(Model):
eta [-] overall efficiency
z1 self.helper [-] efficiency helper 1
z2 [-] efficiency helper 2
lam [-] advance ratio
CT [-] thrust coefficient
CP [-] power coefficient
Q [N*m] torque
omega [RPM] propeller rotation rate
"""

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

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

V = state.V
rho = state.rho
Expand All @@ -46,5 +51,10 @@ def setup(self,parent, state):
constraints = [eta <= etav*etai,
Tc == T/(0.5*rho*V**2*pi*R**2),
z2 >= Tc + 1,
etai*(z1 + z2**0.5/etaadd) <= 2]
etai*(z1 + z2**0.5/etaadd) <= 2,
lam == V/(omega*R),
CT == Tc*lam**2,
CP == Q*omega/(.5*rho*(omega*R)**3*math.pi*R**2),
eta == CT*lam/CP, #Is this the same eta? check
]
return constraints

0 comments on commit eb7c39d

Please sign in to comment.