<< back to list of programming projects
Check out the structural engineering part of the project >>
As part of my masters thesis on optimization of lateral systems, I developed a MATLAB code that auto-generates structural models on SAP2000 by Computers and Structures Inc using the software's API. Please read the structural engineering portion of the project linked above if you're interested in learning about lateral systems in buildings.
The CSI Open Application Programming Interface (OAPI) is utilized to assemble and run SAP2000 commands through MATLAB scripts. This enables an iterative design process, where structural design parameters are incrementally changed, and the structural model is analyzed for each incremental change. When first initialized, the primary MATLAB script, which serves as the main link between the user and SAP2000’s OAPI function, prompts the user to input various basic design parameters such as material definitions, building height and shear wall thickness. Based on this, the code generates the general building parameters. Next, he program next initializes a separate MATLAB function, named BuildingGeometry, to create the geometric layout of the building based on the user input. The BuildingGeometry script starts by assigning joint labels along the x and y directions. Next, the code assigns bay labels based on the joint labels assigned earlier. Finally, SAPAPI initiates the model formulation process using the output from BuildingGeometry. Once SAPAPI is run, the main script retrieves the necessary data and creates a results matrix, which is the graphically presented to the user using the plotter script.
A flowchart for the codes, along with the codes themselves are provided below.
Copyright © 2022 Nablul - All Rights Reserved.