@@ -104,7 +104,7 @@ def design_mission(nexus):
104104def simple_sizing (nexus ):
105105 configs = nexus .vehicle_configurations
106106 base = configs .base
107-
107+
108108 #find conditions
109109 air_speed = nexus .missions .base .segments ['cruise' ].air_speed
110110 altitude = nexus .missions .base .segments ['climb_5' ].altitude_end
@@ -163,10 +163,11 @@ def simple_sizing(nexus):
163163 # Landing CL_max
164164 altitude = nexus .missions .base .segments [- 1 ].altitude_end
165165 atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
166- p , T , rho , a , mu = atmosphere .compute_values (altitude )
166+ freestream_landing = atmosphere .compute_values (0. )
167+ #p, T, rho, a, mu = atmosphere.compute_values(0.)
167168 landing_conditions .freestream .velocity = nexus .missions .base .segments ['descent_3' ].air_speed
168- landing_conditions .freestream .density = rho
169- landing_conditions .freestream .dynamic_viscosity = mu / rho
169+ landing_conditions .freestream .density = freestream_landing . density
170+ landing_conditions .freestream .dynamic_viscosity = freestream_landing . dynamic_viscosity
170171 CL_max_landing ,CDi = compute_max_lift_coeff (landing ,landing_conditions )
171172 landing .maximum_lift_coefficient = CL_max_landing
172173 # diff the new data
@@ -178,11 +179,12 @@ def simple_sizing(nexus):
178179 takeoff_conditions = Data ()
179180 takeoff_conditions .freestream = Data ()
180181 altitude = nexus .missions .base .airport .altitude
181- atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
182- p , T , rho , a , mu = atmosphere .compute_values (altitude )
182+ freestream_takeoff = atmosphere .compute_values (altitude )
183+
184+ #p, T, rho, a, mu = atmosphere.compute_values(altitude)
183185 takeoff_conditions .freestream .velocity = nexus .missions .base .segments .climb_1 .air_speed
184- takeoff_conditions .freestream .density = rho
185- takeoff_conditions .freestream .dynamic_viscosity = mu / rho
186+ takeoff_conditions .freestream .density = freestream_takeoff . density
187+ takeoff_conditions .freestream .dynamic_viscosity = freestream_takeoff . dynamic_viscosity
186188 max_CL_takeoff ,CDi = compute_max_lift_coeff (takeoff ,takeoff_conditions )
187189 takeoff .maximum_lift_coefficient = max_CL_takeoff
188190
@@ -193,13 +195,7 @@ def simple_sizing(nexus):
193195 #Base config CL_max
194196 base = nexus .vehicle_configurations .base
195197 base_conditions = Data ()
196- base_conditions .freestream = Data ()
197- altitude = nexus .missions .base .airport .altitude
198- atmosphere = SUAVE .Analyses .Atmospheric .US_Standard_1976 ()
199- p , T , rho , a , mu = atmosphere .compute_values (altitude )
200- base_conditions .freestream .velocity = nexus .missions .base .segments .climb_1 .air_speed
201- base_conditions .freestream .density = rho
202- base_conditions .freestream .dynamic_viscosity = mu / rho
198+ base_conditions .freestream = takeoff_conditions .freestream
203199 max_CL_base ,CDi = compute_max_lift_coeff (base ,base_conditions )
204200 base .maximum_lift_coefficient = max_CL_base
205201 base .store_diff ()
@@ -225,6 +221,7 @@ def weight(nexus):
225221
226222
227223 weights = nexus .analyses .cruise .weights .evaluate ()
224+ vehicle .mass_properties .breakdown = weights
228225 weights = nexus .analyses .landing .weights .evaluate ()
229226 weights = nexus .analyses .takeoff .weights .evaluate ()
230227 weights = nexus .analyses .short_field_takeoff .weights .evaluate ()
@@ -235,6 +232,7 @@ def weight(nexus):
235232 #config.mass_properties.max_zero_fuel = empty_weight+passenger_weight
236233 config .mass_properties .zero_fuel_center_of_gravity = vehicle .mass_properties .zero_fuel_center_of_gravity
237234 config .fuel = vehicle .fuel
235+
238236 return nexus
239237
240238
@@ -257,7 +255,13 @@ def finalize(nexus):
257255def post_process (nexus ):
258256
259257 # Unpack data
260- vehicle = nexus .vehicle_configurations .base
258+ vehicle = nexus .vehicle_configurations .base
259+
260+ '''
261+ print 'base.mass_properties.takeoff = ', vehicle.mass_properties.takeoff
262+ print 'takeoff.mass_properties.takeoff = ', nexus.vehicle_configurations.takeoff.mass_properties.takeoff
263+ print 'vehicle.mass_properties.empty = ', vehicle.mass_properties.operating_empty
264+ '''
261265 results = nexus .results
262266 summary = nexus .summary
263267 missions = nexus .missions
@@ -284,7 +288,6 @@ def post_process(nexus):
284288 summary .max_throttle = max_throttle
285289
286290 # Fuel margin and base fuel calculations
287-
288291 operating_empty = vehicle .mass_properties .operating_empty
289292 payload = vehicle .passenger_weights .mass_properties .mass
290293 design_landing_weight = results .base .segments [- 1 ].conditions .weights .total_mass [- 1 ]
0 commit comments