Some final remark:
I have computed the error for the different options in flusew.f. The error can be computed by the last formula given in the previous post. In flusew.f this leads to following equation:
error = R1 - (UI*XN + VI*YN+2.D0*SQRT(G*HI))
If we check the error for the three possible cases
a) U,V given; computes h
b) H given; computes Q
c) Q given; computes u,v and h:
We get the following results:
Case a) allows only to compute HI when the velocity is given as fixed boundary condition. In Telemac it is also used for an imposed in/outflow boundary condition (given q) where U,V, and H are given. As a result, the formula is for most cases not fulfilled.
Case b) is always fulfilled. Which means that is implemented correctly in Telemac.
Case c) is not implemented in Telemac.
The implementation of case c) shouldn't be too tricky. We need the inflow q at all boundary points. We can get this by splitting the total inflow into the inflow at each boundary segment. Maybe this can be done in debimp?
Then the case can be implemented in flusew.f. The condition must be solved via an iterative procedure (e.g. Newton-Raphson method)
I've programmed an Newton-Raphson solver and will try to adopt debimp to get q instead of the velocity.