1 of 21

QSU2: A QGIS Processing Plugin to Prepare the SU2 Files for CFD Simulations

Monday, 30 September 2024

Marios Kyriakou, Nearchos Stylianidis, Demetris Eliades

University of Cyprus, KIOS CoE

Funded by:

www.kios.ucy.ac.cy

2 of 21

Introduction

  • KIOS Research and Innovation Center of Excellence (KIOS CoE) has extensive knowledge and expertise in Smart Water Systems and has led several important projects related to water contamination risk assessment and emergency response.
  • One of these projects is Horizon 2020 Pathogen Contamination Emergency Response Technologies (PathoCERT) in which different tools have been developed for situational awareness and response to contamination events.
  • Pathogen Contamination Investigation Digital Twin (PathoINVEST) has won the "Digital Water Award 2024" by Water Innovation Europe
  • Q(GIS)-SU2 Dynamic Coupling Architecture is incorporated in PathoINVEST and used for the preparation and implementation of the boundary conditions into the  SU2 model.
  • This architecture has been tested as part of the PathoCERT project and applied to simulate water pollution in the Pancharevo Dam in Sofia, Bulgaria, and the Germasogeia Dam in Limassol, Cyprus.

2

www.kios.ucy.ac.cy

3 of 21

Aim-Objective

  • Aim: Development of a user-friendly coupling architecture that enables the fast and efficient preparation of accurate and reliable mesh and boundary files through QGIS, allowing seamless integration into the SU2 software.
  • Objectives:
    • Development of QGIS Processing Plugin for the preparation of the boundary & mesh files.
    • Testing and validation of SU2 against real case
    • Useful for emergency response and rapid risk assessment.
    • QSU2 can be integrated as part of a digital twin solution.

3

www.kios.ucy.ac.cy

4 of 21

System Architecture

4

SU2 Files Preparation

Simulation

Results Analysis

The system architecture consists of three different sub-systems:

    • First, the required boundary and mesh files are prepared in QGIS using the QSU2 Plugin
    • Second, the files are transferred to SU2 which run till the solution is converged
    • The results are post-processed, exported as vectors, images and animation files and analyzed

www.kios.ucy.ac.cy

5 of 21

What is GIS

Geographic Information Systems​

A spatial system designed to create, store, manipulate, analyse, manage, and maps all types of data.

Using Google Maps

- Directions (mobile maps)

5

Longitude

Latitude

Topic

Date

26.870436

-31.909519

Contamination

20/09/2024

26.868682

-31.909259

Leakage

10/09/2024

www.kios.ucy.ac.cy

6 of 21

What is QGIS

  • GIS software
  • Many different GIS Applications available (arcgis, e.g.)

Some cost tens of thousands

  • QGIS is completely FREE and you can copy and share it
  • If you need extra/custom functionality, you can use or create a plugin!
  • It’s constantly developing (version 3.38)
  • Extensive help and documentation online
  • Cross-platform (Windows, Linux, macOS)

Download https://qgis.org/en/site/forusers/download.html

www.kios.ucy.ac.cy

7 of 21

QSU2 Plugin

  • Open source QGIS processing Plugin
  • Developed by KIOS CoE for the purposes of PathoCERT project
  • Integrated in PathoINVEST
  • Efficient preparation of mesh and boundary files for SU2 using geographical data
  • Has more than 500 downloads at the time

7

www.kios.ucy.ac.cy

8 of 21

QSU2 – Processing Toolbox

8

  • User-friendly and accessible Processing Toolbox
  • Allows the user to easily create the mesh and export boundary files, run the simulation and visualize the solution

www.kios.ucy.ac.cy

9 of 21

QSU2 Functionalities - Load GIS Data

9

  • Loading of GIS map data for the dam/river/lake
  • Figure shows an example of the Germasogia dam in Limassol, Cyprus
  • Important for exporting accurate geometrical information of the domain

www.kios.ucy.ac.cy

10 of 21

QSU2 Functionalities – Mesh Layer Creation

10

  • Import the geometrical layer loaded from GIS (Input Layer)
  • Choose your preferable number of nodes and perform the mesh operation
  • For example, for the Germasogia dam, images on the right side, 100,000 nodes have been selected

www.kios.ucy.ac.cy

11 of 21

QSU2 Functionalities – Inlet/Outlet Boundaries Layers Creation

  • Choose the location of the inlet and outlet boundaries on the created mesh file
  • Design the shape of both inlet and outlet boundaries on the map
  • Perform the create boundaries operation
  • An example is presented in the figure for Germasogia dam:
    • Inlet Layer
    • Outlet Layer

11

Inlet

Outlet

www.kios.ucy.ac.cy

12 of 21

QSU2 Functionalities – Mesh & Boundary files Export

12

User can easily export the files and save them in the directory of his preference to be used by the SU2 simulation

www.kios.ucy.ac.cy

13 of 21

QSU2 Functionalities – Run SU2 Simulation

13

  • Easy running and checking the progress of the SU2 simulation by following two steps: �
    1. Select the executable, input and configuration files through the Parameters tab, and select run

    • Check the simulation progress, duration and timestep size through the log tab

www.kios.ucy.ac.cy

14 of 21

QSU2 Functionalities – Results Post-Processing and Visualization

14

  • Results Post-Processing includes:�
    1. Selection of the .csv results file at the preferable timestep

    • Selecting the parameter of interest to be plotted

    • Perform operation Results Visualization

www.kios.ucy.ac.cy

15 of 21

QSU2 Functionalities – GIF Animation File Creation

15

  • The plugin allows also the creation of an animation GIF file by:
    • Selection of the directory of the results files
    • Choose the parameter of interest
    • Choose the duration period (ms)
    • Execute the operation

www.kios.ucy.ac.cy

16 of 21

Use Cases from PathoCERT Project

  • Scenario 1: In Germasogia dam a tanker truck with unknown liquid cargo, possibly contaminated with sewerage, falls into the reservoir after a collision with another vehicle. Its content is released in the water. First responders need to Search and Rescue for survivors
  • Scenario 2: A contamination event is occurring in Pancharevo dam, due to flooding of sewage water.

16

Scenario 1

Scenario 2

www.kios.ucy.ac.cy

17 of 21

SU2 Methodology – Sub-models

  • k − ω SST Turbulence model
  • Incompressible flow
  • Pollutant: Flour
  • Solver: Incompressible- RANS
  • Multiple Species (Water and Pollutant)
  • Numerical Method Gradient: Weighted Least Squares
  • Mesh Size: 81,168 cells
  • 9,000 iterations

17

www.kios.ucy.ac.cy

18 of 21

Results

18

Iteration No.

1800

3600

7200

9000

Germasogeia

Pancharevo

Species Mass Fraction

www.kios.ucy.ac.cy

19 of 21

Result - GIFs

19

Germasogeia Dam

Pancharevo Dam

www.kios.ucy.ac.cy

20 of 21

Conclusions and Future work

  • Plugin Updates:
    • Enhance config.cfg editing options:
      • Provide users with more flexibility to edit additional parameters directly within the config.cfg file.
    • Introduce new algorithms.
  • Testing and validation with real data from other cases
  • Deepen understanding of the SU2 CFD codebase and its capabilities to further enhance QSU2 functionality – Contributions are welcome.
  • Integrate QSU2 into the Cyprus Digital Twin Platform.

20

www.kios.ucy.ac.cy

21 of 21

Thank you!

21

www.kios.ucy.ac.cy