You are on page 1of 45

iRIC Software

Changing River Science

Mflow_02
Example 1
(How to create grids and
Flow field computation)
Directed by Mineyuki Gamou

Last Update:2014.06.24
Release Date: 2014.07.11
Copyright 2011 iRIC Project All Right Reserved.
Mflow_02  tutorial 1

(How to create grids and 
Flow field computation)

Creation of distributaries model

2
Preparation data
① River survey data
Folder name 「survey data¥Sample_1¥Testdata¥R_Survey」
File name 「River_survey_1.riv」、
「River_survey_2.riv」、
「River_survey_3.riv」
② Water level and flow discharge data
Folder name 「¥Sample_1¥Testdata¥Discharge」
File name 「Discharge_W_level_7k.csv」
③ Water level data
Folder name 「¥Sample_1¥Testdata¥Water_level」
File name 「W_level_3k.csv」、「W_level_4k.csv」
④ Grain size data
Folder name 「¥Sample_1¥Testdata¥Grain_size」
File name 「Grain _1.csv」、「Grain _2.csv」、「Grain _3.csv」

Folders created in advance

Please create under folder name “「~¥Sample_1」”

① Folder name “¥ Outlist” : Output file folder for calculation results


② Folder name “¥ Plotdata” : Dump file folder for calculation results
③ Folder name “¥ Restart” : Restart file folder

(Note) The folder name dose not matter any.


The above is for informational purposes only.

4
The table of contents of tutorial

Ⅰ. Creating Unstructured meshes


( from river survey data )
Ⅱ. Set up ground elevation
Ⅲ. Set up calculation condition and
geographical information
Ⅳ. Setting up boundary conditions
Ⅴ. Confirmation of elevation and initial water depth
Ⅵ. Execution of Flow field and
Movable bed computation
Ⅶ. Visualizing the calculation results

Ⅰ How to create unstructured grid data


( from river survey data )
Ⅰ.1 Importing of river survey data

① Select “ Import”.→ “ Geographic data ” → “ Elevation ”


from menu bar.

6
② Please move ” ~¥Testdata¥R_Survey ” folder,
and then load the river survey data
“River_survey1.riv”, ”River_survey2.riv”, ” River_survey3.riv”.

Note the order in which they read
Please load in the order of  “River_survey1.riv” ,
”River_survey2.riv” and “River_survey3.riv” always.

③ Ingenuity of river_survey data


River_survey3.riv

Cross-section added
in River_survey3.riv

River_survey1.riv River_survey2.riv
<Tips>
•“River_survey1.riv” and “River_survey2.riv” refer to the same river, but the survey data is separated to 2 files. In
the same river, if the riverbed slope changes significantly, it’s better to separate survey data to make the setting
of initial water level (depth) smooth.
• A cross section data at 5.2k of the main stream has been added into the survey data of tributes and distributes
“River_survey3.riv”. In normal circumstances it is up to 3.0k~4.0k, but it’s better to add one cross-section of the
main stream at the end of the surveying cross-section in order to smooth the connection with the part of main8
stream.
Ⅰ.2 How to select grid creation
① Right-click “Grid Creating condition” in object browser,
“select algorithm to create grid” will display.

② Dialog "Select Grid Creating algorithm" will display when you click
the “ Select Grid Creating algorithm ” , please click “OK”.

For unstructured grid, because only "Create grid from polygon


shape" is available

10
Ⅰ.3 Set up the coverage to create grids

① By mouse click in a line along the river survey data and then double-
click in the end, set up of grid creation coverage is completed .

Because river
survey data and the
line can’t match with
perfectly, it doesn’t
matter if it enters
inside or protrudes out
of the boundary a little.
However, please don’t
protrude out of the
open boundary. (main
boundary stream 4.0k, 7.0k,
distribute 3.0k) 11

② By moving mouse upon the grid creation range and then right-click,
the sub menu of grid creation conditions is shown.
You click "Create Grid" at the bottom.

12
③ Dialog of “Create Grid” appears .
It’s available to input “Specify minimum angle of cell vertices” and
“Specify maximum area for cell ” then click “OK”.

④ It’s possible to click “yes” at the “Confirmation dialog” of mapping for


the grid attributes of geographic information.

13

⑤ Then grids are created as shown.

14
Ⅰ.4 Refinement of grids
① It’s possible to set up the Refinement area inside the grid area if you
want to create small grids only in specified area such like distributaries
and confluences. Right-click again, “submenu of grid creating
conditions” displays, then click “add Refinement Region”. You can set
the Refinement Region by continuing mouse click.

15

② “Maximum area in Refinement region” displays, you can


specify smaller area than former.

16
③ Right-click again to display "submenu of grid creating condition", then
click "Create Grid" at the bottom, a warning dialog as shown.
If you click "Yes", the “dialog of grid creation” will display again.

④ Then if you click “OK” and thereafter click “yes” in the next
“confirmation dialog”,

17

⑤ The grids as shown will be created

18
Ⅰ.5 Add a break line
① At the place where ground elevation changes significantly,
grids must be created in the shape in accordance with the
variation. Therefore, break line can be applied.

Place of break line

19

② Right-click again when “submenu of grid creating conditions”


appears, then please click “add break line”. Break line can be
drawn up by continuous mouse click.

break line

20
③ Right-click again when “submenu of grid creating conditions”
appears, if you click “create grid”, the warning dialog appears again.
By clicking “yes”, the “grid creation dialog” appears again.

④ If you click “yes” and then still click “yes” again in the
“confirmation dialog”,

21

⑤ It’s able to confirm creation of grids along the break line.

break line

22
⑥ Necessary to modify shape of grids

Please avoid long and thin grids in


transverse direction

23

Ⅰ.6 Other editing function of


unstructured meshes
① Add node
② Delete node
③ Additional obstacle(island) area
④ Editing of the coordinate value
⑤ Edit the maximum area of
cell(element)
Please refer to the “iRIC User’s Manual” for details.
24
Ⅱ Setting up of ground elevation
Ⅱ.1 Setting up from river survey data
① Ground elevation is reflected by clicking “grid” → “Attributes
Mapping” → “execute” in menu bar.

25

② Elevation is set in the order of


“River_survey1.riv” , “River_survey2.riv” and “River_survey3.riv”.

River_survey3.riv

Possible for levee

Data displayed on the


top takes priority

In order to
“River_survey1.riv”is a
River_survey1.riv priority, embankment
has to be diverted
portion. 26
③ So let’s replace river survey data 1 and 3. By moving and right-clicking
mouse at the position of river survey data, data can be replaced by
“move up”, “move down”.

River_survey3.riv

Possible for levee

And ground data is


set with priority of
river survey data 3
(“River_survey3.riv”),
levees are possible
to dam up water in
River_survey1.riv the main stream.27

Ⅱ.2 Setting up of Area code


What is area code?
“Area code” is a control parameter to set up
ground elevation and initial water‐elevation 
that is available for all areas and river survey data.

28
① In object browser “Geographical Data” → right-click “Area code”,
select “add” → select “polygon” to set up.
Area code = 3

Area code = 2

At this time, it’s easy to


imagine the results of both
ground elevation setting by
area codes and lead to the
same result with priority of
river survey data 1
Area code = 1 (“River_survey1.riv”),. 29

② So it’s better to set “area code” as shows, along the line of


distribution basin and low-water channel.

Area code = 3

Data displayed on the


top takes priority

Area code = 1 Area code = 2 30


③ Apology

It’s not available to set up the ground elevation 
considering “area code” in the preprocessor of 
iRIC. 
Therefore, Mflow_02 also has the function to 
set ground elevation from solver. 

31

Set all “Calculation condition” , “Geographical 
information” and “Boundary conditions”

The one-step through

Confirmation in “Initial Elevation”


in the calculation result

If correction is needed If elevation is a reasonable

Fixed area code back to Continuing the perform


the pre-processor iRIC Mflow 32
④ Elevation that was set using “Area cord”

33

Ⅲ Setting up of Calculation condition・


Geographical information
Ⅲ.1 Setting up of Calculation condition
① Select “calculation condition”.→ “Setting” from menu bar.

34
② Setting up of data name and calculation condition

How to set up data name is set to see calculation object, name of area,
calculation condition, calculation time, etc. ( 256 alphanumeric at most.)

35

③ Setting up of calculation time and time step


Click the “Control specification” in the “Groups ” and set as follows.

1. Start time  : 0(s)  (Initial)
2. Time step  : 0.03(s)
3. End time    : 1.0(s)
( Please remember the elevation setting.
There may be a need to return to
the preprocessor again.
It is a temporary data. )   36
④ Setting up of turbulence model
Click the “Turbulence model” in the “Groups”, and set as follows.

It’s possible to choose the turbulence model from “zero equation model”,
“simple k-ε model” and “direct input of kinematic eddy viscosity”.
In the case of river, “simple k-ε model” is recommended. In the case of
large size meshes , like ocean , “zero equation model” is recommended.
37
“Direct input of kinematic eddy viscosity” is a last resort.

⑤ Setting up of initial conditions


Initial condition (water depth) can be set up from river survey data and area code.
Water level at downstream boundary and initial water surface slope of each river
can be set.
River survey data 3
Area code 3
Initial water-elevation at
downstream 3
Initial water surface slope 3

Initial water-elevation at
downstream 2
Initial water surface slope 2

Initial water-elevation at
downstream 1
Initial water surface slope 1 River survey data 1 River survey data 2
Area code 1 Area code 2
38
Initial water-elevation
at downstream 2
Initial water surface
slope 2

Initial water-elevation
at downstream 1
Initial water surface
slope 1 River survey data 1 River survey data 2
Area code 1 Area code 2

Water level setting

Elevation

Water level setting


which can’t be
Average divided
riverbed slope
39
Distance

Click the “Initial condition” in the “Groups”, and set as follows.

Please certainly coincide “river_survey data” and the area code to specify.
Area code 1 : “River_survey1.riv” Initial water-elevation 1 : 6.044
Initial water-surface slope 1 : 650
Area code 2 : “River_survey2.riv” Initial water-elevation 2 : 7.448
Initial water-surface slope 2 : 550
Area code 3 : “River_survey3.riv” Initial water-elevation 3 : 5.828
Initial water-surface slope 3 : 500

If it specifies “Input form file” , the data file (*.tpo , *.anc) prepared in advance will
be import, and initial water-depth will be set up. 40
⑥ Setting up of file control
Click the “file control” in the “Groups”, and set as follows.
In new calculation, please specify the “Initial” in the “Computation from initial or
restart file”

Please specify the “full pass” of all file name.


Please also set up the output time of each file as above. 41

Functions of each file


Restart file  The binary file for reading the last calculation result as
(for input) an initial value at the time of continuous calculation.

Restart file  The binary file for writing the last step in continuous
(for output) calculation.

iRIC file The file for outputting a calculation result to the post
processor of iRIC
External text file The text file for outputting which edits a calculation
result.
External dump file The dumping file for outputting with un-editing a
calculation result. (text file)
42
The image in the case of using hot start function (to continue calculating
from the final output data of previous calculation result)
Flow
discharge Restart file ① Restart file ② Restart file ③

Output Input

Time
Run-up calculation t1 t2 t3
by regime flow

*3) Output time is recorded in restart file (t1, t2, t3… in this figure). Please set this time
as same as the start time in “V.2 Time”.
If time is different, error message appears and calculation stops. 43

⑦ Setting up of vegetation and wind


Click the “vegetation / wind” in the “Groups”, and set as follows.

44
⑧ Setting up of dike breach condition
It is setting needlessness this time.

45

⑨ Set up riverbed variation calculation


Click the “vegetation / wind” in the “Groups”, and set as follows.

1. “Moved bed computation” :


“Moved bed computation”
2. “Moved bed computation start
time” : 1800 s In
the case of new calculation,
please calculation until a flow is
stabilized by fixed bed.
3. “Moved bed computation end
time” : 9000 s
4. “Bed load transport equation” :
Ashida and Michiue formula
5. “Limit of scouring” : No limit
6. “Secondary flow coefficient” : 7
7. “Relative weight of bed
material” : 1.65
8. “Void ratio of bed material” : 30%
9. “Suspended load” : Bed and
suspended load
10. “Non-dimensional velocity of
buoyancy” : Itakura-Kishi
formula
11. “Reference concentration of
suspended sediment” : Land-
Kalinske formula
12. “Diffusion coefficient of
suspended sediment” : 0
When the value is “0” (default),
the same value of kinematic eddy
viscosity will be set up.

46
⑩ Setting up of size grain distribution
Click the “grain size distribution” in the “Groups”.
If mixed grain size distribution is selected, different distribution patterns
can be set up for different areas.
This time, please set up as follows.

1. ”Bed material
distribution”: Non-
uniform
2. Grain size
distribution pattern :
3 "Edit"
icon becomes active
only the number of
patterns of grain size
distribution.
“Geographical
information” explains
next which particle
size pattern is set to
which domain.
3. Exchange layer
thickness : 0.25m
47

How to import grain size distribution

1. Click the “Edit”, in the “Groups”,


calculation condition dialog is displayed.

48
2. In order to import grain size distribution pattern file, it clicks on "import"
icon.
It moves to folder “~¥sample_1¥Testdata¥Grain_size” and import grain
size distribution pattern file “Grain_1.csv”~”Grain_3.csv”.

49

3. “Grain size diameter” is displayed on the 1st row and a “the


percentage of passing for sediment” is displayed on the 2nd row.

50
Ⅲ.2 Set up geographical information
The settings items of geographical information

① Ground elevation(It has been set)
② Initial depth(Unnecessary, when an initial condition is set up )
③ Area code(It has been set)
④ Manning roughness
⑤ Vegetation density and transmission coefficient
⑥ Vegetation height
⑦ Kinematic eddy viscosity (specific value)
⑧ Fixed or movable bed
⑨ Scour depth control
⑩ Scour elevation control
⑪ Grain size distribution code
⑫ Elevation after dike breach

You may not set up the conditions without necessity.
The setting method can be altogether set up by a polygon like “area code”. 
51

1. Manning roughness
Move the cursor to the “Manning roughness” in “geographical information”
of object browser. Right-click, then select “add” → “polygon” to set up.
Please surround the area by continuous mouse click to set the value, and
then double-click to complete confining of the area to set up value .

Please set 0.03 to all the areas.


Moreover, you may set up freely.
52
2. Vegetation density and transmission coefficient
Here, vegetation density is set up.

The value of vegetation density should refer


to the following.

λ = d/L d:The diameter of an average trunk


L:The interval of a center of trunk
53

3. Fixed or movable bed

Please enter “1” if you want to set up the range of fixed riverbed.
The unset up area recognizes it as "movable bed"

54
4. Scour depth control

For example, you can enter “-3” if 3m under riverbed is available to


be scoured.
Sedimentation is in prescribed as “+” and scouring is “-” in
Mflow_02, so the value must be minus.
Please enter the value you want to set up as scour depth control.
55

5. Scour elevation control

For example, ground elevation is 97m, structures (e.g. ground sill)


are specified at 95m, then please enter “95”.
Please enter the value for the “elevation” of scour elevation
control only.

56
6. Grain size distribution code

Grain size distribution code is the parameter that controls appropriate calculation of
riverbed variation for certain pattern of grain diameter distribution, as the same image
as “Area code”
The area must be set in accordance with “Grain diameter distribution pattern 1-10”.

57

Ⅳ Setting up boundary conditions

Ⅳ.1 Notice to set up boundary conditions

boundary conditions of flow,


boundary conditions of bed load,
boundary conditions of suspended bed

must be set up in correct order

58
Set up boundary conditions (right order)
Boundary condition of flow ①
Boundary condition of
Boundary condition of flow ③ bed load ①
Boundary condition of Boundary condition of
bed load③ suspended bed ①
Boundary condition of suspended bed ③

Boundary condition of flow ②


Boundary condition of movable bed ②
Boundary condition of suspended bed ②
59

Set up boundary conditions (wrong order)

Boundary condition of flow ①


Boundary condition of flow ③ Boundary condition of
Boundary condition of movable bed ②
movable bed ① Boundary condition of
Boundary condition of suspended bed ①
suspended bed ②

Boundary condition of flow ②


Boundary condition of
movable bed ③
Boundary condition of
suspended bed ③ 60
Ⅳ.2 Setting up boundary conditions at upstream
① Right-click “Boundary condition setting” in object browser, boundary
condition dialog appears, and then select “Add boundary condition of flow”.

61

② Drawing of polyline over nodes along the open boundary which was
explained before and double click at the end.

If you enlarge or rotate the grid data and show the


open boundary line in horizontal or vertical direction
Please make sure if you do not include nodes outside of
the open boundary which you are going to configure.
62
③ Setting up “Time varying elevation and discharge” at upstream.

63

④ Click the “Edit”, calculation condition dialog is displayed.


In order to import time varying elevation and discharge file, it clicks on
"import" icon.
It moves to folder “~¥sample_1¥Testdata¥Discharge” and import
time varying elevation and discharge file “Dischage_W_level_7k.csv”.

64
⑤ Time is displayed on the 1st row,
water level is displayed on the 2nd row and
discharge is displayed on the 3rd row.

65

⑥ Mapping of a boundary condition

After setting boundary conditions , click “Grid” →“Attributes mapping”


→ “execute”, the boundary conditions will be set .

66
Ⅳ.3 Setting up boundary conditions at downstream
(main stream and distributary).

① Similarly, please set “Time varying elevation(outflow)”


to a downstream end.

67

② Click the “Edit”, calculation condition dialog is displayed.


In order to import time varying elevation file, it clicks on "import" icon.
It moves to folder “~¥sample_1¥Testdata¥Water_level” and import
time varying elevation files.
Pease set “W_level_4k.csv” to main stream and “W_level_4k.csv” set to
distributary

68
③ Time is displayed on the 1st row and water level is displayed on the 2nd row

Mflow_02 assumes time-series fluctuating conditions together with water level and
flow discharge. To set up certain condition for all time. 69

Ⅳ.4 Boundary condition of movable bed computation

① Setting up boundary condition of bed load


Right-click “Boundary condition setting” in object browser, boundary
condition dialog appears, and then select “Add boundary condition of
bed load”.

Please set “Equilibrium sediment discharge” to all three boundaries (upstream and
downstream of main stream, and down stream of distributary). 70
② Setting up boundary condition of suspended sediment
(upstream of main stream)

Right-click “Boundary condition setting” in object browser, boundary


condition dialog appears, and then select “Add boundary condition of
suspended load”.

Please set up
“Discharge-suspended
load distribution” to
upstream of main stream.

Discharge coefficient : 3.5


Power coefficient : -8

71

③ Setting up boundary condition of suspended sediment


(downstream of main stream and distributary)

Right-click “Boundary condition setting” in object browser, boundary


condition dialog appears, and then select “Add boundary condition of
suspended load”.

Please set “Equilibrium sediment discharge” to tow


boundaries (downstream of main stream, and distributary). 72
④ Mapping of a boundary condition

After setting boundary conditions , click “Grid” →


“Attributes mapping” → “execute”,
the boundary conditions will be set .

73

⑤ The standard of application of a boundary condition


Application object boundary
Select from “Equilibrium Specification with all the
sediment discharge boundaries (up and down stream)
Bed load are possible.
Ratio of sediment discharge Specification with all the
boundaries (up and down stream)
are possible.
Select from “Equilibrium Specification with all the
sediment discharge boundaries (up and down stream)
are possible.
Fixed concentration of each Specification with all the
diameter boundaries (up and down stream)
Suspended bed (Concentration specification are possible.
for every diameter)
Discharge-suspended load An inflow boundary (upstream) is
distribution recommended.
Periodic boundary condition An inflow boundary (upstream) is
possible.
However, only a single river can be
specified.
Please be sure to set conditions to all the boundaries. 74
Ⅴ Confirmation of elevation and initial water depth

① Temporary calculation for elevation setting


When all condition setting is finished, you click “Run“ and will carry out a calculation.
Because it is a temporary calculation for elevation setting , the following dialogue
“Solver Finished” is displayed immediately, and the calculation is finished.

In addition, calculation start time and end time are displayed in Mflow.

75

② Confirmation of elevation
Let’s open new(2D) post-processing window.
Click the “iRICZone ” → “Scalar” → “Initial Elevation” and then initial elevation
will display.
Please confirm whether “Initial Elevation” (especially shape of Water channel) is proper.

It becomes easy to consider that you exclude a click “iRICZone ” → “Grid shape”. 76
③ Confirmation of initial water depth
Let’s display “Depth” , you can confirm whether “initial stream line” is proper.

In the “iRICZone” item of object browser, please right-click right-click on “Scalar” to select “Property”
and then “Scalar setting” will display.
Remove the check of “Automatic" of “Value range" ,
input "0.01" into “Min",
remove the check of “Full lower area“.
77
Then you can confirm only area of the water(initial stream line).

④ Let’s return to a preprocessing window


If you can confirm elevation and initial water depth, click the button of
“Focus preprocessor window”(yellow pencil mark) and return to the
preprocessing window.
.

78
Ⅵ Execution of Flow field and Movable bed computation
① Reset of the time
If it can confirm that elevation and initial water depth has set up
satisfactorily, reset of the “End time” in the “Control specification”.
Let’s change “End time” for "1"→"9000".

79

② Reset of the File control


Let’s change “File control” as follows.

“Start time of output to iRIC(s)” : "1"→"1800"


“T time interval to iRIC file(s)” : "1"→"60"

80
③ Run
Click “Run“ , the dialog as follows display.
When you click "OK“, a calculation is started.

81

④ Indication during calculation execution


Execution of calculation will output the following display.

The number of The increase and decrease of the


Time step effective (water
area) elements number of element from initial setting

82
⑤ When a calculation performs abnormal termination (the emission)

When the calculation performs abnormal termination (the emission),


the following message is output.

TIME = 2108.00 : Abnormal termination at 2108.00 s


NUMBER = 1077 : Node number “1077” is an abnormality
point of the beginning 83
X-CORD = 4897.263 Y-CORD = 2136.232 : Coordinate of node number”1077”

Ⅶ Visualizing the calculation results


Visualization items
・ Elevation
・ Initial Elevation
・ Water surface elevation
・ Depth
・ Flux
・ Elevation change
・ Friction velocity
・ Bed load
・ Suspended load
・ Central grain diameter
・ Velocity - magnitude

84
An example of visualization
Let's display the flow velocity vector on the flow velocity contour.
Open new(2D) post-processing window.
Click the “iRICZone ” → “Scalar” → “Velocity(magnitude)” and then flow
velocity contour will display.

In the “iRICZone” item of object browser, please right-click on “Scalar” to select “Property” and then
“Scalar setting” will display.
Remove the check of “Automatic" of “Value range" ,
input "0.01" into “Min",
remove the check of “Full lower area“.
Then you can confirm only area of the water(initial stream line).
85

Next, click “Arrow” → “Velocity –” and then the flow velocity vector will display.
Vector arrows are displayed greatly in this way at first.

86
In the “iRICZone” item of object browser, please right-click on “Arrow” to
select “Property” and then “Arrow setting” will display.

Remove the check of “Auto" of “Length“.


Input “20" into “Standard value“.
Input "0.01" into “Minimum value to draw”.
Input “3" into “Sampling rate” in “Sampling”.
87
Then it becomes easy o considerably look.

Please try other visualization items.

88

You might also like