Skip to content

Use other datasources

Emanuele Gissi edited this page Aug 22, 2022 · 1 revision

ℹ️ Updated to qgis2fds 1.0

This wiki page describes how to use other datasources for terrain geometry, by building an FDS case for the CERN particle physics laboratory in Meyrin, Geneva, Switzerland.

You can download a working cern_meyrin.gqs example file created following the steps of this example from here.

This example does not have a landuse layer, only the terrain geometry is exported. The boundary conditions can be added later to the terrain faces with BlenderFDS, the free and open source user interface for FDS.

Step 1: Select and download terrain data from public sources

Citing Wikipedia, though there is no universal usage of the terms digital elevation model (DEM), digital terrain model (DTM) and digital surface model (DSM) in scientific literature, in most cases the term digital surface model represents the earth's surface and includes all objects on it. In contrast to a DSM, the digital terrain model (DTM) represents the bare ground surface without any objects like plants and buildings. DEM is often used as a generic term for DSMs and DTMs, only representing height information without any further definition about the surface.

As the large majority of the European local authorities, the SITG offers geographic open data of its reference area.

The SITG is the center of competence of the Direction de l’information du territoire (DIT) du Département du territoire (DT) of Geneva in Switzerland. The provided data is freely available for download from its portal website for any kind of use.

Open the SITG portal website. Select the ASCII/GRID extraction format to select the DEM data. Both the digital terrain model (DTM) and the digital surface model (DSM) are available. In our example, we are going to download the DSM as we are interested in direct modelling buildings and trees without any further step. So first select the format Format Raster| ASCII-GRID | MNT/MNS and then check the MNS - MODELE NUMERIQUE DE SURFACE 2017 in the data extraction dialog (Extracteur de données).

In the Périmétre panel choose the terrain extent you want to download by dragging on the underlying map canvas.

In the following panel (Validation) insert the name and launch the data extraction. Wait some time until the statut changes from En cours to Terminé. The data is now available and can be downloaded to your local storage. Unzip the downloaded file in a convenient location. Inside the extracted folder, the MN_Surface_2017_GRID.asc file contains the requested DSM data.

Step 2: Create a new QGIS project

Click on Project > New in QGIS main menu and start a new empty project.

Step 3: Populate the new QGIS project with data layers

Add the digital elevation model layer

Drag-and-drop the MN_Surface_2017_GRID.asc file from the file browser window to the Layers panel of your new QGIS project. A greyscale map of your terrain should appear in your project map canvas.

The question mark symbol by the layer name means that the layer coordinate reference system (CRS) is not set. By searching on the SITG website, you discover a webpage that describes the CRS that should be used for data visualization: CH1903+_LV95 - EPSG:2056. As done while working on the Quickstart example, right-click on the layer name in the Layers panel and choose Properties. Its Layer Properties window opens up.Select the Source label in the side panel. Then click on the small button to set the CH1903+_LV95 - EPSG:2056 CRS for this layer.

When back in the Layer Properties window, select the Symbology label in the side panel. Choose Render type > Hillshade to improve the digital elevation model layer appearance. If after setting up the CRS the map has disappeared, zoom in that layer again by using View > Zoom to Layer in the main menu.

Add the OpenStreetMap basemap layer

Add the OpenStreetMap data source to the Layers panel of your project, as already done in the Quickstart example.

Step 3: Set your project CRS

Set your project CRS, as already done in the Quickstart example.

Step 4: Export the terrain to an FDS case

Look at the Processing Toolbox panel and double click on the Export to NIST FDS > Export terrain tool. Then fill in the required informations in the qgis2fds main panel. Find guidance on each parameter in the Quickstart example.

The DTM has a very dense 0.5 m resolution resulting in 18 · 10^6 faces, and qgis2fds takes some minutes to complete the export process on my laptop.

Step 5: Run FDS

Running the FDS solver on the unmodified created case, the Smokeview setup is performed. Then open the case in Smokeview, and enjoy it.

Unfortunately you will not discover any new elusive subatomic particle by running FDS on the amazing geometry of the CERN laboratories you just created, but you might contribute with a small grain of sand to it.