Hi!
Thank you for your reply.
I was actually pointing out that in the validation case 039_bridge, the results show that the flow is in charge in the structure, whereas the computed flow was obtained using the formula defined for the case when the structure is in charge only at the upstream end.
By giving a closer look at the subroutine it appears that the IF condition used seems to be actually pointing at the wrong formula (see ***):
IF(S1.LT.(RD1+HAUT).AND.S1.LT.(RD2+HAUT)) THEN
! FREE SURFACE FLOW WHICH FOLLOW A WEIR LAW
IF(S2.GT.(0.666666667D0*(S1-RD2)+RD2)) THEN
Q = LARG * SQRT( 2.D0*GRAV*(S1-S2)/(CE1+L+CS2) )*(S2-RD2)
SECT = (S2-RD2) * LARG
ELSE
Q = LARG * SQRT(2.D0*GRAV) * (S1-RD1)**1.5D0 * 0.385D0
SECT = (S1-RD1) * LARG
ENDIF
ELSE
! PRESSURE FLOW --> ORIFICE LAW
SECT = LARG * HAUT
***IF(S1.GE.(RD1+HAUT))*** THEN
Q = SECT * SQRT( 2.D0*GRAV*(S1-S2)/(CE1+L) )
ELSE
Q = SECT * SQRT( 2.D0*GRAV*(S1-S2)/(L+CS2+CE1) )
ENDIF
I think it should rather be ***IF(S2.LT(RD2+HAUT))***. Otherwise the last formula (used in siphons) is never used.
I am not familiar with programming, but if a condition IF((A<C).AND.(B<C)) is not fulfilled, do the action defined by ELSE corresponds to the case when (A>C).AND.(B>C)?
I made a test by adding reformulating the conditionning in the orifice law part the following way:
! PRESSURE FLOW --> ORIFICE LAW
SECT = LARG * HAUT
IF(S1.GE.(RD1+HAUT).AND.S1.LT.(RD2+HAUT)) THEN
Q = SECT * SQRT( 2.D0*GRAV*(S1-S2)/(CE1+L) )
ENDIF
IF(S1.GE.(RD1+HAUT).AND.S1.GE.(RD2+HAUT)) THEN
Q = SECT * SQRT( 2.D0*GRAV*(S1-S2)/(L+CS2+CE1) )
ENDIF
The result gives S1 = 10,43, S2 = 7,04, and the computed discharge is now coherent if I check it by hand using the siphon formula.
Regards
PL