예제 #1
0
def acceleration_factor_calculation(h, delta_ISA, mach):
    lambda_rate = 0.0019812
    tropopause = (71.5 + delta_ISA) / lambda_rate

    T, _, _, _ = atmosphere(h)
    _, _, _, T_ISA, _, _, _ = atmosphere_ISA_deviation(h, delta_ISA)

    if h < tropopause:
        # For constant calibrated airspeed below the tropopause:
        acceleration_factor_V_CAS = (0.7 * mach**2) * (phi_factor(mach) -
                                                       0.190263 * (T_ISA / T))
        # For constant Mach number below the tropopause:
        acceleration_factor_mach = (-0.13318 * mach**2) * (T_ISA / T)
    elif h > tropopause:
        # For constant calibrated airspeed above the tropopause:
        acceleration_factor_V_CAS = (0.7 * mach**2) * phi_factor(mach)
        # For constant Mach number above the tropopause:
        acceleration_factor_mach = 0

    return acceleration_factor_V_CAS, acceleration_factor_mach
def dynamics(t, state, control):

    aircraft_data = baseline_aircraft()

    # control = [control1, control2, control3, control4, control5, control6]

    # X       = [V alpha q theta H x beta phi p r psi y].'
    V = state[0]
    alpha_deg = state[1]
    q_deg_s = state[2]
    theta_deg = state[3]
    h = state[4]
    x = state[5]
    beta_deg = state[6]
    phi_deg = state[7]
    p_deg_s = state[8]
    r_deg_s = state[9]
    psi_deg = state[10]
    y = state[11]

    ## -----------------------------------------------------------------------#
    omega_b = np.array([p_deg_s, q_deg_s, r_deg_s]).T  # Velocidade ângular
    # omega_b  = omega_b.transpose()
    v = V * np.sin(np.deg2rad(beta_deg))
    u = V * np.cos(np.deg2rad(beta_deg)) * np.cos(np.deg2rad(alpha_deg))
    w = V * np.cos(np.deg2rad(beta_deg)) * np.sin(np.deg2rad(alpha_deg))
    V_b = np.array([u, v, w]).T  # Velocidade linear

    ## ----------------------Matriz de Transformação--------------------------#
    C_phi = Cmat(1, np.deg2rad(phi_deg))
    C_theta = Cmat(2, np.deg2rad(theta_deg))
    C_psi = Cmat(3, np.deg2rad(psi_deg))
    C_bv = C_phi.dot(C_theta).dot(C_psi)

    ## ------------------------Matriz de Gravidade----------------------------#
    g_b = C_bv.dot(np.array([0, 0, g]).T)

    ## --------------------Matriz de Massa Generalizada-----------------------#
    m = aircraft_data['maximum_takeoff_weight'] / g  # Massa da Aeronave
    J_O_b = aircraft_data['inertia_matrix']  # Matriz de Inércia
    # Distância entre origem e centro de massa
    rC_b = aircraft_data['CG_position']

    Mgen = np.zeros((6, 6))

    aux1 = m * np.eye(3, dtype=int)
    aux2 = -m * skew(rC_b)
    aux3 = m * skew(rC_b)
    aux4 = J_O_b

    # print(aux1)
    Mgen[0:0 + aux1.shape[0], 0:0 + aux1.shape[1]] += aux1
    Mgen[0:0 + aux2.shape[0], 3:3 + aux2.shape[1]] += aux2
    Mgen[3:3 + aux3.shape[0], 0:0 + aux3.shape[1]] += aux3
    Mgen[3:3 + aux4.shape[0], 3:3 + aux4.shape[1]] += aux4

    ## -------------------------Forças e Momentos-----------------------------#
    Faero_b, Maero_O_b, Yaero = aero_loads(state, control)
    Fprop_b, Mprop_O_b, Yprop = prop_loads(state, control)

    ## -----------Termos restantes das equações do movimento------------------#

    eq_F = -(m * skew(omega_b).dot(V_b) - m * skew(omega_b).dot(
        skew(rC_b)).dot(omega_b)) + Faero_b.T + Fprop_b + m * g_b
    eq_M = -(skew(omega_b).dot(J_O_b).dot(omega_b) +
             m * skew(rC_b).dot(skew(omega_b)).dot(V_b)
             ) + Maero_O_b.T + Mprop_O_b + m * skew(rC_b).dot(g_b)

    # ----------------------------Acelerações--------------------------------#
    # edot     = Mgen\[eq_F eq_M]

    V_FM = np.zeros((1, 6))
    V_FM[0:0 + eq_F.shape[0], 0:0 + eq_F.shape[1]] += eq_F
    V_FM[0:0 + eq_M.shape[0], 3:3 + eq_M.shape[1]] += eq_M

    V_FM = V_FM.T

    edot = (np.linalg.inv(Mgen)).dot(V_FM)

    u_dot = edot[0]
    v_dot = edot[1]
    w_dot = edot[2]

    Vdot = ((V_b.T).dot(edot[0:3])) / V

    ## ----------------------Cinemática de Rotação----------------------------#

    HPhi_inv = np.zeros((3, 3))
    aux5 = np.array([C_phi[:, 0]]).T
    aux6 = np.array([C_phi[:, 1]]).T
    aux7 = np.array([C_bv[:, 2]]).T
    HPhi_inv[0:0 + aux5.shape[0], 0:0 + aux5.shape[1]] += aux5
    HPhi_inv[0:0 + aux6.shape[0], 1:1 + aux6.shape[1]] += aux6
    HPhi_inv[0:0 + aux7.shape[0], 2:2 + aux7.shape[1]] += aux7
    Phi_dot_rad = (np.linalg.inv(HPhi_inv)).dot(omega_b)

    ## ---------------------Cinemática de Translação--------------------------#
    dReodt = (C_bv.T).dot(V_b)

    # -----------------------------Fator de Carga----------------------------#
    n_C_b = -1 / (m * g) * (Faero_b.T + Fprop_b)
    r_pilot_b = aircraft_data['r_pilot_b']
    n_pilot_b = n_C_b + -1/g * \
        (skew(edot[3:6]).dot(r_pilot_b-rC_b) +
         skew(omega_b).dot(r_pilot_b-rC_b))

    ## ---------------------------Pressão Dinâmica----------------------------#
    ft_to_m = 0.3048
    _, _, rho, a = atmosphere(h / ft_to_m)
    Mach = V / a
    q_bar = 0.5 * rho * V**2

    ## ------------------------------Saída------------------------------------#
    p_deg_dot = np.rad2deg(edot[3])
    q_deg_dot = np.rad2deg(edot[4])
    r_deg_dot = np.rad2deg(edot[5])
    alpha_dot = np.rad2deg((u * w_dot - w * u_dot) / (u**2 + w**2))

    # print((u*w_dot-w*u_dot))
    beta_dot = np.rad2deg((V * v_dot - v * Vdot) / (V * np.sqrt(u**2 + w**2)))
    phi_dot = np.rad2deg(Phi_dot_rad[0])
    theta_dot = np.rad2deg(Phi_dot_rad[1])
    psi_dot = np.rad2deg(Phi_dot_rad[2])
    H_dot = -dReodt[2]
    V_dot = Vdot
    x_dot = dReodt[0]
    y_dot = dReodt[1]
    Xdot = [
        V_dot, alpha_dot, q_deg_dot, theta_dot, H_dot, x_dot, beta_dot,
        phi_dot, p_deg_dot, r_deg_dot, psi_dot, y_dot
    ]
    Y = [n_pilot_b, n_C_b, Mach, q_bar, Yaero, Yprop, beta_deg]
    return Xdot
예제 #3
0
def aero_loads(state, control):

    # state =state.squeeze().T
    # control = control.squeeze().T

    aircraft_data = baseline_aircraft()

    V = state[0]
    alpha_deg = state[1]
    q_deg_s = state[2]
    theta_deg = state[3]
    h = state[4]
    x = state[5]
    beta_deg = state[6]
    phi_deg = state[7]
    p_deg_s = state[8]
    r_deg_s = state[9]
    psi_deg = state[10]
    y = state[11]

    ih = control[2]
    delta_e = control[3]
    delta_a = control[4]
    delta_r = control[5]

    b = wing['span']
    c = aircraft_data['mean_aerodynamic_chord']
    S = wing['area']

    ## ----------------------------Conversões---------------------------------#
    q_rad_s = np.deg2rad(q_deg_s)
    p_rad_s = np.deg2rad(p_deg_s)
    r_rad_s = np.deg2rad(r_deg_s)

    ## ----------------------Matriz de Transformação--------------------------#
    C_alpha = Cmat(2, np.deg2rad(alpha_deg))
    C_beta = Cmat(3, np.deg2rad(-beta_deg))
    # C_ba   = C_alpha*C_beta
    C_ba = C_alpha.dot(C_beta)

    ## -----------------------------Atmosfera---------------------------------#
    ft_to_m = 0.3048
    _, _, rho, _ = atmosphere(h / ft_to_m)
    q_bar = 0.5 * rho * V**2

    ## -----------------------------Sustentação-------------------------------#
    CL0 = 0.308
    CLa = 0.133
    CLq = 16.7
    CLih = 0.0194
    CLde = 0.00895

    CL = CL0 + CLa * alpha_deg + CLq * ((q_rad_s * c) /
                                        (2 * V)) + CLih * ih + CLde * delta_e
    La = q_bar * S * CL

    ## --------------------------------Arrasto--------------------------------#
    CD0 = 0.02207
    CDa = 0.00271
    CDa2 = 0.000603
    CDq2 = 35.904
    CDb2 = 0.00016
    CDp2 = 0.5167
    CDr2 = 0.5738
    CDih = -0.00042
    CDih2 = 0.000134
    CDde2 = 4.61e-5
    CDda2 = 3e-5
    CDdr2 = 1.81e-5

    CD = CD0 + CDa * alpha_deg + CDa2 * alpha_deg**2 + CDq2 * (
        (q_rad_s * c) / (2 * V)
    )**2 + CDb2 * beta_deg**2 + CDp2 * ((p_rad_s * b) / (2 * V))**2 + CDr2 * (
        (r_rad_s * b) / (2 * V)
    )**2 + CDih * ih + CDih2 * ih**2 + CDde2 * delta_e**2 + CDda2 * delta_a**2 + CDdr2 * delta_r**2
    D = q_bar * S * CD

    ## --------------------------------Lateral--------------------------------#
    Cyb = 0.0228
    Cyp = 0.084
    Cyr = -1.21
    Cyda = 2.36e-4
    Cydr = -5.75e-3

    CY = Cyb*beta_deg+Cyp*((p_rad_s*b)/(2*V))+Cyr * \
        ((r_rad_s*b)/(2*V))+Cyda*delta_a+Cydr*delta_r
    Y = q_bar * S * CY

    ## --------------------------Momento de Arfagem---------------------------#
    CM0 = 0.017
    CMa = -0.0402
    CMq = -57
    CMih = -0.0935
    CMde = -0.0448

    CM = CM0 + CMa * alpha_deg + CMq * ((q_rad_s * c) /
                                        (2 * V)) + CMih * ih + CMde * delta_e
    M = q_bar * S * c * CM

    ## -------------------------Momento de Rolamento--------------------------#
    Clb = -3.66e-3
    Clp = -0.661
    Clr = 0.144
    Clda = -2.87e-3
    Cldr = 6.76e-4

    Cl = Clb*beta_deg+Clp*((p_rad_s*b)/(2*V))+Clr * \
        ((r_rad_s*b)/(2*V))+Clda*delta_a+Cldr*delta_r
    L = q_bar * S * b * Cl

    ## ---------------------------Momento de Guinada--------------------------#
    Cnb = 5.06e-3
    Cnp = 0.0219
    Cnr = -0.634
    Cnda = 0
    Cndr = -3.26e-3

    Cn = Cnb*beta_deg+Cnp*((p_rad_s*b)/(2*V))+Cnr * \
        ((r_rad_s*b)/(2*V))+Cnda*delta_a+Cndr*delta_r
    N = q_bar * S * b * Cn

    ## --------------------------Forças Aerodinâmicas-------------------------#
    # Faero_b = C_ba*np.array([[-D], [-Y], [-La]])

    # print(C_ba)
    Faero_b = C_ba.dot(np.array([-D, -Y, -La]))

    ## -------------------------Momentos Aerodinâmicos------------------------#
    Maero_O_b = np.array([[L], [M], [N]])

    ## ---------------------------------Saidas--------------------------------#
    Yaero = np.array([[CL], [CD], [CY], [CM], [Cl], [Cn]])

    return Faero_b, Maero_O_b, Yaero
예제 #4
0
from framework.Attributes.Atmosphere.atmosphere import atmosphere
from framework.Stability.Dynamic.trim import trim
from scipy import optimize

import numpy as np
# =============================================================================
# CLASSES
# =============================================================================

# =============================================================================
# FUNCTIONS
# =============================================================================
ft_to_m = 0.3048

H_ft_eq = 10000
_, _, _, a = atmosphere(H_ft_eq)
mach = 0.2
V_eq = mach * a

gamma_deg_eq = 10
phi_dot_deg_s_eq = 0
theta_dot_deg_s_eq = 0
psi_dot_deg_s_eq = 0
beta_deg_eq = 0
chi_deg = 0

trim_par = {}
trim_par = {
    'V': V_eq,
    'H_m': H_ft_eq,
    'chi_deg': chi_deg,
def turbofan(h, mach, throttle_position, engine):

    engine = baseline_engine()

    fan_pressure_ratio = engine['fan_pressure_ratio']
    compressor_pressure_ratio = engine['compressor_pressure_ratio']
    bypass_ratio = engine['bypass_ratio']
    fan_diameter = engine['engine_diameter']
    turbine_inlet_temperature = engine['turbine_inlet_temperature']

    # ----- MOTOR DATA INPUT --------------------------------------------------
    fan_disk_area = np.pi * (fan_diameter**2) / 4
    compressor_compression_rate = compressor_pressure_ratio / \
        fan_pressure_ratio  # taxa de compressão fornecida pelo compressor
    combustor_compression_ratio = 0.99  # razão de pressão do combustor
    # temperatura na entrada da turbina
    inlet_turbine_temperature = turbine_inlet_temperature
    # at takeoff 10# increase in turbine temperatute for 5 min
    inlet_turbine_temperature_takeoff = turbine_inlet_temperature
    thermal_energy = 43260000  # Poder calorífico (J/kg)

    # ----- DESIGN POINT ------------------------------------------------------

    design_mach = 0
    design_altitude = 0
    design_throttle_position = 1.0

    # ------ EFICIÊNCIAS ------------------------------------------------------

    inlet_efficiency = 0.98
    compressor_efficiency = 0.85
    combustion_chamber_efficiency = 0.99
    turbine_efficiency = 0.90
    nozzle_efficiency = 0.98
    fan_efficiency = 0.97

    # Atualizado tabela acima em setembro de 2013 de acordo com as anotacoes
    # de aula do Ney
    # ------ TEMPERATURE RATIOS -----------------------------------------------
    temperature_ratio = 1

    # #########################################################################
    # #########  G E T  T H E R M O - DESIGN MODE #############################

    # ------ PRESSURE RATIOS --------------------------------------------------

    inlet_pressure_ratio = inlet_efficiency
    compressor_pressure_ratio = compressor_compression_rate
    combustor_pressure_ratio = combustor_compression_ratio
    fan_pressure_ratio = fan_pressure_ratio

    # ------ FREE STREAM ------------------------------------------------------
    gamma = 1.4  # gamma do programa
    R = 287.2933  # R do programa
    T_0, P_0, _, _ = atmosphere(design_altitude)
    T0_0 = (1 + (gamma - 1) / 2 * design_mach**2) * T_0  # temperatura total
    P0_0 = P_0 * (T0_0 / T_0)**(gamma / (gamma - 1))  # pressão total
    a0 = np.sqrt(gamma * R * T_0)  # velocidade do som
    u0 = design_mach * a0  # velocidade de vôo

    # ------ TEMPERATURE RATIOS -----------------------------------------------
    # ----- ENTRADA DE AR -----------------------------------------------------
    P0_1 = P0_0
    T0_1 = T0_0

    # ----- INLET -------------------------------------------------------------
    T0_2 = T0_1
    P0_2 = P0_1 * inlet_pressure_ratio
    T0_2_T0_1 = T0_2 / T0_1
    # ----- FAN ---------------------------------------------------------------
    _, _, _, _, Cp_2, _, gamma_2, _ = FAIR(item=1, f=0, T=T_0)

    del_h_fan = Cp_2*T0_2/fan_efficiency * \
        ((fan_pressure_ratio)**((gamma_2-1)/gamma_2)-1)
    del_t_fan = del_h_fan / Cp_2
    T0_13 = T0_2 + del_t_fan
    P0_13 = P0_2 * fan_pressure_ratio
    T0_13_T0_2 = T0_13 / T0_2

    # ----- COMPRESSOR --------------------------------------------------------
    _, _, _, _, Cp_4, _, gamma_4, _ = FAIR(item=1, f=0, T=T0_13)
    del_h_c = Cp_4*T0_13/compressor_efficiency * \
        (compressor_pressure_ratio**((gamma_4-1)/gamma_4)-1)
    del_t_c = del_h_c / Cp_4
    T0_3 = T0_13 + del_t_c
    P0_3 = P0_13 * compressor_pressure_ratio
    T0_3_T0_13 = T0_3 / T0_13

    _, _, _, _, Cp_3, _, _, _ = FAIR(item=1, f=0, T=T0_3)

    # ----- COMBUSTOR ---------------------------------------------------------
    T0_4 = design_throttle_position * \
        inlet_turbine_temperature_takeoff    # ponto de projeto
    P0_4 = P0_3 * combustor_pressure_ratio
    T0_4_T0_3 = T0_4 / T0_3

    # ----- HIGHT TURBINE -----------------------------------------------------
    _, _, _, _, Cp_4, _, gamma_4, _ = FAIR(item=1, f=0, T=T0_4)
    del_h_ht = del_h_c
    del_t_ht = del_h_ht / Cp_4

    T0_5 = T0_4 - del_t_ht
    high_pressure_turbine_pressure_ratio = (
        1 - del_h_ht / (Cp_4 * T0_4 * turbine_efficiency))**(gamma_4 /
                                                             (gamma_4 - 1))
    P0_5 = P0_4 * high_pressure_turbine_pressure_ratio
    T0_5_T0_4 = T0_5 / T0_4

    # ----- LOWER TURBINE -----------------------------------------------------
    _, _, _, _, Cp_5, _, gamma_5, _ = FAIR(item=1, f=0, T=T0_5)
    del_h_lt = (1 + bypass_ratio) * del_h_fan
    del_t_lt = del_h_lt / Cp_5

    T0_15 = T0_5 - del_t_lt
    low_pressure_turbine_pressure_ratio = (
        1 - del_h_lt / (Cp_5 * T0_5 * turbine_efficiency))**(gamma_5 /
                                                             (gamma_5 - 1))
    P0_15 = P0_5 * low_pressure_turbine_pressure_ratio
    T0_15_T0_5 = T0_15 / T0_5

    epr = inlet_pressure_ratio*compressor_pressure_ratio*combustor_pressure_ratio * \
        high_pressure_turbine_pressure_ratio * \
        fan_pressure_ratio*low_pressure_turbine_pressure_ratio
    etr = T0_2_T0_1 * T0_3_T0_13 * T0_4_T0_3 * T0_5_T0_4 * T0_13_T0_2 * T0_15_T0_5
    # #########################################################################

    # ########### G E T    G E O M E T R Y  ###################################
    acore = fan_disk_area / (bypass_ratio + 1)  # área do núcleo

    #  ---- a8rat = a8 / acore ----
    a8rat = min(0.75 * np.sqrt(etr / T0_2_T0_1) / epr * inlet_pressure_ratio,
                1.0)
    # OBS: divide por inlet_pressure_ratio pois ele não é considerado no cálculo do EPR e
    # ETR acima no applet original

    a8 = a8rat * acore
    a4 = a8 * high_pressure_turbine_pressure_ratio * \
        low_pressure_turbine_pressure_ratio/np.sqrt(T0_5_T0_4*T0_15_T0_5)
    a4p = a8 * low_pressure_turbine_pressure_ratio / np.sqrt(T0_15_T0_5)
    a8d = a8

    if ((design_mach == mach) and (design_altitude == h)
            and (design_throttle_position == throttle_position)):
        designpoint = 1
    else:
        designpoint = 0

    if not designpoint:
        # #########################################################################
        # #########  G E T  T H E R M O - WIND TUNNEL TEST ########################
        # disp('passei aqui designpoint')
        Mach = mach
        design_throttle_position = throttle_position

        # ------ FREE STREAM ------------------------------------------------------
        gamma = 1.4  # gamma do programa
        R = 287.2933  # R do programa
        T_0, P_0, rho_0, a_0 = atmosphere(h)

        T0_0 = (1 + (gamma - 1) / 2 * Mach**2) * T_0  # temperatura total
        P0_0 = P_0 * (T0_0 / T_0)**(gamma / (gamma - 1))  # pressão total
        a0 = np.sqrt(gamma * R * T_0)  # velocidade do som
        u0 = Mach * a0  # velocidade de vôo

        # ----- ENTRADA DE AR -----------------------------------------------------
        P0_1 = P0_0
        T0_1 = T0_0

        # ----- INLET -------------------------------------------------------------
        T0_2 = T0_1
        P0_2 = P0_1 * inlet_pressure_ratio

        # ----- COMBUSTOR ---------------------------------------------------------
        T0_4 = design_throttle_position * inlet_turbine_temperature
        _, _, _, _, Cp_4, _, gamma_4, _ = FAIR(item=1, f=0, T=T0_4)

        # ----- HIGHT TURBINE -----------------------------------------------------
        T0_5_T0_4 = optimize.fsolve(
            lambda x: find_turbine_temperature_ratio(
                x, a4p / a4, turbine_efficiency, -gamma_4 / (gamma_4 - 1)),
            0.5)
        T0_5 = T0_4 * T0_5_T0_4
        _, _, _, _, Cp_5, _, gamma_5, _ = FAIR(item=1, f=0, T=T0_5)
        del_t_ht = T0_5 - T0_4
        del_h_ht = del_t_ht * Cp_4
        high_pressure_turbine_pressure_ratio = (
            1 - (1 - T0_5_T0_4) / turbine_efficiency)**(gamma_4 /
                                                        (gamma_4 - 1))

        # ----- LOWER TURBINE -----------------------------------------------------
        T0_15_T0_5 = optimize.fsolve(
            lambda x: find_turbine_temperature_ratio(
                x, a8d / a4p, turbine_efficiency, -gamma_5 / (gamma_5 - 1)),
            0.5)
        T0_15 = T0_5 * T0_15_T0_5
        _, _, _, _, Cp_15, _, gamma_15, _ = FAIR(item=1, f=0, T=T0_15)
        del_t_lt = T0_15 - T0_5
        del_h_lt = del_t_lt * Cp_5
        low_pressure_turbine_pressure_ratio = (
            1 - (1 - T0_15_T0_5) / turbine_efficiency)**(gamma_5 /
                                                         (gamma_5 - 1))

        # ----- FAN ---------------------------------------------------------------
        del_h_fan = del_h_lt / (1 + bypass_ratio)
        del_t_fan = -del_h_fan / Cp_2
        T0_13 = T0_2 + del_t_fan
        _, _, _, _, Cp_13, _, gamma_13, _ = FAIR(item=1, f=0, T=T0_13)
        T0_13_T0_2 = T0_13 / T0_2
        fan_pressure_ratio = (1 - (1 - T0_13_T0_2) * fan_efficiency)**(
            gamma_2 / (gamma_2 - 1))

        # ----- COMPRESSOR --------------------------------------------------------
        del_h_c = del_h_ht
        del_t_c = -del_h_c / Cp_13

        T0_3 = T0_13 + del_t_c
        _, _, _, _, Cp_3, _, gamma_3, _ = FAIR(item=1, f=0, T=T0_3)
        T0_3_T0_13 = T0_3 / T0_13
        compressor_pressure_ratio = (
            1 - (1 - T0_3_T0_13) * compressor_efficiency)**(gamma_13 /
                                                            (gamma_13 - 1))
        T0_4_T0_3 = T0_4 / T0_3

        # ----- total pressures definition ----------------------------------------
        P0_13 = P0_2 * fan_pressure_ratio
        P0_3 = P0_13 * compressor_pressure_ratio
        P0_4 = P0_3 * combustor_pressure_ratio
        P0_5 = P0_4 * high_pressure_turbine_pressure_ratio
        P0_15 = P0_5 * low_pressure_turbine_pressure_ratio

        # ----- overall pressure & temperature ratios -----------------------------
        # print(compressor_pressure_ratio)
        # print(combustor_pressure_ratio)
        epr = inlet_pressure_ratio*compressor_pressure_ratio*combustor_pressure_ratio * \
            high_pressure_turbine_pressure_ratio * \
            fan_pressure_ratio*low_pressure_turbine_pressure_ratio
        etr = T0_2_T0_1 * T0_3_T0_13 * T0_4_T0_3 * T0_5_T0_4 * T0_13_T0_2 * T0_15_T0_5

    # ########### G E T   P E R F O R M A N C E  ##############################
    _, _, _, _, Cp_exit, _, gamma_exit, _ = FAIR(
        item=1, f=0, T=T0_5)  # gamma de saída (T0_5 ???)
    Re = (gamma_exit - 1) / gamma_exit * Cp_exit  # Constante R de saída
    g = 32.2

    P0_8 = P0_0 * epr
    T0_8 = T0_0 * etr

    fact2 = -0.5 * (gamma_exit + 1) / (gamma_exit - 1)
    fact1 = (1 + 0.5 * (gamma_exit - 1))**fact2
    mdot = a8*np.sqrt(gamma_exit)*P0_8*fact1 / \
        np.sqrt(T0_8*Re)  # fluxo mássico [kg/s]

    npr = max(P0_8 / P_0, 1)

    fact1 = (gamma_exit - 1) / gamma_exit
    uexit = np.sqrt(2 * R / (gamma_exit - 1) * gamma_exit * T0_8 *
                    nozzle_efficiency * (1 - (1 / npr)**fact1))  # ????

    if (npr <= 1.893):
        pexit = P_0
    else:
        pexit = 0.52828 * P0_8

    fgros = uexit + (pexit - P_0) * a8 / mdot / g

    # ------ contribuição do fan -------------------------------------------
    snpr = P0_13 / P_0
    fact1 = (gamma - 1) / gamma
    ues = np.sqrt(2 * R / fact1 * T0_13 * nozzle_efficiency *
                  (1 - 1 / snpr**fact1))

    if (snpr <= 1.893):
        pfexit = P_0
    else:
        pfexit = 0.52828 * P0_13

    fgros = fgros + bypass_ratio * ues + (
        pfexit - P_0) * bypass_ratio * acore / mdot / g

    dram = u0 * (1 + bypass_ratio)
    fnet = fgros - dram
    fuel_air = (T0_4_T0_3 -
                1) / (combustion_chamber_efficiency * thermal_energy /
                      (Cp_3 * T0_3) - T0_4 / T0_3)

    # ####### Estimativa de Peso ##############################################
    ncomp = min(15, round(1 + compressor_compression_rate / 1.5))
    nturb = 2 + math.floor(ncomp / 4)
    dfan = 293.02  # fan density
    dcomp = 293.02  # comp density
    dburn = 515.2  # burner density
    dturb = 515.2  # turbine density
    conv1 = 10.7639104167  # conversão de acore para ft**2

    weight = (4.4552 * 0.0932 * acore * conv1 *
              np.sqrt(acore * conv1 / 6.965) *
              ((1 + bypass_ratio) * dfan * 4 + dcomp *
               (ncomp - 3) + 3 * dburn + dturb * nturb))  # [N]

    # SUBROUTINE OUTPUTS
    # weightkgf = weight/9.8
    # tracaokgf = fnet*mdot/9.8  #[kgf]
    force = fnet * mdot  # [tracao em Newtons]
    # [kg/h]   # correção de 15# baseado em dados de motores reais
    fuel_flow = 1.15 * fuel_air * mdot * 3600

    return force, fuel_flow