Engineers widely rely on simulation platforms like COMSOL or ANSYS to model and optimise processes. However, setting up such simulations requires expertise in defining geometry, generating meshes, establishing boundary conditions, and configuring solvers. This research aims to simplify this process by enabling engineers to describe their setup in plain language, allowing a Large Language Model (LLM) to generate the necessary input files for their specific application. This novel approach allows establishing a direct link between natural language and complex engineering tasks. Building on previous work that evaluated various LLMs for generating input files across simple and complex geometries, this study demonstrates that small LLMs - specifically, Phi-3 Mini and Qwen-2.5 1.5B - can be fine-tuned to generate precise engineering geometries in GMSH format. Through Low-Rank Adaptation (LoRA), we curated a dataset of 480 instruction-output pairs encompassing simple shapes (squares, rectangles, circles, and half circles) and more complex structures (I-beams, cylindrical pipes, and bent pipes). The fine-tuned models produced high-fidelity outputs, handling routine geometry generation with minimal intervention. While challenges remain with geometries involving combinations of multiple bodies, this study demonstrates that fine-tuned small models can outperform larger models like GPT-4o in specialised tasks, offering a precise and resource-efficient alternative for engineering applications.
翻译:工程师广泛依赖COMSOL或ANSYS等仿真平台进行过程建模与优化。然而,搭建此类仿真需要具备定义几何、生成网格、设定边界条件和配置求解器的专业知识。本研究旨在通过让工程师用自然语言描述其配置,使大型语言模型(LLM)能够为其特定应用生成必要的输入文件,从而简化这一过程。这种新颖方法在自然语言与复杂工程任务之间建立了直接联系。基于先前评估各种LLM在简单和复杂几何中生成输入文件的研究,本研究表明小型LLM——特别是Phi-3 Mini和Qwen-2.5 1.5B——可以通过微调生成GMSH格式的精确工程几何。通过低秩自适应(LoRA)方法,我们构建了包含简单形状(正方形、矩形、圆形和半圆形)和复杂结构(工字梁、圆柱管和弯管)的480个指令-输出对数据集。微调后的模型能生成高保真输出,以最小干预处理常规几何生成。尽管在多体组合几何方面仍存在挑战,但本研究表明微调后的小型模型在特定任务中能超越GPT-4o等大型模型,为工程应用提供了精确且资源高效的替代方案。