Module 1 - 2D Flow

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

TUFLOW

Tutorial
Model

www.TUFLOW.com
www.TUFLOW.com/forum
support@tuflow.com

Introduction
Data Supplied
Tutorial Modules

SMS Version
March 2008
(SMS 10.0 or later)
Module 1 Pure 2D Model
Module 2 Embedding 1D Culverts
Module 3 1D Open Channel Through 2D Domain
Module 4 Flood Impact Assessment
Module 5 Modelling Bridges

TABLE OF CONTENTS
1.

Introduction

2.

Data Supplied

3.

Tutorial Modules
Module 1 Pure 2D Model
Module 2 Embedding 1D Culverts
Module 3 1D Open Channel Through 2D Domain
Module 4 Flood Impact Assessment
Module 5 Modelling Bridges
Module 6 2D-2D Linking and Modelling an Urban Environment
(Note: this module has not yet been documented, but the complete model files are
provided for those who wish to learn how to insert a finer grid inside a coarser grid.
To run this model, with or without a dongle, build 2007-07-BD or later of the
model is required.)

INTRODUCTION
TUFLOW is a powerful computational hydrodynamic engine used to simulate the flow of water
along channels and across surfaces. Such flows may be the result of flooding, storm surge or tidal
movement. TUFLOW, which stands for Two-dimensional Unsteady FLOW, was originally
developed for simulating two-dimensional (2D) flow. The one-dimensional (1D) program, ESTRY,
was subsequently incorporated and dynamically linked to the 2D solution (Syme 1991). Refer to the
TUFLOW User Manual available from www.tuflow.com for a more detailed explanation of the
concepts and algorithms used in TUFLOW.
Since TUFLOW does not have its own graphical user interface (GUI), there are different tools that
may be used for the creation and visualization of models. SMS includes a full-interface for building
1D/2D TUFLOW models that encompasses the majority of features including: creating the 2D
domains, interpolating z elevations, defining model simulations, setting up boundary conditions,
create 1D/2D layers (called coverages in SMS), working with cross-section data, defining 2D/2D
model linkages, and a host of post-processing options including contours, vectors, and plots.
These workshops have the same functionality as the TUFLOW tutorials that use MapInfo for
building model domains. While the functionality is equivalent, the steps may be quite different in
order and methods. This is due to the different model setup options available in SMS compared
with MapInfo.
This manual is designed for both hardcopy and digital use. The TUFLOW User Manual should also
be downloaded and referenced while undertaking the tutorial.
To run TUFLOW simulations, TUFLOW Build 2008-08-AE or later should be used. It is not
necessary to have a TUFLOW licence to complete the tutorial. You will also need to download a
version of SMS (10.0 or later). You can obtain a free 30 day trial license for SMS which you can
use to perform this tutorial.

1.1

Disclaimer

This tutorial is designed to help the user develop a clear understanding of the key concepts and
structure of TUFLOW models. It is intended for use in TUFLOW training, and is ideally used by
experienced TUFLOW users to train inexperienced users.
Note that the complete model files are provided. This allows the user to cross-check and to compare
their files with those provided to help identify any problems.
Please contact Aquaveo at support@aquaveo.com to provide feedback, obtain assistance, learn
about training opportunities, or report bugs/problems with SMS or these tutorials.
Neither Aquaveo nor BMT WBM Pty Ltd make any guarantee that the modelling approaches
presented in this tutorial are the best, or most appropriate, for developing other TUFLOW models.

MODULE 1 PURE 2D MODEL


2

Background Data
Creating a TUFLOW model requires the use of several types of data including:
1. Geographic (location) and topographic (elevation) data
2. Maps and images
3. Land use data (may be extracted from images)
4. Boundary conditions

2.1

Topographic Data
Topographic data in SMS is managed in the scatter module as scattered data sets
or triangulated irregular networks (TINs). SMS uses this data as the source for
elevation data in the study area. To open the TIN data:
1. All units used by TUFLOW must be metric. Select Edit | Projection and
change the horizontal and vertical units to meters.
2. Select File | Open and open the file DEM_M01.SMS.tin from the Data
Files Folder for this tutorial (Module 1\Input\Map Info).
The screen will refresh, showing a set of scattered data points. The display of the
scatter points will vary depending upon your current display settings. We will
change the display so we can see the elevation data and boundary of the TIN:
1. Choose Display | Display Options.
2. In the Scatter tab, make sure Points are turned off and Boundary and
Contours are turned on.
3. In the Contours tab, set the Contour Method to Color Fill and set the
Transparency to 50%.
4. Click OK to accept these settings and close the Display Options dialog

2.2

Background Image
Aerial photographs are useful to define material zones, verify model setup, and
for identification of hydraulically significant features. To open an aerial photo for
the site:
1. Select File | Open and open the file Aerial_Photo_M01.jpg

2. Click yes if prompted to build image pyramids. This builds images at


various resolutions for clearer images at different zoom levels.
You can toggle the display of the scatter data and images by clicking on the
appropriate toggles in the project explorer. As you proceed through this
workshop, turn the display of items on and off as is useful.

2D Grid, Materials, and Boundary Conditions


A TUFLOW model uses grids, feature coverages, and model control objects. In
this section we will build the base grid and coverages. Model control information
and additional objects will be added later.

3.1

TUFLOW Grid
To create the grid:
1. Right click on the default coverage. Select Rename and change the name
to TUFLOW grid.
2. Right click on this coverage again and change the type to Models ->
TUFLOW -> Grid Extents.
3. Make sure you are in the map module and select the Create 2-D Grid
. Create a grid frame around the area shown in Error!
Frame tool
Reference source not found. by clicking on three of the corners.

Figure 1. Creation of the Grid Frame

4. The location/size of the grid frame needs to be edited. First select the
and clicking
grid frame by choosing the Select 2-D Grid Frame tool
the box in the center of the grid frame. This reveals the editing handles.
You can drag the handles on each side and corner of the grid frame to
adjust the size of the grid frame. The circle near one of the grid frame
corners can be used to rotate the grid frame.
5. Select Feature Objects | Map -> 2D Grid. This will bring up the Map ->
2D Grid dialog.
6. Under Origin and Orientation, set the Origin to (292725, 6177615), the
Angle to 345 and the Size to 850 (I) by 1000 (J). Under I Cell Options,
set the Cell size to 5 m.
7. In the Elevation Options section of the Map -> 2D Grid dialog make
sure the source is set to Scatter Set and click the Select button (for
elevation) to bring up the interpolation options dialog. Change the
Extrapolation Single Value to 74.6 m and leave everything else as
default. SMS assigns all cells not inside the TIN to this value. The value
was chosen because it is above all the elevations in the TIN, but not so
large as to throw off the contour intervals.
8. Select OK twice. SMS will display the newly created grid as shown in
Figure 2 and will create a new item in the project explorer under
Cartesian Grid Data named TUFLOW gridGrid.

Figure 2. Final grid size and orientation.

9. Rename the grid TUFLOW gridGrid to 5m. (right click on the item
in the project explorer)

3.2

Materials
The type of land/vegetation within the simulation has a large effect on how water
will flow through the area. Manning n values are provided to TUFLOW which
control the resistance to flow. To provide these n values, we create polygons in
SMS with defined material properties.
Materials are created in SMS in Area Property coverages. Materials data may
be digitized from an image or imported from a GIS file (shapefile or mif/mid
file). We will read the material data from MapInfo mif/mid files.
To read in the area properties:
1. Right click on the tree item Map Data in the project explorer. Select New
Coverage.
2.

In the New Coverage dialog, change the type to Generic->Area


Property. Also, change the name to materials. Click OK to exit the
dialog and create the new coverage.

3. When converting GIS data to feature objects, the feature objects are
added to the active coverage. Select the materials coverage to make it
active.
4. Select File | Open and open the 2d_mat_M01_003.MIF file.
5. Click OK on the warning and then cancel to leave the Current Projection
as it is.
6. Select the new GIS Data folder to make it active.
7. From the Mapping menu select Shapes -> Feature Objects.
8. Click Yes to use all shapes then click Next.
9. In the GIS to Feature Objects Wizard, Step 1 choose Material in the
combo-box in the column labeled MaterialName and Not mapped in the
combo-box in the column labeled MaterialId.
10. Click Next and then Finish.
You may want to go to the display options dialog, turn on polygons and the
legend and also turn off other items in the project explorer so you can see the
material zones.
Notice that the area property coverage contains polygons but the polygons do not
cover the entire domain. Areas not contained inside a polygon will be assigned to
a default material value. It is easiest if you can make the default material the most
prevalent material in your simulation. The default material for our simulation is
pasture. This material hasnt been created since it was not part of the area
property coverage. To create this material:
1. Select Edit | Materials Data from the menu.
2. Click the button New.
3. Rename this material to Pasture.
4. Click OK.

Now that we have an area property coverage and a default material, we need to
associate them with the grid. This is specified in the grid options dialog. At the
same time, we will specify that the grid will use cell-codes from BC coverages.
To do this:
1. Right click on the Cartesian Grid labeled 5m in the Project Explorer
and select Options from the drop down menu.
2. Under Materials select the radio button Specify using area property
coverage(s).
3. Change the default material to Pasture.
4. Under Cell Codes select the radio button Specify using BC coverage(s).
5. Change the Default code to Inactive cell -- not in mesh.
6. Click OK to exit the Grid Options dialog.

3.3

Boundary Conditions
A TUFLOW simulation computes the water surface elevations and velocities
within the model domain. This requires definition of the model domain such as
topography and materials as well as external forces which are referred to as
boundary conditions.
This model will include a flow rate boundary condition on the upstream portions
of the model and a water surface elevation boundary condition on the
downstream portion of the model. This boundary condition configuration is very
typical of hydraulic models.
TUFLOW has the ability to store multiple boundary condition curves to represent
separate events. For example, curves for 10, 50, and 100 year events can be
included in the same boundary condition. Each simulation specifies the event that
is used for the simulation.

FC01 Downstream Boundary Arc

FC04 Upstream Boundary Arc

FC01 Upstream Boundary Arc

Figure 3. Locations of boundary condition arcs.

Generally, boundary condition locations are digitized by hand. However, in order


to ensure uniformity we will read the model boundary from a GIS file (mif/mid
format). To create the upstream boundary condition arc and assign boundary
conditions:
1. Turn off the display of all project explorer items except the Scatter Data.
2. Select File |Open and open the file Boundary.MIF.
3. Create a boundary condition coverage in SMS by right clicking on Map
Data in the project explorer and selecting New Coverage. Change the
type to TUFLOW->BC and the name to BC. Click OK and make sure
the new coverage is active.
4. Select the Boundary.MIF GIS shapefile in the project explorer and
select Mapping | Shapes -> Feature Objects. Click Yes to use all shapes
for mapping. Click Next.
5. In the GIS to Feature Objects Wizard click Next then Finish.
6. Uncheck the display of the GIS data and make sure that the arcs/vertices
are visible in the map layer.
7. Select the BC coverage to switch to the map module.
8. Click on the Select Feature Vertex tool. Select the Northern vertex at the
end of the FC01 Upstream BC Arc shown in Figure 3. Select the
Feature Objects | Vertices <-> Nodes command. Converting vertices to
nodes creates new arcs from the existing vertices. The new arc should
have two nodes (endpoints) and two interior vertices.

9. Select the newly created arc using the Select Feature Arc
click and select Attributes.

tool. Right

10. Change the type to Flow vs Time. Make sure the Spline Curve option (in
the Options section of the dialog) is not selected.
11. Click Add/Remove Events.
12. Click Add and enter 100 year as the name. Click OK twice.
13. Select the 100 year event.
14. Click on the button (rectangular box) currently labeled Curve
undefined to bring up the XY Series Editor dialog.
15. Open the file 100yr2hr.xls in a spreadsheet program, and copy the
inflow times to the first column and the first column of inflow values to
the second column.
16. Toggle on the Override default name option and rename the arc to FC01
Upstream.
17. Click OK twice.
Use the Vertex->Nodes tool and arc attributes dialog to create and setup the
second upstream boundary (FC04 Upstream BC Arc in Figure 3). You will not
need to create the event again (since it is already setup). Set this arc to also be a
flow vs time boundary condition and use the inflow 2 values from the
spreadsheet (use the same time values). Toggle on the Override default name
option and rename the arc to FC04 Upstream.
The downstream boundary condition is going to be a rating curve computed from
a friction slope within TUFLOW. To create the downstream boundary arc and set
up the boundary condition:
1. Use the Vertex->Nodes tool to create the downstream boundary arc
(FC01_DS Downstream BC Arc as shown in Figure 2).
tool, double click the downstream BC
2. Using the Select Feature Arc
arc. This will bring up an Attributes dialog.
3. Change the type to Wse vs Flow. Make sure the Spline Curve option is
not selected.
4. Change the Curve Source to Computed.
5. Set the Water Surface Slope to 0.01.
6. Toggle on the Override default name option and rename the arc to FC01
downstream
7. Click OK to return to the main screen in SMS.
In addition to specifying boundary conditions, we will use the bc coverage to
specify the cells that should be on for our simulation. We want cells outside of
our boundary conditions to be turned off or they can cause problems with the
solution. In addition turning off cells that we know will be dry during the entire
simulation reduces runtimes.

Earlier we specified that the cell codes (active/inactive) would be based on the
BC coverages with the default code being inactive. We need to activate the cells
for the area that we wish to model. We are going to use the "Boundary.mif"
polygon already read in for our domain extents.

Figure 4. Active polygon defined using "boundary.mif" for domain extents.

To activate cells within domain extents:


1. Make sure the BC coverage is active and select Feature Objects | Build
Polygons.
and click somewhere within
2. Select the Select Feature Polygon tool
the Boundary.mif polygon. Right click and select Attributes from the
drop-down menu.
3. Change the Type to Cell Codes and the Code to Active.
4. Click OK

TUFLOW Simulation
As mentioned earlier a TUFLOW simulation is comprised of a grid, feature
coverages, and model parameters. We have created a grid and several coverages
to use in TUFLOW simulations. SMS allows for the creation of multiple
simulations each which includes links to these items. A link is like a shortcut in
windows. The data is not duplicated; rather, the link points to where to go to get
the data. The use of links allows these items to be shared between multiple
simulations. A simulation also stores the model parameters used by TUFLOW.
To create the TUFLOW simulation:
1. Right click in the empty part of the project explorer and choose New |
TUFLOW Simulation. This will create several new folders that we will
discuss as we go. Under the tree item named Simulations, there will be a
new tree item named Sim.
2. Rename the simulation tree item to 100year_5m.

4.1

Geometry Components
Rather than being included directly in a simulation, grids are added to a
Geometry Component which is added to a simulation. The geometry
component includes a grid and all coverages which apply directly to the grid.
Coverages that should be included in the geometry component include: 2D BC
coverages (if they include code polygons), geometry modification coverages, 2D
spatial attribute coverages, and area property coverages.
To create and setup the geometry component:
1. Right click on the folder named Components and choose New 2D
Geometry component.
2. Rename the new tree item from 2D Geom Component to 5m geo.
3. Drag under this tree item the grid, the coverage named materials, and the
coverage named BC.

4.2

Material Sets
Now that we have a Simulation, we need to define our material properties. There
is already a Material Sets folder but we need to create material definition sets or a
set of values for the materials.
1. Right click on the Material Sets folder and select New Material Set. A
material set will appear below the Material Sets folder.
2. Right click on the material set in the project explorer and click the
Properties from the menu. The materials are displayed in the list box in
on the left.
3. Change the values for Mannings n for the materials according to Table 1.
Click OK when done.

Table 2. Manning's "n" Values

4.3

Material

Mannings n

Pasture

0.06

Roads

0.022

Buildings

Ponds/Water

0.03

Vegetated Creek

0.08

Simulation Setup and model parameters


The simulation must include a link to the geometry component and to each
coverage used that is not part of the geometry component. In our case, all of the
coverages in our simulation are part of the geometry component.
To create the link to the geometry component:
4. Drag the geometry component "5m geo" onto the simulation in the
project explorer.
The TUFLOW model parameters include timing controls, output controls, and
various model parameters. To setup the model control parameters:
1. Right click on the 100year_5m simulation and select Model Control.
Select the Output Control tab if it is not already selected.
2. In the Map Output section, set the Format to SMS 2dm; the Start Time to
0 hours and the Interval to 300 seconds (5 minutes). Set
Minimums/Maximums to Maximums Only.
3. In the Data section, select the following datasets: Depth, Water Level,
Flow Vectors, and Velocity Vectors.
4. In the Screen/Log Output section, change the display interval to 6. While
TUFLOW is running, it will write status information every 6 time steps.
5. Switch to the Time tab. Set the Start Time to 0 hours and the End Time
to 5 hours. Change the time step to 1.5 seconds. The rule of thumb is
that the timestep should be about half the cell size in seconds.
6. Switch to the Water Level tab and change the Initial Water Level to
0.0. Make sure that the Override Default Instability Level option is not
selected.
7. Switch to the BC tab and using the drop down list switch the BC Event
Name to 100 year.
8. Click OK to close the Model Control dialog.

Saving a Project File


To save all this data for use in a later session:
1. Select File | Save New Project.
2. Save the file as 2dflow.sms.
3. Click the Save button to save the files.

Running TUFLOW
TUFLOW can be launched from inside of SMS. Before launching TUFLOW the
data in SMS must be exported into TUFLOW files. To export the files and run
TUFLOW:
1. Right click on the simulation and select Export TUFLOW files. This will
create a directory named TUFLOW where the files will be written. The
directory structure is modeled after that described in the TUFLOW users
manual.
2. Right click on the simulation and select Launch TUFLOW. This will
bring up a console window and launch TUFLOW.
3. The simulation may take several minutes to run. The TUFLOW output
window will provide information as the run proceeds including the
current timestep, # of wet cells, as well as mass balance information
(poor mass balance is an indication of instabilities).
Note that TUFLOW can also be run by selecting Save Project, Export Files and
run TUFLOW from the simulation right-click menu. This will save the project to
the current project name so be sure to do a save as beforehand if you dont want
to override the existing SMS project.

Using Log and Check Files


TUFLOW generates several files that can be useful for locating problems in a
model. In the TUFLOW directory under \runs\log, there should be a file named
100year_5m.tlf. This is a log file generated by TUFLOW. It contains useful
information regarding the data used in the simulation as well as warning or error
messages.
This file can be opened with a text editor by using the File | View Data file
command in SMS. Open this file and go to the bottom of the file. The bottom of
this file will report if the run finished, whether the simulation was stable, and
report the number of warning and error messages. Some warnings and errors are
found in the *.tlf file (by searching for ERROR or WARNING) and some are
found in the messages.mif file (discussed below).
In addition to the text log file, TUFLOW generates a message file in .mif/.mid
format. SMS can import mif/mid files into the GIS module for inspection. In the
\runs\log directory, there should be a mif/mid pair of files named
100year_5m_messages.mif. Open this file in SMS. This file contains messages
which are tied to the locations where they occur. If your simulation had any

ERRORS or WARNINGS, they will show up in this file. Otherwise the file will
be empty.
It is sometimes difficult to read the messages because they are stacked on top of
each other. You can use the info tool to see what the messages are. To use the
info tool, click on the object (point at the start of the text string). This will bring
up a dialog showing the attributes (in this case text) of the object or objects at the
location.
The check directory in the TUFLOW directory contains several mif/mid files that
can be used to confirm that the data in TUFLOW is correct. The info tool can be
used with points, lines, and polygons to check TUFLOW input values.

Viewing the Solution


TUFLOW has several kinds of output. All the output data is found in a folder
named results under the TUFLOW folder. Each file begins with the name of
the simulation which generated the files. The files which have _1d after the
simulation name are results for the 1D portions of the model. We will ignore the
1D solution files in this tutorial.
In addition to the 1D solution files, the results folder contains a .2dm, .mat, .sup,
and several .dat files. These are SMS files which contain a 2D mesh and
accompanying solutions, which represent the 2D portions of the model.
To view the solution files from within SMS:
1. Select File->Open from the menu bar. Open the Results folder from the
TUFLOW directory.
2. Locate the 100year_5m.ALL.sup file and open it. This file contains a link
to the mesh file (.2dm) as well as the solution files (.dat). If a dialog pops
up and asks if you want to replace existing material definitions, click no.
If a dialog pops up and asks for time units, select hours.
3. From the project explorer, turn off all Map Data, Scatter Data, and
Cartesian Grid Data. Turn on the Mesh Data and click on it to make the
mesh module active.
dialog. From the 2D Mesh tab, turn on
4. Open the Display Options
contours and vectors as shown in Figure 5.

Figure 5. Display Options dialog set to display Contours and Vectors

5. Switch to the Contours tab and select Color Fill as the contour method.

Figure 6. Specifying the Contour Method.

6. Click the Color Ramp button to open the Color Options dialog box
and adjust the markers under the Current Palette to indicate a color ramp
like the one shown in Figure 7.

Figure 7. Specifying the color ramp.

1. On the Vectors tab, select Scale Length to Magnitude and a Scaling


ratio of 10 as per below.

2. Click OK on the Display Options dialog. At a later stage experiment


with the various display options available using these dialogs.
In SMS, select File, Save Settings to save these display settings for next time you
start SMS.

Make sure the Vel 100year_5m and Dep 100year_5m datasets are bold in the
project explorer. If they are not, select each one in turn to select as the active
layers as shown in the image below.
In the bottom left corner of SMS are the Time steps. This lists all of the output
times as written by TUFLOW. Select time step 0 00:00:00 and using the down
arrow on your keyboard, step down through the time steps to see how the flood
propagates through the catchment.
At this point any of the techniques demonstrated in the post-processing tutorial
can be used to visualize the TUFLOW results including film loops and
observation plots. You may want to take a few minutes and explore the
visualization options in SMS.

Figure 8. This is what the TUFLOW model looks like at 00:55 hours.

You might also like