Esempio n. 1
0
def __main__():
    # Define an isotropic material with E = 29,500 ksi and nu = 0.3
    props = np.array(
        [np.array([0, 29500, 29500, 0.3, 0.3, 29500 / (2 * (1 + 0.3))])])

    # Define a lightly-meshed Cee shape
    # (1 element per lip, 2 elements per flange, 3 elements on the web)
    # Nodal location units are inches
    nodes = np.array([[0, 5, 1, 1, 1, 1, 1, 0], [1, 5, 0, 1, 1, 1, 1, 0],
                      [2, 2.5, 0, 1, 1, 1, 1, 0], [3, 0, 0, 1, 1, 1, 1, 0],
                      [4, 0, 3, 1, 1, 1, 1, 0], [5, 0, 6, 1, 1, 1, 1, 0],
                      [6, 0, 9, 1, 1, 1, 1, 0], [7, 2.5, 9, 1, 1, 1, 1, 0],
                      [8, 5, 9, 1, 1, 1, 1, 0], [9, 5, 8, 1, 1, 1, 1, 0]])
    thickness = 0.1
    elements = [[0, 0, 1, thickness, 0], [1, 1, 2, thickness, 0],
                [2, 2, 3, thickness, 0], [3, 3, 4, thickness, 0],
                [4, 4, 5, thickness, 0], [5, 5, 6, thickness, 0],
                [6, 6, 7, thickness, 0], [7, 7, 8, thickness, 0],
                [8, 8, 9, thickness, 0]]

    # These lengths will generally provide sufficient accuracy for
    # local, distortional, and global buckling modes
    # Length units are inches
    lengths = [
        0.5, 0.75, 1, 1.25, 1.5, 1.75, 2, 2.25, 2.5, 2.75, 3, 3.25, 3.5, 3.75,
        4, 4.25, 4.5, 4.75, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
        19, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52,
        54, 56, 58, 60, 66, 72, 78, 84, 90, 96, 102, 108, 114, 120, 132, 144,
        156, 168, 180, 204, 228, 252, 276, 300
    ]

    # No special springs or constraints
    springs = []
    constraints = []

    # Values here correspond to signature curve basis and orthogonal based upon geometry
    gbt_con = {
        'glob': [0],
        'dist': [0],
        'local': [0],
        'other': [0],
        'o_space': 1,
        'couple': 1,
        'orth': 2,
        'norm': 0,
    }

    # Simply-supported boundary conditions
    b_c = 'S-S'

    # For signature curve analysis, only a single array of ones makes sense here
    m_all = np.ones((len(lengths), 1))

    # Solve for 10 eigenvalues
    n_eigs = 10

    # Set the section properties for this simple section
    # Normally, these might be calculated by an external package
    sect_props = {
        'cx': 1.67,
        'cy': 4.5,
        'x0': -2.27,
        'y0': 4.5,
        'phi': 0,
        'A': 2.06,
        'Ixx': 28.303,
        'Ixy': 0,
        'Iyy': 7.019,
        'I11': 28.303,
        'I22': 7.019
    }

    # Generate the stress points assuming 50 ksi yield and pure compression
    nodes_p = stress_gen(nodes=nodes,
                         forces={
                             'P': sect_props['A'] * 50,
                             'Mxx': 0,
                             'Myy': 0,
                             'M11': 0,
                             'M22': 0
                         },
                         sect_props=sect_props,
                         offset_basis=[-thickness / 2, -thickness / 2])

    # Perform the Finite Strip Method analysis
    signature, curve, shapes = strip(props=props,
                                     nodes=nodes_p,
                                     elements=elements,
                                     lengths=lengths,
                                     springs=springs,
                                     constraints=constraints,
                                     gbt_con=gbt_con,
                                     b_c=b_c,
                                     m_all=m_all,
                                     n_eigs=n_eigs,
                                     sect_props=sect_props)

    # Return the important example results
    # The signature curve is simply a matter of plotting the
    # 'signature' values against the lengths
    # (usually on a logarithmic axis)
    return {
        'X_values': lengths,
        'Y_values': signature,
        'Y_values_allmodes': curve,
        'Orig_coords': nodes,
        'Deformations': shapes
    }
Esempio n. 2
0
def __main__():
    # Define an isotropic material with E = 203,000 MPa and nu = 0.3
    props = [[0, 203000, 203000, 0.3, 0.3, 203000 / (2 * (1 + 0.3))]]

    # Define a lightly-meshed Zed shape
    # (1 element per lip, 2 elements per flange, 3 elements on the web)
    # Nodal location units are millimetres
    nodes = np.array([[0, 100, 25, 1, 1, 1, 1, 0], [1, 100, 0, 1, 1, 1, 1, 0],
                      [2, 50, 0, 1, 1, 1, 1, 0], [3, 0, 0, 1, 1, 1, 1, 0],
                      [4, 0, 100, 1, 1, 1, 1, 0], [5, 0, 200, 1, 1, 1, 1, 0],
                      [6, 0, 300, 1, 1, 1, 1, 0], [7, -50, 300, 1, 1, 1, 1, 0],
                      [8, -100, 300, 1, 1, 1, 1, 0],
                      [9, -100, 275, 1, 1, 1, 1, 0]])
    elements = [[0, 0, 1, 2, 0], [1, 1, 2, 2, 0], [2, 2, 3, 2, 0],
                [3, 3, 4, 2, 0], [4, 4, 5, 2, 0], [5, 5, 6, 2, 0],
                [6, 6, 7, 2, 0], [7, 7, 8, 2, 0], [8, 8, 9, 2, 0]]

    # These lengths will generally provide sufficient accuracy for
    # local, distortional, and global buckling modes
    # Length units are millimetres
    lengths = [
        10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160,
        170, 180, 190, 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900,
        1000, 1100, 1200, 1300, 1400, 1500, 2000, 2500, 3000, 3500, 4000, 4500,
        5000, 6000, 7000, 8000, 9000, 10000
    ]

    # No special springs or constraints
    springs = []
    constraints = []

    # Values here correspond to signature curve basis and orthogonal based upon geometry
    gbt_con = {
        'glob': [0],
        'dist': [0],
        'local': [0],
        'other': [0],
        'o_space': 1,
        'couple': 1,
        'orth': 2,
        'norm': 0,
    }

    # Simply-supported boundary conditions
    b_c = 'S-S'

    # For signature curve analysis, only a single array of ones makes sense here
    m_all = np.ones((len(lengths), 1))

    # Solve for 10 eigenvalues
    n_eigs = 10

    # Set the section properties for this simple section
    # Normally, these might be calculated by an external package
    sect_props = {
        'cx': 0,
        'cy': 150,
        'x0': 0,
        'y0': 150,
        'phi': 16.54,
        'A': 1084,
        'Ixx': 14921145,
        'Ixy': -4151084,
        'Iyy': 2177529,
        'I11': 16154036,
        'I22': 944639
    }

    # Generate the stress points assuming 500 MPa yield and X-axis bending
    nodes_p = stress_gen(nodes=nodes,
                         forces={
                             'P': 0,
                             'Mxx': 500 * sect_props['Ixx'] / sect_props['cy'],
                             'Myy': 0,
                             'M11': 0,
                             'M22': 0
                         },
                         sect_props=sect_props)

    # Perform the Finite Strip Method analysis
    signature, curve, shapes = strip(props=props,
                                     nodes=nodes_p,
                                     elements=elements,
                                     lengths=lengths,
                                     springs=springs,
                                     constraints=constraints,
                                     gbt_con=gbt_con,
                                     b_c=b_c,
                                     m_all=m_all,
                                     n_eigs=n_eigs,
                                     sect_props=sect_props)

    # Return the important example results
    # The signature curve is simply a matter of plotting the
    # 'signature' values against the lengths
    # (usually on a logarithmic axis)
    return {
        'X_values': lengths,
        'Y_values': signature,
        'Y_values_allmodes': curve,
        'Orig_coords': nodes,
        'Deformations': shapes
    }
Esempio n. 3
0
    'x0': 0,
    'y0': 150,
    'phi': 16.54,
    'A': 1084,
    'Ixx': 14921145,
    'Ixy': -4151084,
    'Iyy': 2177529,
    'I11': 16154036,
    'I22': 944639
}
# Generate the stress points assuming 500 MPa yield and X-axis bending
nodes_p = stress_gen(nodes=nodes,
                     forces={
                         'P': sect_props['A'] * 50,
                         'Mxx': 0,
                         'Myy': 0,
                         'M11': 0,
                         'M22': 0
                     },
                     sect_props=sect_props)
print(nodes_p)
#####CALL CROSS SECTION
#Flag = {node, elem, mat, stress, stresspic, coord, constraints, springs, origin, propaxis}
flag = np.array([1, 0, 0, 1, 1, 0, 0, 0, 0, 0])
crossect.crossect(nodes_p, elements, springs, constraints, flag)
plt.show()
# Perform the Finite Strip Method analysis
signature, curve, shapes = strip(props=props,
                                 nodes=nodes_p,
                                 elements=elements,
                                 lengths=lengths,