Setting up the link between Flood Modeller and TUFLOW

Integrated 1D-2D linked modelling is a popular option for representing flooding from rivers onto adjacent floodplains. It utilises the 1D solver to simulate in-bank river flows efficiently and accurately. It then dynamically exchanges data with a 2D model of the floodplain which will enable accuracy to be maintained together with increased detail, e.g. encompassing flow paths as defined by the topography.


In addition to the industry-leading 1D and 2D solvers within Flood Modeller, TUFLOW users also have the option of linking to Flood Modeller’s 1D solver, allowing them to benefit from an intuitive user interface, wide-range of complex structures and logical rules. TUFLOW’s 1D solver (ESTRY) and HPC GPU solver can also be linked with Flood Modeller.


This month’s tip explains how the link to TUFLOW is specified within Flood Modeller and how to fix things when the link doesn’t work for you.


What’s set-up during the installation of Flood Modeller?


In order for the link between Flood Modeller and TUFLOW to work the Flood Modeller solvers folder must contain copies of two TUFLOW files. This folder is called the “bin” folder and is located (by default) in “C:\Program Files\Flood Modeller”. The two required TUFLOW files are called:

  • kernels_nSP.ptx

  • kernels_nDP.ptx

Your Flood Modeller installation includes versions of these files that should be compatible with the current version of TUFLOW (at the time of the Flood Modeller release). In addition, it is possible that the versions of these files will also work successfully with other versions of TUFLOW.


However, if you find that the link in a linked model is failing then the fix could be to browse to your TUFLOW installation folder, e.g. “C:\Program Files\TUFLOW”, find and copy the above two files and then paste them into your Flood Modeller bin folder (replacing the files there).


How to set your TUFLOW location in Flood Modeller?


For Flood Modeller to link to TUFLOW when you run a simulation, Flood Modeller needs to know where the appropriate TUFLOW engine is located. There are two places where this location can be specified.


Firstly, you can adjust this setting from within the Flood Modeller user interface. Access the General Settings from the Home tab of the main Toolbar. These will open in a new window, as shown below. Update the TUFLOW path specified in General Settings > Project settings tab (a browse button is provided to the right of this setting). For this setting, Flood Modeller requires you to select the TUFLOW solver executable file (as shown in the example below). Click OK to apply the setting and close the window. Provided the specified path and filename are valid, Flood Modeller will automatically update its settings file (called formsed.ini) accordingly (note for a revised setting to apply you will need to close and restart Flood Modeller).

Alternatively, you could edit the formsed.ini settings file directly (not recommended as the primary option but could be necessary). This is a text file located in the AppData folder (“C:\Users\YourUserName\AppData\Roaming\Flood Modeller”). You can open this file in a text editor and manually enter your TUFLOW path reference. This takes the form of: TUFLOWPATH=C:\TUFLOW\2018-03-AE This line must be added to the “[Preferences]” section of the formsed.ini file. Note that the setting only requires the path to be set – no file in this folder is referenced (note the path used here is just an example).


Note: If you manually update the TUFLOW location in formsed.ini after setting a path in the General Settings window then the setting displayed in General Settings will not automatically update to match this revision. Therefore, the two options for setting the TUFLOW path can be different. This may be important depending on what type of model you are running (see below).


How does Flood Modeller use the TUFLOW path settings?


Flood Modeller-TUFLOW linked models are controlled from the 1D solver. The 1D solver will look in the formsed.ini for the location to the TUFLOW folder (and not in General Settings). In a linked model the 1D solver is looking for one of the following files:

  • “TUFLOW_LINK_iSP_w64.dll” – for single precision simulations

  • “TUFLOW_LINK_iDP_w64.dll” – for double precision simulations

The setting for single or double precision for a simulation is set in the 1D simulation file (ief file). This setting is located on the Links tab of the 1D simulation interface:

Flood Modeller can also be used to start TUFLOW only simulations, i.e. controlled by the .tcf file. These simulations must be loaded in the Project Panel of the Flood Modeller user interface. They are then run from the Simulations tab of the main Toolbar (tcf file should be set as the Active simulation) or by right-clicking on the tcf file in the Project Panel and selecting Run in the menu. Flood Modeller will then use the TUFLOW solver executable referenced in the General Settings to run the simulation (and not look in formsed.ini):


  • White Twitter Icon
  • White YouTube Icon
  • White Facebook Icon
  • White LinkedIn Icon

Useful links

up-arrow.png

Copyright © 2020 Jacobs