Module 1 - 2D Flow

Embed Size (px)

Citation preview

  • 8/10/2019 Module 1 - 2D Flow

    1/18

    TUFLOW

    TutorialModel

    SMS Version

    March 2008(SMS 10.0 or later)

    www.TUFLOW.com

    www.TUFLOW.com/forum

    [email protected]

    Introduction

    Data Supplied

    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 5Modelling Bridges

    http://www.tuflow.com/http://www.tuflow.com/forummailto:[email protected]:[email protected]://www.tuflow.com/forumhttp://www.tuflow.com/
  • 8/10/2019 Module 1 - 2D Flow

    2/18

    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.)

    http://../1D_Culverts.dochttp://../1D_Culverts.doc
  • 8/10/2019 Module 1 - 2D Flow

    3/18

    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 aversion 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 [email protected] 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.

    http://www.tuflow.com/mailto:[email protected]:[email protected]://www.tuflow.com/
  • 8/10/2019 Module 1 - 2D Flow

    4/18

  • 8/10/2019 Module 1 - 2D Flow

    5/18

    2. Click yes if prompted to build image pyramids. This builds images atvarious resolutions for clearer images at different zoom levels.

    You can toggle the display of the scatter data and images by clicking on theappropriate toggles in the project explorer. As you proceed through thisworkshop, turn the display of items on and off as is useful.

    3 2D Grid, Materials, and Boundary Conditions

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

    3.1 TUFLOW Grid

    To create the grid:

    1. Right click on the default coverage. Select Renameand 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

    Frame tool . Create a grid frame around the area shown in Error!Reference source not found.by clicking on three of the corners.

    Figure 1. Creation of the Grid Frame

  • 8/10/2019 Module 1 - 2D Flow

    6/18

    4. The location/size of the grid frame needs to be edited. First select the

    grid frame by choosing the Select 2-D Grid Frametool and clickingthe 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 toadjust the size of the grid frame. The circle near one of the grid framecorners can be used to rotate the grid frame.

    5. Select Feature Objects | Map -> 2D Grid. This will bring up theMap ->2D Griddialog.

    6. Under Origin and Orientation, set the Originto (292725, 6177615), theAngleto 345 and the Size to 850 (I) by 1000 (J). Under I Cell Options,set the Cell sizeto 5 m.

    7. In the Elevation Options section of the Map -> 2D Grid dialog makesure the source is set to Scatter Set and click the Select button (forelevation) to bring up the interpolation options dialog. Change theExtrapolation Single Value to 74.6 m and leave everything else asdefault. 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 solarge as to throw off the contour intervals.

    8. Select OK twice. SMS will display the newly created grid as shown inFigure 2 and will create a new item in the project explorer underCartesian Grid Datanamed TUFLOW gridGrid.

    Figure 2. Final grid size and orientation.

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

  • 8/10/2019 Module 1 - 2D Flow

    7/18

    3.2 Materials

    The type of land/vegetation within the simulation has a large effect on how waterwill flow through the area. Manning n values are provided to TUFLOW whichcontrol the resistance to flow. To provide these n values, we create polygons inSMS with defined material properties.

    Materials are created in SMS in Area Property coverages. Materials data maybe digitized from an image or imported from a GIS file (shapefile or mif/midfile). We will read the material data from MapInfo mif/mid files.

    To read in the area properties:

    1. Right click on the tree itemMap Datain the project explorer. SelectNewCoverage.

    2. In the New Coverage dialog, change the type to Generic->AreaProperty. Also, change the name to materials. Click OK to exit thedialog 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 itactive.

    4. Select File | Openand open the 2d_mat_M01_003.MIF file.

    5. Click OK on the warning and then cancel to leave the Current Projectionas it is.

    6. Select the new GIS Data folder to make it active.

    7. From theMapping menu select Shapes -> Feature Objects.

    8. Click Yesto use all shapes then clickNext.

    9. In the GIS to Feature Objects Wizard, Step 1 choose Material in the

    combo-box in the column labeled MaterialName andNot mappedin thecombo-box in the column labeledMaterialId.

    10.ClickNextand then Finish.

    You may want to go to the display options dialog, turn on polygons and thelegend and also turn off other items in the project explorer so you can see thematerial zones.

    Notice that the area property coverage contains polygons but the polygons do notcover the entire domain. Areas not contained inside a polygon will be assigned toa default material value. It is easiest if you can make the default material the mostprevalent material in your simulation. The default material for our simulation ispasture. This material hasnt been created since it was not part of the area

    property coverage. To create this material:

    1. SelectEdit|MaterialsDatafrom the menu.

    2. Click the buttonNew.

    3. Rename this material to Pasture.

    4. Click OK.

  • 8/10/2019 Module 1 - 2D Flow

    8/18

    Now that we have an area property coverage and a default material, we need toassociate them with the grid. This is specified in the grid options dialog. At thesame 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 ProjectExplorer

    and select Optionsfrom the drop down menu.2. Under Materials select the radio button Specify using area property

    coverage(s).

    3. Change the default materialto Pasture.

    4. Under CellCodesselect the radio button Specify using BC coverage(s).

    5. Change theDefaultcodetoInactive cell -- not in mesh.

    6. Click OKto exit the Grid Optionsdialog.

    3.3 Boundary Conditions

    A TUFLOW simulation computes the water surface elevations and velocitieswithin the model domain. This requires definition of the model domain such astopography and materials as well as external forces which are referred to asboundary conditions.

    This model will include a flow rate boundary condition on the upstream portionsof the model and a water surface elevation boundary condition on thedownstream portion of the model. This boundary condition configuration is verytypical of hydraulic models.

    TUFLOW has the ability to store multiple boundary condition curves to representseparate events. For example, curves for 10, 50, and 100 year events can beincluded in the same boundary condition. Each simulation specifies the event that

    is used for the simulation.

  • 8/10/2019 Module 1 - 2D Flow

    9/18

    Figure 3. Locations of boundary condition arcs.

    Generally, boundary condition locations are digitized by hand. However, in orderto ensure uniformity we will read the model boundary from a GIS file (mif/midformat). To create the upstream boundary condition arc and assign boundaryconditions:

    FC01 Downstream Boundary Arc

    FC04 Upstream Boundary Arc

    FC01 Upstream Boundary Arc

    1. Turn off the display of all project explorer items except the Scatter Data.

    2. Select File |Openand open the file Boundary.MIF.

    3. Create a boundary condition coverage in SMS by right clicking on MapData in the project explorer and selecting New Coverage. Change thetype to TUFLOW->BCand the name to BC. Click OKand make surethe new coverage is active.

    4. Select the Boundary.MIF GIS shapefile in the project explorer andselectMapping | Shapes -> Feature Objects. Click Yesto use all shapesfor mapping. ClickNext.

    5. In the GIS to Feature Objects WizardclickNext then Finish.

    6. Uncheck the display of the GIS data and make sure that the arcs/verticesare visible in the map layer.

    7. Select the BC coverage to switch to the map module.

    8. Click on the Select Feature Vertextool. Select the Northern vertex at theend of the FC01 Upstream BC Arc shown in Figure 3. Select theFeature Objects | Vertices Nodes command. Converting vertices tonodes creates new arcs from the existing vertices. The new arc shouldhave two nodes (endpoints) and two interior vertices.

  • 8/10/2019 Module 1 - 2D Flow

    10/18

    9. Select the newly created arc using the Select Feature Arc tool. Rightclick and selectAttributes.

    10.Change the type to Flow vs Time. Make sure the Spline Curve option (inthe Optionssection of the dialog) is not selected.

    11.ClickAdd/Remove Events.

    12.ClickAdd and enter 100 year as the name. Click OKtwice.

    13.Select the 100 year event.

    14.Click on the button (rectangular box) currently labeled Curveundefined to bring up theXY Series Editordialog.

    15.Open the file 100yr2hr.xls in a spreadsheet program, and copy theinflow times to the first column and the first column of inflow values tothe second column.

    16.Toggle on the Override default name option and rename the arc to FC01Upstream.

    17.Click OKtwice.Use the Vertex->Nodes tool and arc attributes dialog to create and setup thesecond upstream boundary (FC04 Upstream BC Arc in Figure 3). You will notneed to create the event again (since it is already setup). Set this arc to also be aflow vs time boundary condition and use the inflow 2 values from thespreadsheet (use the same time values). Toggle on the Override default nameoption and rename the arc to FC04 Upstream.

    The downstream boundary condition is going to be a rating curve computed froma friction slope within TUFLOW. To create the downstream boundary arc and setup 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).

    2. Using the Select Feature Arc tool, double click the downstream BCarc. This will bring up an Attributes dialog.

    3. Change the type to Wse vs Flow. Make sure the Spline Curve option isnot selected.

    4. Change the Curve Sourceto Computed.

    5. Set the Water Surface Slope to 0.01.

    6. Toggle on the Override default name option and rename the arc to FC01downstream

    7. Click OKto return to the main screen in SMS.

    In addition to specifying boundary conditions, we will use the bc coverage tospecify the cells that should be on for our simulation. We want cells outside ofour boundary conditions to be turned off or they can cause problems with thesolution. In addition turning off cells that we know will be dry during the entiresimulation reduces runtimes.

  • 8/10/2019 Module 1 - 2D Flow

    11/18

    Earlier we specified that the cell codes (active/inactive) would be based on theBC coverages with the default code being inactive. We need to activate the cellsfor 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 | BuildPolygons.

    2. Select the Select Feature Polygon tool and click somewhere withinthe Boundary.mif polygon. Right click and select Attributes from thedrop-down menu.

    3. Change the Typeto Cell Codes and the Code toActive.

    4. Click OK

  • 8/10/2019 Module 1 - 2D Flow

    12/18

    4 TUFLOW Simulation

    As mentioned earlier a TUFLOW simulation is comprised of a grid, featurecoverages, and model parameters. We have created a grid and several coveragesto use in TUFLOW simulations. SMS allows for the creation of multiplesimulations 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 getthe data. The use of links allows these items to be shared between multiplesimulations. 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 willdiscuss as we go. Under the tree item named Simulations, there will be anew 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 aGeometry Component which is added to a simulation. The geometrycomponent includes a grid and all coverages which apply directly to the grid.

    Coverages that should be included in the geometry component include: 2D BCcoverages(if they include code polygons), geometry modification coverages, 2Dspatial attribute coverages, and area property coverages.

    To create and setup the geometry component:

    1. Right click on the folder named Components and choose New 2DGeometry component.

    2. Rename the new tree item from 2D Geom Componentto 5m geo.

    3. Drag under this tree item the grid, the coverage named materials, and thecoverage named BC.

    4.2 Material Sets

    Now that we have a Simulation, we need to define our material properties. Thereis already a Material Sets folder but we need to create material definition sets or aset of values for the materials.

    1. Right click on the Material Sets folder and select New Material Set. Amaterial set will appear below the Material Sets folder.

    2. Right click on the material set in the project explorer and click theProperties from the menu. The materials are displayed in the list box inon the left.

    3. Change the values for Mannings n for the materials according to Table 1.Click OKwhen done.

  • 8/10/2019 Module 1 - 2D Flow

    13/18

    Table 2. Manning's "n" Values

    Material Mannings n

    Pasture 0.06

    Roads 0.022

    Buildings 3

    Ponds/Water 0.03

    Vegetated Creek 0.08

    4.3 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 thecoverages 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 theproject explorer.

    The TUFLOW model parameters include timing controls, output controls, andvarious model parameters. To setup the model control parameters:

    1. Right click on the 100year_5m simulation and select Model Control.Select the Output Controltab if it is not already selected.

    2. In theMap Outputsection, set the Format to SMS 2dm; the Start Timeto

    0 hours and the Interval to 300 seconds (5 minutes). SetMinimums/Maximumsto Maximums Only.

    3. In the Data section, select the following datasets: Depth, Water Level,Flow Vectors,and Velocity Vectors.

    4. In the Screen/Log Outputsection, change the display intervalto 6. WhileTUFLOW is running, it will write status information every 6 time steps.

    5. Switch to the Timetab. Set the Start Timeto 0 hours and theEnd Timeto 5 hours. Change the time stepto 1.5 seconds. The rule of thumb isthat 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 OverrideDefault Instability Leveloption is notselected.

    7. Switch to the BC tab and using the drop down list switch the BC EventNameto 100 year.

    8. Click OKto close theModel Controldialog.

  • 8/10/2019 Module 1 - 2D Flow

    14/18

    5 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 Savebutton to save the files.

    6 Running TUFLOW

    TUFLOW can be launched from inside of SMS. Before launching TUFLOW thedata in SMS must be exported into TUFLOW files. To export the files and runTUFLOW:

    1. Right click on the simulation and selectExport TUFLOW files. This willcreate a directory named TUFLOW where the files will be written. Thedirectory 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 outputwindow will provide information as the run proceeds including thecurrent 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 andrun TUFLOW from the simulation right-click menu. This will save the project tothe current project name so be sure to do a save as beforehand if you dont wantto override the existing SMS project.

    7 Using Log and Check Files

    TUFLOW generates several files that can be useful for locating problems in amodel. In the TUFLOW directory under \runs\log, there should be a file named100year_5m.tlf. This is a log file generated by TUFLOW. It contains usefulinformation regarding the data used in the simulation as well as warning or errormessages.

    This file can be opened with a text editor by using the File | View Data filecommand in SMS. Open this file and go to the bottom of the file. The bottom ofthis file will report if the run finished, whether the simulation was stable, andreport the number of warning and error messages. Some warnings and errors arefound in the *.tlf file (by searching for ERROR or WARNING) and some arefound in the messages.mif file (discussed below).

    In addition to the text log file, TUFLOW generates a message file in .mif/.midformat. 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 named100year_5m_messages.mif. Open this file in SMS. This file contains messageswhich are tied to the locations where they occur. If your simulation had any

  • 8/10/2019 Module 1 - 2D Flow

    15/18

    ERRORS or WARNINGS, they will show up in this file. Otherwise the file willbe empty.

    It is sometimes difficult to read the messages because they are stacked on top ofeach other. You can use the info tool to see what the messages are. To use theinfo 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 thelocation.

    The check directory in the TUFLOW directory contains several mif/mid files thatcan be used to confirm that the data in TUFLOW is correct. The info tool can beused with points, lines, and polygons to check TUFLOW input values.

    8 Viewing the Solution

    TUFLOW has several kinds of output. All the output data is found in a foldernamed results under the TUFLOW folder. Each file begins with the name ofthe 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 the1D 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 andaccompanying 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 Resultsfolder from theTUFLOW directory.

    2. Locate the 100year_5m.ALL.supfile and open it. This file contains a linkto 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, andCartesian Grid Data. Turn on the Mesh Data and click on it to make themesh module active.

    4. Open the Display Options dialog. From the 2D Mesh tab, turn oncontoursand vectorsas shown in Figure 5.

  • 8/10/2019 Module 1 - 2D Flow

    16/18

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

    5. Switch to the Contourstab and select Color Fillas the contour method.

    Figure 6. Specifying the Contour Method.

  • 8/10/2019 Module 1 - 2D Flow

    17/18

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

    Figure 7. Specifying the color ramp.

    1. On the Vectors tab, select Scale Length to Magnitude and a Scalingratio of 10 as per below.

    2. Click OK on the Display Options dialog. At a later stage experimentwith the various display options available using these dialogs.

    In SMS, select File, Save Settings to save these display settings for next time youstart SMS.

  • 8/10/2019 Module 1 - 2D Flow

    18/18

    Make sure the Vel 100year_5m and Dep 100year_5m datasets are bold in theproject explorer. If they are not, select each one in turn to select as the activelayers as shown in the image below.

    In the bottom left corner of SMS are the Time steps. This lists all of the outputtimes 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 floodpropagates through the catchment.

    At this point any of the techniques demonstrated in the post-processing tutorialcan be used to visualize the TUFLOW results including film loops andobservation plots. You may want to take a few minutes and explore thevisualization options in SMS.

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