From Text to Tech: Sketch- and Language-Driven Physics-Based Simulation with LLMs

O. Shafiq1
1University of Birmingham
Published in 2026

COMSOL Multiphysics® and similar platforms give engineers powerful tools to model and optimise processes. COMSOL has begun building Large Language Model (LLM) assistance directly into that workflow, its Chatbot window generates and debugs COMSOL API code from natural-language prompts, and in recent versions consults the COMSOL documentation to ground its answers. Even so, setting up a simulation remains complex: you need to create the geometry, generate a mesh, define boundary conditions, and configure the solver, each step requiring expertise in specialised software. Our goal is to make this process easier. Instead of manually creating input files, engineers describe their setup in plain language, and a LLM generates the necessary files for the simulation software. This shifts the focus from learning complex tools to defining the problem, whether it's a reactor, a pipeline, or a mixing vessel, while the LLM handles the technical details. To test this approach, we evaluated LLMs on their ability to generate input files for both simple and complex geometries. Larger models performed well out of the box, but smaller models, when fine-tuned with domain-specific data such as geometry templates, produced comparable or even better results. We also explored using additional inputs, such as sketches to further improve accuracy through two routes; (1) fine-tuning a vision-language model to interpret a drawing directly, (2) a fixed base model paired with a CLIP model that retrieves the closest-matching geometry templates as context. This Retrieval-Augmented Generation (RAG) route is conceptually parallel to COMSOL's documentation-aware Chatbot but is applied to sketches and geometry. Together, this points toward a path from a plain-language description or a rough sketch to a simulation-ready geometry, and suggests how sketch-driven, RAG could extend the kind of LLM assistance now emerging inside COMSOL Multiphysics®.

Download