In an effort to automate the generation of chemical process simulations, this thesis explores the use of generative artificial intelligence to convert natural language descriptions into executable XML simulation files for Aspen HYSYS and DWSIM. A synthetic dataset of heat exchanger simulations was created as paired textual descriptions and simulation-ready XML files. Three state-of-the-art language models (GPT-5, DeepSeek V3.2, and Llama 3.1 8B) were evaluated under zero-shot conditions, few-shot learning strategies, and Low-Rank Adaptation (LoRA) fine-tuning. Results show that baseline models were unable to produce executable simulation files due to the absence of domain-specific structural knowledge. In contrast, few-shot learning significantly improved performance across all datasets. For the Aspen HYSYS dataset, reproducibility scores increased by 46.3 % for GPT-5 and 95.1 % for DeepSeek V3.2, the latter achieving perfect performance across all test cases. Similar improvements were observed in extrapolation scenarios, with gains of 38.9 % and 88.9 %, respectively, confirming strong generalization capabilities when contextual examples are provided. The introduction of a curated HYSYS dataset further enhanced reliability, increasing GPT-5 extrapolation performance by 35.8 % compared with the original dataset, highlighting the critical role of dataset quality in structured code generation tasks. Conversely, LoRA fine-tuning of Llama 3.1 8B yielded only marginal improvement despite dataset refinement, with outputs remaining largely unusable due to repetitive generation loops and missing simulation data. Evaluation on the DWSIM software revealed additional challenges associated with a higher XML structural complexity, showing that simulator architecture influences generative performance. Across all experiments, few-shot learning reproduced learned structural patterns but did not consistently enforce physical plausibility, emphasizing the continued need for human validation in engineering applications.
Nel tentativo di automatizzare la generazione di simulazioni di processo chimico, questa tesi esplora l’utilizzo dell’intelligenza artificiale generativa per convertire descrizioni in linguaggio naturale in file di simulazione XML eseguibili per Aspen HYSYS e DWSIM. È stato creato un dataset sintetico di simulazioni di scambiatori di calore, costituito da coppie di descrizioni testuali e file XML pronti per la simulazione. Tre modelli linguistici di ultima generazione (GPT-5, DeepSeek V3.2 e Llama 3.1 8B) sono stati valutati in condizioni zero-shot, mediante strategie di apprendimento few-shot e tramite fine-tuning con Low-Rank Adaptation (LoRA). I risultati mostrano che i modelli di base non sono stati in grado di produrre file di simulazione eseguibili a causa dell’assenza di conoscenza strutturale specifica del dominio. Al contrario, l’apprendimento few-shot ha migliorato significativamente le prestazioni su tutti i dataset. Per il dataset Aspen HYSYS, i punteggi di riproducibilità sono aumentati del 46,3% per GPT-5 e del 95,1% per DeepSeek V3.2, con quest’ultimo che ha raggiunto prestazioni perfette in tutti i casi di test. Miglioramenti analoghi sono stati osservati negli scenari di estrapolazione, con incrementi rispettivamente del 38,9% e dell’88,9%, confermando solide capacità di generalizzazione quando vengono forniti esempi contestuali. L’introduzione di un dataset HYSYS curato ha ulteriormente incrementato l’affidabilità, aumentando le prestazioni di estrapolazione di GPT-5 del 35,8\% rispetto al dataset originale, evidenziando il ruolo critico della qualità del dataset nei compiti di generazione di codice strutturato. Al contrario, il fine-tuning LoRA del modello Llama 3.1 8B ha prodotto solo miglioramenti marginali nonostante il raffinamento del dataset, con output rimasti in larga parte inutilizzabili a causa di cicli generativi ripetitivi e dati di simulazione mancanti. La valutazione sul software DWSIM ha inoltre evidenziato ulteriori criticità associate a una maggiore complessità strutturale dell’XML, mostrando come l’architettura del simulatore influenzi le prestazioni generative. Nel complesso, gli esperimenti dimostrano che l’apprendimento few-shot è in grado di riprodurre pattern strutturali appresi, ma non garantisce in modo sistematico la plausibilità fisica dei risultati, sottolineando la necessità di una validazione umana nelle applicazioni ingegneristiche.
Generative Artificial Intelligence in chemical engineering: automatic flowsheet simulation generation
D'ALVANO TERAN, GERARDO GIOTTO
2024/2025
Abstract
In an effort to automate the generation of chemical process simulations, this thesis explores the use of generative artificial intelligence to convert natural language descriptions into executable XML simulation files for Aspen HYSYS and DWSIM. A synthetic dataset of heat exchanger simulations was created as paired textual descriptions and simulation-ready XML files. Three state-of-the-art language models (GPT-5, DeepSeek V3.2, and Llama 3.1 8B) were evaluated under zero-shot conditions, few-shot learning strategies, and Low-Rank Adaptation (LoRA) fine-tuning. Results show that baseline models were unable to produce executable simulation files due to the absence of domain-specific structural knowledge. In contrast, few-shot learning significantly improved performance across all datasets. For the Aspen HYSYS dataset, reproducibility scores increased by 46.3 % for GPT-5 and 95.1 % for DeepSeek V3.2, the latter achieving perfect performance across all test cases. Similar improvements were observed in extrapolation scenarios, with gains of 38.9 % and 88.9 %, respectively, confirming strong generalization capabilities when contextual examples are provided. The introduction of a curated HYSYS dataset further enhanced reliability, increasing GPT-5 extrapolation performance by 35.8 % compared with the original dataset, highlighting the critical role of dataset quality in structured code generation tasks. Conversely, LoRA fine-tuning of Llama 3.1 8B yielded only marginal improvement despite dataset refinement, with outputs remaining largely unusable due to repetitive generation loops and missing simulation data. Evaluation on the DWSIM software revealed additional challenges associated with a higher XML structural complexity, showing that simulator architecture influences generative performance. Across all experiments, few-shot learning reproduced learned structural patterns but did not consistently enforce physical plausibility, emphasizing the continued need for human validation in engineering applications.| File | Dimensione | Formato | |
|---|---|---|---|
|
Dalvano_2026_Thesis.pdf
solo utenti autorizzati a partire dal 02/03/2029
Descrizione: Master Thesis of Generative Artificial Intelligence in Chemical Engineering: Automatic Flowsheet Simulation Generation
Dimensione
1.79 MB
Formato
Adobe PDF
|
1.79 MB | Adobe PDF | Visualizza/Apri |
|
Dalvano_2026_Executive Summary.pdf
solo utenti autorizzati a partire dal 02/03/2029
Descrizione: Executive Summary of Generative Artificial Intelligence in Chemical Engineering: Automatic Flowsheet Simulation Generation
Dimensione
372.43 kB
Formato
Adobe PDF
|
372.43 kB | Adobe PDF | Visualizza/Apri |
I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/10589/251995