The SQL or Structured Query Language functionality in InfoWorks ICM is a highly powerful and flexible way to edit a model network properties. A simple SQL which is commonly used when building river reaches is the following to set the Manning’s n value for all river sections.
Another useful SQL is the following to set discharge coefficients and modular ratios to the river reach banklines (which solve a weir equation).
An extension to these simple SQL queries would be to use dialogue boxes as specified in the following blog:-
We can use this functionality to create a prompt dialogues where we can specify a Manning’s n value, as well as discharge coefficients and modular limits which will get applied to the river reach sections and banklines accordingly.
LET $n = 0;
LET $A =0;
LET $B =0;
LET $C =0;
LET $D =0;
PROMPT TITLE “River Reach Parameters”;
PROMPT LINE $n “Mannings n value” DP 3;
PROMPT LINE $A “Left Bank Discharge Coefficient” DP 3;
PROMPT LINE $B “Right Bank Discharge Coefficient” DP 3;
PROMPT LINE $C “Left Bank Modular Limit” DP 3;
PROMPT LINE $D “‘Right Bank Modular Limit” DP 3;
Upon running the SQL, the following prompt dialogue will appear which we can populate with our chosen values for the Manning’s n values, the discharge coefficients and the modular ratios.
Upon clicking OK, these will be applied to all river reaches.
We can then go one step further and use the custom actions functionality (http://blog.innovyze.com/2015/10/16/custom-actions/)
This allows us to specify a toolbar icon which will automatically run this SQL query for us. Under File-Master Database Settings it is possible to specify ‘User’ or ‘Shared’ Custom actions. See the above blog for details of the difference between the 2. A Title and a description can be added and the relevant SQL dragged into the appropriate dialogue box.
Once saved, the button is active on our ‘Shared Custom Actions’ toolbar.
Clicking on this icon will provide the dialogue from Figure 2.
Although this blog provides the example of the river reach parameters, it would be possible to do this for a range of different parameters such as bridge roughness parameters, structure parameters, 2D Resolution subcatchments etc…