Exemplo n.º 1
0
def Calc_spar_inertia(
    HSpar, TSpar, ChSpar, zs
):  # Input height spar (m), thickness spar (m), location centroid w.r.t. chord and chordwise location (-) spar respectively (-)
    Ixx = (1 / 12) * TSpar * (HSpar**3)  # Calculation of Ixx
    Iyy = (1 / 12) * HSpar * (TSpar**3)  # Caclulation of Iyy w/o steiner term
    Iyysteiner = TSpar * HSpar * (abs((Wing.centroid * Wing.length_chord(zs)) -
                                      (ChSpar * Wing.length_chord(zs)))**2
                                  )  # Calculation of steiner term Iyy
    Iyy = Iyy + Iyysteiner  # Adding both Iyy moments of inertia together
    return Ixx, Iyy
Exemplo n.º 2
0
def computeloads(z):
    Sectioncenters = np.array([])
    dLlist = np.array([])
    dDlist = np.array([])
    L = 0
    D = 0
    M = 0
    L_moment = 0
    D_moment = 0
    Llist = np.array([])
    Dlist = np.array([])
    Lmomentlist = np.array([])
    Dmomentlist = np.array([])
    L_momentlist = np.array([])
    zs = b - (sectionlength / 2)
    dL = Q_("0 N")
    dD = Q_("0 N")
    dM = Q_("0 N*m")
    while zs > z:  #zs is measured is m from

        Areaofsection = sectionlength * Wing.length_chord(zs)

        Sectioncenters = np.append(Sectioncenters, zs)
        '''Lift drag and moment for the section'''
        dL = (cl * 0.5 * rho * (V**2) *
              Areaofsection).magnitude  #lift of the section
        dD = (cd * 0.5 * rho * (V**2) *
              Areaofsection).magnitude  #drag of the section
        dM = (cm * 0.5 * rho * (V**2) * Areaofsection *
              Wing.length_chord(zs)).magnitude  #moment of the section
        dL *= Q_('kg * m / s**2')
        dD *= Q_('kg * m / s**2')
        dM *= Q_('kg * m**2 / s**2')

        if zs < Geometry.Fuselage.b_f * 0:
            dL = 0
            dD = 0
            dM = 0

        dLlist = np.append(dLlist, dL)
        dDlist = np.append(dDlist, dD)
        '''Total lift, drag and moment for the wing'''
        L = L + dL  # Total lift for one wing
        D = D + dD  # Total drag for one wing
        M = M + dM  # Total moment for one wing

        Llist = np.append(Llist,
                          L)  # put the values in a list so we can plot them
        Dlist = np.append(Dlist, D)

        zs = zs - sectionlength  # Select other section for the next loop

    for i in range(0, len(Sectioncenters)):
        arm = (Sectioncenters[i] - z.magnitude)
        dLmoment = (arm * dLlist[i])
        dDmoment = (arm * dDlist[i])
        L_moment = L_moment + dLmoment
        D_moment = D_moment + dDmoment
        Lmomentlist = np.append(Lmomentlist, L_moment)
        Dmomentlist = np.append(Dmomentlist, D_moment)
    '''For the 20G manoeuver'''
    MTOW = Geometry.Masses.W_MTOW
    Max_20G_N = MTOW * 9.81 * 20
    Tot_L = 2 * totallift
    if Tot_L.magnitude > 0.:
        fac_20G = Max_20G_N / Tot_L
        fac_20G = fac_20G.magnitude
    else:
        fac_20G = 0

    L_moment = L_moment * fac_20G
    D_moment = D_moment * fac_20G

    L = L * fac_20G
    D = D * fac_20G
    M = M * fac_20G

    return L, D, M, L_moment, D_moment, dL, dD, dM
Exemplo n.º 3
0
Lmomentlist = np.array([])
Dmomentlist = np.array([])
dLlist = np.array([])
dDlist = np.array([])
Llist = np.array([])
Dlist = np.array([])

Sectioncenters = np.array([])

sectionlength = (b.magnitude -
                 0 * Geometry.Fuselage.b_f.magnitude) / n * ureg.meter

zs = b - (sectionlength / 2)

while zs.magnitude > 0:  # zs is measured is m from
    Areaofsection = sectionlength * Wing.length_chord(zs)

    Sectioncenters = np.append(Sectioncenters, zs)
    '''Lift drag and moment for the section'''
    dL = cl * 0.5 * rho * (V**2) * Areaofsection.magnitude * Q_(
        "m**2")  # lift of the section

    if zs < Geometry.Fuselage.b_f * 0:
        dL = Q_('0 kg * m / s**2')
    '''Total lift, drag and moment for the wing'''
    L = L + dL  # Total lift for one wing

    zs = zs - sectionlength  # Select other section for the next loop

totallift = L