1iRIC Software
Changing River Science

Nays2DH
ExamplesiRIC version 4.0

Copyright 2013 iRIC Project All Right Reserved.
Nays2DH Tutorial

2

Introduction to Nays2DH
You can use Nays2DH in the iRIC for your calculations using the following procedures;

Launch Nays2DH
Prepare to use Nays2DH in iRIC

Generating the computational grid
Generate the computational grid by using selected geographic data
(river survey data, Digital Elevation Model,etc)

Setting the computational conditions
Set initial and boundary conditions, etc

Running a simulation
Calculate with Nays2DH

Visualizing the simulated results
Visualize the simulated results such as flow velocity, water depth, river
bed elevation and more using contour maps, vectors, etc

Nays2DH Tutorial

3

TutorialⅠ.
Calculation of flow and morphological change ofriver bed in a meandering channel⚫

Purpose of this tutorial
You can understand the basic operation of Nays2DH in iRIC by calculating the flow

and morphological change of the river bed in a meandering channel with simple bed
geometry, and also understand the fundamental bed evolution phenomena in ameandering channel.

Nays2DH Tutorial

41.

Generate a computational grid
Generate a computational grid of a meandering channel with a rectangular crosssection using the [Multi-function Grid Generator] included in iRIC.

Select Menu bar → [Grid] → [Select Algorithm to Create Grid].
In the grid generation algorithm selection dialog, select [Multifunction Grid Generator] andpress [OK].

The dialog for grid generation will be opened.
You can generate the computational grid by clicking on [Create Grid] after setting theconditions defined as follows.
[Channel Shape]-Select Channel Shape：Sine-generated curve[Cross Sectional Shape Parameters]- Width：0.3m- Number of Grid in Lateral
Direction：16[Channel Shape Parameters]- Wave Length of Meander：4.7m- Meander Angle ：28.6°- Number of Grid in One Wave Length：40[Bed and Channel Shape]- Channel Shape：0.004
The default values are used for the otherparameters.

Nays2DH Tutorial5

A confirmation dialog which asks you [Do you want to map geographic data to grid attributes
now?] will appear. Click on [Yes], and the computational grid will be generated as follows.

The computational grid willappear on the screen.

2.

Set the cell conditions
The cell conditions can be set on the generated computational grid. Here, you set the
Manning’s roughness coefficient.

Click on [Cell attributes] in the object browser, and change the status of cell attributes to. You can open the cell attributes by clicking on  bottom on the left side of [Cell attributes],
and then click on [Manning’s roughness coefficient].
⚫

The left side of the figure is
the object browser, and theright side of the figure is thevisualization screen.

⚫

When you want to change
something in thevisualization screen, youneed to click on the related
item in the object browser.
When you click on that item,
the background color of theitem changes to light blue.
Such status is defined as‘active’ here.

⚫

While you keep the status of[Manning’s roughness
coefficient] as , thecontour on the gridindicates the value of[Manning’s roughness
coefficient].

Nays2DH Tutorial

6

Select all of computational grid by operating your mouse, and then right-click on the selected
region.
Then select [Edit value] on appeared menu.

⚫

You can directly
change the value of cell
attributes of each cell.

⚫

Hold down the Shift
key and select cells
continuously. You canselect remote cells at
the same time.

On the dialog [Edit Manning’s roughness coefficient], you can specify the value of thiscoefficient in the region you selected.
By this procedure, Manning’s roughness coefficient is set at all of cells in the grid.
⚫

Nays2DH Tutorial

Manning’s roughness
coefficient:0.013

7

3.

Set the computational conditions
This section explains how to set the computational conditions for Nays2DH. The

modified part of the dialog needed for this computation is only described below. For the
rest of parameters, the default values are used.

Select [Calculation conditions] → [Setting] on menu bar.
⚫

[Import]: iRIC reads
the computational
conditions from another
iRIC project file which
was created using
Nays2DH.

⚫

[Export]: You can
output thecomputational
conditions for other
runs.

⚫

Solver Type: setting thegeneral settings ofNays2DHSet the computational conditions for this run as follows.

-

Bed deformation:
EnabledNote: You can select theitems with mark [+], if you
select [Advanced] in [SelectSolver Type].

Nays2DH Tutorial

8

Set the boundary conditions.

⚫

Boundary conditions-Periodic boundary
condition: Enabled-Time unit ofdischarge/water surface
file: Second

After setting the conditions
as shown below, click [Edit]
for [Time series of discharge
at upstream and water levelat downstream].

Set the discharge of upstream end.

Nays2DH Tutorial⚫

Clicking on [Add]makes new line.

⚫

Time from 0 to 1800
(sec) with a constantdischarge of 0.004
m3/s, is given in thisexample.

9

Setting conditions related to Time.

-Output time interval: 60 sec-Calculation time step: 0.01 sec-Start time of output: 0 sec

Setting conditions related to Bed material.

- Diameter of uniform bed
material(mm): 0.55(mm)Nays2DH Tutorial

10

4.

Run a simulation
After setting calculation conditions, run the computation.

For running a simulation, select [Simulation] → [Run] in menu bar or select  on menu tool
bar.

Before running the calculation, a message recommending that you save the current project isdisplayed, so click “Yes” to save the project.

There are two methods of saving the project, [Save as File (*.ipro)] and [Save as Project].
Here, select [Save as File (*.ipro)] and save it.

Nays2DH Tutorial11

When saving the project is completed, the solver console starts up and the calculation begins.

⚫

The numbers shown insolver console are time(sec), discharge (m3/s)
and downstream waterlevel (m) (from left toright).

⚫

The [out] shown on theright-hand side of thenumbers means that iRIC
has written the result to a
file to be visualized.

You can visualize the result after getting a dialog which informs you [The solver finishedcalculation] (left figure), or by selecting [Calculation result] → [Reload] on the menu bar(right figure) during the calculation.

Nays2DH Tutorial

12

5.

Visualize the results
By visualizing the output results, we confirm the calculation result.

Select [Calculation result] → [Open new 2D post-processing window] in the menu bar, or
click on the button shown in the following figure.
The buttons for visualization arefrom left to right:

2D post-processing window will open.

Nays2DH Tutorial⚫

2D Post-Processing
window: for visualizing
top or plan view of theresult⚫

2D Bird’s-Eye PostProcessing window: forvisualizing three
dimensional view⚫

Graph window: forvisualizing one
dimensional graph ofmodel variables

13

To display the physical quantity in a contour plot, left-click on the quantity you want tovisualize. We choose “ElevationChange (m)” to visualize the calculation result of bed
evolution.
⚫

[Scalar]: show a contour map ofselected scalar data.

⚫

[Arrow]: show a vector of selected
vector data.

⚫

[Particles]: visualize particle
movement by selected vector data.

⚫

[Particles]: visualize particle
movement by selected vector data.

⚫

[Cell attributes]: show the cell
attributes you set in the cellconditions.

⚫

[Measured values]: You can read themeasured data such as experimental
data.

To change the range of color legend, right-click on [Scalar > ElevationChange (m)] and click[Property].

Nays2DH Tutorial⚫

You can grab the color
bar with the mouse andmove it. (Note that thescalar must be active.)⚫

You can pan / zoom /rotate the drawing
screen using thefollowing mouse
operation.

14

You can change the maximum value, minimum value, division number, etc. of the color bar.

⚫

Deselect [Automatic]⚫

Max: 0.02 (m)⚫

Min: -0.04(m)⚫

Deselect [Transparent] box⚫

Color bar setting:Direction > Horizontal

Now, you can clearly observe a point bar on the inner bend and the erosion in the outer bend.

Nays2DH Tutorial

15

In the next step, the flow field is visualized by vectors. Click on the box of [Velocity] under[Arrow] in the object browser.

The flow in thecomputation isvisualized by vectors.
However, the lengthof vectors is notsuitable for thevisualization.

For setting the properties of vectors, right-click on [Arrow], and select [Property] on the popup menu that appears. The dialog for setting the vector scaling will open.

Nays2DH Tutorial⚫

Deselect [Auto] check box⚫

Length on screen: 20 pixel⚫

Legend title:
Velocity (m/s)

16

By adjusting the length of vectors, you now can see the flow field in the meandering channel.

Next, the one-dimensional graphic function is used for visualizing the water level and bed
elevation in the cross section. Select [Calculation Result] → [Open new graph window]
on the menu bar.

Nays2DH Tutorial

17

The dialog for setting the data of 1D graph will open. Select the X Axis as [J] and add[Elevation] and [WaterSurfaceElevation] from [Two dimensional data] to [Selected data].

⚫

X Axis: J⚫

Two-dimensional Data:
Select [Elevation],[WaterSurfaceElevation]and click on [Add].

Note: I and J indicate theindex of the longitudinal andtransverse direction in thegrid.

The water surface and bed in a cross section are visualized. Click on [Draw Setting] forchanging the visualization properties of this graph.

⚫

Nays2DH Tutorial

By moving thelocation of I on
Controller, you canchange the positionof the cross section.

18

You can change the style width and color of lines.

⚫

Setting for Elevation(m)-Line style: Solid Line
-Line Width: 3-Color: Black⚫

Setting for
WaterSurfaceElevation(m)-Line style: Solid Line
-Line Width: 3-Color: BlueYou can visually understand the line of water surface and river bed.

Nays2DH Tutorial

19

As the last step, the simulated bed elevation changes are compared with the experimental
results. Right-click on [Measured Values], and select [Import] on the pop-up menu.

⚫

“measured.txt” isspecified as a
[Measured values].

The measured data will be imported. Set the scalar and color bar ranges to be the same.
You can change the range of color legend by right-clicking [Scalar] under [Measured Values]
and selecting [property] on appeared pop-up menu.

⚫

Nays2DH Tutorial

The calculation
result shows thatthe trend of
measured values
can be roughly
reproduced.

20

You can do more qualitative comparison between simulated and measured bed topography. On
the menu bar, select [Calculation Result] → [Open new verification window].

You will specify the time and quantity of simulated result for the comparison as well as themeasured data. Here, the bed evolution is compared.

Nays2DH Tutorial⚫

[Timestep]: 1800,
meaning you choose
the simulation result at
the end of computation.

⚫

[Calculation Result]:
ElevationChange(m)⚫

[Measured Value]: Dz

21

The dialog “Verification” will open. Select “Measured value vs. Calculation Result” for Chart
type. The solid line in the figure means perfect agreement between simulated and measured
bed evolution rate. The calculation result shows good agreement with the measured data. You
can see how this agreement changes when you change the calculation condition (e.g., grid
resolution, roughness, model parameters etc).

Nays2DH Tutorial

22

TutorialⅡ．
Calculation of flow and bed morphological change
of a real river⚫

PurposeYou will learn how to generate a computational grid from cross sectional river survey data, andset the computational conditions to calculate the flow and morphological changes in a real river.
The computational results are visualized by the post-processing tools of iRIC. You will make asnapshot and animation of the computational results.

Nays2DH Tutorial

23

1.

Generate a computational grid
A computational grid will be generated by using river survey data which includes the cross-sectional geometry data for the river reach of interest.

You can import a river survey data by selecting Menu bar → [Geographic Data] →[Elevation(m)].

⚫

You will specify [I2735.riv] as a riversurvey data.

⚫

Check on [Middle
point of Low waterway] for defining thelocation of centerlineof the river survey
data, and push [OK].

The dialog for setting the imported river survey data will open.

Note: you will see an error
message when you open
river survey data. You canjust click “OK” to open the
file.

Nays2DH Tutorial

24

When reading is successful, the transverse survey data is drawn.
Next, a background image can be imported. Click [File > Property] on the menu bar.
⚫

Please specify [I2735.jpg] as backgroundimage, or import thebackground images byfollowing procedure.

Background Images
By importing backgroundimages such as maps andaerial photographs whencreating a calculation grid or
mesh, it is possible to createa calculation coordinate
system that takes into
consideration the levees,
river banks, low waterways
and high water reservoir
boundaries. In addition,
designation of vegetation
cell, fixed bed cell, obstacle
cell etc. can be set whilereferring to the backgroundimage, as is described below.

Set the coordinate system of the imported data. Click [Coordinate System > Edit].

⚫

Nays2DH Tutorial

The coordinate
system of the dataread this time is[Orthogonal
coordinate system 12series].

25

The selection screen for the coordinate system is displayed. Enter “jgd” in the search window.
Select “EPSG:2454 JGD2000 / Japan Plane Rectangular CS XII“ and click “OK”.
Since you will return to the project property setting screen, please click “Close”.

With the above settings, the coordinate system of the imported river survey data has been
described. You can import background image from some sources like Google Map.

Note: To show Google
Map image correctly, youwill need Google API key
and set it into Menu bar >Option > Background
Images (Internet).

Nays2DH Tutorial

26

Align the channel center line with the main channel of background image.

⚫

By selecting thesurvey line andholding down the
Shift key, bring it
closer to the blue
circle at the channel
center point, you canmove the center pointwith the mouse.

The channel center point was able to match the main channel center of background image.

Nays2DH Tutorial

27

Set calculation grid generation conditions.
Select [Grid] → [Select Algorithm to Create Grid] on the menu bar as shown on the left.
On the screen on the right, select [Create grid shape solving Poisson equation].

Click [OK] as it is.

In this grid generation method, the calculation
area is first set using the center line, thecontrol section, and the left and rightshoreline.
You can also add the number of control
sections later.

Nays2DH Tutorial

28First, edit the center line with the mouse so that the center line passes approximately throughthe center of the main channel.
If the number of vertices is insufficient, you can add using right click.

Next, click [Build Left bank and Right bank line] from the right click menu. The screen forentering the distance from the center line is displayed. Please enter the approximate distance.
For this case, both the left bank and the right bank are 300m.

Nays2DH Tutorial

29

There are some vertices on the left bank and right bank line. Move these vertices with the mouseto set the area to be calculated.
Attention Point:
The calculation area
should be within the areaof the imported riversurvey data. If you
protrude from the area,
the terrain data may not
be mapped correctly tothe calculation grid.
Please keep in mind
that the center line, theleft bank line, and theright bank line areroughly perpendicular tothe cross section near the
upstream anddownstream ends of thereach- this will aid insetting boundary
conditions.

Once the calculation area is set, click [Create grid] from the right click menu.

Nays2DH Tutorial

30

The grid division number setting screen in the streamwise flow direction (ni) and transverse
direction (nj) is displayed.
Please set these as follows and click [OK].
Next, in the confirmation dialog that comes up, click the [Yes].

Note: For workshops,
please set as following asa guide according to thespecifications of thecalculator.
ni=50～
nj=20～A calculation grid was created.

Please check the grid
shape. In order to obtainbetter calculation results,
it is important that gridlines are orthogonal as
much as possible.
Are the edges collapsed
and there is some grid
like a triangle?
If so, check the points
to be noted in thecalculation area andcorrect the calculationarea.

Nays2DH Tutorial

31

2.

Setting cell attributes
Set the roughness coefficients for the fixed and movable bed by choosing a value of Manningcoefficient as attributes of the cell. The low water channel is treated as a movable bed and the highwater floodplain is a fixed bed; separate roughness coefficients are set for each.

Right-click [Geographic Data > Fixed or Movable Bed] of the object browser. Click [Import> Polygons] and load “floodplain.shp”.

floodplain.shp

In the polygon import setting screen, set the value to [Fixed bed] and click [OK].

Nays2DH Tutorial

32

A polygon with “Fixed bed” attribute is loaded.

In the same operation, read the low waterway polygon “mainchannel.shp” as the value“Movable bed”.

Nays2DH Tutorial

33

Copy the polygon because the place you want to set Manning’s roughness coefficient is thesame as fixed bed and movable bed part. Right-click on the polygon you want to copy andselect [Copy].

Select the geographic information to copy the selected polygon.

⚫

Select [Manning’s
roughness coefficient]

Set the value of the polygon to be copied.
This operation is performed on both the high-water bed and low-water channel polygons.

Nays2DH Tutorial⚫

Polygon with specified
low waterway: roughness
coefficient 0.022⚫

Polygon with specified ahigh waterbed: roughness
coefficient 0.04

34

At this stage, the cell attribute has not yet been reflected in the calculation grid. To map acell attribute to a calculation grid, select [Grid > Attributes Mapping > Execute] on themenu bar.

If you check the cell attributes of the grid, you can see that the cell attribute is mapped in thecalculation grid.

Nays2DH Tutorial⚫

If you want to fine-tune
after mapping, you canchange the value by
specifying it in cell units.

⚫

However, it is important
to note that if you change
the cell attributes directly
on a cell-by-cell basis
and then perform themapping again, thedirectly modified partwill disappear.

35

3.

Setting calculation conditions
Set the calculation conditions. Since only the changes are described, you can infer the settings thatare not explained here as the default values.

Set the necessary calculation conditions.

⚫

Solver type: setting thegeneral settings of Nays2DH-Bed deformation: Enabled

Set the boundary condition.

⚫

Boundary Condition- Time unit ofdischarge/water surface file:
Hour

Nays2DH Tutorial

36

Set the discharge of upstream end.

⚫

For flow setting, click[Import] and load
“qt.txt”.

⚫

Output time interval:
200 (sec)⚫

Calculation time step:
0.5 (sec)⚫

Start time of output: 0
(sec)

⚫

Start Time of bed
deformation: 3600
(sec)

Setting conditions related to Time.

Nays2DH Tutorial

37

Setting conditions related to Bed material.

⚫

Nays2DH Tutorial

Diameter of uniform
bed material: 0.4 (mm)

38

4.

Run a simulation
Select [Simulation] → [Run] in menu bar .

5.

Visualization and out output of calculation results
Output the calculation result in iRIC and output the image.

Select [Calculation result] → [Open new visualization window (2D)] on the menu bar.

⚫

Nays2DH Tutorial

Output example
displaying backgroundimage and water depth
contours

39

Fix the color range of the contour so that it does not visualize low water depths.
Right-click [Scalar > Depth (m)] in the object browser and select [Property].

Next, visualize the arrow.
Select [Arrow > Velocity (ms-1)] in the object browser.

Nays2DH Tutorial⚫

Deselect [Automatic]⚫

Max: 15 m⚫

Min: 0.05 m⚫

Deselect [Fill lower area]⚫

Deselect [Transparent]

40

By right clicking on [Arrow > Velocity (ms-1)], you can set some parameters for visualizing the vector.
Below is an example.

Use the animation tool bar to check the calculation result.

Nays2DH Tutorial

41

Also you can draw the hydrograph at the same time.
Select [Calculation Result > Open new Graph Window] in the menu bar.

⚫

X Axis: Time⚫

Select [Discharge (m3s-1)] inpoint data and select [Add].

You can draw a contour map and a hydrograph at the same time.
The computational results can be outputted as image file. Select [File > Continuous Snapshot/Movie/ Google Earth Export] on the menu bar.

Nays2DH Tutorial

42

Make the necessary settings in the continuous snapshot wizard.

⚫

Target windows: Selectboth⚫

Output file: In one file⚫

Layout: As is⚫

Specify directory⚫

File Format: jpg

Specify the file output location and image file format.

Nays2DH Tutorial43

Specify whether to output movie．

⚫

Specify the start and end time to output.

Nays2DH Tutorial

Output the movie files

44

You can also export the image file into Google Earth

When the setting is completed, a confirmation screen (left figure) appears, so select [Finish].
The screen on the right is the output screen.

Nays2DH Tutorial

45

Image files grouped with a contour diagram and hydrograph in the movie are output.

An example of the Google Earth export of the computational result

Nays2DH Tutorial