Hello,
as part of my master thesis, I implement an internal boundary condition for bedload transport over weirs. This should happen analogously to the subroutine clsing.f and clhuvt.f in Telemac2D. Therefore, I used the two subroutines as a template and created a new subroutine bedload_weir.f, which is called in the subroutine conlit.f in Sisyphe. The idea is to redefine the boundary condition at each node of the weir if the bedload rate at the upstream side of the weir becomes greater than zero. Then the nodes at the upstream side of the weir are assigned a free boundary condition (LIQBOR = 4 and LIEBOR = 4) and the nodes at the downstream side of the weir are given a prescribed value for bedload transport rate (LIQBOR = 5 and LIEBOR = 4). To simplify matters, QBOR of the 1st size class is set to 0.0001 and QBOR of the 2nd size class is set to 0.
When I run the simulation, an error appears in the 8th iteration step („Fail to run“). In the 7th iteration step, the bedload reaches the weir for the first time, so that for the first time the boundary conditions on the weir are rewritten from a solid wall (LIQBOR=2 and LIEBOR=2) to the boundary condition types described above. In the 7th iteration step, the rewriting of the boundary conditions and the definition of QBOR on the downstream weir edge work, which can be seen in the result file "out.txt". The subroutine bedload_weir.f is also called successfully in the 8th iteration step and the boundary condition and QBOR are correctly defined, but after returning from conlit.f to the main program sisyphe.f, the error mentioned above appears. I suspect that the problem may be the incorrect storage of variables and that the program can then no longer correctly call them.
However, since I am new to using Telemac and programming with Fortran, I have not yet been able to find the error. I would be very happy about help. You can find the necessary files attached, but you won’t be able to run the simulation, since the source code has been changed.
Kind regards,
Antonia