Example #1
0
def redistribute_blade_planform(pfIn, x):

    pfOut = BladePlanformVT()
    pfOut.s = x.copy()

    for name in pfIn.list_vars():
        var = getattr(pfIn, name)
        if not isinstance(var, np.ndarray): continue
        tck = Akima1DInterpolator(pfIn.s, var)
        newvar = tck(x)
        setattr(pfOut, name, newvar)

    return pfOut
Example #2
0
def redistribute_blade_planform(pfIn, x):

    pfOut = BladePlanformVT()
    pfOut.s = x.copy()

    for name in pfIn.list_vars():
        var = getattr(pfIn, name)
        if not isinstance(var, np.ndarray): continue
        tck = Akima1DInterpolator(pfIn.s, var)
        newvar = tck(x) 
        setattr(pfOut, name, newvar)

    return pfOut
Example #3
0
def read_blade_planform(filename):

    data = np.loadtxt(filename)
    s = calculate_length(data[:, [0, 1, 2]])

    pf = BladePlanformVT()
    pf.blade_length = data[-1, 2]
    pf.s = s / s[-1]
    pf.x = data[:, 0] / data[-1, 2]
    pf.y = data[:, 1] / data[-1, 2]
    pf.z = data[:, 2] / data[-1, 2]
    pf.rot_x = data[:, 3]
    pf.rot_y = data[:, 4]
    pf.rot_z = data[:, 5]
    pf.chord = data[:, 6] / data[-1, 2]
    pf.rthick = data[:, 7]
    pf.rthick /= pf.rthick.max()
    pf.athick = pf.rthick * pf.chord
    pf.p_le = data[:, 8]

    return pf
Example #4
0
def read_blade_planform(filename):

    data = np.loadtxt(filename)
    s = calculate_length(data[:, [0, 1, 2]])

    pf = BladePlanformVT()
    pf.blade_length = data[-1, 2]
    pf.s = s / s[-1]
    pf.x = data[:, 0] / data[-1, 2]
    pf.y = data[:, 1] / data[-1, 2]
    pf.z = data[:, 2] / data[-1, 2]
    pf.rot_x = data[:, 3]
    pf.rot_y = data[:, 4]
    pf.rot_z = data[:, 5]
    pf.chord = data[:, 6] / data[-1, 2]
    pf.rthick = data[:, 7]
    pf.rthick /= pf.rthick.max()
    pf.athick = pf.rthick * pf.chord
    pf.p_le = data[:, 8]

    return pf