# %% # Generate a mesh geom.create_mesh([1]) sec = Section(geom) sec.plot_mesh(materials=False) # %% # Conduct a geometric & plastic analysis sec.calculate_geometric_properties() sec.calculate_plastic_properties() sec.plot_centroids() # %% # Display the geometric & plastic properties sec.display_results() # %% # Load a geometry with multiple holes from a dxf file geom = Geometry.from_dxf(dxf_filepath="files/section_holes_complex.dxf") geom.plot_geometry() # %% # Generate a mesh geom.create_mesh([1]) sec = Section(geom) sec.plot_mesh(materials=False) # %% # Conduct a geometric & plastic analysis sec.calculate_geometric_properties()
# %% # Create a 50 diameter circle discretised by 64 points geometry = sections.circular_section(d=50, n=64) geometry.plot_geometry() # %% # Create a mesh with a mesh size of 2.5 and display information about it geometry.create_mesh(mesh_sizes=[2.5]) section = Section(geometry, time_info=True) section.display_mesh_info() section.plot_mesh() # %% # perform a geometric, warping and plastic analysis, displaying the time info section.calculate_geometric_properties() section.calculate_warping_properties() section.calculate_plastic_properties() # %% # Print the results to the terminal section.display_results() # %% # Get and print the second moments of area and the torsion constant (ixx_c, iyy_c, ixy_c) = section.get_ic() j = section.get_j() print("Ixx + Iyy = {0:.3f}".format(ixx_c + iyy_c)) print("J = {0:.3f}".format(j))
# Plot the mesh with coloured materials and a line transparency of 0.6 comp_section.plot_mesh(materials=True, alpha=0.6) # %% # Perform a geometric, warping and plastic analysis comp_section.calculate_geometric_properties() comp_section.calculate_warping_properties() comp_section.calculate_plastic_properties(verbose=True) # %% # Perform a stress analysis with N = 100 kN, Mxx = 120 kN.m and Vy = 75 kN stress_post = comp_section.calculate_stress(N=-100e3, Mxx=-120e6, Vy=-75e3) # %% # Print the results to the terminal comp_section.display_results() # %% # Plot the centroids comp_section.plot_centroids() # %% # Plot the axial stress stress_post.plot_stress_n_zz(pause=False) # %% # Plot the bending stress stress_post.plot_stress_m_zz(pause=False) # %% # Plot the shear stress