Welcome, Guest
Username: Password: Remember me

TOPIC: Internal boundary condition for bedload transport over weir

Internal boundary condition for bedload transport over weir 4 years 10 months ago #35194

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
Attachments:
The administrator has disabled public write access.

Internal boundary condition for bedload transport over weir 4 years 10 months ago #35195

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
Not sure if it's the origin of your problem but the out.txt file shows the variable QBOR is not initialised on all nodes...

Maybe you could also try to active the debugger to have a better idea of the location of the crash because it's not clear int he listing...

regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: a.dallmeier

Internal boundary condition for bedload transport over weir 4 years 10 months ago #35206

Hello,

thank you for your quick reply.

Regarding your first suggestion: I also ran a simulation in which I defined the boundary conditions on the weir in the boundary conditions file and had the variable QBOR written out. In this simulation, QBOR has the same values as in the simulation with the internally defined boundary conditions on the weir. I assumed that these values make sense, since QBOR is not defined for nodes that have a solid wall boundary condition. You can find the result file of the simulation with external defined boundary conditions for comparison attached (out_QBOR.txt).

You can find the result file with debugger in Telemac2D and Sisyphe attached (out_new.txt). As you can see, the program stops in the 8th time step at the end of the subroutine conlit.f, but unfortunately I cannot understand why. Is the implementation of the boundary condition on the weir correct?

Kind regards,

Antonia
Attachments:
The administrator has disabled public write access.

Internal boundary condition for bedload transport over weir 4 years 10 months ago #35207

  • mafknaapen
  • mafknaapen's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 157
  • Thank you received: 62
Hi Antonia,

QBOR is printed to be 1.7976931348623157E+308

this is the default setting for double precision, if no value has been assigned to the variable. So when printing, QBOR has not been set yet.

Hope that helps,

Michiel
Dr Michiel Knaapen
Senior Scientist
E This email address is being protected from spambots. You need JavaScript enabled to view it.
T +44 (0)1491 822399

HR Wallingford, Howbery Park, Wallingford, Oxfordshire OX10 8BA, United Kingdom
T +44 (0)1491 835381, F +44 (0)1491 832233
www.hrwallingford.com
The administrator has disabled public write access.
The following user(s) said Thank You: a.dallmeier

Internal boundary condition for bedload transport over weir 4 years 10 months ago #35209

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi Antonia
I investigate a little more your program
Running on the trunk version in debug mode gaves me some complementary information.
I advise you to use also a debug configuration, this will helps you to traceback problems...

I saw a problem at iteration 4 in conlit.
In fact, the weir node are declared as solid nodes (2 2 2). In this case, the liquid boundary number is 0 and you try to give a value to the array YADEB which is impossible.
Look at bord.f which is the equivalent to conlit for telemac. You will see a comment in line 196 : IFRLIQ.EQ.0 MAY HAPPEN WITH WEIRS.
There is a security added specifically.
I think this should be similar in conlit as you deals also with weirs.

Hope this helps
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: a.dallmeier
Moderators: Pablo, pavans

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.