Skip to content

Commit

Permalink
Merge pull request #198 from iggroup/QgepSwmmPhase3Enhancements
Browse files Browse the repository at this point in the history
Qgep swmm phase3 enhancements
  • Loading branch information
sjib authored Mar 28, 2023
2 parents 10fcfa4 + 55087e4 commit aa34e9f
Show file tree
Hide file tree
Showing 20 changed files with 916 additions and 229 deletions.
13 changes: 13 additions & 0 deletions en/qgep_swmm/Change-Default-Export-Parameters.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

.. _Change-Default-Export-Parameters:

Change default export parameters
--------------------------------
As mentionned earlier, most of the simulation parameters are copied from the template ``.inp`` file.

Remaining default parameters are currently hard coded in the views within the database ``qgep_swmm`` schema.
The defaults parameters can be edited directly in the view (with PgAdmin).

.. note::

The default parameters modified in the views and modified views in general will be overwritten during a datamodel update.
179 changes: 0 additions & 179 deletions en/qgep_swmm/Change-simulation-parameters.rst

This file was deleted.

39 changes: 29 additions & 10 deletions en/qgep_swmm/Check-Input.rst → en/qgep_swmm/Check-SWMM-File.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. _Check-Input:
.. _Check-SWMM-File:

Check input file
Check SWMM File
================

The generated ``.inp`` file can be imported in SWMM GUI. It is likely that some errors will be raised. You will have to solve them (see hereunder a list of common errors)
Expand All @@ -9,11 +9,11 @@ You have to solve the errors in the order in which they appear in the report. So

To fix an error you can search in the corresponding QGEP layers in the QGIS project:

* vw_wastewater_node for undefined nodes
* catchment_area for subcatchment errors
* compare if the number of exported nodes (in vw_junctions) are what you expect it to be.
* Check if the function (manhole / special_structure) of wastewater_structure are all filled in
* etc.
- vw_wastewater_node for undefined nodes
- catchment_area for subcatchment errors
- compare if the number of exported nodes (in vw_junctions) are what you expect it to be.
- Check if the function (manhole / special_structure) of wastewater_structure are all filled in
- etc.



Expand All @@ -27,9 +27,9 @@ Missing status or _function_hierarchic (wn_function_hierarchic)

The catchment area is linked to node which is not exported or a reach cannot be drawn because of a missing node:

* because of its status (abandonned etc.) or status is not defined (is Null)
* the node is not connected (correctly) to a conduit
* the node is secondary (the linked reach are secondary)
- because of its status (abandonned etc.) or status is not defined (is Null)
- the node is not connected (correctly) to a conduit
- the node is secondary (the linked reach are secondary)

and therefore not export in the vw_junctions.

Expand Down Expand Up @@ -93,3 +93,22 @@ Missing population densities
``qgep_od.catchment_area.population_density_current`` or ``qgep_od.catchment_area.population_density_planned`` are not filled.


Subcatchments and rain Gauges
-----------------------------
If you want to attach every subcatchments to a single rain gauge, edit the file with SWMM interface:

- Edit > Select All
- Edit > Group Deletion > All Rain Gages
- Create a new raingage
- Edit > Select All
- Edit > Group Edit

- For objects of type: Subcatchment
- Edit the property: Rain Gage
- By replacing it with: Name of the new rain gage

To edit the rain serie:

- Click on Time Series
- Double click default_qgep_raingage_timeserie
- Edit the serie
32 changes: 32 additions & 0 deletions en/qgep_swmm/Coefficient-Of-Friction.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.. _Coefficient-Of-Friction:

Coefficient of friction
-----------------------

- The plugin will export the roughness according to these priorities:

- If ``reach.coefficient_of_friction`` is set then it is converted (``1/coefficient_of_friction``) and exported to SWMM
- Else if ``reach.wall_roughness`` and ``reach.clear_height`` are set, it is converted (``(1/(4 * SQRT(9.81)*POWER((32/re.clear_height/1000),(1/6))*LOG(((3.71*re.clear_height/1000)/(re.wall_roughness/1000)))))``) and exported.
- Else if ``reach.swmm_default_coefficient_of_friction`` is set then it is used
- Else a default value of ``0.01`` is set
- See ``vw_swmm_conduites.sql`` for details



.. note::
The formula to convert from Strickler to Coolebrook is documented in *ATV-DVWK STANDARD ATV-DVWK-A 110E, Hydraulic Dimensioning and Performance Verification of Sewers and Drains September 2001*
`Link <https://pdfslide.net/documents/atv-dvwk-a-110-e-55846635d4eef.html>`__


Populate default coefficient of friction
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The table ``qgep_swmm.reach_coefficient_of_friction`` contains default coefficient of Strickler for the reach materials.
The file ``../project/qml/reach_coefficient_of_friction.qml`` is the layer definition, that you can import in your QGIS project.
If the default values don't match your needs you can edit them.
The function ``SWMM Set default coefficient of friction`` will put in ``qgep_od.reach.swmm_default_coefficient_of_friction`` these default values.
You can choose if you want to overwrite or not the values existing in this attribute.

Launch ``SWMM Set default coefficient of friction``:

- ``Overwrite existing default values``: If checked the values stored in ``swmm_default_coefficient_of_friction`` will be overwrited with new values.
25 changes: 20 additions & 5 deletions en/qgep_swmm/Create-Input.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _Create-Input:

SWMM Create Input
=================
-----------------

- The plugin extracts only the primary wastewater structures
- By default, the plugin extracts the entire primary wastewater structures. If you check *Export only selected network*, then both the selected primary and secondary network will be exported.

- The ``.inp`` file is the input file format for SWMM. It contains the wastewater network AND simulation parameters. The network can be extracted from the QGEP data, but the simulation parameters must be set according to your study.

Expand All @@ -12,11 +12,26 @@ SWMM Create Input
- By default, the export supposes that you use an *Horton Infiltration method*. If another method is set in the template ``.inp``, you might need to adapt the generated ``.inp``. See the linked `issue <https://github.com/QGEP/QGEP/issues/644/>`_

QGEP plugin
-----------

^^^^^^^^^^^^
Launch ``SWMM Create Input``:

- ``Database``: the name of the service used to connect to the database
- ``State``: Current or Planned: extract the wastewater structure according to the status
- ``Template INP file``: a ``.inp`` from which simulation parameters will be copied
- ``Destination INP file``: the ``.inp`` generated from QGEP data
- ``Destination INP file``: the ``.inp`` generated from QGEP data
- ``Export only selected network``: Export primary and secondary selected network


Selection
---------
Usually you will select a subnetwork to be exported with the QGEP button ``Upstream`` and then ``Select current path``.
If you want to remove from this selection secondary structures:

- Open ``Selection by expression`` on the layer ``vw_qgep_reach``
- Expression: ``"ch_function_hierarchic" in (5066, 5068, 5069, 5070, 5064, 5071, 5062, 5072, 5074)``
- Choose: ``filter current selection``

- Open ``Selection by expression`` on the layer ``vw_qgep_wastewater_structure``
- Expression: ``"_channel_function_hierarchic" in (5066, 5068, 5069, 5070, 5064, 5071, 5062, 5072, 5074)``
- Choose: ``filter current selection``

2 changes: 1 addition & 1 deletion en/qgep_swmm/Extract-Results.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _Extract-Results:

SWMM Extract Results
====================
--------------------

If you don't want to store the results in QGEP, this function generates two QGIS tables from a report file.
You can map the values with the geometries (see: :ref:`mapping-not-imported`).
Expand Down
9 changes: 9 additions & 0 deletions en/qgep_swmm/Generate-SWMM-File.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.. _Generate-SWMM-File:

Generate SWMM File
==================

.. include:: Create-Input.rst

.. include:: Change-Default-Export-Parameters.rst
11 changes: 7 additions & 4 deletions en/qgep_swmm/Import-Results.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.. _Import-Results:

SWMM Import Results
===================
-------------------

Measurement tables
------------------
^^^^^^^^^^^^^^^^^^

If you want to store the results in QGEP and use the dedicated view for the mapping then use SWMM Import Results.
It parses the report file of SWMM.
Expand Down Expand Up @@ -39,14 +39,17 @@ and they populate a view dedicated for the mapping (see :ref:`mapping-imported`)


Launch import
-------------
^^^^^^^^^^^^^

Launch ``SWMM Import results``:

- ``SWMM report file``: the ``.rpt`` file generated during the previous step
- ``Database``: The name of the PostgreSQL service hosting the QGEP database.
- ``Simulation name``: The name that you want to give to this simulation (it will appear in ``qgep_od.measuring_point.remark``).
- ``Import full results in addition to summary``: The full time series will be imported. Attention, if the report step is small, the import can take a long time.
- ``Import summary``: Only the summary is imported.
- ``Import full results``: The full time series will be imported. Attention, if the report step is small, the import can take a long time.
- ``Import Max HGL in qgep_od.wastewater_node.backflow_level``
- ``Import Max/Full Flow in qgep_od.reach.dss2020_hydraulic_load_current``

.. warning::
Attention, a report file created from the SWMM GUI don't contain the full time series but only the summary.
Expand Down
2 changes: 2 additions & 0 deletions en/qgep_swmm/Mapping.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ The project ``swmm_summary.qgs`` show how the summary indicators can be loaded i

Show the indicators evolving along time
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


This manipulation only works with complete times series. Namely, you need to import the full results and not only the summary.

**Play the simulation with Time Manager**
Expand Down
Loading

0 comments on commit aa34e9f

Please sign in to comment.