User Guide
User Guide
User Guide
This paper describes the structure of the MATLAB HEC-RAS interface documentation. Then, it
contains general explanations of the operation of the interface MATLAB HEC-RAS. Finally, it contains
a list with a brief description of every document, which is in the same folder.
Table of contents
To read the documents available in this folder, you can follow this hierarchy:
1. User guide
2. Installation and update
3. Settings
4. Input and output scripts
Other papers are optional or designed for a specific usage of the interface. A brief description of
what they contain is given below in this paper, cf. Which subject is mentioned in which paper?
Every MATLAB object used in this interface has a documentation written in its code. You can visualize
it quickly by writing help <MATLAB object name> in the MATLAB command window.
A first objective of the script – the easiest one – is to imitate, automated by MATLAB, what a human
can do directly in HEC-RAS. More precisely, MATLAB must be able to perform a step by step
simulation, i.e. divide a long computation into a set of small simulations, which will be computed in a
series. Each step uses the results of the previous step as initial conditions. Cf. sketch below.
On the sketch above, if we are in the case of a river, which overflows on 23 January 2020.
If I compute in one step, I will just notice this overflow, but I cannot act during this simulation, and I
eventually have to rerun my model.
If I compute step by step, I can act on 24 January 2020, and open a gate to reduce damages caused
by the flood.
Another objective of the interface is to make you able to easily edit data in HEC-RAS files between
two time step. For instance, to open a gate. Cf. steps 6 to 9 in the video tutorial 1 – Simple
automation example .
To do so, the interface contains a set of functions designed to hold your own custom MATLAB code.
The interface will then edit Ras files, based on data and parameters, that you give to it, through
communication variables such as input_list.
Dev doc
Documentation for development, contains a lot of useful information, for an interface user, who
wants to add features or fix a bug. This paper gives too information about how the MATLAB code of
the interface works and look at some technical programming details.
Settings
Contains a lot of useful information about the settings.ini file, to understand well how this file work,
how to configure it and what is the impact of this file on the interface.
How to use input and output scripts, which will contain your MATLAB code and make you able to
easily interact with MATLAB.
Reference sources
List of documents and websites used to design this interface. It can be useful if you plan to edit this
interface or if you want to transcript this interface in another programming language, if it is not
already available on one of our websites.
This section is not related to the interface itself but talks about advices about the HEC-RAS modeling
software. MATLAB is not used there.
Using the Normal Depth boundary condition for a new HEC-RAS project
I use the Normal Depth to determine a stable Stage hydrograph to apply downstream of a river.
Methodology
Run simulation during a few days, depending on your project. As boundary conditions I have a
constant flow hydrograph upstream of 0 m3.s-1. And a Normal Depth with a friction slope of 0.001.
During this run, HEC-RAS can throw some errors, this is not a problem.
In the results table, measure the average W.S. Elev, at the most downstream cross section.
Then replace the Normal Depth with a constant Stage Hydrograph of <average W.S. Elev> meters.
During the computation, there should not be any error returned by MATLAB, related with this
boundary condition.
HEC-RAS limitations
HEC-RAS does not support long path, so save your Ras projects near to the hard drive root folder.
It is useful too because the HEC-RAS integrated file explorer does not support shortcuts.