intro story DELWAQ


DELWAQ is the engine of the D-Water Quality and D-Ecology programmes of the Delft3D suite. It is based on a rich library from which relevant substances and processes can be selected to quickly put water and sediment quality models together.

The processes library covers many aspects of water quality and ecology, from basic tracers, dissolved oxygen, nutrients, organic matter, inorganic suspended matter, heavy metals, bacteria and organic micro-pollutants, to complex algae and macrophyte dynamics. High performance solvers enable the simulation of long periods, often required to capture the full cycles of the processes being modelled.

The finite volume approach underlying DELWAQ allows it to be coupled to both the structured grid hydrodynamics of the current Delft3D-FLOW engine and the upcoming D-Flow Flexible Mesh engine (1D-2D-3D) of the Delft3D Flexible Mesh Suite (or even other models such as TELEMAC).

'DELWAQ in open source' is our invitation to all leading experts to collaborate in further development and research in the field of water quality, ecology and morphology using Delft3D. Feel free to post your DELWAQ related questions or comments in this dedicated forum space. If you are new to DELWAQ, the tutorial (in the user manual) is a good place to start. A list of DELWAQ related publications is available here.




Sub groups
D-Flow Flexible Mesh

Cohesive sediments & muddy systems


Message Boards

Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological model

Matthew Adams, modified 4 Years ago.

Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological model

Youngling Posts: 19 Join Date: 8/20/15 Recent Posts
Hi there,

I am running a configuration whereby hydrodynamics is computed by TELEMAC on an unstructured grid, then this information is fed into DELWAQ for the ecological model.

I am able to run the model in DELWAQ successfully, and visualise time-series of individual state variables (e.g. phytoplankton concentration) at a single node. However, visualising spatial distribution (e.g. lake maps) of these variables at single time-point does not work in either GPP or Quickplot. I believe this stems from the fact that the TELEMAC grid file is not LGA or CCO file extension, but is a SLF file. Specifically, the issue is as follows:

The output files generated from DELWAQ include: ADA, ADF, HDA, HDF, HIS and MAP. My understanding is that ADA and MAP contain output maps, ADF is a small file associated with ADA; HDA and HIS contain output time-series at individual nodes (as selected during model configuration), and HDF is a small file associated with HDA.

Both Quickplot and GPP can read the HIS and HDF files just fine (as these are time-series).

When I open either the ADA or MAP files in Quickplot, it asks me for the grid file, with the following error if I try the SLF file:
Error using delwaq>Local_lga_open (line 472)
LGA/CCO file extension should match .lga/.cco

When I open the ADA or MAP files in GPP, I can get output at an individual timepoint that *looks* likes a timeseries (see attached images). I think what is happening is it is plotting e.g. phytoplankton concentration vs node number.

I can load the HDA and ADA files post-simulation in MATLAB using the “vs_use”command which is part of the DELWAQ to MATLAB codes included in the installation of DELWAQ. But no idea how to visualise the grid.

I have spoken to our local hydrodynamicist who thinks that DELWAQ pays attention to how cells are joined together and what their size, depth and surface area are, but might not keep track of the grid?

Any idea on how to proceed with this? The only other option is to manually put together the unstructured grid file post-simulation e.g. in MATLAB and read in the DELWAQ output to construct lake maps.

Keen to hear any insights you can provide!

Many thanks,
Michel Jeuken, modified 4 Years ago.

RE: Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological mod (Answer)

Jedi Knight Posts: 154 Join Date: 1/21/13 Recent Posts
Hi Matthew,

QuickPlot will need a similair named *.cli file next to the *.slf file (only differ in extension). This is the Telemac equivalent of the Delft3D FLOW cco/lga combination. cco/cli are the cell coordinates, slf/lga the grid indices.

Also be sure to switch to "Telemac Grid File" in the file selection menu you will get when you open the map file! Looking at the QuickPlot code, I guess you didnt't switch so QuickPlot expected the lga/cco combination.

Matthew Adams, modified 4 Years ago.

RE: Visualising unstructured grid - TELEMAC hydro and DELWAQ ecological mod (Answer)

Youngling Posts: 19 Join Date: 8/20/15 Recent Posts
Hi Michel,

Thanks for your response - I did have the clf file already next to the slf file, and had already been switching to Telemac Grid File in the file selection menu, but to no avail. I think this might have occurred because the Telemac grid is an unstructured triangular mesh.

I did manage to find a workaround though, to do the plots in MATLAB:
1. Use Telemac Tools by Thomas Benson (http://au.mathworks.com/matlabcentral/fileexchange/25021-telemac-tools) to import the Telemac SLF grid file into MATLAB.
2. Use the "vs_get" command from the Delft3D-MATLAB routines that comes with DELWAQ, to import the DELWAQ model output into MATLAB. Then extract from that the particular water layer, timestep and substance. For water layer, knowledge of how many layers DELWAQ solves, and how the output array containing these layers is structured, is necessary.
3. Use the patch command in MATLAB to plot the result

patch('faces',m.IKLE,'vertices',m.XYZ,'FaceVertexCData',Species, ...

where m is the structure containing the imported SLF file, and Species is the vector containing the DELWAQ model output for the particular water layer, timestep and substance of interest.