diff --git a/gpkitmodels/SP/SimPleAC/SimPleAC.py b/gpkitmodels/SP/SimPleAC/SimPleAC.py index c53f093f..67971bb5 100644 --- a/gpkitmodels/SP/SimPleAC/SimPleAC.py +++ b/gpkitmodels/SP/SimPleAC/SimPleAC.py @@ -17,9 +17,9 @@ def SimPleAC(): S_wetratio = Variable("(\\frac{S}{S_{wet}})", 2.075, "-", "wetted area ratio", pr=3.) tau = Variable("\\tau", 0.12, "-", "airfoil thickness to chord ratio", pr=10.) W_W_coeff1 = Variable("W_{W_{coeff1}}", 2e-5, "1/m", - "Wing Weight Coefficent 1", pr= 30.) #orig 12e-5 + "wing weight coefficent 1", pr= 30.) #orig 12e-5 W_W_coeff2 = Variable("W_{W_{coeff2}}", 60., "Pa", - "Wing Weight Coefficent 2", pr=10.) + "wing weight coefficent 2", pr=10.) p_labor = Variable('p_{labor}',1.,'1/min','cost of labor', pr = 20.) # Dimensional constants @@ -63,13 +63,12 @@ def SimPleAC(): with SignomialsEnabled(): # Wing weight model - #NOTE: This is a signomial constraint that has been GPified. Could revert back to signomial? 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] - # and the rest of the models + # 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, @@ -77,17 +76,18 @@ def SimPleAC(): 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, - V_f == W_f / g / rho_f, + 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_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) + # return Model(D, constraints) return Model(W_f, constraints) # return Model(W,constraints) # return Model(W_f*T_flight,constraints)