diff --git a/deltaforge_install.html b/deltaforge_install.html index 5b6df55..b3db5b3 100644 --- a/deltaforge_install.html +++ b/deltaforge_install.html @@ -2,12 +2,12 @@ - + -QGIS-Tim - Install iMOD Python with Deltaforge +Install iMOD Python with Deltaforge – QGIS-Tim -
+
Table 1: Geohydrological model of the subsoil @@ -552,7 +552,7 @@

Open the QGIS-Tim
  • Click the New button to create the GeoPackage and save it for instance in the folder with your tutorial data, e.g. “..\QGIS-Tim_Tutorial-TheHague\case-TheHague.gpkg”.
  • Your window looks like in Figure 4.

    -
    +
    @@ -584,7 +584,7 @@

    Open the QGIS-Tim

    Start your Tim model

    To get an idea of the parameterization of our Aquifer we can use the layer information available from the LHM database (Landelijk hydrologisch model). That model provides 3D geological layering within The Netherlands and the corresponding geological parameterization (permeability, resistance, thickness).

    An example of parameter values near our building pit area is presented in Table 2. In each LHM layer the Aquitard information is positioned on top of Aquifer.

    -
    +
    Table 2: The characteristics of the subsoil based on LHM data (example, your values may differ) @@ -748,7 +748,7 @@

    Start your Tim model<
  • Then by clicking 3 times on () Add feature you will see new rows are added.
  • Now you are able to fill in the desired values shown in Figure 5.
    NB! Do not fill in column FID. ‘Autogenerate’ will take care.
  • -
    +
    @@ -787,7 +787,7 @@

    Adding a Leaky
  • In the main menu go to Project and select Snapping Options...
  • From the new toolbar (see Figure 6), click on the Enable Snapping button ().
  • -
    +
    @@ -802,7 +802,7 @@

    Adding a Leaky
  • Draw the sheet pile around the building pit (start south corner) with your left mouse button and close the feature on the first point.
  • In the pop-up window fill in the resistance (1000 d, see * below) and layer number (layer=0, see ** below) as in Figure 7 and click OK to close the window.
  • -
    +
    @@ -831,7 +831,7 @@

    Adding a Well

  • In the pop-up window, fill in the well parameters discharge (50 m3/d), radius (0.1 m), resistance (1 d) and layer (0).
  • Now add the other 7 wells locations in a fast way: do not import parameters with every single point. We will do that later. Just click OK on each Feature Attribute window.
  • -
    +
    @@ -847,7 +847,7 @@

    Adding a Well

  • Stop the editing mode, save your work and close the window.
  • Select layer timml Well:pumping_wells again, click right and from the menu select Show labels.
  • -
    +
    @@ -864,7 +864,7 @@

    Adding a Well

  • With the combination of Shift + double left click, you can add a new vertex to the line. Repeat that for the number of points you want to add.
  • Figure 10 shows the result of positioned extra points in the line.

    -
    +
    @@ -898,7 +898,7 @@

    Studying output re
  • Uncheck mesh and raster to only visualize contours on the base map.
  • Uncheck contour lines of layer 1 and 2 to get only the result for layer 0 on screen as in Figure 11.
  • -
    +
    @@ -935,13 +935,14 @@

    Creating a cross
    1. To make a cross section, use the iMOD plugin toolbar and click on the Cross Section widget ()
    2. From the dropdown menu on the left of this panel, select the mesh () with *_layer_0.
    3. +
    4. Check the box As line(s).
    5. Press Add.
    6. Start to define your cross section with a click on the button Select location.
    7. Draw your cross section by left clicking on the map. Stop drawing with a right click. You can redraw this line anytime you like.
    8. Satisfied with your line? Click the button Plot to draw this layer in the cross section. Your screen might look like Figure 12.
    9. By using the Export button you can store results from the cross section in a CSV file.
    -
    +
    @@ -957,17 +958,17 @@

    Creating a cross

    Making calculations with parameter variations or checking bandwidth

    The authorities demand a drawdown effect of dewatering at a maximum of 0.10 m at surrounding buildings. This means that improvements for leakage control are needed but first we need to discover what parameter to focus on.

    To check whether the wall resistance or the bottom resistance of the layer 1 (below the building pit) is more important we can make 2 variations; one with C-clay=200 d and one with R-wall=500 d. 
    Of course you can change your model input, rerun the model and overwrite your model results. The next steps show you how to change the model input and save the results in separate .gpkg and .nc files.

    -
      +
      1. In the input group select layer timml Aquifer:…
      2. Open the Attrribute Table (F6) and change the value for “aquitard_c” in layer 1 into 200 d.
      3. In the QGIS-Tim panel go to the tab Results and change the name of the output, e.g. case-TheHague_v1.
      4. Click Compute to run variant 1.

      Check in the Layers panel and see that the results are not overwritten but added to the groups, e.g. layer case-TheHague_v1-timml Observation:observations is added to the group Vector.

      -
        +
        1. Fill in your calculated heads at the observation locations in Table 4 or use Excel.
        -
        +
        Table 3: Table: calculated heads [m] in observation points for 2 variants compared to the initial situations. Your values will differ. @@ -1047,7 +1048,7 @@

        +
        1. In layer timml Aquifer:… reset the value for “aquitard_c” in layer 1 to the default of 40 d.
        2. In layer timml Leaky Line Doublet:… change the value for “resistance” into 5000 d (500x10).
        3. In the QGIS-Tim panel go to the tab Results and change the name of the output, e.g. case-TheHague_v2.
        4. @@ -1065,7 +1066,7 @@

          Sheet piles w
        5. We recommend to create an extra Leaky Line Doublet element. In this case it is more easy to switch on/off this additional element in your sensitivity analysis.
        6. How to copy the sheet pile wall to an extra Leaky Line Doublet element?

          -
            +
            1. In the QGIS-Tim panel go to the tab Elements and add a second Leaky Line Doublet and give it a name, e.g. “sheet_pile_L1”
            2. Go to the tab Model Manager and see that the element separately is added to the list. Here is can switch this element on / off for a calculation.
            3. In the Layers panel select the new layer timml Leaky Line Doublet:sheet_pile_l1.
            4. @@ -1074,17 +1075,17 @@

              Sheet piles w
            5. Click on the Copy button () in the source table to copy the selected row to the clipboard.

            -
              +
              1. In the target table, paste it with the Paste button () as a new layer.
              2. Assign this new sheet pile to layer=1.
              3. Stop editing and save the new element.
              4. Click Compute to start the computation again.

              The results are directly visible in the contours and cross-section again.
              We can conclude that the drawdown in the building pit increases with a factor of almost 2 (-7.48 m at the centre of the building pit). Therefore, we adjust the well flow to 3.95/7.48*30=15.54 m3/d per well.

              -
                +
                1. Implement this change in the timm Well element and recalculate the model.
                -
                +
                @@ -1096,11 +1097,11 @@

                Sheet piles w

                We conclude that the drawdown of groundwater level around the building pit with deep sheet piles decreased significantly.

                Next also alternatives with a shallow concrete cut-off wall will be calculated for a shallow and a deep wall. In that case we have R=1000 d, but note that the input in the attribute than becomes k*R=10000 due to the error in Tim.

                -
                  +
                  1. After changing the value in attribute tables of wall elements, we can compute again, switching off and on the element for the deep wall section (tab “Model Manager” on the QGIS-Tim panel).

                  Again extra calculation is needed to adjust well extractions for drawdown in the building pit.
                  Results of calculations are gathered in the following table, showing extractions and head outside the wall at South East monitoring position.

                  -
                  +
                  Table 4: Effect of 4 Wall alternatives on extraction rate and drawdown South East. @@ -1156,14 +1157,14 @@

                  Sheet piles w

                  Effect of a not closed wall (about 20 cm)

                  Authorities are afraid that leakage incidents could be harmful for surrounding monuments. The effect of leakage can be studied by creating a fictitious little opening in the wall. This can be done e.g. by changing the values of first and last coordinate of the leaky line doublet.

                  -
                    +
                    1. Select the Leaky Line Doublet in the Layers panel
                    2. In the editing toolbar go to the toggle editing option () and check the vertex option ().
                    3. On the drawing panel select a point in the line element of the wall and right click.

                    The list with coordinates appears in the vertex editor at the lower left corner of the screen. There you can edit the coordinates of all points in the line. Another option is to zoom in and select a point in the line element and drag it to a new position.

                    When the coordinates differ a gap results, in the studied case we created a 0.2 m wide gap. It might be elaborate to perform but the result is shown in the next figure. The result is calculated by using a small grid spacing. At this created gap a large flow results in the corner of the building pit, leading to an insufficient drawdown in the building pit and a 0.1 – 0.2 m larger lowering outside the building pit at that location.

                    -
                    +
                    @@ -1178,12 +1179,12 @@

                    Ef

                    Using Python for sensitivity analyses with a QGIS-Tim model

                    QGIS-Tim offers the opportunity to export the geopackage of the created model to a Python script. This makes it possible to use the script for other ways of calculation, e.g.: - Calculation of model results in other Python environments, like Anaconda or Spyder or in a notebook. - Use in other Python oriented programs, like the Probabilistic Toolkit.

                    -
                      +
                      1. If input of all elements is ready and the model has proved to run properly, go to the QGIS-Tim panel and the tab Model Manager.
                      2. At the bottom press the button Convert GeoPackage to Python script.
                      3. After a short period for translation in Python the explorer panel appears where you can enter the name you want to give for the python file, e.g. “case-TheHague.py” and store it in a directory you choose to save your work. The file looks like:
                      -
                      +
                      @@ -1198,11 +1199,11 @@

                      Probabilistic Toolkit - download.

                      -
                        +
                        1. Open the Probabilistic Toolkit from your desktop () or Windows menu (Deltares folder).

                        The Toolkit opens at the first of 5 tabs: Model.

                        -
                          +
                          1. In the section Model Type check if the dropdown menu Type is set to Internal.
                          2. In the section Model Type check if the dropdown menu Language is set to Python and a the field Version appears.
                          3. Select the tree points (‘…’) in the field Version and give the path where PTK can find the Python interpreter, e.g. Spyder at “C:\roelofs_fs\_software\deltaforge\pythonw.exe”.
                          4. @@ -1216,7 +1217,7 @@

                            +
                            @@ -1227,13 +1228,13 @@

                            +
                            1. In the PTK panel Input click 4 times on the Add button (), to add 4 variables and name them Rshp, czba, khol and cbasis (see Figure 16)
                            2. In the tab Variables give these 4 variables the values 10000, 40, 10 and 100.
                            3. Return to the tab Model and assign these variable values to the parameters in the source code by copying this code block to the top of the Python source code (see Figure 17).
                              Rwall = Rshp
                              c0 = czba
                              k0 = khol
                              c2 = cbasis
                            4. Finaly, replace the fixed value (NB! 2 times “Rwall”, for each sheet pile definition) in the Python code for the parameter name (see red elements in Figure 17).
                            -
                            +
                            @@ -1243,28 +1244,28 @@

                            +
                            1. At the end of the source code, eliminate the following lines from the converted file:

                            head = model.headgrid(xg=np.arange(80940.0, 81166.0, 4), yg=np.arange(455554.0, 455360.0, -4) )

                            -
                              +
                              1. Also eliminate the lines:

                              observation_peilbuis_2 = model.head(x=80970.16497991727, y=455495.54316352855) observation_peilbuis_3 = model.head(x=81004.86605597858, y=455389.68291883526) observation_peilbuis_4 = model.head(x=81049.06450220713, y=455485.0645022071)

                              -
                                +
                                1. Because we only are interested in 2 points, use the first two observation points and add these lines at the end of the Python script:

                                pb0 = observation_observations_0[0]
                                pb1 = observation_observations_1[0]

                                -
                                  +
                                  1. In the panel Output of the PTK use the Add button () the new defined variables “pb0” and “pb1”.
                                  2. Check if the program works properly. Field Analysis must contain “Run model”, field Results must contain “Single run”
                                  3. Press the RUN button () to calculate the model.

                                  In the tab Run model we find the results of our calculation.

                                  -
                                    +
                                    1. Check if it complies with your earlier calculations in QGIS-Tim.
                                    -
                                    +
                                    @@ -1275,15 +1276,15 @@

                                    +
                                    1. In the tab Field, set the Analysis option to “Sensitivity*.
                                    2. Go to the tab Variables.

                                    For each selected parameter a distribution is defined with certain limits or characteristic values. Distribution formulas can be chosen based on knowhow of the user. Best guess of the parameter value distributions is given in the next example window.

                                    -
                                      +
                                      1. Change the distributon types for each Variable in the column “Distrubution” and fill in the other values.
                                      -
                                      +
                                      @@ -1293,11 +1294,11 @@

                                      +
                                      1. Select the row with sheetpile resistance (Rshp) and in the panel below the distribution is shown (see Figure 20).

                                      Parameter value distributions of silt layer resistance (czba), basic peat layer resistance (cbasis) and permeability of Holocene sand (khol) are shown in graphs below.

                                      -
                                      +
                                      @@ -1307,7 +1308,7 @@

                                      +
                                      @@ -1317,7 +1318,7 @@

                                      +
                                      @@ -1327,7 +1328,7 @@

                                      +
                                      @@ -1338,12 +1339,12 @@

                                      +
                                      1. Press RUN () to recalculate the model in the Sensitivity mode.
                                      2. After the run is finished, a new tab Sensitivity is visible. Go to the tab.

                                      Here we can find what extent parameter variations contribute to model results. In Figure 24 it is shown what parameter variation means for drawdown in the building pit. We conclude that for a situation with a sheet pile wall in only the first sand layer the variation of the resistance of the loamy layer (czba) determines the drawdown, and with that this factor determines the amount of extraction in that situation for the largest part. Translated to practical considerations, it is worthwhile to spend extra budget on determining the homogeneity of that layer and the vertical permeability of the loamy layer in more detail.

                                      -
                                      +
                                      @@ -1355,7 +1356,7 @@

                                      +
                                      1. Go to the tab Model and in the panel Model code remove from the end of the script the lines for pb0 and the line for pb1.
                                      2. On the top of the script, below the line k01 = khol add a value for the fixed total extraction flux and the fixed head within the building pit:
                                        Qws = 100
                                        pb0d = -3.5
                                      3. Now add the following lines to the code. NB! Use the same observation variable name as is used in your script!
                                        pb0 = observation_observations_0[0]
                                        fact = pb0d/pb0
                                        Qtot = 8*Qws*fact
                                        pb1 = observation_observations_1[0]*fact
                                      4. @@ -1364,7 +1365,7 @@

                                        Figure 25) but also for the total flow to the extraction wells (Qtot, see Figure 26).

                                        -
                                        +
                                        @@ -1374,7 +1375,7 @@

                                        +
                                        @@ -1385,7 +1386,7 @@

                                        Figure 27, which in the lower part shows the distribution for total flow rate from the dewatering in the building pit.

                                        -
                                        +
                                        @@ -1395,7 +1396,7 @@

                                        +
                                        @@ -1407,17 +1408,17 @@

                                        +
                                        1. Go to the tab Analysis and select the option Reliability.
                                        2. Then we check the variable distributions again.
                                        3. Next, we open the tab Calculation.

                                        This gives the possibility to introduce a failure criterium for certain variable, like in our case pb1. We choose a less strict criterium because with a shallow sheetpile wall it is not possible to meet the requirements anyhow.

                                        -
                                          +
                                          1. Choose a comparison with undershooting a critical value of REF -0.5 m for the groundwater head in pb1 (see Figure 29).

                                          At the right hand side in the settings window a calculation method needs to be selected. Many statistical methods are available, like Monte Carlo method etc. They are described in the help of the PTK in the main menu. We chose FORM (First Order Reliability Method) as a fast method because it is an automated intelligent iteration process to find a design point for reliability by using first calculated realisations (p.97 in the Help manual, see PTK menu).

                                          -
                                          +
                                          @@ -1427,11 +1428,11 @@

                                          +
                                          1. Recalculate the model and go to the tab Reliability.

                                          From the result (see Figure 30) we conclude that the FORM method is able to find a solution in just a few iterations.

                                          -
                                          +
                                          @@ -1449,13 +1450,13 @@

                                          Creating a transient model

                                          At this moment, it is not possible to create a transient (time dependent) model with correct answers to case studies with sheetpile walls. The TTim solution needs to be updated.
                                          Nevertheless in this section we want to guide you on setting up a basic transient model.

                                          -
                                            +
                                            1. Return to QGIS and in the QGIS-Tim panel go to the tab Model Manager.
                                            2. In the section Model Setup turn on the option “Transient”.
                                            3. In the panel Layers select timml Aquifer:Aquifer.

                                            As can be seen in Figure 31, the matrix of properties is extended in the transient mode with cells for transient parameters, like specific storage coefficients (aquitard_s, and aquifer_s) and porosities (aquitard_npor and aquifer_npor). Take care that specific storage coefficient is a storage per meter layer thickness. In older MWell course material a speadsheet is presented for estimation of coefficient values but there we calculated storage coefficients per whole layer. Those values should be divided by layer thickness.

                                            -
                                            +
                                            @@ -1465,17 +1466,17 @@

                                            Creating a tran

                  -
                    +
                    1. Fill in the Table with the corresponding values.
                    2. In the TTim section in the Layers panel go to the list of elements for transient calculations.
                    3. Select ttim Temporal Settings:Aquifer and open its Attribute Table (F6). Here the length of the time series is specified.
                    4. Set the starting time to 0.

                    But calculations take place for the range of time steps between “time_min” and “time_max”. The time unit is according to central settings in the project, mostly time in days. “Time_min” should not be zero but given a slight offset. Here we also find a “Stehfest_M” number, related to the number of terms in the calculation method performing transformation of formulas in solving differential equations. A reference date can be set to relate the calculation to real time data.

                    -
                      +
                      1. Fill in the table according to Figure 32.
                      -
                      +
                      @@ -1486,10 +1487,10 @@

                      Creating a tran

                      NB!: In QGIS it is an obligation to use a “reference_date” to get the model running and present outcomes!

                      -
                        +
                        1. Select ttim Computation Times:Domain and set the time values for time steps where we want to get calculations of spatially distributed heads in mesh or raster points and contours.
                        -
                        +
                        @@ -1500,10 +1501,10 @@

                        Creating a tran

                        For this case we will leave this table blank, because calculating several head distributions at different time steps is rather time consuming during this course.

                        -
                          +
                          1. Select ttim Observation:observations and here we can set the time steps for a time series at certain points we want to monitor the calculation results. We set points at intervals that follow a (approximately) logarithmic increase in time intervals. Proposed values are shown in the next table.
                          -
                          +
                          @@ -1515,7 +1516,7 @@

                          Creating a tran

                          Don’t choose exactly the same time as when changing the flow. So if 60 is an end value, choose 59.9.

                          In the Attribute Table of layer ttim Well:pumping_wells we can set the discharge amount. The value might change during time when excavation is considered or construction is performed in phases. For each change we have to add a line of input. In case there are a lot of switch on/off moments, this is a lot of work.
                          We just leave this option without any change because there is an other option in case each well has only a singel start and end time.

                          -
                            +
                            1. Therefor go to the layer timml Well:pumping_wells layer. This layer contains simple elements to make it behave as a simple Timm element.
                            2. In the Attribute Table make start_time=5, end_time=30 and discharge_transient=15.
                            3. But fill in a value of 0 m3/d in column “Discharge” because this variable is part of TimML well element. We use the “discharge_transient” variable to define flow in TTim. Remember: Solution of TTim is superposed on solution of TimML.
                            4. @@ -1560,18 +1561,7 @@

                              Creating a tran } return false; } - const clipboard = new window.ClipboardJS('.code-copy-button', { - text: function(trigger) { - const codeEl = trigger.previousElementSibling.cloneNode(true); - for (const childEl of codeEl.children) { - if (isCodeAnnotation(childEl)) { - childEl.remove(); - } - } - return codeEl.innerText; - } - }); - clipboard.on('success', function(e) { + const onCopySuccess = function(e) { // button target const button = e.trigger; // don't keep focus @@ -1603,7 +1593,27 @@

                              Creating a tran }, 1000); // clear code selection e.clearSelection(); + } + const getTextToCopy = function(trigger) { + const codeEl = trigger.previousElementSibling.cloneNode(true); + for (const childEl of codeEl.children) { + if (isCodeAnnotation(childEl)) { + childEl.remove(); + } + } + return codeEl.innerText; + } + const clipboard = new window.ClipboardJS('.code-copy-button:not([data-in-quarto-modal])', { + text: getTextToCopy }); + clipboard.on('success', onCopySuccess); + if (window.document.getElementById('quarto-embedded-source-code-modal')) { + const clipboardModal = new window.ClipboardJS('.code-copy-button[data-in-quarto-modal]', { + text: getTextToCopy, + container: window.document.getElementById('quarto-embedded-source-code-modal') + }); + clipboardModal.on('success', onCopySuccess); + } var localhostRegex = new RegExp(/^(?:http|https):\/\/localhost\:?[0-9]*\//); var mailtoRegex = new RegExp(/^mailto:/); var filterRegex = new RegExp('/' + window.location.host + '/'); @@ -1611,7 +1621,7 @@

                              Creating a tran return filterRegex.test(href) || localhostRegex.test(href) || mailtoRegex.test(href); } // Inspect non-navigation links and adorn them if external - var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool)'); + var links = window.document.querySelectorAll('a[href]:not(.nav-link):not(.navbar-brand):not(.toc-action):not(.sidebar-link):not(.sidebar-item-toggle):not(.pagination-link):not(.no-external):not([aria-hidden]):not(.dropdown-item):not(.quarto-navigation-tool):not(.about-link)'); for (var i=0; iCreating a tran if (window.Quarto?.typesetMath) { window.Quarto.typesetMath(note); } - // TODO in 1.5, we should make sure this works without a callout special case if (note.classList.contains("callout")) { return note.outerHTML; } else {