Telemac-AD Adjoint Example 3: Shape optimization of bathymetry for a better distribution of a Tracer


Confluence. Right: One Channel brings a Tracer which might be a solved chemical or a temperature. Left: how the geometry (x,y,z coordinates) affect the asymmetry of the concentration in the outflow profile.

Mixing of a Tracer (e.g. salinity or temperature):

  • How does the shape (x,y,z coordinates) affect the mixing of a tracer?


Inverse Problem: As potentially any points bathymetry value X, Y, Z in the model affect one mixing indicator.

Experimental Setup:

This is an academic example to show the usage of adjoints for tracer mixing and shape optimization. The „mixing effect“ is defined as the asymmetry of the concentration in the outflow cross section.

Indicator = ABS(mean concentration left flume half – mean concentration right flume half)

5382 nodes. Runtime 50s = 5000 time steps. 7m long / 1m wide  -> 3 * 5382 values (x,y,z, per node) affect 1 problem, the asymmetry.

Interpretation of the resulting adjoints as a map:

The pictures show a tracer plume (concentration) that comes out of the left channel.

Especially the corner points of the sharp confluence edge affect the wideness of the plume.

The alternative picture shows the three adjoints for x, y, z coordinates as gradient arrows in the direction which would reduce the asymmetry.

This arrows are no velocity vectors. They are the combined adjoints of x,y and z visualized as arrows. They point the direction which the bathymetry has to be altered to get a better concentration mixture in the outflow cross section.

Download and experiment with the trail show case:

The example is available for Download as ZIP: -> Link (Registered Users Only!)
If your not already registered: Contact us!:


The executable is compiled for Linux 64bit.

  • Unpack the folder
  • Open a teminal in this folder and execute „./Confluence-Adj-Tracer_zf+ks.exe“
  • Results will appear in the file „T2DRES“ in the same folder