# name
Development of a Python tool for the automated resolution of material balances

# metadata.dc.description[].value
Treballs Finals de Grau d'Enginyeria Química, Facultat de Química, Universitat de Barcelona, Curs: 2024-2025, Tutor:Alberto Cruz Alcalde

# metadata.dc.description.abstract[].value
Macroscopic mass balances are a fundamental tool in chemical engineering for analyzing and designing processes efficiently. They constitute the first stage to be analysed in the study of chemical processes. These balances can be formulated as global balances (considering all components together) or component-wise balances, incorporating accumulation, inputs, outputs, and generation terms. Their resolution depends on factors such as the presence of chemical reactions, steady or unsteady-state conditions, and whether the process is continuous or batch.
Traditionally, these calculations are performed manually or using spreadsheets, which can be inefficient tedius, as each type of problem requires setting up a new sheet. This approach is also prone to errors, especially in complex systems involving multiple streams, recirculations, or chemical reactions. More advanced programs like Aspen offer powerful capabilities but often require numerous parameters and physical properties that may not always be available.
Moreover, for preliminary calculations, such a level of detail may be unnecessary. To address these limitations and offer an intermediate solution, this project aims to develop a Python-based computational tool that automates the resolution of steady-state macroscopic mass balances for continuous processes using a sequential solving approach. The tool handles three types of process blocks: reactors (with reactions and generation terms),
separators (input-output only), and splitters (used for recirculations and purges, imposing composition equality). The algorithm allows users to draw the process diagram, input the data into a table, and iteratively solve the blocks using pre-programmed calculation rules until convergence is reached. The final output is a completed table showing the resulting flows and compositions.
The tool has been validated through classical case studies in chemical engineering introductory courses, comparing results with manual calculations and evaluating computational efficiency and accuracy. This project seeks to provide a practical and reliable solution to facilitate mass balance calculations, enhancing their applicability in both academic and industrial contexts

# metadata.dc.source[].value
Treballs Finals de Grau (TFG) - Enginyeria Química

# metadata.dc.title[].value
Development of a Python tool for the automated resolution of material balances