Tutorial M03 draft

From TUFLOW FV Wiki
Jump to navigation Jump to search

Tutorial Description

Read the Tutorial Model Introduction before starting this tutorial. It outlines programs requiring installation.

This tutorial builds upon the previous tutorial models X and Y introducing and is designed to introduce the skills required for coastal modelling. Specifically, this tutorial demonstrates:

  • Defining boundary conditions.
  • Defining spatially varying landcover via a material coverage.
  • Creating a TUFLOW FV simulation.
  • X
  • Y
  • Z
  • Importing and reviewing results.

The workflow uses QGIS and Notepad++ to setup and run our models.

IMAGE OF CUDGEN GoES HERE

Requirements And Downloads

Requirement Brief Description
Model Data Download the Tutorial Module 2 Data Package MADDYTODO Change link
Assumed Knowledge It is recommended to complete Tutorial Module 2 and Meshing Module 3 prior to completing this tutorial.

TUFLOW FV Model Development Workflow

We will develop our model using a combination of the QGIS and Notepad++, noting that the mesh has already been developed in Meshing Module 3.

Key components of the workflow include:

  • Initialise the TUFLOW FV project and folder structure with the TUFLOW Viewer Plugin for QGIS.
  • Generate our spatial layers such as boundary condition nodestrings and material coverages.
  • Create our TUFLOW FV control file and define boundary condition time series input data.
  • Run the model via a windows batch file.
  • Review the model log files, GIS check files and model results.


These key steps and the software package used together in combination are provided in the figure below:

TUFLOW FV SMS Community Version Workflow.jpg

Prepare Your Working Environment

Copy and unzip the folder to your preferred working location on your computer, for example E:\TUFLOWFV\Tutorial_M03.

  • The Complete_Model folder contains a completed version of the tutorial and its supporting files. You can use this as a reference if you require.
  • The Exe folder contains the TUFLOW FV executable used to run your models.
  • The Module_Data folder contains the required mesh files to complete this tutorial.
  • The Working folder is for the files you create and work within.
T01 SC folderDownload.png

Initialise The Project With GIS Integration

Save The Workspace

Firstly, launch QGIS and use the below steps to save the workspace in your Working folder:

1. Go to Project > Save As.
2. Navigate to TUFLOWFV\Tutorial_M03\Working folder.
3. Save the workspace as Cudgen_Creek_000.qgz.

Set The Projection

Use the below steps and animation to set your workspace projection:
1. Go to Project > Properties.
2. In the CRS tab, type GDA 94 / MGA zone 56.
3. Select the matching projection in the Predefined Coordinate Reference Systems section.
4. Click Apply and OK.

Configuring A TUFLOW FV Project

The TUFLOW plugin is used to configure the TUFLOW project. This includes specifying the model and executable file paths, defining the GIS projection (i.e. the geographic coordinate system used for the TUFLOW model, all inputs need to use the same projection) and writing GIS empty files for model inputs:

1. Select the Configure / Create TUFLOW Project symbol from the TUFLOW Plugin toolbar.
M03 Plugin Config.png
2. Click Select CRS and use the filter to select: GDA 94 / MGA zone 56.
3. Click Browse... to select the folder location of the Working folder. This creates the default TUFLOW FV model directory and sub-folders.
4. Click Browse... to select the location of the TUFLOW FV single precision executable file.
5. Select SHP as the GIS Format.
6. Select TUFLOW Flexible Mesh (TUFLOW FV).
7. Tick all box options:
  • 'Save Default Settings Globally (for all projects)': The settings configured by this window sets the default for opening a new QGIS workspace.
  • 'Create Model Folder Structure': The TUFLOW sub-folders (e.g. bc_dbase, model, runs) are made within the Working\TUFLOWFV folder.
  • 'Create Template Files': This creates an 'empty' folder in Working\TUFLOWFV\model\gis folder. It contains all the TUFLOW FV template files in the projection set above. It is important to create new template files for each project to ensure the projection is correct.
  • 'Tutorial Model': Sets a command within the automatically generated FVC instructing TUFLOWFV to run the tutorial model licence free.
8. Click OK and a TUFLOW FV DOS console window opens. This runs the first part of a TUFLOW FV model initialisation and creates TUFLOW FV folder structure, projection file, TUFLOW FV empty GIS files and base FVC file called Create_Empties.fvc.
M03 Config proj.png

Reviewing The Model Domain

Become familiar with the model location, using the model mesh, bathymetry, and aerial imagery.

Firstly, we will open and visualise the model mesh using the below steps and animation:

1. Drag and drop the model mesh file Cudgen_Creek_001.2dm from TUFLOWFV\Tutorial_M03\Model_Data folder\Mesh.
2. Right click on the Cudgen_Creek_001 file in the Layers panel and select Properties.
3. From the Symbology tab, under Contours uncheck Show Contours.
4. Under the Rendering tab check Native Mesh Rendering.
5. Click Apply and OK.


Review bathymetry to understand model elevation using the below steps and animation:

1. Drag and drop the model bathymetry file Cudgen_Creek_bathy_001.asc from TUFLOWFV\Tutorial_M03\Model_Data folder\Mesh into the workspace.
2. Right click on the Cudgen_Creek_bathy_001 file in the Layers panel and select Properties.
3. From the Symbology tab, under Band Rendering select the following options:
  • Render type: Singleband pseudocolor.
  • Set the Min: -10 and Max: to 10.
  • Color ramp: Turbo.
  • Mode: Equal Interval.
  • Classes: 25.
  • Click Apply and OK.


To view the model extent we will use Google Hybrid Satellite aerial imagery via the AusMap plugin. Follow the below steps and animation to install the plugin and display the imagery:

1. Open the Plugins installer via Plugins > Manage and Install Plugins....
M03 select plugin manager.png
2. In the Plugins dialog under All search AusMap.
3. Select AusMap and Install Plugin.
4. Once installation is complete select Close.
5. From the menu bar select the new AusMap drop down select Google Basemaps > Google Hybrid Satellite.


Defining Open Boundary Condition

TUFLOW FV uses nodestrings to specify the location of open boundary conditions. We will create our nodestring by importing an empty template GIS layer using the TUFLOW Plugin and digitising the nodestring locations.

1. Select the Import Empty File symbol from the TUFLOW Plugin toolbar.
M03 Import empty.png
2. In the empty dialog box set the following:
  • Set Empty Directory by selecting Browse... to select the folder location of the Working folder.
  • Select the Empty Type 2d_ns.
  • Update the Run ID name to Cudgen_Creek_ocean_boundary.
  • Check the Geometry Type: Lines
  • Select OK
M03 EmptyDialog.png

Now that the empty Nodestring file has been made we will digitise the model ocean boundary. Use the following steps and animation as a guide:

  1. Digitising and assigning the ocean boundary model attributes.
  2. Add note on styling and adding labels

Digitise the ocean boundary:

  1. Select the 2d_ns_ocean_boundary_001 in the Layers panel and toggle on editing.
  2. Zoom into the southern end of the coast to Snapper Rock.
  3. Select 'Add Line Feature'.
  4. Create a line offshore of the mesh and continue to digitize around mesh. Boundary condition's do not need to be snapped to the boudnary
  5. End at Norries Headland
  6. When selecting the final vertex, use the right mouse butson to terminate the line, an attributes dialog appears. In the attributes, specify the boundary as flow vs time (QT) boundary with the name 'FC01'.
    • ID = Ocean
    • Flags = BD

Reviewing Materials

TUFLOW FV uses polygons to specify the spatial location of varying material types within the model domain. To reduce the amount of digitising required in this tutorial we have provided the material file in the Module_Data folder.

In the below animation we will guide you with the following:

  1. Loading the materials shp file into the workspace.
  2. Reviewing the assigned materials through out the model domain.
  3. note sure yet


You will see how the materials change throughout the model domain. We use these values to inform TUFLOW FV of the roughness value the model will use for each material type. In this model we have assigned four material types:

  1. Estuary main channel represented by a Manning's 'n' roughness value of 0.025.
  2. Mangroves represented by a Manning's 'n' roughness value of 0.035.
  3. Lake and Canal represented by a Manning's 'n' roughness value of 0.015.
  4. Ocean represented by a Manning's 'n' roughness value of 0.030.

TUFLOW FV Model Setup

Now that the TUFLOW FV folder structure has been created we will copy over the provided materials and breaklines GIS files as well as the 2dm mesh file and model bathymetry. Copy the following files from the Module_Data folder:

  • Copy all files from Module_Data\GIS and into Working\TUFLOWFV\model\gis.
  • Copy all files from Module_Data\Mesh and into Working\TUFLOWFV\model\geo.

Boundary Condition Time Series

When developing complex models such as this Cudgen Creek with many boundary conditions Include files are recommended to manage and categorise data inputs. The boundary condition data and Include files have been provided in the Module_Data folder.

  • Copy FES2014_20221231_20230202_GDA94Z56_AEST.nc and FES2014_20221231_20230202_GDA94Z56_AEST.fvc from Module_Data\BC\ to Working\TUFLOWFV\bc_dbase.
  • Copy CFSR_20230101_20230201_GDA94Z56_AEST.nc and CFSR_20230101_20230201_GDA94Z56_AEST.fvc from Module_Data\BC\ to Working\TUFLOWFV\bc_dbase.

An astronomical tidal boundary is applied using data from the FES 2014 global tide model. The tidal data is provided in a NetCDF format, NetCDF layers contain time, space and sometime depth varying boundary conditions. The FES2014_20221231_20230202_GDA94Z56_AEST.nc file was generated using TUFLOW FV Get Tide command line tool using conda. This step has already been undertaken for you and is not outlined in this tutorial, for more information refer toTUFLOW FV Get Tide. TUFLOW FV Include file FES2014_20221231_20230202_GDA94Z56_AEST.fvc has been provide. Open this in Notepad++ and review the follow:



MB OUTLINE control file HERE

We will also apply an atmospheric boundary using data from CFSR atmospheric model. The atmospheric conditions applied to the model include:

  • Mean sea level pressure
  • Wind speed and direction
  • Shortwave and longwave radiation
  • Air temperature
  • Relative humidity

These are provided in CFSR_20230101_20230201_GDA94Z56_AEST.nc and was obtained using TUFLOW FV Get Atmos.

Create The TUFLOW FV Control File (FVC)

The TUFLOW FV Control File (.fvc extension) is created via a text editor. Notepad++ is recommended for this purpose as it allows for syntax highlighting of TUFLOW FV specific commands. This configuration information is provided in NotepadPlusPlus_Tips.

1. To setup our .fvc Launch Notepad++ and select File > Open... and navigate to the TUFLOWFV\runs folder and open Create_Empties.fvc.
T02 SC NewFVC.png
2. Save a new copy of this file into the TUFLOWFV\runs folder and call it Cudgen_Creek_001.fvc.
Note: Your FVC will already have some commands. These are default commands produced when you configured the TFV project. We will discuss these commands in the next section. Remember to enable the TUFLOW syntax highlighting using TUFLOW syntax highlighting for Notepad++.
3. The FVC already contains commands to define the GIS format and model projection. Comment out the last command since we don’t need to generate empty files again.
GIS FORMAT  == SHP
SHP Projection  == ..\model\gis\projection.prj
Tutorial Model  == ON
!Write Empty GIS Files == ..\model\gis\empty
4. The required commands are provided in the code blocks below. A brief description is also provided via a series of comments (green text after ! syntax). Copy the commands into your fvc file and save the file in Notepad++:
! TUFLOW FV TUTORIAL
! 2D hydrodynamic model of Cudgen Creek
GIS FORMAT == SHP ! GIS layers will be ESRI Shapefile
SHP Projection == ..\model\gis\projection.prj ! Projection string. All GIS layers in the model need to be in the same reference system
Tutorial Model == ON ! Run the model in license free demo/tutorial mode
!Write Empty GIS Files == ..\model\gis\empty  ! Generate empty template GIS layers. Already completed via QGIS

Run TUFLOW FV

Troubleshooting

Reviewing Results

WL and Vel

TUFLOW FV Model Setup With Structures

Run TUFLOW FV

Troubleshooting

Reviewing Results

WL and Velocity how do the structures change the hydrodynamics

TUFLOW FV Model Setup AD

Inclusion of Sal and Temp

Run TUFLOW FV

Troubleshooting

Reviewing Results

Sal and temp

Going Further

Use GetAmos, GetTide.. to download BC data link to pages here.

Feedback

Conclusion and Next Steps