This study presents TeS v.3, a thermodynamic equilibrium simulator integrated with an artificial intelligence agent (AI), ThermoAgent, to enhance the analysis of complex chemical systems. Developed in Python, the simulator employs Gibbs energy minimization for isothermal reactors and entropy maximization for adiabatic reactors. ThermoAgent leverages the LangChain framework to interpret natural language commands, autonomously execute simulations, and query a scientific knowledge base through a Retrieval-Augmented Generation (RAG) approach. The validation of TeS v.3 demonstrated high accuracy, with coefficients of determination (R2 > 0.95) compared to reference simulation data and strong correlation (R2 > 0.88) with experimental data from the steam methane reforming (SMR) process. The SMR analysis correctly distinguished the high conversions in isothermal reactors from the limited conversions in adiabatic reactors, due to the reaction temperature drop. ThermoAgent successfully executed simulations and provided justified analyses, combining generated data with information from reference publications. The successful integration of the simulator with the AI agent represents a significant advancement, offering a powerful tool that accurately calculates equilibrium and accelerates knowledge extraction through intuitive interaction.
This work aims to present tes-thermo, a Python library developed to solve thermodynamic equilibrium problems using the Gibbs energy minimization approach. The library is a variant of TeS v.3, a standalone executable developed for the same purpose. The tool formulates the chemical equilibrium problem of combined phases as a nonlinear programming problem, implemented using Pyomo (Python Optimization Modeling Objects) and solved with IPOPT (Interior Point OPTimizer). To validate the tool and demonstrate its robustness, the supercritical water gasification (SCWG) of methanol and ethanol was investigated. The Peng–Robinson equation of state was employed to account for non-idealities in the gas phase. Experimental and simulated data from the literature were used for validation, and, in both cases, the results were satisfactory, with root mean square errors consistently below 0.23. The SCWG processes studied revealed that hydrogen production is favored by increasing temperature and decreasing pressure. For both methanol and ethanol, increasing the carbonaceous substrate fraction in the feed promotes hydrogen formation; however, it also leads to reduced hydrogen relative yield due to the enhanced formation of methane and carbon monoxide under these conditions. Consequently, although hydrogen production increases, the hydrogen molar fraction in the dry gas stream tends to decrease with the higher substrate content. As expected, the SCWG of methanol produces more hydrogen and less carbon monoxide compared to ethanol under similar conditions. This behavior is consistent with the higher carbon content in ethanol, which favors reactions leading to carbon oxides. In summary, tes-thermo proves to be a robust and reliable tool for conducting research and studies on topics related to thermodynamic equilibrium.