def eval_aerodynamics_design(aircraft): """ Defines high lift movable deflection settings HLDconf varies from 0 (clean) to 1 (full deflected) Typically : HLDconf = 1 ==> CzmaxLD : HLDconf = 0.1 to 0.5 ==> CzmaxTO """ design_driver = aircraft.design_driver wing = aircraft.wing aerodynamics = aircraft.aerodynamics mach = design_driver.cruise_mach altp = design_driver.ref_cruise_altp disa = 0 pamb, tamb, tstd, dtodz = earth.atmosphere(altp, disa) aerodynamics.cruise_lod_max, aerodynamics.cz_cruise_lod_max = craft_aero.lod_max( aircraft, pamb, tamb, mach) aerodynamics.hld_conf_clean = 0 # By definition (0=<hld_conf=<1) aerodynamics.cz_max_clean, Cz0 = craft_aero.high_lift( wing, aerodynamics.hld_conf_clean) aerodynamics.hld_conf_to = 0.3 # Take off (empirical setting) aerodynamics.cz_max_to, Cz0 = craft_aero.high_lift( wing, aerodynamics.hld_conf_to) aerodynamics.hld_conf_ld = 1 # By definition (0=<hld_conf=<1), 1 is full landing aerodynamics.cz_max_ld, Cz0 = craft_aero.high_lift( wing, aerodynamics.hld_conf_ld) return
def eval_wing_mass(aircraft): """ Wing mass & CG estimation """ weights = aircraft.weights aerodynamics = aircraft.aerodynamics wing = aircraft.wing (cz_max_ld, cz0) = craft_aero.high_lift(wing, aerodynamics.hld_conf_ld) A = 32 * wing.area**1.1 B = 4 * wing.span**2 * numpy.sqrt(weights.mtow * weights.mzfw) C = 1.1e-6 * (1 + 2 * wing.aspect_ratio) / (1 + wing.aspect_ratio) D = (0.6 * wing.t_o_c_r + 0.3 * wing.t_o_c_k + 0.1 * wing.t_o_c_t) * (wing.area / wing.span) E = numpy.cos(wing.sweep)**2 F = 1200 * (cz_max_ld - 1.8)**1.5 wing.mass = A + (B * C) / ( D * E) + F # Shevell formula + high lift device regression wing.c_g = 0.25*(wing.x_root + 0.40*wing.c_root) \ + 0.55*(wing.x_kink + 0.40*wing.c_kink) \ + 0.20*(wing.x_tip + 0.40*wing.c_tip) return
def forward_cg_stall(aircraft, altp, disa, nei, hld_conf, speed_mode, mass): """ Computes max forward trimmable CG position at stall speed """ wing = aircraft.wing htp = aircraft.horizontal_tail gam = earth.heat_ratio() [pamb, tamb, tstd, dtodz] = earth.atmosphere(altp, disa) [cz_max_wing, cz0] = craft_aero.high_lift( wing, hld_conf) # Wing maximum lift coefficient without margin [cza_htp, xlc_htp, aoa_max_htp, ki_htp] = frame_aero.htp_aero_data(aircraft) cz_max_htp = cza_htp * aoa_max_htp c_z = cz_max_wing - cz_max_htp # Max forward Cg assumed, HTP has down lift mach = flight.speed_from_lift(aircraft, pamb, c_z, mass) [cza_wo_htp, xlc_wo_htp, ki_wing] = frame_aero.wing_aero_data(aircraft, mach, hld_conf) if (nei > 0): dcx_oei = nei * propu.oei_drag(pamb, mach) else: dcx_oei = 0 dw_angle = frame_aero.wing_downwash( aircraft, cz_max_wing) # Downwash angle due to the wing cx_basic, lod_trash = craft_aero.drag( aircraft, pamb, tamb, mach, cz_max_wing) # By definition of the drag_ function cxi_htp = (ki_htp * cz_max_htp**2) * (htp.area / wing.area ) # Induced drag generated by HTP cx_inter = cz_max_htp * dw_angle # Interaction drag (due to downwash) cx_trimmed = cx_basic + cxi_htp + cx_inter + dcx_oei fn = 0.5 * gam * pamb * mach**2 * wing.area * cx_trimmed cm_prop = propu.thrust_pitch_moment(aircraft, fn, pamb, mach, dcx_oei) cg_max_fwd_stall = (cm_prop + xlc_wo_htp * cz_max_wing - xlc_htp * cz_max_htp) / (cz_max_wing - cz_max_htp) aoa_wing = (cz_max_wing - cz0) / cza_wo_htp # Wing angle of attack aoa = aoa_wing - wing.setting # Reference angle of attack (fuselage axis versus air speed) ih = -aoa + dw_angle - aoa_max_htp # HTP trim setting speed = flight.get_speed(pamb, speed_mode, mach) return cg_max_fwd_stall, speed, fn, aoa, ih, c_z, cx_trimmed
def approach_speed(aircraft, altp, disa, mass, hld_conf): """ Minimum approach speed (VLS) """ wing = aircraft.wing g = earth.gravity() czmax, trash = craft_aero.high_lift(wing, hld_conf) stall_margin = regul.kvs1g_min_landing() [pamb, tamb, tstd, dtodz] = earth.atmosphere(altp, disa) [rho, sig] = earth.air_density(pamb, tamb) vapp = numpy.sqrt( (mass * g) / (0.5 * rho * wing.area * (czmax / stall_margin**2))) return vapp
def take_off(aircraft, kvs1g, altp, disa, mass, hld_conf): """ Take off field length and climb path at 35 ft depending on stall margin (kVs1g) """ wing = aircraft.wing propulsion = aircraft.propulsion (MTO, MCN, MCL, MCR, FID) = propulsion.rating_code czmax, cz_0 = craft_aero.high_lift(wing, hld_conf) rating = MTO [pamb, tamb, tstd, dtodz] = earth.atmosphere(altp, disa) [rho, sig] = earth.air_density(pamb, tamb) cz_to = czmax / kvs1g**2 mach = flight.speed_from_lift(aircraft, pamb, cz_to, mass) nei = 0 # For Magic Line factor computation fn, trash = propu.thrust(aircraft, pamb, tamb, mach, rating, nei) ml_factor = mass**2 / (cz_to * fn * wing.area * sig**0.8 ) # Magic Line factor tofl = 14.23 * ml_factor + 97.58 nei = 1 # For 2nd segment computation speed_mode = 1 speed = flight.get_speed(pamb, speed_mode, mach) seg2path, vz = flight.air_path(aircraft, nei, altp, disa, speed_mode, speed, mass, rating) return seg2path, tofl