def turbofan_thrust(aircraft, Pamb, Tamb, Mach, rating, nei): """ Calculation of thrust for pure turbofan airplane Warning : ALL engine thrust returned """ engine = aircraft.turbofan_engine nacelle = aircraft.turbofan_nacelle factor = engine.rating_factor # [MTO,MCN,MCL,MCR,FID] kth = 0.475*Mach**2 + 0.091*(engine.bpr/10)**2 \ - 0.283*Mach*engine.bpr/10 \ - 0.633*Mach - 0.081*engine.bpr/10 + 1.192 (rho, sig) = earth.air_density(Pamb, Tamb) fn0 = factor[rating] * kth * engine.reference_thrust * sig**0.75 fn_core = fn0 * engine.core_thrust_ratio # Core thrust fn_fan0 = fn0 * (1 - engine.core_thrust_ratio) # Fan thrust Vsnd = earth.sound_speed(Tamb) Vair = Vsnd * Mach shaft_power0 = fn_fan0 * Vair / nacelle.efficiency_prop # Available total shaft power for one engine fn = fn0 * (engine.n_engine - nei) # All turbofan thrust data = (fn_core, fn_fan0, fn0, shaft_power0 ) # Data for ONE turbofan engine return fn, data
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
def eval_bli_nacelle_design(this_nacelle, Pamb, Tamb, Mach, shaft_power, hub_width, body_length, body_width): """ BLI nacelle design """ gam = earth.heat_ratio() r = earth.gaz_constant() Cp = earth.heat_constant(gam, r) (rho, sig) = earth.air_density(Pamb, Tamb) Vsnd = earth.sound_speed(Tamb) Re = craft_aero.reynolds_number(Pamb, Tamb, Mach) Vair = Vsnd * Mach # Precalculation of the relation between d0 and d1 #----------------------------------------------------------------------------------------------------------- body_bnd_layer = eval_boundary_layer(body_width, hub_width) # Electrical nacelle geometry : e-nacelle diameter is size by cruise conditions #----------------------------------------------------------------------------------------------------------- r0 = 0.5 * body_width # Radius of the fuselage, supposed constant d0 = craft_aero.boundary_layer( Re, body_length ) # theoritical thickness of the boundary layer without taking account of fuselage tapering r1 = 0.5 * hub_width # Radius of the hub of the efan nacelle d1 = lin_interp_1d(d0, body_bnd_layer[:, 0], body_bnd_layer[:, 1]) # Thickness of the BL around the hub deltaV = 2. * Vair * ( this_nacelle.efficiency_fan / this_nacelle.efficiency_prop - 1. ) # speed variation produced by the fan PwInput = this_nacelle.efficiency_fan * shaft_power # kinetic energy produced by the fan #=========================================================================================================== def fct_power_1(y, PwInput, deltaV, rho, Vair, r1, d1): (q0, q1, q2, v1, dVbli) = craft_aero.air_flows(rho, Vair, r1, d1, y) Vinlet = Vair - dVbli Vjet = Vinlet + deltaV Pw = 0.5 * q1 * (Vjet**2 - Vinlet**2) y = PwInput - Pw return y #----------------------------------------------------------------------------------------------------------- fct_arg = (PwInput, deltaV, rho, Vair, r1, d1) # Computation of y1 : thickness of the vein swallowed by the inlet output_dict = fsolve(fct_power_1, x0=d1, args=fct_arg, full_output=True) y1 = output_dict[0][0] (q0, q1, q2, v1, dVbli) = craft_aero.air_flows(rho, Vair, r1, d1, y1) MachInlet = v1 / Vsnd # Mean Mach number at inlet position Ptot = earth.total_pressure( Pamb, MachInlet) # Stagnation pressure at inlet position Ttot = earth.total_temperature( Tamb, MachInlet) # Stagnation temperature at inlet position MachFan = 0.5 # required Mach number at fan position CQoA1 = craft_aero.corrected_air_flow( Ptot, Ttot, MachFan) # Corrected air flow per area at fan position eFanArea = q1 / CQoA1 # Fan area around the hub fan_width = math.sqrt(hub_width**2 + 4 * eFanArea / math.pi) # Fan diameter Vjet = v1 + deltaV # Jet velocity TtotJet = Ttot + shaft_power / ( q1 * Cp) # Stagnation pressure increases due to introduced work Tstat = TtotJet - 0.5 * Vjet**2 / Cp # static temperature VsndJet = math.sqrt(gam * r * Tstat) # Sound velocity at nozzle exhaust MachJet = Vjet / VsndJet # Mach number at nozzle output PtotJet = earth.total_pressure( Pamb, MachJet) # total pressure at nozzle exhaust (P = Pamb) CQoA2 = craft_aero.corrected_air_flow( PtotJet, TtotJet, MachJet) # Corrected air flow per area at nozzle output nozzle_area = q1 / CQoA2 # Fan area around the hub nozzle_width = math.sqrt(4 * nozzle_area / math.pi) # Nozzle diameter this_nacelle.hub_width = hub_width this_nacelle.fan_width = fan_width this_nacelle.nozzle_width = nozzle_width this_nacelle.nozzle_area = nozzle_area this_nacelle.width = 1.19 * fan_width # Surrounding structure this_nacelle.length = 1.68 * this_nacelle.width this_nacelle.net_wetted_area = math.pi * this_nacelle.width * this_nacelle.length # Nacelle wetted area this_nacelle.bnd_layer = body_bnd_layer this_nacelle.body_length = body_length return
def fan_thrust(nacelle, Pamb, Tamb, Mach, Vair, PwShaft): """ Compute the thrust of a fan of given geometry swallowing the boundary layer (BL) of a body of given geometry The amount of swallowed BL depends on the given shaft power and flying conditions """ bnd_layer = nacelle.bnd_layer Re = craft_aero.reynolds_number(Pamb, Tamb, Mach) (rho, sig) = earth.air_density(Pamb, Tamb) Vsnd = earth.sound_speed(Tamb) d0 = craft_aero.boundary_layer( Re, nacelle.body_length ) #Theoritical thickness of the boundary layer without taking account of fuselage tapering d1 = lin_interp_1d(d0, bnd_layer[:, 0], bnd_layer[:, 1]) # Using the precomputed relation r1 = 0.5 * nacelle.hub_width # Radius of the hub of the eFan nacelle PwInput = nacelle.efficiency_fan * PwShaft #=========================================================================================================== def fct_power(q, PwInput, Vair, Vsnd, eNozzleArea): Vinlet = Vair MachInlet = Vinlet / Vsnd # Mean Mach number at inlet position Ptot = earth.total_pressure( Pamb, MachInlet) #total pressure at inlet position Ttot = earth.total_temperature( Tamb, MachInlet) # Total temperature at inlet position Vjet = math.sqrt(2. * PwInput / q + Vinlet**2) MachJet = Vjet / Vsnd CQoA1 = craft_aero.corrected_air_flow( Ptot, Ttot, MachJet) # Corrected air flow per area at fan position q0 = CQoA1 * eNozzleArea y = q - q0 return y #----------------------------------------------------------------------------------------------------------- eNozzleArea = nacelle.nozzle_area fct_arg = (PwInput, Vair, Vsnd, eNozzleArea) (q0init, q1, q2, V1, dV) = craft_aero.air_flows(rho, Vair, r1, d1, 1.00) # Computation of y1 : thikness of the vein swallowed by the inlet output_dict = fsolve(fct_power, x0=q0init, args=fct_arg, full_output=True) q0 = output_dict[0][0] Vinlet = Vair Vjet = math.sqrt(2. * PwInput / q0 + Vinlet**2) eFn = q0 * (Vjet - Vinlet) return (eFn, q0)
def fan_thrust_with_bli(nacelle, Pamb, Tamb, Mach, Vair, PwShaft): """ Compute the thrust of a fan of a given geometry swallowing the boundary layer (BL) of a body of a given geometry The amount of swallowed BL depends on the given shaft power and flying conditions. """ bnd_layer = nacelle.bnd_layer gam = earth.heat_ratio() r = earth.gaz_constant() Cp = earth.heat_constant(gam, r) Re = craft_aero.reynolds_number(Pamb, Tamb, Mach) (rho, sig) = earth.air_density(Pamb, Tamb) Vsnd = earth.sound_speed(Tamb) d0 = craft_aero.boundary_layer( Re, nacelle.body_length ) # theorical thickness of the boundary layer without taking account of fuselage tapering r1 = 0.5 * nacelle.hub_width # Radius of the hub of the eFan nacelle d1 = lin_interp_1d(d0, bnd_layer[:, 0], bnd_layer[:, 1]) # Using the precomputed relation #=========================================================================================================== def fct_power_bli(y, PwShaft, Tamb, Pamb, rho, Mach, Vair, Vsnd, r1, d1, nozzle_area): Ttot = earth.total_temperature( Tamb, Mach) # Stagnation temperature at inlet position (q0, q1, q2, Vinlet, dVbli) = craft_aero.air_flows(rho, Vair, r1, d1, y) Tstat = Ttot - 0.5 * Vinlet**2 / Cp # Static temperature at inlet position Vsnd_inlet = earth.sound_speed(Tstat) # Sound speed at inlet position MachInlet = Vinlet / Vsnd_inlet # Mean Mach number at inlet position PwInput = nacelle.efficiency_fan * PwShaft Vjet = math.sqrt(2. * PwInput / q1 + Vinlet**2) TtotJet = Ttot + PwShaft / ( q1 * Cp) # Stagnation temperature increases due to introduced work Tstat = TtotJet - 0.5 * Vjet**2 / Cp # Static temperature VsndJet = earth.sound_speed(Tstat) # Sound speed at nozzle exhaust MachJet = Vjet / VsndJet # Mach number at nozzle output PtotJet = earth.total_pressure( Pamb, MachJet) # total pressure at nozzle exhaust (P = Pamb) CQoA1 = craft_aero.corrected_air_flow( PtotJet, TtotJet, MachJet) # Corrected air flow per area at fan position q = CQoA1 * nozzle_area y = q1 - q return y #----------------------------------------------------------------------------------------------------------- nozzle_area = nacelle.nozzle_area fct_arg = (PwShaft, Tamb, Pamb, rho, Mach, Vair, Vsnd, r1, d1, nozzle_area) # Computation of y1 : thikness of the vein swallowed by the inlet output_dict = fsolve(fct_power_bli, x0=0.50, args=fct_arg, full_output=True) y = output_dict[0][0] Ttot = earth.total_temperature( Tamb, Mach) # Stagnation temperature at inlet position (q0, q1, q2, Vinlet, dVbli) = craft_aero.air_flows(rho, Vair, r1, d1, y) Tstat = Ttot - 0.5 * Vinlet**2 / Cp # Static temperature at inlet position Vsnd_inlet = earth.sound_speed(Tstat) # Sound speed at inlet position MachInlet = Vinlet / Vsnd_inlet # Mean Mach number at inlet position PwInput = nacelle.efficiency_fan * PwShaft Vjet = math.sqrt(2. * PwInput / q1 + Vinlet**2) eFn = q1 * (Vjet - Vinlet) return (eFn, q1, dVbli)