From 095f2478750f79fa2d2960fe41e6b237d3f606e6 Mon Sep 17 00:00:00 2001 From: Chris Courtin Date: Wed, 4 Apr 2018 12:11:29 -0400 Subject: [PATCH] created new prop classes; actuator disk and single blade element --- gpkitmodels/GP/aircraft/motor/motor_test.py | 44 +++++++++++- gpkitmodels/GP/aircraft/prop/propeller.py | 75 +++++++++++++++++++-- 2 files changed, 114 insertions(+), 5 deletions(-) diff --git a/gpkitmodels/GP/aircraft/motor/motor_test.py b/gpkitmodels/GP/aircraft/motor/motor_test.py index 276c63c1..84c2af2d 100644 --- a/gpkitmodels/GP/aircraft/motor/motor_test.py +++ b/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): @@ -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() @@ -62,4 +103,5 @@ def test(): propulsor_test() if __name__ == "__main__": - test() + #test() + speed_280_test() diff --git a/gpkitmodels/GP/aircraft/prop/propeller.py b/gpkitmodels/GP/aircraft/prop/propeller.py index f96d310d..75049608 100644 --- a/gpkitmodels/GP/aircraft/prop/propeller.py +++ b/gpkitmodels/GP/aircraft/prop/propeller.py @@ -3,9 +3,7 @@ from gpkit import Model, parse_variables, SignomialsEnabled, SignomialEquality - - -class Propeller_Performance(Model): +class Actuator_Propeller_Performance(Model): """ Propeller Model Variables @@ -55,7 +53,7 @@ def setup(self,parent, state): ] return constraints, state -class Propeller(Model): +class Actuator_Propeller(Model): """ Propeller Model Variables @@ -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 \ No newline at end of file