@@ -54,7 +54,6 @@ def setup():
5454def find_target_range (nexus ,mission ):
5555
5656 segments = mission .segments
57- cruise_altitude = mission .segments ['climb_5' ].altitude_end
5857 climb_1 = segments ['climb_1' ]
5958 climb_2 = segments ['climb_2' ]
6059 climb_3 = segments ['climb_3' ]
@@ -139,55 +138,6 @@ def simple_sizing(nexus):
139138 turbofan_sizing (config .propulsors ['turbofan' ], mach_number = mach_number , altitude = altitude )
140139 compute_turbofan_geometry (config .propulsors ['turbofan' ], conditions )
141140
142-
143- # ------------------------------------------------------------------
144- # Landing Configuration
145- # ------------------------------------------------------------------
146- landing = nexus .vehicle_configurations .landing
147- state = Data ()
148- state .conditions = Data ()
149- state .conditions .freestream = Data ()
150-
151- # landing weight
152- landing .mass_properties .landing = 0.85 * config .mass_properties .takeoff
153-
154- # Landing CL_max
155- altitude = nexus .missions .base .segments [- 1 ].altitude_end
156- atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
157- p , T , rho , a , mu = atmosphere .compute_values (altitude )
158- state .conditions .freestream .velocity = nexus .missions .base .segments ['descent_3' ].air_speed
159- state .conditions .freestream .density = rho
160- state .conditions .freestream .dynamic_viscosity = mu / rho
161- settings = Data ()
162- settings .maximum_lift_coefficient_factor = 1.0
163- CL_max_landing , CDi = compute_max_lift_coeff (state ,settings ,landing )
164- landing .maximum_lift_coefficient = CL_max_landing
165-
166-
167- #Takeoff CL_max
168- takeoff = nexus .vehicle_configurations .takeoff
169- altitude = nexus .missions .base .airport .altitude
170- atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
171- p , T , rho , a , mu = atmosphere .compute_values (altitude )
172- state .conditions .freestream .velocity = nexus .missions .base .segments .climb_1 .air_speed
173- state .conditions .freestream .density = rho
174- state .conditions .freestream .dynamic_viscosity = mu / rho
175- settings .maximum_lift_coefficient_factor = 1.0
176- max_CL_takeoff ,CDi = compute_max_lift_coeff (state ,settings ,takeoff )
177- takeoff .maximum_lift_coefficient = max_CL_takeoff
178-
179- #Base config CL_max
180- base = nexus .vehicle_configurations .base
181- altitude = nexus .missions .base .airport .altitude
182- atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
183- p , T , rho , a , mu = atmosphere .compute_values (altitude )
184- state .conditions .freestream .velocity = nexus .missions .base .segments .climb_1 .air_speed
185- state .conditions .freestream .density = rho
186- state .conditions .freestream .dynamic_viscosity = mu / rho
187- settings .maximum_lift_coefficient_factor = 1.0
188- max_CL_base ,CDi = compute_max_lift_coeff (state ,settings ,landing )
189- base .maximum_lift_coefficient = max_CL_base
190-
191141 return nexus
192142
193143# ----------------------------------------------------------------------
@@ -198,17 +148,13 @@ def weight(nexus):
198148 vehicle = nexus .vehicle_configurations .base
199149
200150 # weight analysis
201- weights = nexus .analyses .base .weights .evaluate ()
202- weights = nexus .analyses .cruise .weights .evaluate ()
151+ weights = nexus .analyses .base .weights .evaluate (method = "SUAVE" )
152+ weights = nexus .analyses .cruise .weights .evaluate (method = "SUAVE" )
203153 vehicle .mass_properties .breakdown = weights
204- weights = nexus .analyses .landing .weights .evaluate ()
205- weights = nexus .analyses .takeoff .weights .evaluate ()
206- weights = nexus .analyses .short_field_takeoff .weights .evaluate ()
207-
208- for config in nexus .vehicle_configurations :
209- config .mass_properties .zero_fuel_center_of_gravity = vehicle .mass_properties .zero_fuel_center_of_gravity
210- config .fuel = vehicle .fuel
211-
154+ weights = nexus .analyses .landing .weights .evaluate (method = "SUAVE" )
155+ weights = nexus .analyses .takeoff .weights .evaluate (method = "SUAVE" )
156+ weights = nexus .analyses .short_field_takeoff .weights .evaluate (method = "SUAVE" )
157+
212158 return nexus
213159
214160# ----------------------------------------------------------------------
@@ -231,16 +177,7 @@ def post_process(nexus):
231177 vehicle = nexus .vehicle_configurations .base
232178 results = nexus .results
233179 summary = nexus .summary
234- missions = nexus .missions
235180 nexus .total_number_of_iterations += 1
236- # Static stability calculations
237- CMA = - 10.
238- for segment in results .base .segments .values ():
239- max_CMA = np .max (segment .conditions .stability .static .Cm_alpha [:,0 ])
240- if max_CMA > CMA :
241- CMA = max_CMA
242-
243- summary .static_stability = CMA
244181
245182 #throttle in design mission
246183 max_throttle = 0
@@ -252,18 +189,15 @@ def post_process(nexus):
252189 summary .max_throttle = max_throttle
253190
254191 # Fuel margin and base fuel calculations
255- operating_empty = vehicle .mass_properties .operating_empty
256- payload = vehicle .mass_properties .breakdown .payload
257192 design_landing_weight = results .base .segments [- 1 ].conditions .weights .total_mass [- 1 ]
258193 design_takeoff_weight = vehicle .mass_properties .takeoff
259- max_takeoff_weight = nexus .vehicle_configurations .takeoff .mass_properties .max_takeoff
260- zero_fuel_weight = payload + operating_empty
194+ zero_fuel_weight = vehicle .mass_properties .breakdown .zero_fuel_weight
261195
262- summary .max_zero_fuel_margin = (design_landing_weight - zero_fuel_weight )/ zero_fuel_weight
263- summary .base_mission_fuelburn = design_takeoff_weight - results .base .segments ['descent_3' ].conditions .weights .total_mass [- 1 ]
196+ summary .max_zero_fuel_margin = (design_landing_weight - zero_fuel_weight )/ zero_fuel_weight
197+ summary .base_mission_fuelburn = design_takeoff_weight - results .base .segments ['descent_3' ].conditions .weights .total_mass [- 1 ]
264198
265199 #when you run want to output results to a file
266200 filename = 'results.txt'
267201 write_optimization_outputs (nexus , filename )
268-
202+
269203 return nexus
0 commit comments