コード例 #1
0
def req_oei_altp(propulsive_architecture):
    if (propulsive_architecture < 4):
        req_oei_altp_i = unit.m_ft(15000)
    elif (propulsive_architecture == 4):
        req_oei_altp_i = unit.m_ft(10000)
    else:
        raise Exception("propulsion.architecture index is out of range")
    return req_oei_altp_i
コード例 #2
0
def top_of_climb_altp(propulsive_architecture):
    if (propulsive_architecture == 1):
        top_of_climb_altp_i = unit.m_ft(35000)
    elif (propulsive_architecture == 2):
        top_of_climb_altp_i = unit.m_ft(35000)
    elif (propulsive_architecture == 3):
        top_of_climb_altp_i = unit.m_ft(35000)
    elif (propulsive_architecture == 4):
        top_of_climb_altp_i = unit.m_ft(20000)
    else:
        raise Exception("propulsion.architecture index is out of range")
    return top_of_climb_altp_i
コード例 #3
0
ファイル: design.py プロジェクト: AdelTaiebTamacha/ACDC
def handling_qualities_analysis(aircraft):
    """
    Compute CG limits from handling qualities point of view
    """
    # Forward limit : trim landing
    #------------------------------------------------------------------------------------------------------
    altp = unit.m_ft(0)
    disa = 0
    nei = 0
    speed_mode = 1
    hld_conf = aircraft.aerodynamics.hld_conf_ld
    mass = aircraft.center_of_gravity.max_fwd_mass

    cg_max_fwd_stall, speed, fn, aoa, ih, c_z, cx_trimmed = h_q.forward_cg_stall(
        aircraft, altp, disa, nei, hld_conf, speed_mode, mass)

    aircraft.center_of_gravity.max_fwd_trim_cg = cg_max_fwd_stall  # Forward cg limit

    # Backward limit : static stability
    #------------------------------------------------------------------------------------------------------
    stability_margin = 0.05

    cg_max_bwd_stab = h_q.backward_cg_stab(aircraft, stability_margin)

    aircraft.center_of_gravity.max_bwd_stab_cg = cg_max_bwd_stab  # Backward cg limit

    return
コード例 #4
0
ファイル: demo2.py プロジェクト: AdelTaiebTamacha/ACDC
# Solve the geometric coupling between airframe and engines
#------------------------------------------------------------------------------------------------------
run.aircraft_pre_design(aircraft)

# Estimate all mass and CGs
#------------------------------------------------------------------------------------------------------
run.mass_mission_adaptation(aircraft)
#run.mass_estimation(aircraft)

# Calculate all airplane performances
#------------------------------------------------------------------------------------------------------
run.performance_analysis(aircraft)

# Print relevant output
#------------------------------------------------------------------------------------------------------
altp = unit.m_ft(35000)
disa = 0
pamb, tamb, tstd, dtodz = earth.atmosphere(altp, disa)
(MTO, MCN, MCL, MCR, FID) = aircraft.propulsion.rating_code
nei = 0
Fn, Data = propu.thrust(aircraft, pamb, tamb, cruise_mach, MTO, nei)
vsnd = earth.sound_speed(tamb)
tas = vsnd * cruise_mach
print("")
print("True air speed in cruise", "%.1f" % tas, " m/s")
print("Totalthrust in cruise", "%.0f" % Fn, " N")

print("")
print("Engine thrust = ",
      "%.1f" % (aircraft.propulsion.reference_thrust_effective / 10), " daN")
print("Wing area = ", "%.1f" % aircraft.wing.area, " m2")
コード例 #5
0
print('Criterion : CO2_metric = ', "%.4f" % (CO2_metric * 1000),
      'kg/km/m0.48 (minimize)')
print('Criterion : block_CO2 = ', "%.0f" % block_CO2, 'kg, (minimize)')
print('Criterion : block_fuel = ', "%.2f" % block_fuel, 'kg, (minimize)')
print('Criterion : mtow_eff = ', "%.1f" % mtow_eff, 'kg, (minimize)')
print('Criterion : cash_op_cost = ', "%.2f" % cash_op_cost,
      '$/trip, (minimize)')
print('Criterion : direct_op_cost = ', "%.2f" % direct_op_cost,
      '$/trip, (minimize)')

print("-------------------------------------------")
print("Performance analysis : done")

# Handling_Qualities
#------------------------------------------------------------------------------------------------------
altp = unit.m_ft(0)
disa = 0
nei = 0
speed_mode = 1
hld_conf = ac.aerodynamics.hld_conf_ld
mass = ac.center_of_gravity.max_fwd_mass

cg_max_fwd_stall, speed, fn, aoa, ih, c_z, cx_trimmed = h_q.forward_cg_stall(
    ac, altp, disa, nei, hld_conf, speed_mode, mass)

ac.center_of_gravity.max_fwd_trim_cg = cg_max_fwd_stall  # Forward cg limit

stability_margin = 0.05

cg_max_bwd_stab = h_q.backward_cg_stab(ac, stability_margin)
コード例 #6
0
def altp_app_speed():
    altp_app_speed_i = unit.m_ft(0)
    return altp_app_speed_i
コード例 #7
0
ファイル: mission.py プロジェクト: AdelTaiebTamacha/ACDC
def time_to_climb(aircraft, toc, disa, mass, vcas1, vcas2, mach):
    """
    Time to climb to initial cruise altitude
    """

    propulsion = aircraft.propulsion

    (MTO, MCN, MCL, MCR, FID) = propulsion.rating_code

    if (vcas1 > unit.mps_kt(250)):
        print("time_to_climb_, vcas1 must be lower than or equal to 250kt")
    if (vcas1 > vcas2):
        print("time_to_climb_, vcas1 must be lower than or equal to vcas2")

    cross_over_altp = earth.cross_over_altp(vcas2, mach)

    if (cross_over_altp < unit.m_ft(1500)):
        print("time_to_climb_, cross over altitude is too low")

    if (toc < cross_over_altp):
        cross_over_altp = toc

    # Duration of initial climb
    #-----------------------------------------------------------------------------------------------------------
    altp = numpy.array([0., 0., 0.])
    altp[0] = unit.m_ft(1500)
    altp[2] = unit.m_ft(10000)
    altp[1] = (altp[0] + altp[2]) / 2

    nei = 0
    speed_mode = 1  # Constant CAS
    rating = MCL

    v_z = numpy.array([0., 0., 0.])
    [slope, v_z[0]] = flight.air_path(aircraft, nei, altp[0], disa, speed_mode,
                                      vcas1, mass, rating)
    [slope, v_z[1]] = flight.air_path(aircraft, nei, altp[1], disa, speed_mode,
                                      vcas1, mass, rating)
    [slope, v_z[2]] = flight.air_path(aircraft, nei, altp[2], disa, speed_mode,
                                      vcas1, mass, rating)

    if (numpy.extract(v_z < 0, v_z).size > 0):
        print("time_to_climb_, Climb to acceleration altitude is not possible")

    A = numpy.vander(altp, 3)
    B = 1 / v_z
    C = trinome(A, B)

    time1 = ((C[0] * altp[2] / 3 + C[1] / 2) * altp[2] + C[2]) * altp[2]
    time1 = time1 - (
        (C[0] * altp[0] / 3 + C[1] / 2) * altp[0] + C[2]) * altp[0]

    # Acceleration
    #-----------------------------------------------------------------------------------------------------------
    vcas = numpy.array([0., 0., 0.])
    vcas[0] = vcas1
    vcas[2] = vcas2
    vcas[1] = (vcas[0] + vcas[2]) / 2

    acc = numpy.array([0., 0., 0.])
    acc[0] = flight.acceleration(aircraft, nei, altp[2], disa, speed_mode,
                                 vcas[0], mass, rating)
    acc[1] = flight.acceleration(aircraft, nei, altp[2], disa, speed_mode,
                                 vcas[1], mass, rating)
    acc[2] = flight.acceleration(aircraft, nei, altp[2], disa, speed_mode,
                                 vcas[2], mass, rating)

    if (numpy.extract(acc < 0, acc).size > 0):
        print("time_to_climb_, acceleration is not possible")

    A = numpy.vander(vcas, 3)
    B = 1 / acc
    C = trinome(A, B)

    time2 = ((C[0] * vcas[2] / 3 + C[1] / 2) * vcas[2] + C[2]) * vcas[2]
    time2 = time2 - (
        (C[0] * vcas[0] / 3 + C[1] / 2) * vcas[0] + C[2]) * vcas[0]

    # Duration of climb to cross over
    #-----------------------------------------------------------------------------------------------------------
    altp[0] = unit.m_ft(10000)
    altp[2] = cross_over_altp
    altp[1] = (altp[0] + altp[2]) / 2

    [slope, v_z[0]] = flight.air_path(aircraft, nei, altp[0], disa, speed_mode,
                                      vcas2, mass, rating)
    [slope, v_z[1]] = flight.air_path(aircraft, nei, altp[1], disa, speed_mode,
                                      vcas2, mass, rating)
    [slope, v_z[2]] = flight.air_path(aircraft, nei, altp[2], disa, speed_mode,
                                      vcas2, mass, rating)

    if (numpy.extract(v_z < 0, v_z).size > 0):
        print("time_to_climb_, Climb to cross over altitude is not possible")

    A = numpy.vander(altp, 3)
    B = 1 / v_z
    C = trinome(A, B)

    time3 = ((C[0] * altp[2] / 3 + C[1] / 2) * altp[2] + C[2]) * altp[2]
    time3 = time3 - (
        (C[0] * altp[0] / 3 + C[1] / 2) * altp[0] + C[2]) * altp[0]

    # Duration of climb to altp
    #-----------------------------------------------------------------------------------------------------------
    if (cross_over_altp < toc):

        altp[0] = cross_over_altp
        altp[2] = toc
        altp[1] = (altp[0] + altp[2]) / 2

        speed_mode = 2  # mach

        [slope, v_z[0]] = flight.air_path(aircraft, nei, altp[0], disa,
                                          speed_mode, mach, mass, rating)
        [slope, v_z[1]] = flight.air_path(aircraft, nei, altp[1], disa,
                                          speed_mode, mach, mass, rating)
        [slope, v_z[2]] = flight.air_path(aircraft, nei, altp[2], disa,
                                          speed_mode, mach, mass, rating)

        if (numpy.extract(v_z < 0, v_z).size > 0):
            print("time_to_climb_, Climb to top of climb is not possible")

        A = numpy.vander(altp, 3)
        B = 1 / v_z
        C = trinome(A, B)

        time4 =  ((C[0]*altp[2]/3 + C[1]/2)*altp[2] + C[2])*altp[2] \
               - ((C[0]*altp[0]/3 + C[1]/2)*altp[0] + C[2])*altp[0]
    else:

        time4 = 0

    #    Total time
    #-----------------------------------------------------------------------------------------------------------
    ttc = time1 + time2 + time3 + time4

    return ttc