Beispiel #1
0
 def fct_mission(range, aircraft, tow, payload, altp, mach, disa):
     #=======================================================================================
     weights = aircraft.weights
     [block_fuel, block_time,
      total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)
     Y = tow - weights.owe - payload - total_fuel
     return Y
Beispiel #2
0
def mission_tow(aircraft, payload, range, altp, mach, disa):
    """
    Mission simulation (take off weight is output)
    """

    weights = aircraft.weights

    def fct_mission(tow, aircraft, payload, range, altp, mach, disa):
        #=======================================================================================
        weights = aircraft.weights
        [block_fuel, block_time,
         total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)
        Y = tow - weights.owe - payload - total_fuel
        return Y

    #---------------------------------------------------------------------------------------

    tow_ini = weights.owe + payload + 2000

    fct_arg = (aircraft, payload, range, altp, mach, disa)

    output_dict = fsolve(fct_mission,
                         x0=tow_ini,
                         args=fct_arg,
                         full_output=True)

    tow = output_dict[0][0]

    [block_fuel, block_time,
     total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)

    return tow, block_fuel, block_time, total_fuel
Beispiel #3
0
def mission_range(aircraft, tow, payload, altp, mach, disa):
    """
    Mission simulation (range is output)
    """

    design_driver = aircraft.design_driver

    def fct_mission(range, aircraft, tow, payload, altp, mach, disa):
        #=======================================================================================
        weights = aircraft.weights
        [block_fuel, block_time,
         total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)
        Y = tow - weights.owe - payload - total_fuel
        return Y

    #---------------------------------------------------------------------------------------

    range_ini = design_driver.design_range

    fct_arg = (aircraft, tow, payload, altp, mach, disa)

    output_dict = fsolve(fct_mission,
                         x0=range_ini,
                         args=fct_arg,
                         full_output=True)

    range = output_dict[0][0]

    [block_fuel, block_time,
     total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)

    return range, block_fuel, block_time, total_fuel
Beispiel #4
0
 def fct_mission(range, aircraft, tow, total_fuel, altp, mach, disa):
     #=======================================================================================
     weights = aircraft.weights
     [block_fuel, block_time, fuel] = perfo.mission(aircraft, range, tow,
                                                    altp, mach, disa)
     Y = total_fuel - fuel
     return Y
Beispiel #5
0
def mission_fuel_limited(aircraft, tow, total_fuel, altp, mach, disa):
    """
    Mission fuel limited (range & payload are output)
    """

    design_driver = aircraft.design_driver
    weights = aircraft.weights

    def fct_mission(range, aircraft, tow, total_fuel, altp, mach, disa):
        #=======================================================================================
        weights = aircraft.weights
        [block_fuel, block_time, fuel] = perfo.mission(aircraft, range, tow,
                                                       altp, mach, disa)
        Y = total_fuel - fuel
        return Y

    #---------------------------------------------------------------------------------------

    range_ini = design_driver.design_range

    fct_arg = (aircraft, tow, total_fuel, altp, mach, disa)

    output_dict = fsolve(fct_mission,
                         x0=range_ini,
                         args=fct_arg,
                         full_output=True)

    range = output_dict[0][0]

    [block_fuel, block_time,
     total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)

    payload = tow - weights.owe - total_fuel

    return range, payload, block_fuel, block_time
Beispiel #6
0
def nominal_mission(aircraft):
    """
    Compute nominal mission with range as input
    """

    disa = 0
    altp = aircraft.design_driver.ref_cruise_altp
    mach = aircraft.design_driver.cruise_mach
    nei = 0

    aircraft.nominal_mission.payload = aircraft.payload.nominal
    aircraft.nominal_mission.range = aircraft.design_driver.design_range
    aircraft.nominal_mission.tow = aircraft.weights.mtow

    (MTO, MCN, MCL, MCR, FID) = aircraft.propulsion.rating_code
    pamb, tamb, tstd, dtodz = earth.atmosphere(altp, disa)
    lod_max, _ = craft_aero.lod_max(aircraft, pamb, tamb, mach)
    sfc = propu.sfc(aircraft, pamb, tamb, mach, MCR, nei)

    aircraft.high_speed.cruise_lod = lod_max
    aircraft.high_speed.cruise_sfc = sfc

    payload = aircraft.nominal_mission.payload
    range = aircraft.nominal_mission.range
    tow = aircraft.nominal_mission.tow

    block_fuel, block_time, total_fuel = perfo.mission(aircraft, range, tow,
                                                       altp, mach, disa)

    aircraft.nominal_mission.block_fuel = block_fuel
    aircraft.nominal_mission.block_time = block_time
    aircraft.nominal_mission.total_fuel = total_fuel

    return
Beispiel #7
0
    def fct_mass_mission(x_in, aircraft):

        ac = aircraft

        ac.weights.mtow = x_in[0]  # Coupling variable
        ac.weights.mlw = x_in[1]  # Coupling variable
        ac.weights.mzfw = x_in[2]  # Coupling variable

        # Mass
        #------------------------------------------------------------------------------------------------------
        airframe.eval_cabin_mass(ac)
        airframe.eval_fuselage_mass(ac)
        airframe.eval_vtp_mass(ac)
        airframe.eval_wing_mass(ac)
        airframe.eval_htp_mass(ac)
        airframe.eval_landing_gear_mass(ac)

        propulsion.eval_propulsion_mass(ac)
        propulsion.eval_battery_mass(ac)
        propulsion.eval_tank_data(ac)

        airplane.eval_system_mass(ac)
        airplane.eval_payload_mass(ac)
        airplane.eval_aircraft_weights(ac)

        # Mission
        #------------------------------------------------------------------------------------------------------
        disa = 0
        altp = ac.design_driver.ref_cruise_altp
        mach = ac.design_driver.cruise_mach

        ac.nominal_mission.payload = ac.payload.nominal
        ac.nominal_mission.range = ac.design_driver.design_range
        ac.nominal_mission.tow = ac.weights.mtow

        payload = ac.nominal_mission.payload
        range = ac.nominal_mission.range
        tow = ac.nominal_mission.tow

        block_fuel, block_time, total_fuel = perfo.mission(
            ac, range, tow, altp, mach, disa)

        ac.nominal_mission.block_fuel = block_fuel
        ac.nominal_mission.block_time = block_time
        ac.nominal_mission.total_fuel = total_fuel

        required_mtow = ac.weights.owe + payload + total_fuel

        y_out = np.array([x_in[0] - required_mtow, \
                          x_in[1] - ac.weights.mlw, \
                          x_in[2] - ac.weights.mzfw])

        return y_out
Beispiel #8
0
def mission_payload(aircraft, tow, range, altp, mach, disa):
    """
    Mission simulation (payload weight is output)
    """

    weights = aircraft.weights

    [block_fuel, block_time,
     total_fuel] = perfo.mission(aircraft, range, tow, altp, mach, disa)

    payload = tow - weights.owe - total_fuel

    return payload, block_fuel, block_time, total_fuel
Beispiel #9
0
pamb, tamb, tstd, dtodz = earth.atmosphere(altp, disa)
lod_max, _ = craft_aero.lod_max(ac, pamb, tamb, mach)
sfc = propu.sfc(ac, pamb, tamb, mach, MCR, nei)

ac.high_speed.cruise_lod = lod_max
ac.high_speed.cruise_sfc = sfc

ac.nominal_mission.payload = ac.payload.nominal
ac.nominal_mission.range = ac.design_driver.design_range
ac.nominal_mission.tow = ac.weights.mtow

payload = ac.nominal_mission.payload
range = ac.nominal_mission.range
tow = ac.nominal_mission.tow

block_fuel, block_time, total_fuel = perfo.mission(ac, range, tow, altp, mach,
                                                   disa)

ac.nominal_mission.block_fuel = block_fuel
ac.nominal_mission.block_time = block_time
ac.nominal_mission.total_fuel = total_fuel

mtow_eff = ac.weights.owe + payload + total_fuel

delta_mtow = mtow_i - mtow_eff  # Should be positive or zero

print("-------------------------------------------")
print("Nominal mission : done")
print("")
print('Coupling : delta_mtow = ', "%.2f" % delta_mtow, 'kg, (= 0 ?)')

# Ceilings