예제 #1
0
    for y1, y2, cl1, cl2, c1, c2 in zip(y[:-1], y[1:], cl[:-1], cl[1:], c[:-1],
                                        c[1:]):
        sec_cl = 0.5 * (cl1 * c1 + cl2 * c2) * (y2 - y1)
        if y2 <= 0.0:
            continue
        if y2 < switch[i]:
            inboard_wing_cl_hodson += sec_cl
        else:
            outboard_wing_cl_hodson += sec_cl

    inboard_wing_cl_panair = 0.0
    outboard_wing_cl_panair = 0.0
    y = sec_cl_panair[i][0]
    cl = sec_cl_panair[i][1]
    w = wing.Elliptic(ra, ra, 20)
    for y1, y2, cl1, c1 in zip(w.y[:-1] / ra, w.y[1:] / ra, cl, w.cc):
        sec_cl = cl1 * c1 * (y2 - y1)
        if y2 <= 0.0:
            continue
        if y2 < switch[i]:
            inboard_wing_cl_panair += sec_cl
        else:
            outboard_wing_cl_panair += sec_cl

    diff = inboard_wing_cl_panair - inboard_wing_cl_hodson
    total = panair_wing_cla.cla(10.0, 9.0) * np.radians(1.0)
    pct_diff = diff / total * 100
    print("RA={:7.4f}, shift = {:7.4f}%".format(ra, pct_diff))

plt.show()
예제 #2
0
    if pr_modified_slender.setup(overwrite=False):
        pr_modified_slender.execute()
    a_modified_slender.append(pr_modified_slender.WingLiftSlope)

## Get numerical lifting surface results
#krienes = wing_cla.a_krienes()
#kinner = wing_cla.a_kinner()
#jordan = wing_cla.a_jordan()
#medan = wing_cla.a_medan()

# Get Panair results
#A_panair = np.concatenate((np.linspace(0.25, 2.0, 8), np.linspace(2.5, 3.0, 2),
#        np.linspace(4.0, 5.0, 2), np.linspace(6.0, 10.0, 3)))
A_panair = np.linspace(1.0, 8.0, 8)
c = 10.0
cla_panair = [panair_wing_cla.cla(c, x, rt, False) for x in A_panair]
#cla_machup = [machup_wing_cla_tapered.a_machup(x, rt, False) for x in A_panair]

# Define cycles for line patterns and markers
lines = cycle([(0, ()), (0, (1, 1)), (0, (5, 5)), (0, (3, 5, 1, 5))])
markers = cycle(['o', 's', '^', 'D', 'v'])
lw = 0.5  # Line width

# Set up a new plot
plt.rc('font', **{'family': 'serif', 'serif': ['Times New Roman']})
plt.rcParams["font.family"] = "Times New Roman"
plt.rcParams["font.size"] = 10
plt.rcParams["lines.markersize"] = 4
plt.figure(figsize=(4.0, 2.5))

# Plot the analytical relations
예제 #3
0
    pr_hodson = pralines.Pralines(w, a0, 'Hodson')
    if pr_hodson.setup(overwrite=False):
        pr_hodson.execute()
    a_hodson.append(pr_hodson.WingLiftSlope)

    pr_modified_slender = pralines.Pralines(w, a0, 'ModifiedSlender')
    if pr_modified_slender.setup(overwrite=False):
        pr_modified_slender.execute()
    a_modified_slender.append(pr_modified_slender.WingLiftSlope)

# Get Panair results
A_panair = np.linspace(1.0, 8.0, 8)
c = 10.0
cla_panair = [
    panair_wing_cla.cla(c, x, rt, False, True, False) for x in A_panair
]

# Set up a new plot
plt.rc('font', **{'family': 'serif', 'serif': ['Times New Roman']})
plt.rcParams["font.family"] = "Times New Roman"
plt.rcParams["font.size"] = 10
plt.rcParams["lines.markersize"] = 4
plt.figure(figsize=(4.0, 2.5))
lw = 0.5  # Line width

# Plot the analytical relations
lines = cycle([(0, ()), (0, (1, 1)), (0, (5, 5)), (0, (3, 5, 1, 5))])
plt.plot(A,
         a_classical,
         label="Classical lifting line theory",
예제 #4
0
from phd_scripts.utility_scripts import wing_cla
from phd_scripts.utility_scripts import pralines_wing_cla
from phd_scripts.utility_scripts import panair_wing_cla
from phd_scripts.utility_scripts import machup_wing_cla

# Use lift slope from thin airfoil theory
a0 = 2.0 * np.pi

# Average chord length
c_panair = 10.0

# Calculate the lift slope using Pralines
A_analytical = np.linspace(0.01, 8, 800)
A_numerical = np.linspace(0.1, 8, 80)
A_vortexpanel = np.linspace(1, 8, 8)
a_panair = [panair_wing_cla.cla(c_panair, x) for x in A_vortexpanel]
a_classical = wing_cla.a_classical(A_analytical, a0)

a_machup_classical = [
    machup_wing_cla.cla(x, lowra_method='Classical') for x in A_numerical
]

# Set up a new plot
plt.rc('font', **{'family': 'serif', 'serif': ['Times New Roman']})
plt.rcParams["font.family"] = "Times New Roman"
plt.rcParams["font.size"] = 10
plt.rcParams["lines.markersize"] = 4
plt.figure(figsize=(4.0, 2.5))
lw = 0.5  # Line width

# Plot the analytical relations
예제 #5
0
A_vandyke_1 = A[:len(a_vandyke_1)]
a_vandyke_2 = a_vandyke[len(a_vandyke_1):]
A_vandyke_2 = A[len(a_vandyke_1):]

# Get numerical lifting surface results
krienes = wing_cla.a_krienes()
kinner = wing_cla.a_kinner()
jordan = wing_cla.a_jordan()
medan = wing_cla.a_medan()

# Get Panair results
#A_panair = np.concatenate((np.linspace(0.25, 2.0, 8), np.linspace(2.5, 3.0, 2),
#        np.linspace(4.0, 5.0, 2), np.linspace(6.0, 10.0, 3)))
A_panair = np.linspace(1.0, 8.0, 8)
c_panair = 10.0
cla_panair = [panair_wing_cla.cla(c_panair, x) for x in A_panair]

# Define cycles for line patterns and markers
#lines = cycle([(0, ()), (0, (1,1)), (0, (10,10)), (0, (3,10,1,10)), (0, (10,10,5,10)), (0, (3,10,1,10,1,10)), (0, (5,10)), (0, (15,5,1,5,5,5,1,5)), (0, (1,5))])
lines = cycle([(0, ()), (0, (1, 1)), (0, (5, 5)), (0, (3, 5, 1, 5))])
markers = cycle(['o', 's', '^', 'D', 'v'])
lw = 0.5  # Line width

# Set up a new plot
plt.rc('font', **{'family': 'serif', 'serif': ['Times New Roman']})
plt.rcParams["font.family"] = "Times New Roman"
plt.rcParams["font.size"] = 10
plt.rcParams["lines.markersize"] = 4
plt.figure(figsize=(6.0, 4.0))

# Plot the analytical relations