Use ChatGPT to write and debug structural-analysis code

Civil Engineering   |   External institution

After learning Python fundamentals, students ask an AI tool to create code for a structural-analysis problem, test the program, and debug it until it works. A written reflection asks them to evaluate the tool’s effectiveness, limitations, and influence on their learning process.

See how it works

In Cal Poly’s ARCE 352 Structural Computing I laboratory, students first learn Python and write several structural-analysis programs themselves. They then use ChatGPT or another AI platform to generate code for an application such as shear-moment diagrams, truss analysis, or beam-column deflection. Students run and debug the program, assess the quality of the result, and write about the strategies they used and the tool’s limitations. They also compare their original reflection with an AI-rewritten version, adding a second opportunity to examine what AI changes and what human judgment contributes.

Source: ASEE structural-computing study