コード例 #1
0
    def m0_fn(Ma):
        if Ma <= 0.9:
            return (2 * math.pi) / numpy.sqrt(1 - Ma**2)
        else:
            return (2 * math.pi) / numpy.sqrt(1 - 0.9**2)

    def Cd_fn(Cl):
        return 0.0095 + 0.0040 * (Cl - 0.2)**2

    nn = 101
    h = 0  # m
    v_inf = 70  # m/s
    is_SI = True
    atm = AtmData(v_inf, h, is_SI)
    k = 1.4
    R = 287
    atm.expand(k, R)

    numB = 3
    radius = 2 / 2
    RPM = 2400
    Cl = 0.4
    alp0 = numpy.radians(-2)
    prop = Propeller(radius, numB, RPM, CP=0, CT=0, CQ=0, Cl=Cl, alp0=alp0)

    T_req = 13000 / 8  # N (TOGW/(L/D))
    r_vec, c_vec, beta_vec, P_design, T_design, Q_design, eta_P, theta_vec = prop_design(
        atm, prop, T_req, m0_fn, Cd_fn)
    in_line = [0] * len(r_vec)
    plot_propeller_3D(r_vec, c_vec, beta_vec, prop, in_line)
コード例 #2
0
    # Propeller
    radius = 41 * 0.0254  # m
    numB = 3
    Cl = 0.4
    RPM = 2400
    alp0 = numpy.radians(-2)
    dens = atm_check.dens
    CT = 0.0509
    T_req = CT * dens * (RPM / 60)**2 * (radius * 2)**4

    v_seq = numpy.arange(v_climb - 30 * 0.3048, v_climb + 126 * 0.3048, 2)
    prop_check = Propeller(radius,
                           numB,
                           RPM,
                           eta_P=0,
                           CP=0,
                           CT=0,
                           CQ=0,
                           Cl=0.4)
    r, prop_check.chord, prop_check.bet, P_design, T_design, Q_design, eta_P, prop_check.theta = prop_design(
        atm_check, prop_check, T_req, m0_fn, Cd_fn)

    ll = numpy.size(v_seq)

    J_var = numpy.zeros((ll, ))
    P_design_var = numpy.zeros((ll, ))
    T_design_var = numpy.zeros((ll, ))
    eta_P_var = numpy.zeros((ll, ))
    deta_P = numpy.zeros((ll, ))
    dT = numpy.zeros((ll, ))
    delta_bet = numpy.zeros((ll, ))
コード例 #3
0
T_req = 13000 / 8 / LD  #N (TOGW/(L/D))
Cl = 0.4
alp0 = numpy.radians(-2)

for v_inf in range(22, 72, 10):
    P_design = [0] * nn
    T_design = [0] * nn
    Q_design = [0] * nn
    eta_P = [0] * nn
    for ii in range(0, nn):
        atm = AtmData(v_inf, h, is_SI)
        atm.expand(1.4, 287)
        prop = Propeller(radius,
                         numB,
                         RPM[ii],
                         eta_P,
                         CP=0,
                         CT=0,
                         CQ=0,
                         Cl=0.4)
        [_, _, _, P_design[ii], T_design[ii], Q_design[ii], eta_P[ii],
         _] = prop_design(atm, prop, T_req, m0_fn, Cd_fn)
    label = "$V_\infty$ = " + str(v_inf) + " (m/s)"
    plt.figure(1)
    plt.plot(RPM, Q_design, label=label)
    plt.figure(2)
    plt.plot(RPM, eta_P, label=label)
    plt.figure(3)
    plt.plot(RPM, P_design, label=label)
    # plt.figure(7)
    # plt.plot(RPM,T_design,label=label)
# Design condition
T_req = 13000 / (8) * 1.2 * 0.601  # N (TOGW/(L/D))
Cl = 0.4
alp0 = numpy.radians(-2)

v_hover = 2.54
v_cruise = 62
v_design = 30
atm = AtmData(v_design, 0, is_SI)
atm.expand(1.4, 287)
v_seq = numpy.arange(-10, 68, 2)
ll = numpy.size(v_seq)

Design_RPM = 3000

prop = Propeller(radius, numB, Design_RPM, eta_P=0, CP=0, CT=0, CQ=0, Cl=Cl)
r, prop.chord, prop.bet, P_design, T_design, Q_design, eta_P, prop.theta = prop_design(atm, prop, T_req, m0_fn, Cd_fn)

num_len = len(prop.bet)
beta_75_index = int(num_len * 0.75)
x = numpy.linspace(0, 1, num_len)
x_need = x[x >= 0.15]
c_need = prop.chord[x >= 0.15]
AF = 10 ** 5 / 16 * numpy.trapz(c_need / diameter * x_need ** 3, x_need)  # activity factor
CL_design = 4 * numpy.trapz(Cl * x_need ** 3, x_need)
print('====================== Propeller Design Parameters ======================')
print("Beta angle at 75% is {:.5f} degree".format(numpy.rad2deg(prop.bet[beta_75_index])))
print("Activity factor is {:.2f}, which corresponds to {:.2f} in openVSP (Source checked)".format(AF, AF * 2))
print("CL_design is {:.2f}".format(CL_design))

コード例 #5
0
vel = 124 * 0.514444  # m/s
c_p = 0.51 / (1980000 * 0.3048)  # lb/(hp*hr) to 1/ft to 1/m
eta_P = 0.85
CD_0 = 0.0340
CL = 0.305
CD = 0.0401
# Just to make class work
area = 200 * 0.092903  # ft^2 to m^2
span = 1 / (numpy.pi * 0.0657)
e = 1

atm = AtmData(vel, 'temp', 'pres', 'dens', 'visc', 'k', 'R', 'is_SI')
wing = Wing(area, span, e, 'alpha', 'chord', 'c_bar', CL, 'CL_max', CD, CD_0,
            'airfoil')
prop = Propeller('radius', 'RPM', eta_P, 'CP', 'CT', 'CQ', 'Cl = 0.4',
                 'chord = 1', 'numB = 3', 'alp0 = 0', 'alpha = None',
                 'beta = None', 'theta = None', 'phi = None')

R, E = propeller_in_cruise(W_initial, W_final, c_p, atm, prop, wing,
                           const_logic)

R *= 0.000539957  # m to nmi
E /= 3600  # s to hr

#print(R)    # should be ~500 nmi
#print(E)    # should be ~4.03 hr
# Checked!

# Test B, constant Cl and altitude, numbers from lecture 01.27.2021
const_logic = [True, False, True]
W_initial = 2500 * 4.4482216153  # lbf to N
コード例 #6
0
temp = 288
pres = 101250
dens = 1.225
visc = 3E-6
k = 1.4
R = 287
is_SI = True
atm_check = AtmData(v_inf, temp, pres, dens, visc, k, R, is_SI)

# prop. data
radius = 41 * 0.0254
RPM = 1854.4805
Cl = 0.4
numB = 3
alp0 = numpy.radians(-2)
prop_check = Propeller(radius, RPM, Cl, "chord", numB, alp0)

# wing data
area = 16
span = 5
e = 0.9
CL_max = 2.1

wing_check = Wing(area, span, e, "alpha", "chord", 1, 1, CL_max, "CD", "CD_0", "airfoil")

# function call
m = 6000
mot_distr = [1,1]
print(numpy.size(mot_distr))
dist_to = 2000
power_vec = STOL_power_req(m, dist_to, mot_distr, atm_check, wing_check, prop_check)
コード例 #7
0
# 3 Blades
numB = 3

# Design condition
T_req = 13000 / 8 * 1.2 * 0.601  # N (TOGW/(L/D))
Cl = 0.4
alp0 = np.radians(-2)

v_design = 30
atm = AtmData(v_design, 0, is_SI)
atm.expand(1.4, 287)

Design_RPM = 3000

prop = Propeller(radius, numB, Design_RPM, eta_P=0, CP=0, CT=0, CQ=0, Cl=Cl)
output = prop_design(atm, prop, T_req, m0_fn, Cd_fn, num=401)
r, prop.chord, prop.bet, P_design, T_design, Q_design, eta_P, prop.theta = output

# Point reduction and interpolation

# Adjustment
num_len = len(prop.bet)
beta_75_index = int(num_len * 0.75)
x = np.linspace(0, 1, num_len)
x_need = x[x >= 0.15]
c_need = prop.chord[x >= 0.15]
AF = 10**5 / 16 * np.trapz(c_need / diameter * x_need**3,
                           x_need)  # activity factor
CL_design = 4 * np.trapz(Cl * x_need**3, x_need)
print(
コード例 #8
0
    g = 9.81  # m/s^2
    W_initial = 13000  # N
    m_loss = 5  # this affects the output tremendously
    W_final = 13000 - (m_loss * g)  # N
    W_diff = W_initial - W_final

    # atm data
    h = 6000 * 0.3048  # m
    vel = 62  # m/s
    is_SI = True
    atm = AtmData(vel, h, is_SI)
    atm.expand(1.4, 287)

    # prop data
    eta_P = 0.82
    prop = Propeller('radius', 'numB', 'RPM', eta_P=eta_P)

    const_logic = [False, True, True]  # [CL, v_inf, h]

    area = 16  # m^2
    span = (4.7046 + 1.62) * 2
    CL = (W_initial + W_final) / (atm.dens * atm.vel**2 * area)

    # CL = 0.4128
    CD = 0.018  # from drag polar with no flap, 62 m/s, 6000 ft
    CD_0 = 0.012

    wing = Wing(area, span, e=0.7, CL=CL, CD=CD, CD_0=CD_0)

    # c_p
    P_fuelcell_cont = 100 * 1000  # W
コード例 #9
0
    radius = 1.78 / 2
    RPM = numpy.linspace(500, 2950, nn)
    LD = 15
    T_req = 13000 / 8  # N (TOGW/(L/D))
    Cl = 0.4
    alp0 = numpy.radians(-2)

    for v_inf in range(20, 70, 10):
        P_design = [0] * nn
        T_design = [0] * nn
        Q_design = [0] * nn
        eta_P = [0] * nn
        for ii in range(0, nn):
            atm = AtmData(v_inf, h, is_SI)
            atm.expand(1.4, 287)
            prop = Propeller(radius, numB, RPM[ii], eta_P, CP=0, CT=0, CQ=0, Cl=0.4)
            [_, _, _, P_design[ii], T_design[ii], Q_design[ii], eta_P[ii], _] = prop_design(atm, prop, T_req, m0_fn,
                                                                                            Cd_fn)
        label = "$V_\infty$ = " + str(v_inf) + " (m/s)"
        plt.figure(4)
        plt.plot(RPM, Q_design, label=label)
        plt.figure(5)
        plt.plot(RPM, eta_P, label=label)
        plt.figure(6)
        plt.plot(RPM, P_design, label=label)
        # plt.figure(7)
        # plt.plot(RPM,T_design,label=label)

    plt.figure(4)
    plt.legend()
    plt.xlabel("RPM")
コード例 #10
0
    import matplotlib.pyplot as plt

    ## ******The resulting graph does not make sense to XT


    Weight = 13000  # N
    f_body = 0.001  # m^2, almost neglected
    gamma = 0  # deg
    num_rotor = 8

    # prop
    radius = 1.78 / 2  # m
    numB = 3
    c_bar = 0.1  # m, assumed
    RPM = 2500  # assumed
    prop_trial = Propeller(radius, numB, RPM, c_bar=c_bar)

    # atm
    h = 500  # m
    is_SI = True

    num = 101
    vel_start = -10
    vel_end = 20
    vel_vec = numpy.linspace(vel_start, vel_end, num)

    Cd_bar_start = 0.01
    Cd_bar_end = 0.05
    Cd_bar_num = 5
    Cd_bar_vec = numpy.linspace(Cd_bar_start, Cd_bar_end, Cd_bar_num)