Research and Prototyping Study of an LLM-Based Chatbot for Electromagnetic Simulations
Albert Piwonski, Mirsad Hadžiefendić
TL;DR
The paper tackles the problem of reducing the time to set up electromagnetic simulations by introducing a chatbot-based workflow that uses Google Gemini 2.0 Flash to automatically generate and execute 2D eddy current models with Gmsh and GetDP, coordinated by Python. It demonstrates architectural extensions for inferring Python and domain-specific language code, including post-processing routines, and a textual summary of outputs, while exploring semantic and syntactic failure modes of the AI workflow. The key contributions include a minimal viable pipeline, DSL and summary generation capabilities with and without exemplars in prompts, and a framework for diagnosing and mitigating failures, all within a non-fine-tuned, prompt-contextualized setting. The work offers practical impact by enabling rapid exploration of conductor geometries and post-processing configurations, while highlighting limitations in automated evaluation and the need for more robust prompt engineering and tool integration.
Abstract
This work addresses the question of how generative artificial intelligence can be used to reduce the time required to set up electromagnetic simulation models. A chatbot based on a large language model is presented, enabling the automated generation of simulation models with various functional enhancements. A chatbot-driven workflow based on the large language model Google Gemini 2.0 Flash automatically generates and solves two-dimensional finite element eddy current models using Gmsh and GetDP. Python is used to coordinate and automate interactions between the workflow components. The study considers conductor geometries with circular cross-sections of variable position and number. Additionally, users can define custom post-processing routines and receive a concise summary of model information and simulation results. Each functional enhancement includes the corresponding architectural modifications and illustrative case studies.
