Tutorial 2: Creating a 2D model

Introduction

In this tutorial, you will us the 3Di Modeller Interface to build a 2D model of the Laugharne and Pendine Burrows, in Carmarthenshire (Wales). The burrows enclose a flat area of reclaimed salt marshes that are currently used as farmland.

Although the model will represent a real-world area, some processes will be simplified for the sake of this tutorial. Please keep this in mind while analysing the results of your simulations.

Learning objectives

In this tutorial you will:

  • Become familiar with the modelling workflow in 3Di

  • Create a new schematisation

  • Use the schematisation checker

  • Upload a new revision and create a 3Di model

  • Start simulations in the 3Di Modeller Interface

Preparation

Before you get started:

Creating a new schematisation

Follow these steps to create a new Schematisation:

  1. Open the 3Di Modeller Interface and click on the 3Di Models and Simulations icon (modelsSimulations). You should now see the 3Di Models and Simulations panel.

    Note

    If this is the first time you use 3Di Models and Simulation panel, you will need to go through some steps to set it up.

  2. In the Schematisation section of the 3Di Models and Simulations panel, click the New button (newschematisation). The New schematisation wizard is shown.

  3. Fill in a schematisation name, such as ‘Tutorial 2 <your_name>’. Select the organisation you want to be the owner of the new schematisation (most users have rights for only one organisation). Tags are optional, you can leave this field empty for now. Since we are creating a schematisation from scratch, select the Create new Spatialite option. Click Next.

  4. Read the explanation on the second page of the New schematisation wizard. Click Next.

  5. In the section 2D Flow, browse to the DEM (.tif) file you have downloaded. The coordinate reference system (EPSG:27700) is read from the DEM file and filled in automatically.

  6. Fill in the following settings:

    • Computational cell size: 64

    • The model area is predominantly: Flat

    • No 1D flow

    • No 0D flow

    • Friction type: Manning

    • No friction file

    • Global 2D friction coefficient: 0.06

    • Simulation timestep: 30 s

    • Typical simulation duration: 0-3 hours

  7. Click Create schematisation. A popup message will tell you that the the schematisation was created. Copy the path that is shown in the popup message.

Viewing the schematisation

You will now add the schematisation in your 3Di Modeller Interface project and add a background map for reference. This will allow you to check if the schematisation looks as you expect.

You will need the path to the spatialite file (.sqlite) for this schematisation. If you have not copied the path to the spatialite in the previous step, do the following to find it: At the top of the 3Di Models & Simulations panel, click on the (blue, underlined) name of your schematisation. Windows Explorer will open; browse to work in progress/schematisation and copy the path from the Windows Explorer address bar.

  1. In the 3Di Schematisation Editor toolbar, click the Load from Spatialite button (load_from_spatialite). Paste the path to the spatialite and click Open.

  2. Add a background map from OpenStreetMap by clicking Web in the Main Menu > Quick Map Services > OSM > OSM Standard.

  3. In the Layers panel, reorder the layers such that the OpenStreetMap layer is below the 3Di schematisation.

You should now see the DEM, located in southern Wales.

Uploading the schematisation

The next step is to check the schematisation, upload it as a first Revision and process it into a 3Di Model. All these steps are covered by the upload wizard.

  1. Click the upload button (upload) in the 3Di Models and Simulations panel.

  2. In the dialog that has appeared, click New upload and click Next.

  3. Click Check schematisation. This will check your schematisations for any errors. A schematisation that contains errors cannot be processed into a 3Di model and simulation template. The schematisation checker may also produce warnings or info level messages. These help you to improve the schematisation. If you have followed the instructions in this tutorial, the schematisation checker should not produce any errors, warnings or info level messages.

    Note

    Please do not ignore warnings. These are given for schematisation choices that are usually wrong and negatively impact the performance of you model. It will still be possible generate a model from a schematisation with warnings, and there may also be special cases where your schematisation choice is intentional and you deliberately ignore the warning. If the performance of you model is sub-par, please fix any warnings before reaching out to the servicedesk.

  4. Continue to the next screen. Here you have to fill in a commit message that describes the changes your have made relative to the previous revision. As this is the first revision of this schematisation, you can instead provide a short description of what you upload. For example: “Default settings, DEM only”.

  5. Click Start upload. Check if it is the upload is successful and if the uploaded data is successfully processed into a 3Di model.

    Note

    By default, this page of the upload wizard is set to UPLOAD AND PROCESS, so that a 3Di model and simulation template will be generated automatically after the upload. When you start using the upload wizard regularly, you may sometimes want to upload data without generating a new 3Di model from it. In that case, choose the UPLOAD ONLY option.

Your 3Di model is now ready for simulation!

Running a simulation

You will now start a simulation with the 3Di model you have created.

  1. In the 3Di Models and Simulations panel, click Simulate (simulate) > New simulation.

  2. Select your model and simulation template and click Next. A new dialog opens with several options for your simulation.

  3. Check the box for Include precipitation. Click Next.

  4. Give your simulation a name. Click Next.

  5. Set the duration of your simulation to 4 hours. Click Next.

  6. Accept the Boundary conditions as they are by clicking Next.

  7. Use the default Initial conditions. Click Next.

  8. Define a Constant rain event during the first two hours with an intensity of 40 mm/h. Click Next.

  9. Accept the simulation settings as they are by clicking Next.

  10. Check the summary of your simulation and click Add to queue.

Your simulation will start as soon as a calculation node is available for your organisation. Note: the number of available calculation nodes depends on your 3Di subscription.

In the 3Di Models and Simulations panel, click Simulate. An overview is given of all running simulations for your organisation(s). Here you can follow the progress of your simulation.

Adding infiltration

We will now add infiltration to the model you have just created. In this tutorial, you will set a global infiltration rate, that applies to the entire model domain.

Note

It is also possible to use a spatially variable infiltration rate by providing an infiltration rate raster file. This will be shown in tutorial 3.

To add infiltration to the model, you need to create a Simple infiltration settings record and reference it from the Global settings.

Follow these steps:

  1. In the Layers panel, under Settings, click on the Simple infiltration settings layer

  2. Click the Toggle editing mode button (toggle_editing) in the top left corner, then click the Add Feature button (add_feature). Fill in the values from the table below (Simple infiltration settings) and click OK.

  3. Click the Toggle editing mode button in the toolbar and save your edits to this layer.

    Table 1 Simple infiltration settings

    Setting

    Value for this tutorial

    Comments

    id

    1

    Must match the simple_infiltration_settings_id in the v2_global_settings_table

    display_name

    infiltration

    infiltration_rate

    360

    in mm/day; uniform silty sand is assumed in this tutorial

    infiltration_rate_file

    NULL

    Only used for spatially varying infiltration rates

    max_infiltration_capacity

    NULL

    infinite infiltration capacity is assumed in this tutorial

    max_infiltration_capacity_file

    NULL

    infinite infiltration capacity is assumed in this tutorial

    infiltration_surface_option

    Rain

    See Infiltration

Now you need to reference this Simple infiltration settings record from the Global settings table.

  1. In the Layers panel, under Settings, right-click the Global settings layer > Open attribute table

  2. Click Switch to form view in the bottom right corner.

  3. Click Toggle editing mode in the top left corner.

  4. In the tab Settings IDs, fill in the ID (1) of the Simple infiltration settings record you have just created.

  5. Click the Toggle editing mode button in the toolbar and save your edits to this layer.

To make a new revision that includes these edits, you need to save the changes to the spatialite and upload them.

  1. In the 3Di Schematisation Editor toolbar, click Save to Spatialite (save_to_spatialite). Wait for this process to finish.

  2. Upload a new revision, in the same way you did before (see Uploading the schematisation).

Running a simulation with infiltration

With the model that includes infiltration, run the same simulation as before (see Running a simulation).

Online access

Note that the models you have created are stored online. You can use them in 3Di Live and view them in the 3Di Management pages.

To use the model in 3Di Live:

  1. Go to www.3di.live, log in and type the name of your schematisation in the search bar.

  2. Select the model you want to use; #1 is the first revision (without infiltration) and #2 is the second revision (with infiltration). Click Start

To view the model on 3Di Management:

  1. Go to management.3di.live, and log in (if needed)

  2. Click on Schematisations

  3. Type the name of your schematisation in the search bar

  4. In the list, click on your schematisation

  5. On this page, you see the details of the last revision of your schematisation. You can switch to older revisions by clicking Choose other revisions

  6. Under 3Di Model of this revision > Simulation templates, you can start a 3Di Live simulation with this model, by clicking on the button with three horizontal lines > Run on 3Di Live

Footnotes