Skip to content

Commit

Permalink
Prop changes for motor integration
Browse files Browse the repository at this point in the history
  • Loading branch information
courtin committed Mar 28, 2018
1 parent 1840d3e commit 622ba55
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions gpkitmodels/GP/aircraft/prop/propeller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,24 @@
from numpy import pi
from gpkit import Model, parse_variables, SignomialsEnabled, SignomialEquality


class Propeller(Model):
""" Propeller Model
Variables
---------
R 10 [m] prop radius
W .01 [lbf] prop weight
R [ft] prop radius
W [lbf] prop weight
K 4e-4 [1/ft^2] prop weight scaling factor
T_m_static 40. [lbf] prop max static thrust
"""
def setup(self):
exec parse_variables(Propeller.__doc__)

constraints = [W == K*T_m_static*R**2]

return constraints

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

Expand All @@ -22,7 +28,7 @@ class Propeller_Performance(Model):
Variables
---------
T [N] thrust
T [lbf] thrust
Tc [-] coefficient of thrust
etaadd 0.7 [-] swirl and nonuniformity losses
etav 0.85 [-] viscous losses
Expand All @@ -34,8 +40,11 @@ class Propeller_Performance(Model):
CT [-] thrust coefficient
CP [-] power coefficient
Q [N*m] torque
omega [RPM] propeller rotation rate
omega [rpm] propeller 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
"""

def helper(self, c):
Expand All @@ -46,15 +55,20 @@ def setup(self,parent, state):

V = state.V
rho = state.rho
R = parent.R
R = parent.R


constraints = [eta <= etav*etai,
Tc == T/(0.5*rho*V**2*pi*R**2),
z2 >= Tc + 1,
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
CP == Q*omega/(.5*rho*(omega*R)**3*pi*R**2),
eta == CT*lam/CP,
omega <= omega_max,
P_shaft == Q*omega,
(M_tip*a)**2 >= (omega*R)**2 + V**2

]
return constraints
return constraints, state

0 comments on commit 622ba55

Please sign in to comment.