Large language models help build open electrochemical device simulations
LLM-Assisted Generation of Transparent, Open-Source Multiphysics Models of Electrochemical Devices
Artificial Intelligence
Summary
It can be hard to build detailed computer models that show how electrochemical devices work inside, like predicting how chemicals move or react. The authors show that advanced language models can read clear, human-written descriptions of the physics and automatically create these complex simulations using open-source software. Their method matches results from established commercial software closely and helps spot and fix mistakes in the models. This makes transparent and accessible tools for device simulation possible without needing advanced coding skills.
What this means in practice
- •For electrochemical engineers: Build transparent and customizable simulations of electrochemical reactors without deep numerical programming experience.
- •For software engineers in scientific computing: Automate generation of multiphysics numerical models from human-readable physics specifications using large language models.
Authors
Sebastian Castro, Maya F. Schuchert, Spencer A. McCluskey, Eric W. Lees, Justin C. Bui
Abstract
Multiphysics continuum models are powerful tools for studying electrochemical devices, enabling in silico reactor design and resolution of local pH, potential, and concentration fields that govern device performance but are difficult to measure experimentally. However, constructing such models requires substantial numerical expertise or reliance on proprietary software. Here, we show that frontier large language model agents can remove this implementation burden while keeping the underlying physics under researcher control. Using one-dimensional electrochemical CO2 reduction to CO in a porous gas diffusion electrode as a test case, we develop a machine-readable, human-specified modeling harness containing governing equations, parameters, numerical methods, logical build stages, and human-verifiable checkpoints. From this specification, the agent reproducibly constructs complete multiphysics models in open-source Julia. Independently built models, including fully autonomous agent-built models, agree with an equivalent COMSOL implementation to within 0.7% of the peak CO partial current density, and with one another to within 0.04%. Systematically planted errors demonstrate the importance of explicit specifications for reproducibility and reveal the agent's capabilities and limitations in debugging model physics. This framework establishes a more transparent approach to multiphysics modeling in which physical descriptions and governing equations, rather than specialized code, become the primary inputs for computational model development.