def main(): # define the problem configs, analyses = full_setup() configs.finalize() analyses.finalize() # weight analysis weights = analyses.configs.base.weights breakdown = weights.evaluate() # mission analysis mission = analyses.missions results = mission.evaluate() # run payload diagram config = configs.base cruise_segment_tag = "cruise" reserves = 1750. payload_range_results = payload_range(config,mission,cruise_segment_tag,reserves) # plot the results plot_mission(results) return
def main(): # define the problem configs, analyses = full_setup() configs.finalize() analyses.finalize() # weight analysis weights = analyses.configs.base.weights breakdown = weights.evaluate() # mission analysis mission = analyses.missions results = mission.evaluate() # run payload diagram config = configs.base cruise_segment_tag = "cruise" reserves = 1750. payload_range_results = payload_range(config, mission, cruise_segment_tag, reserves) # plot the results plot_mission(results) return
def main(): # define the problem vehicle, mission = full_setup() # run payload diagram cruise_segment_tag = "Cruise" payload_range_results = payload_range(vehicle, mission, cruise_segment_tag) check_results(payload_range_results) return
def main(): # define the problem vehicle, mission = full_setup() # run payload diagram cruise_segment_tag = "Cruise" payload_range_results = payload_range(vehicle,mission,cruise_segment_tag) check_results(payload_range_results) return
def main(): # build the vehicle vehicle = define_vehicle() # define the mission mission = define_mission(vehicle) # evaluate the mission results = evaluate_mission(vehicle,mission) # plot results post_process(vehicle,mission,results) # compute payload range diagram cruise_segment_tag = 'CRUISE' payload_range(vehicle,mission,cruise_segment_tag) plt.show(True) return
def main(): # build the vehicle vehicle = define_vehicle() # define the mission mission = define_mission(vehicle) # evaluate the mission results = evaluate_mission(vehicle,mission) # plot results post_process(vehicle,mission,results) # compute payload range diagram cruise_segment_tag = 'CRUISE' payload_range(vehicle,mission,cruise_segment_tag) plt.show(True) return
def main(): # define the problem configs, analyses = full_setup() configs.finalize() analyses.finalize() vehicle = configs.base mission = analyses.missions # run payload diagram cruise_segment_tag = "Cruise" reserves = 1750. payload_range_results = payload_range(vehicle,mission,cruise_segment_tag,reserves) check_results(payload_range_results) return
def main(): # define the problem configs, analyses = full_setup() configs.finalize() analyses.finalize() vehicle = configs.base mission = analyses.missions # run payload diagram cruise_segment_tag = "cruise" reserves = 1750. payload_range_results = payload_range(vehicle,mission,cruise_segment_tag,reserves) check_results(payload_range_results) return
def main(): # --------------------------------------------------------------------------------------- # INITIALIZING AIRCRAFT configs, analyses, vehicle = full_setup() print 'full setup OK' simple_sizing(configs) configs.finalize() analyses.finalize() # --------------------------------------------------------------------------------------- # WEIGHT ANALYSIS weights = analyses.configs.base.weights weights.evaluate() print 'WEIGHTS OK' # --------------------------------------------------------------------------------------- # MISSION ANALYSIS mission = analyses.missions.base results = mission.evaluate() print 'MISSION OK' configs.cruise.conditions = Data() configs.cruise.conditions = results.segments.cruise.conditions # print weight breakdown print_weight_breakdown(configs.base, filename='ATR72_weight_breakdown.dat') # print parasite drag data into file - define reference condition for parasite drag ref_condition = Data() ref_condition.mach_number = 0.3 ref_condition.reynolds_number = 12e6 print_parasite_drag(ref_condition, configs.cruise, analyses, 'ATR72_parasite_drag.dat') # print compressibility drag data into file print_compress_drag(configs.cruise, analyses, filename='ATR72_compress_drag.dat') # print mission breakdown print_mission_breakdown(results, filename='ATR72_mission_breakdown.dat') state = Data() state.conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics( ) state.numerics = SUAVE.Analyses.Mission.Segments.Conditions.Numerics() # --------------------------------------------------------------------------------------- # PLOT RESULTS plot_mission(results, 0) # --------------------------------------------------------------------------------------- # PAYLOAD RANGE DIAGRAM config = configs.base cruise_segment_tag = "cruise" reserves = [775., 1120., 1040.] weights.mass_properties.operating_empty = weights.mass_properties.operating_empty - 239. payloadrange = payload_range(config, mission, cruise_segment_tag, reserves) # --------------------------------------------------------------------------------------- # TAKE OFF FIELD LENGTH # ---- Inputs analyses.base = analyses.configs.base airport = mission.airport clb_grad = 1 altitude = [0., 6000.] delta_isa = 0. # +23 # 1000, 1100, 1200, 1300, 1400, -, 1500, 1600 # 1200, 1300, 1400, 1500, 1600, 1700 weights_tofl = [[20062, 21044, 21954, 22801, 23000, 23452, 23754, 21200], [18489, 19342, 20154, 20928, 21671, 22105, 21530]] # ---- Inputs: FLAP AND SLAT DEFLECTION flaps = [15., 0.] # Deflections inboard local slats = [0., 0.] # ---- Inputs: FACTOR CLMAX configs.takeoff.max_lift_coefficient_factor = 1.189 configs.takeoff.V2_VS_ratio = 1.143 # ---- Open output file fid = open('TOFL.txt', 'w') # Open output file # ---- Run for j, h in enumerate(altitude): airport.altitude = h * Units.ft airport.delta_isa = delta_isa fid.write('Altitude: %4.0f ft \n' % (h)) fid.write( 'TOFL CLIMB GRADIENT THRUST L/D L/Dv2 CDasym CDwindm CL CD CG_CORRECT\n' ) tofl = np.zeros(len(weights_tofl[j])) secsegclbgrad = np.zeros(len(weights_tofl[j])) thrust = np.zeros(len(weights_tofl[j])) l_over_d = np.zeros(len(weights_tofl[j])) l_over_d_v2 = np.zeros(len(weights_tofl[j])) asymmetry_drag_coefficient = np.zeros(len(weights_tofl[j])) windmilling_drag_coefficient = np.zeros(len(weights_tofl[j])) clv2 = np.zeros(len(weights_tofl[j])) cdv2 = np.zeros(len(weights_tofl[j])) secsegclbgrad_corrected = np.zeros(len(weights_tofl[j])) CLmax_ind = 0 # configs.takeoff.maximum_lift_coefficient = maximum_lift_coefficient[CLmax_ind] configs.takeoff.wings[ 'main_wing'].flaps.angle = flaps[CLmax_ind] * Units.deg configs.takeoff.wings[ 'main_wing'].slats.angle = slats[CLmax_ind] * Units.deg for i, TOW in enumerate(weights_tofl[j]): configs.takeoff.mass_properties.takeoff = TOW * Units.kg tofl[i], secsegclbgrad[i], thrust[i], l_over_d[i], l_over_d_v2[i], asymmetry_drag_coefficient[i], \ windmilling_drag_coefficient[i], clv2[i], cdv2[i], secsegclbgrad_corrected[ i] = estimate_take_off_field_length(configs.takeoff, analyses, airport, clb_grad) if secsegclbgrad_corrected[i] < 0.024: # CLmax_ind = CLmax_ind + 1 # if CLmax_ind > 1: # CLmax_ind = 1 print CLmax_ind, CLmax_ind, CLmax_ind, CLmax_ind, CLmax_ind, CLmax_ind configs.takeoff.wings[ 'main_wing'].flaps.angle = flaps[CLmax_ind] * Units.deg configs.takeoff.wings[ 'main_wing'].slats.angle = slats[CLmax_ind] * Units.deg tofl[i], secsegclbgrad[i], thrust[i], l_over_d[i], l_over_d_v2[i], asymmetry_drag_coefficient[i], \ windmilling_drag_coefficient[i], clv2[i], cdv2[i], secsegclbgrad_corrected[ i] = estimate_take_off_field_length(configs.takeoff, analyses, airport, clb_grad) fid.write( '%4.2f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f %4.4f \n' % (tofl[i], secsegclbgrad[i], thrust[i], l_over_d[i], l_over_d_v2[i], asymmetry_drag_coefficient[i], windmilling_drag_coefficient[i], clv2[i], cdv2[i], secsegclbgrad_corrected[i])) fid.write('\n') fid.close() # --------------------------------------------------------------------------------------- # LANDING FIELD LENGTH # ---- Inputs airport.delta_isa = 0 altitude = [0, 6000] weights_lfl = [[17000, 18000, 19000, 20000, 21000, 22000, 22350], [17000, 18000, 19000, 20000, 21000, 22000, 22350]] flaps = [30., 15.] slats = [0., 0.] configs.landing.landing_constants = Data() configs.landing.landing_constants[0] = 250. * 0.25 configs.landing.landing_constants[1] = 0. configs.landing.landing_constants[2] = 2.485 / 9.81 configs.landing.wings['main_wing'].flaps.angle = flaps[0] * Units.deg configs.landing.wings['main_wing'].slats.angle = slats[0] * Units.deg configs.landing.max_lift_coefficient_factor = 1.31 fid = open('LFL.txt', 'w') # Open output file for j, h in enumerate(altitude): airport.altitude = h * Units.ft lfl = np.zeros(len(weights_lfl[j])) fid.write('Altitude: %4.0f ft \n' % (h)) for i, TOW in enumerate(weights_lfl[j]): configs.landing.mass_properties.landing = TOW * Units.kg lfl[i] = estimate_landing_field_length(configs.landing, analyses, airport) fid.write('%4.2f \n' % (lfl[i])) fid.write('\n') fid.close() return