Abstract:
Integrating existing theories and legacy code into a new platform is a common task in industrial finite element software development. However, this process requires interdisciplinary expertise in legacy-code comprehension, interface adaptation, numerical stability control, and systematic verification, and has long relied on scarce multidisciplinary talents. This study uses a verifiable engineering case to evaluate the feasibility of AI vibe coding for constitutive model integration and implementation, and to present a reproducible workflow together with key numerical correction strategies. Specifically, the integration of Bathe–Ramaswamy plane-stress concrete constitutive model from ADINA into OpenSees is taken as a case study, and an "AI generation–standalone test-driven–progressive iteration" development workflow is proposed. Using an AI coding assistant powered by large language models (e.g., Claude Opus 4.6 via Cursor), we develop an approximately 1,250-line Fortran 90 user-material subroutine for the OpenSees PlaneStressUserMaterial interface and built more than 78 standalone elemental-level tests, together with structural-level validations. The results show that AI can efficiently generate the overall code framework while producing classifiable systematic errors in key numerical details, including boundary conditions for crack-opening/closure transitions, stress–tangent consistency, plane-stress coupling terms, and threshold settings in failure criteria. To address these issues, we further propose and validate several correction strategies, including a progressive mixing scheme, a strain-based crushing criterion, and a lower-bound protection for tensile strength under a biaxial envelope. These strategies ensure the continuity of the post-peak softening branch in uniaxial compression, stabilize the Newton–Raphson iterations, and yield load-carrying capacity and hysteretic responses comparable to those of the reference model in cyclic shear-wall simulations. The total development time is approximately two days, with about 1.2×10
8 tokens consumed and a direct cost of about USD 100. The results indicate that, under strict source-code cross-checking and test-first verification regime, AI vibe coding can substantially reduce the manpower and time costs of constitutive integration. The categorized error patterns and numerical correction strategies reported in this study provide a reproducible engineering methodology for similar industrial finite element software development tasks.