Please use this identifier to cite or link to this item: https://hdl.handle.net/2445/222327
Title: Development of a Python tool for the automated resolution of material balances
Author: Pradas Aguarón, Mar
Director/Tutor: Cruz Alcalde, Alberto
Keywords: Python (Llenguatge de programació)
Balanç de massa macroscòpic
Treballs de fi de grau
Python (Computer program language)
Macroscopic mass balance
Bachelor's theses
Issue Date: Jun-2025
Abstract: 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
Note: Treballs Finals de Grau d'Enginyeria Química, Facultat de Química, Universitat de Barcelona, Curs: 2024-2025, Tutor:Alberto Cruz Alcalde
URI: https://hdl.handle.net/2445/222327
Appears in Collections:Treballs Finals de Grau (TFG) - Enginyeria Química

Files in This Item:
File Description SizeFormat 
TFG PRADAS AGUARON, MAR 24-25.pdf2.8 MBAdobe PDFView/Open


This item is licensed under a Creative Commons License Creative Commons