Hi. I'm looking for some help with the Bisection method in Visual Basic, which I'm using for the first time as part of a university project. I am using the bisection method to work out the water level of a river for a given flow.
My variables are Wla, Wlb, Wlc, I have a sub routine called Qcalculate which calculates the discharge using the bisection method.
My problem is my original Wlb, I did have it set at a ridiculously high level that will always be higher than the water level for any Q set, but my tutor has mentioned that theoretically he could always specify a level of flow (Q) that will lead to my Wlb being too low and as such I will get an endless loop in my Qcalculate subroutine.
So I am looking for a bit of code that ensures (in a loop?) that the Q for Wlb will be higher than the given Q.
Really sorry if this post doesn't fully explain my problem but I’m groping around in the dark due to my lack of knowledge of the platform I'm using! Any help would be amazing, thanks a lot. Laurence