sgs[3] = ab.Segment(3, 4, 1) sgs[4] = ab.Segment(4, 5, 1) sgs[5] = ab.Segment(3, 6, 1) sgs[6] = ab.Segment(1, 7, 1) sgs[7] = ab.Segment(7, 8, 1) sgs[8] = ab.Segment(8, 9, 1) sgs[9] = ab.Segment(9, 10, 1) sgs[10] = ab.Segment(8, 6, 1) # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate section properties sc.calculate_properties() # Plot the section ab.plot_section(sc, segment_coord=True, title='Abdbeam - Megson Example') #Create load case and calculate its internal loads: sc.loads[1] = ab.Load(Vz_s=100000) sc.calculate_internal_loads() ab.plot_section_loads(sc, 1, segment_contour=False, diagram=True, diagram_contour=True, diagram_alpha=1.0, contour_levels=20, contour_color='coolwarm', diagram_factor_list=[1, 1, -1, -1, 1, -1, -1, 1, 1, -1], thickness=False, int_load_list=['Nxy'], title_list=['Nxy (N/mm)'])
sgs[5] = ab.Segment(4, 5, 1) sgs[6] = ab.Segment(5, 6, 1) sgs[7] = ab.Segment(6, 1, 1) # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate and output section properties sc.calculate_properties() sc.summary() # Create and calculate internal loads sc.loads = dict() sc.loads[101] = ab.Load(My=5e6) sc.loads[102] = ab.Load(Tx=250000, Vz=5000.0) sc.calculate_internal_loads() # Access Pandas dataframe with internal loads df = sc.sgs_int_lds_df # Plot the section and its properties ab.plot_section(sc, segment_coord=True, title='Abdbeam - Example', legend=False, prop_color='#471365', figsize=(5.12, 3.84)) # Plot Nx and Nxy internal loads for case 101 ab.plot_section_loads(sc, 101, contour_color='viridis', diagram_scale=0.7, int_load_list=['Nx', 'Nxy'], figsize=(5.12, 3.84))
sgs[13] = ab.Segment(13, 14, 2, 'Top 3') sgs[14] = ab.Segment(14, 15, 1, 'Top 4') sgs[15] = ab.Segment(15, 16, 1, 'Top 5') sgs[21] = ab.Segment(1, 11, 4, 'Web 1') sgs[22] = ab.Segment(2, 12, 3, 'Web 2') sgs[23] = ab.Segment(3, 13, 2, 'Web 3') sgs[24] = ab.Segment(4, 14, 2, 'Web 4') sgs[25] = ab.Segment(5, 15, 1, 'Web 5') sgs[26] = ab.Segment(6, 16, 1, 'Web 6') # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate section properties sc.calculate_properties() # Plot the section ab.plot_section(sc, centroid=False, princ_dir=False, thickness=False, segment_coord=True, title='Abdbeam - Bruhn Example') #Create load case and calculate its internal loads: sc.loads[1] = ab.Load(Vz_s=1000) sc.calculate_internal_loads() # Print the shear flows Nxy for all segments df = sc.sgs_int_lds_df print(df[[('Segment_Id', ''), ('Nxy', 'Avg')]]) # Print the shear center location print('') print('Shear center is at y = {:.8e}'.format(sc.ys))
sgs[12] = ab.Segment(7, 8, 3, 'Hat_Top') sgs[13] = ab.Segment(8, 9, 2, 'Hat_Right_Web') sgs[14] = ab.Segment(9, 10, 2, 'Hat_Right_Foot') sgs[91] = ab.Segment(1, 5, 4, 'Connector_1') sgs[92] = ab.Segment(2, 6, 4, 'Connector_1') sgs[93] = ab.Segment(3, 9, 4, 'Connector_1') sgs[94] = ab.Segment(4, 10, 4, 'Connector_1') # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate section properties sc.calculate_properties() sc.summary() # Plot the section ab.plot_section(sc, filter_sgs=[91, 92, 93, 94], title='Abdbeam - Hat Example', prop_color='#471365') # Create load cases and calculate their internal loads sc.loads[1] = ab.Load(My=100, Vy_s=1000) sc.loads[2] = ab.Load(Tx=100) sc.calculate_internal_loads() # Plot internal loads ab.plot_section_loads(sc, 1, contour_color='viridis', result_sgs=[10, 11, 12, 13, 14], figsize=(6.4 * 0.8, 4.8 * 0.8), diagram_scale=0.5, filter_sgs=[91, 92, 93, 94])
mts[1].plies = [[0, 1]] * 10 + [[45, 1]] * 10 mts[1].symmetry = 'T' # Create a points dictionary based on Y and Z point coordinates: pts = dict() pts[1] = ab.Point(-0.025, -0.035) pts[2] = ab.Point(0.025, -0.035) pts[3] = ab.Point(0.025, 0.035) pts[4] = ab.Point(-0.025, 0.035) # Create a segments dictionary referencing point and material ids: sgs = dict() sgs[1] = ab.Segment(1, 2, 1) sgs[2] = ab.Segment(2, 3, 1) sgs[3] = ab.Segment(3, 4, 1) sgs[4] = ab.Segment(4, 1, 1) # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate and output section properties sc.calculate_properties() sc.summary() ab.plot_section(sc, segment_coord=True, figsize=(6.4 * 0.8, 4.8 * 0.8)) # Create a single load case and calculate its internal loads sc.loads[1] = ab.Load(Px=200, Mz=10, Vz_s=-100) sc.calculate_internal_loads() # Plot internal loads ab.plot_section_loads(sc, 1, int_load_list=['Nx', 'Nxy'], title_list=['Abdbeam - Nx (N/m)', 'Abdbeam - Nxy (N/m)'], figsize=(6.4 * 0.8, 4.8 * 0.8))
0.801) mts[1].plies = [[0, 2], [0, 2], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1], [0, 1]] mts[1].symmetry = 'S' # Create a points dictionary based on Y and Z point coordinates: pts = dict() pts[1] = ab.Point(0.0, 0.0) pts[2] = ab.Point(0.049, 0.0) pts[3] = ab.Point(0.049, 0.062) pts[4] = ab.Point(0.0, 0.062) # Create a segments dictionary referencing point and material ids: sgs = dict() sgs[1] = ab.Segment(1, 2, 1) sgs[2] = ab.Segment(2, 3, 1) sgs[3] = ab.Segment(3, 4, 1) # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate and output section properties sc.calculate_properties() sc.summary() ab.plot_section(sc, figsize=(6.4 * 0.8, 4.8 * 0.8)) # Create a single load case and calculate its internal loads sc.loads[1] = ab.Load(Vz_s=-100) sc.calculate_internal_loads() # Plot internal loads ab.plot_section_loads(sc, 1, int_load_list=['Nxy'], title_list=['Abdbeam - Nxy (N/m)'], figsize=(6.4 * 0.8, 4.8 * 0.8))
sgs[39] = ab.Segment(39, 40, 1, 'Rear Spar') sgs[91] = ab.Segment(2, 22, 2, 'Connector') sgs[92] = ab.Segment(3, 32, 2, 'Connector') sgs[93] = ab.Segment(4, 34, 2, 'Connector') sgs[94] = ab.Segment(25, 12, 2, 'Connector') sgs[95] = ab.Segment(37, 13, 2, 'Connector') sgs[96] = ab.Segment(39, 14, 2, 'Connector') # Point the dictionaries to the section sc.materials = mts sc.points = pts sc.segments = sgs # Calculate section properties sc.calculate_properties() # Plot the section ab.plot_section(sc, pt_size=2, title='Abdbeam - Torque-box Example', figsize=(6.4 * 1.5, 4.8 * 1.5)) # Create load cases and calculate their internal loads sc.loads[8] = ab.Load(Px=17085, My=-140914, Mz=-7208, Tx=1595, Vy=4727, Vz=-1661) sc.loads[4] = ab.Load(Px=11854, My=-89211, Mz=-33716, Tx=-57488, Vy=5684, Vz=394) sc.loads[1] = ab.Load(Px=2395,