The push towards the decarbonization is not reducing the importance of the natural gas in the Italian and European fuel mix, because it is the fossil fuel with the lowest environmental impact. For this reason, the optimization of the Italian transport network is crucial not only to guarantee a reliable energy source, but also to reduce its economic and environmental cost. This thesis lays the foundations for a long-term collaboration between Politecnico di Milano and Snam, the Italian transmission system operator. In this work, a Modelica package that contains models for the simulation of the network components, such as pipes, compressor stations, and control valves, has been developed. This language allows to build a set of components that, thanks to the object-oriented approach, can be easily employed in different simulations and with various purposes. Afterwards, a Python script has been realized. It collects the files provided by Snam and parses them, storing in a graph the information about the network components and configuration, the machines statuses and set-points, and the pressures and flow-rates at the nodes. Then, the script can simplify the graph, keeping only the fundamental components and merging the series of pipes with similar geometrical features. Finally, it can generate the Modelica model that represents the network. The result is a toolchain, based only on open-source software, that is able to generate a fully customizable Modelica model and the relative map for the network visualization. This can be considered as the first step of the wider process that will lead to the development of an optimization suite based on dynamic optimization algorithms, e.g. MILP.

La spinta verso la decarbonizzazione non sta diminuendo l'importanza del gas naturale nel mix energetico italiano ed europeo, dato che questo è il combustibile fossile con il minor impatto ambientale. Per questa ragione, l’ottimizzazione della rete di trasporto italiana è cruciale non solo per garantire una fonte di energia affidabile, ma anche per ridurre il suo costo economico e ambientale. Questa tesi getta le basi per una collaborazione a lungo termine tra il Politecnico di Milano e Snam, il gestore del sistema di trasporto italiano. In questo lavoro è stato sviluppato un pacchetto Modelica che contiene i modelli per la simulazione dei componenti della rete, come tubi, stazioni di compressione e valvole di controllo. Questo linguaggio permette di costruire una serie di componenti che, grazie all’approccio object-oriented, possono essere facilmente impiegati in diverse simulazioni e con vari scopi. Inoltre, è stato sviluppato uno script Python che raccoglie i file forniti da Snam e li tratta salvando in un grafo le informazioni sui componenti e sulla configurazione della rete, sugli stati e set-point delle macchine, sulle pressioni e portate nei nodi. Quindi, questo script è in grado di semplificare questo grafo, conservando solo i suoi componenti fondamentali e unendo le serie di tubi con caratteristiche geometriche simili. Infine, può generare il modello Modelica che rappresenta la rete. Il risultato è un pacchetto di strumenti, basati solo su software open-source, che è in grado di generare un modello Modelica completamente personalizzabile e la relativa mappa per la rappresentazione della rete. Questo può essere considerato come il primo passo per un processo più grande che porterà allo sviluppo di una suite di ottimizzazione basata su algoritmi di ottimizzazione dinamica, ad esempio MILP.

Object-oriented modelling and simulation of the Italian gas network

Bosotti, Simone
2019/2020

Abstract

The push towards the decarbonization is not reducing the importance of the natural gas in the Italian and European fuel mix, because it is the fossil fuel with the lowest environmental impact. For this reason, the optimization of the Italian transport network is crucial not only to guarantee a reliable energy source, but also to reduce its economic and environmental cost. This thesis lays the foundations for a long-term collaboration between Politecnico di Milano and Snam, the Italian transmission system operator. In this work, a Modelica package that contains models for the simulation of the network components, such as pipes, compressor stations, and control valves, has been developed. This language allows to build a set of components that, thanks to the object-oriented approach, can be easily employed in different simulations and with various purposes. Afterwards, a Python script has been realized. It collects the files provided by Snam and parses them, storing in a graph the information about the network components and configuration, the machines statuses and set-points, and the pressures and flow-rates at the nodes. Then, the script can simplify the graph, keeping only the fundamental components and merging the series of pipes with similar geometrical features. Finally, it can generate the Modelica model that represents the network. The result is a toolchain, based only on open-source software, that is able to generate a fully customizable Modelica model and the relative map for the network visualization. This can be considered as the first step of the wider process that will lead to the development of an optimization suite based on dynamic optimization algorithms, e.g. MILP.
MARTELLI, EMANUELE
ING - Scuola di Ingegneria Industriale e dell'Informazione
28-apr-2021
2019/2020
La spinta verso la decarbonizzazione non sta diminuendo l'importanza del gas naturale nel mix energetico italiano ed europeo, dato che questo è il combustibile fossile con il minor impatto ambientale. Per questa ragione, l’ottimizzazione della rete di trasporto italiana è cruciale non solo per garantire una fonte di energia affidabile, ma anche per ridurre il suo costo economico e ambientale. Questa tesi getta le basi per una collaborazione a lungo termine tra il Politecnico di Milano e Snam, il gestore del sistema di trasporto italiano. In questo lavoro è stato sviluppato un pacchetto Modelica che contiene i modelli per la simulazione dei componenti della rete, come tubi, stazioni di compressione e valvole di controllo. Questo linguaggio permette di costruire una serie di componenti che, grazie all’approccio object-oriented, possono essere facilmente impiegati in diverse simulazioni e con vari scopi. Inoltre, è stato sviluppato uno script Python che raccoglie i file forniti da Snam e li tratta salvando in un grafo le informazioni sui componenti e sulla configurazione della rete, sugli stati e set-point delle macchine, sulle pressioni e portate nei nodi. Quindi, questo script è in grado di semplificare questo grafo, conservando solo i suoi componenti fondamentali e unendo le serie di tubi con caratteristiche geometriche simili. Infine, può generare il modello Modelica che rappresenta la rete. Il risultato è un pacchetto di strumenti, basati solo su software open-source, che è in grado di generare un modello Modelica completamente personalizzabile e la relativa mappa per la rappresentazione della rete. Questo può essere considerato come il primo passo per un processo più grande che porterà allo sviluppo di una suite di ottimizzazione basata su algoritmi di ottimizzazione dinamica, ad esempio MILP.
File allegati
File Dimensione Formato  
Bosotti-Simone-905728.pdf

non accessibile

Descrizione: Tesi Magistrale
Dimensione 9.9 MB
Formato Adobe PDF
9.9 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/173389