<br><br><div class="gmail_quote">On Sun, May 22, 2011 at 2:46 PM, Gökhan Sever <span dir="ltr"><<a href="mailto:gokhansever@gmail.com">gokhansever@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Sun, May 22, 2011 at 12:00 PM, Charles R Harris <<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>><br>
<div class="im">> cpdef double petters_solve_for_rw(double x, double rd, double rh):<br>
>    return rh*kappa*y**3 - (exp(y*kelvin/rd) - rh) * (1 - y**3)<br>
<br>
</div>This last modification is converging faster than the original version,<br>
but readability of the function is reduced now.<br>
<div class="im"><br>
><br>
><br>
><br>
> where x = rd/y. The last might allow you to bracket things fairly easily,<br>
> i.e., (exp(y*kelvin/rd) - rh) * (1 - y**3) has to be >0 if you expect y>0<br>
<br>
</div>"rh" also plays role in determining the sign of the right portion of<br>
this equation. Throughout the model rh usually goes from 0.95 and pass<br>
beyond 1.0. This causes a sign change.<br>
<br></blockquote><div><br>I think the zeros of this function can be bracketed by inspection. What sort of values do rd, rh, and kappa have? What is kelvin?<br><br>Chuck <br></div><br></div>