Exemplo n.º 1
0
def top_of_climb_altp(propulsive_architecture):
    if (propulsive_architecture==1):
        top_of_climb_altp_i = unit.m_ft(31000)
    elif (propulsive_architecture==2):
        top_of_climb_altp_i = unit.m_ft(31000)
    else:
        raise Exception("propulsion.architecture index is out of range")
    return top_of_climb_altp_i
Exemplo n.º 2
0
def ref_cruise_altp(propulsive_architecture):
    if (propulsive_architecture==1):
        ref_cruise_altp_i = unit.m_ft(35000)
    elif (propulsive_architecture==2):
        ref_cruise_altp_i = unit.m_ft(35000)
    else:
        raise Exception("propulsion.architecture index is out of range")
    return ref_cruise_altp_i
Exemplo n.º 3
0
def eval_handling_quality_analysis(aircraft):
    """
    Compute CG limits from handling qualities point of view
    """

    c_g = aircraft.center_of_gravity

    # Forward limit : trim landing
    #------------------------------------------------------------------------------------------------------
    altp = unit.m_ft(0)
    disa = 0
    nei = 0
    speed_mode = 1
    hld_conf = aircraft.aerodynamics.hld_conf_ld
    mass = c_g.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)

    c_g.max_fwd_trim_cg = cg_max_fwd_stall  # Forward cg limit

    c_g.cg_constraint_1 = c_g.max_fwd_trim_cg - c_g.max_fwd_req_cg

    # Backward limit : static stability
    #------------------------------------------------------------------------------------------------------
    stability_margin = regul.static_stability_margin()

    cg_max_bwd_stab = h_q.backward_cg_stab(aircraft, stability_margin)

    c_g.max_bwd_stab_cg = cg_max_bwd_stab  # Backward cg limit

    c_g.cg_constraint_2 = c_g.max_bwd_req_cg - c_g.max_bwd_stab_cg

    # Vertical tail sizing
    #------------------------------------------------------------------------------------------------------

    h_q.vertical_tail_sizing(aircraft)

    c_g.cg_constraint_3 = c_g.max_bwd_oei_req_cg - c_g.max_bwd_oei_cg

    return
Exemplo n.º 4
0
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
Exemplo n.º 5
0
def altp_app_speed():
    altp_app_speed_i = unit.m_ft(0)
    return altp_app_speed_i
Exemplo n.º 6
0
def req_oei_altp(propulsive_architecture):
    req_oei_altp_i = unit.m_ft(11000)
    return req_oei_altp_i