From 622ba5510aa7ffaeb43aec05c79096d44f806173 Mon Sep 17 00:00:00 2001 From: Chris Courtin Date: Wed, 28 Mar 2018 10:14:35 -0400 Subject: [PATCH] Prop changes for motor integration --- gpkitmodels/GP/aircraft/prop/propeller.py | 34 ++++++++++++++++------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/gpkitmodels/GP/aircraft/prop/propeller.py b/gpkitmodels/GP/aircraft/prop/propeller.py index 3d78e567..34b7400c 100644 --- a/gpkitmodels/GP/aircraft/prop/propeller.py +++ b/gpkitmodels/GP/aircraft/prop/propeller.py @@ -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) @@ -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 @@ -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): @@ -46,7 +55,8 @@ 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), @@ -54,7 +64,11 @@ def setup(self,parent, state): 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 \ No newline at end of file + return constraints, state \ No newline at end of file