River2D
Two-Dimensional Depth Averaged Model of River
Hydrodynamics and Fish Habitat
River2D Tutorial – The Basics
by
J. Blackburn and P. M. Steffler
University of Alberta
September, 2002
1.0
Introduction
This tutorial is provided for you to learn the basics of River2D, the
two-dimensional depth averaged model of river hydrodynamics
and fish habitat. This tutorial is one in a series. Once you’ve
completed this tutorial, you may consider trying one or more of the
other tutorials. These tutorial cover the following topics:
Fish Habitat Analyses
River Ice Modelling
Transient Flow Modelling
Boundary Extraction and Mesh Merging
All of these tutorials can be obtained from the River2D website.
The address for the website is
www.river2d.ca
In this particular tutorial, you will learn how to use River2D to
obtain a steady state hydrodynamic solution. This will be
accomplished using topographic data obtained along the
Kananaskis River near Fortress Mountain in Alberta.
Along the way, you will also learn how to perform the following:
Set or change the boundary conditions for the problem at hand
Use River2D to obtain a steady state hydrodynamic solution
Use various available display options for viewing and
presenting model information
Make changes to the computational mesh in order to improve
the hydrodynamic solution
Extract cross sectional data from the 2D topography
The files for this tutorial should be found in the same folder in
which you found this file: “R2D_theBasics”. The complete path to
this folder will vary, depending on where you put this folder after
unzipping R2D_theBasics.zip.
River2D Tutorial – The Basic – September 30, 2002
1
It is recommended that you make a hardcopy of this tutorial so that
you may maximize the River2D window on your computer screen
as you follow along. However, River2D displays many things in
colour so you may want refer to the electronic version of this
tutorial if your hardcopy is black and white.
If you have comments or questions regarding this tutorial, please
feel free to contact us.
Julia Blackburn
Email: jblackburn@civil.ualberta.ca
Peter Steffler
Email:pmsteffler@civil.ualberta.ca
2.0
The River2D environment
一个大致的建模步骤:生成
一个包含研究数据的地形文
件,文件是以.bed为扩展
名。然后用R2D-BED对数据
进行编辑。在R2D-MESH中编
辑生成的.bed文件,进行计
算离散,也叫做网格划分。
一旦网格生成和研究边界条
件设定好,用于river2D的文
件就可以生成。
The River2D program is one of a suite of four programs which also
includes R2D_Bed, R2D_Mesh and R2D_Ice. The general
modeling procedure is to develop a bed topography file (a text file
with a .bed file name extension) from surveyed field data, and then
edit and refine the data using R2D_Bed. The resulting .bed file is
then used in R2D_Mesh to develop a computational discretization,
also called a mesh. Once the mesh is built and the boundary
conditions for the problem are set (no flow vertical walls, inflow
discharge, and outflow water surface elevation), an input file for
River2D can be created. Input files for River2D have the file
extension .cdg. Use of R2D_Ice is only required when modelling
flow under an ice cover. In this case, an ice topography file (a text
file with a .ice file name extension) would be developed using
R2D_Ice and then loaded into River2D once the .cdg file for the
domain has been opened.
To get started, we will launch River2D and open the .cdg file for
the Fortress site.
River2D Tutorial – The Basic – September 30, 2002
2
1、启动River2D
2、选择File > Open
and navigate。
3、选择需要的文
件,载入文件
1 Launch River2D.
2
3
Choose File > Open and navigate to the R2D_theBasics folder.
Select the .cdg file for this the Fortress site. It is named
fort.cdg. Note: it may take a while for this file to load
depending on the speed of your computer.
At this point, you should see the following in your River2D
window.
Before getting into the details of what is being displayed in the
River2D viewing window, we shall go over the different
components of the River2D screen. The first item is the Menu Bar
River2D Tutorial – The Basic – September 30, 2002
3
which has many of the standard windows operations and additional
operations that are specific to River2D.
Some of the commands in the menu bar are reproduced in the
Toolbar.
The River2D screen also has a Title Bar which displays the
currently opened file, in this case, fort.cdg.
The last screen item is the status bar, located at the bottom of the
River2D screen.
Once a .cdg file has been loaded, the status bar displays the x and y
coordinates of the position of the mouse pointer. In addition to the
x and y coordinates, one other parameter is given in the status bar.
This parameter is the same as that selected using the
River2D Tutorial – The Basic – September 30, 2002
4
contour/colour command (found under the Display menu). This
parameter defaults to the bed elevation if it has not been specified
using the contour/colour command.
Now we shall focus on the contents of the River2D viewing
window. By default, River2D displays two items once a file is
loaded: the computational boundary and the water’s edge. To see
the distinction between these two items, toggle the display of the
water’s edge. This can be done by selecting the Water’s Edge
command found under Display Menu. As you can see, the water’s
edge consists of a blue line. This blue line represents the boundary
between wet and dry areas in the model. It can also be thought of a
line of zero water depth. If the Water’s Edge command is toggled
on while the model is running, it is updated to reflect areas of
drying or inundation in the solution. Now toggle the display so that
the water’s edge is not visible, so that the River2D window appears
as follows.
River2D Tutorial – The Basic – September 30, 2002
5
Outflow Boundary
No flow
Boundaries
Inflow Boundary
The item left in the window is the computational boundary. As you
can see, this boundary consists of red, blue and green lines. The
colours represent different types of boundaries. The red line
represents a “no cross-flow” or “vertical wall” condition while the
green and blue lines indicate inflow and outflow boundaries
respectively. Unlike the water’s edge, there is no command to
toggle the display of the computational boundary and therefore it is
always visible.
River2D Tutorial – The Basic – September 30, 2002
6
3.0
The .cdg file
The .cdg file used in this tutorial, fort.cdg was developed using a
bed topography file, fort.bed, and a mesh file, fort.msh. These files
can also be found in R2D_theBasics folder, as you may wish to go
through the process of creating fort.cdg yourself. In this tutorial,
we will go through the process of creating a .cdg file when we
learn how to update the computational mesh using R2D_Mesh.
The .cdg file contains all of the information necessary to obtain a
flow solution in River2D. This includes the computational mesh,
which is defined in terms of computational nodes and their
connectivity in the Triangulated Irregular Network (TIN). Each
computational node is represented by a line in the .cdg file and
consists of a node number (integer), x-coordinate (floating point
number), y-coordinate (floating point number), bed elevation
(floating point number), and bed roughness height (floating point
number). In addition, every node line contains information
regarding the initial conditions that are required as the initial guess
in the iterative solution procedure in River2D. This information
consists of x discharge intensity (floating point number), y
discharge intensity (floating point number), and water depth
(floating point number). The .cdg file also contains boundary
condition information and default values for all of the run
parameters required for River2D. (These can be changed by
manually editing the .cdg file or in the River2D environment as
will be demonstrated later). The .cdg file does not contain any
habitat or ice cover information.
If you open fort.cdg in a text editor, you will notice that the initial
x and y discharge intensities are 0 at every node (They are the last
two entries on every node line). This is because fort.cdg was
created using R2D_Mesh. When a .cdg file is created with
R2D_Mesh, the initial discharge intensities (or velocity
components) are assumed to be zero. R2D_Mesh provides initial
water depths at every node based on the water surface elevation at
the outflow boundary and a user supplied estimate of the water
surface elevation at the inflow boundary. If the loaded .cdg file is
River2D Tutorial – The Basic – September 30, 2002
7