From 0f19a9a54e4c06f90f8b4804c1e0004be54ab7da Mon Sep 17 00:00:00 2001 From: 1ozturkbe <1ozturkbe@gmail.com> Date: Wed, 27 Sep 2017 13:14:14 -0400 Subject: [PATCH] [SimPleAC] Moving SigEnabled to Fuel section. --- gpkitmodels/SP/SimPleAC/SimPleAC.py | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gpkitmodels/SP/SimPleAC/SimPleAC.py b/gpkitmodels/SP/SimPleAC/SimPleAC.py index 67971bb5..4086433b 100644 --- a/gpkitmodels/SP/SimPleAC/SimPleAC.py +++ b/gpkitmodels/SP/SimPleAC/SimPleAC.py @@ -20,7 +20,7 @@ def SimPleAC(): "wing weight coefficent 1", pr= 30.) #orig 12e-5 W_W_coeff2 = Variable("W_{W_{coeff2}}", 60., "Pa", "wing weight coefficent 2", pr=10.) - p_labor = Variable('p_{labor}',1.,'1/min','cost of labor', pr = 20.) + p_labor = Variable('p_{labor}',1.,'1/min','cost of labor', pr = 20.) # Dimensional constants CDA0 = Variable("(CDA0)", "m^2", "fuselage drag area") #0.035 originally @@ -57,34 +57,34 @@ def SimPleAC(): # Drag model C_D_fuse = CDA0 / S C_D_wpar = k * C_f * S_wetratio - C_D_ind = C_L ** 2 / (np.pi * A * e) + C_D_ind = C_L ** 2 / (np.pi * A * e) constraints += [C_D >= C_D_fuse * toz + C_D_wpar / toz + C_D_ind * toz] + # Wing weight model + constraints += [W_w >= W_w_surf + W_w_strc, + # W_w_strc >= W_W_coeff1 * (N_ult * A ** 1.5 * ((W_0+V_f_fuse*g*rho_f) * W * S) ** 0.5) / tau, #[GP] + W_w_strc**2. >= W_W_coeff1**2. * (N_ult**2. * A ** 3. * ((W_0+V_f_fuse*g*rho_f) * W * S)) / tau**2., + W_w_surf >= W_W_coeff2 * S] + + # Weight and aerodynamics model + constraints += [LoD == C_L/C_D, + D >= 0.5 * rho * S * C_D * V ** 2, + Re <= (rho / mu) * V * (S / A) ** 0.5, + C_f >= 0.074 / Re ** 0.2, + T_flight >= Range / V, + W_0 + W_w + 0.5 * W_f <= 0.5 * rho * S * C_L * V ** 2, + W <= 0.5 * rho * S * C_Lmax * V_min ** 2, + W >= W_0 + W_w + W_f] + # Fuel volume model with SignomialsEnabled(): - # Wing weight model - constraints += [W_w >= W_w_surf + W_w_strc, - # W_w_strc >= W_W_coeff1 * (N_ult * A ** 1.5 * ((W_0+V_f_fuse*g*rho_f) * W * S) ** 0.5) / tau, #[GP] - W_w_strc**2. >= W_W_coeff1**2. * (N_ult**2. * A ** 3. * ((W_0+V_f_fuse*g*rho_f) * W * S)) / tau**2., - W_w_surf >= W_W_coeff2 * S] - - # Weight and aerodynamics model - constraints += [LoD == C_L/C_D, - D >= 0.5 * rho * S * C_D * V ** 2, - Re <= (rho / mu) * V * (S / A) ** 0.5, - C_f >= 0.074 / Re ** 0.2, - T_flight >= Range / V, - W_0 + W_w + 0.5 * W_f <= 0.5 * rho * S * C_L * V ** 2, - W <= 0.5 * rho * S * C_Lmax * V_min ** 2, - W >= W_0 + W_w + W_f] - # Fuel volume model constraints +=[V_f == W_f / g / rho_f, - V_f_avail <= V_f_wing + V_f_fuse, #[SP] - V_f_wing**2 <= 0.0009*S**3/A*tau**2, # linear with b and tau, quadratic with chord - V_f_fuse <= 10*units('m')*CDA0, - #TODO: Reduce volume available by the structure! - V_f_avail >= V_f, - W_f >= TSFC * T_flight * D] + V_f_avail <= V_f_wing + V_f_fuse, #[SP] + V_f_wing**2 <= 0.0009*S**3/A*tau**2, # linear with b and tau, quadratic with chord + V_f_fuse <= 10*units('m')*CDA0, + #TODO: Reduce volume available by the structure! + V_f_avail >= V_f, + W_f >= TSFC * T_flight * D] # return Model(W_f/LoD, constraints) # return Model(D, constraints)