Skip to content

Commit

Permalink
created new prop classes; actuator disk and single blade element
Browse files Browse the repository at this point in the history
  • Loading branch information
courtin committed Apr 4, 2018
1 parent 2a62d28 commit 095f247
Show file tree
Hide file tree
Showing 2 changed files with 114 additions and 5 deletions.
44 changes: 43 additions & 1 deletion gpkitmodels/GP/aircraft/motor/motor_test.py
@@ -1,5 +1,6 @@
from gpkit import Model, parse_variables, SignomialsEnabled, SignomialEquality, units
from motor import Propulsor, ElecMotor, ElecMotor_Performance
from prop import Propeller
from gpkitmodels.GP.aircraft.wing.wing_test import FlightState

class Propulsor_Test(Model):
Expand Down Expand Up @@ -33,6 +34,46 @@ def setup(self):
self.cost = 1./mp.etam
return self.mp, fs

class speed_280_motor(Model):
def setup(self):
fs = FlightState()
m = ElecMotor()
mp = ElecMotor_Performance(m,fs)
self.mp = mp
mp.substitutions[m.Qmax] = 100
mp.substitutions[mp.R] = .7
mp.substitutions[mp.i0] = .16
mp.substitutions[mp.Kv] = 3800
mp.substitutions[mp.v] = 6
self.cost = 1./mp.etam
return self.mp, fs

def speed_280_test():
test = speed_280_motor()
sol = test.solve()
print sol.table()


class graupner_cam_6x3(Model):
def setup(self):
self.fs = FlightState()
self.p = Propeller()

self.p.substitutions[self.p.R] = (3./12.) #Convert in to ft

return self.p, self.fs
class motorProp(Model):
def setup(self):
p = graupner_cam_6x3()
m = speed_280_motor()


p.fs.substitutions[p.fs.V] = 10

self.cost(1/p.)



def motor_test():
test = Motor_P_Test()
sol = test.solve()
Expand Down Expand Up @@ -62,4 +103,5 @@ def test():
propulsor_test()

if __name__ == "__main__":
test()
#test()
speed_280_test()
75 changes: 71 additions & 4 deletions gpkitmodels/GP/aircraft/prop/propeller.py
Expand Up @@ -3,9 +3,7 @@
from gpkit import Model, parse_variables, SignomialsEnabled, SignomialEquality




class Propeller_Performance(Model):
class Actuator_Propeller_Performance(Model):
""" Propeller Model
Variables
Expand Down Expand Up @@ -55,7 +53,7 @@ def setup(self,parent, state):
]
return constraints, state

class Propeller(Model):
class Actuator_Propeller(Model):
""" Propeller Model
Variables
Expand All @@ -73,3 +71,72 @@ def setup(self):
constraints = [W >= K*T_m_static*R**2]

return constraints

class One_Element_Propeller_Performance(Model):
""" Propeller Model
Variables
---------
T [lbf] thrust
Tc [-] coefficient of thrust
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
lam [-] advance ratio
CT [-] thrust coefficient
CP [-] power coefficient
Q [N*m] torque
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):
return 2. - 1./c[self.etaadd]

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

V = state.V
rho = state.rho
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*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, state

class One_Element_Propeller(Model):
""" Propeller Model
Variables
---------
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
"""

flight_model = One_Element_Propeller_Performance
def setup(self):
exec parse_variables(Propeller.__doc__)

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

return constraints

0 comments on commit 095f247

Please sign in to comment.