Rethinking Scientific Modeling: Toward Physically Consistent and Simulation-Executable Programmatic Generation
Yongqing Jiang, Jianze Wang, Zhiqi Shen, Zhenghong Lin, Jiayuan Wang, Yijian Yang, Kaoshan Dai, Haoran Luo
TL;DR
AutoBM targets turning natural-language building requirements into executable, physically consistent structural modeling code. It couples a domain-specific data pipeline (CivilInstruct) with a two-stage, physics-constrained RL alignment (Stage I SFT followed by Stage II SPC-GRPO) and a physics-aware evaluation benchmark (BMEval). The approach explicitly optimizes executability, structural physics, and design compliance, achieving improvements on Pass@k metrics and reducing physics illusions. This work provides a practical pathway for simulation-ready program generation in civil engineering and establishes a framework for physics-guided code synthesis in domain-specific automation.
Abstract
Structural modeling is a fundamental component of computational engineering science, in which even minor physical inconsistencies or specification violations may invalidate downstream simulations. The potential of large language models (LLMs) for automatic generation of modeling code has been demonstrated. However, non-executable or physically inconsistent outputs remain prevalent under stringent engineering constraints. A framework for physics-consistent automatic building modeling is therefore proposed, integrating domain knowledge construction, constraint-oriented model alignment, and verification-driven evaluation. CivilInstruct is introduced as a domain-specific dataset that formalizes structural engineering knowledge and constraint reasoning to enable simulation-ready model generation. A two-stage fine-tuning strategy is further employed to enforce constraint satisfaction and application programming interface compliance, substantially reducing hallucinated and non-conforming outputs. MBEval is presented as a verification-driven benchmark that evaluates executability and structural dynamics consistency through closed-loop validation. Experimental results show consistent improvements over baselines across rigorous verification metrics. Our code is available at https://github.com/Jovanqing/AutoBM.
