<br><br><div class="gmail_quote">On Mon, May 23, 2011 at 12:21 AM, 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 9:13 PM, Charles R Harris<br>
<div class="im"><<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>> wrote:<br>
</div><div class="im">> I'm not so confidant about the rh >= 1 case, but I've attached an example<br>
> for rh = .95, rd=1e-8. The light blue line is the lhs from above, the labled<br>
> lines are for the rhs and different values of kappa. The heavy horizontal<br>
> line is the rh and the bracket I was suggesting was between the zero of the<br>
> rhs at x=rd and its crossing with the rh line. There are corner cases here<br>
> depending on the parameter values, so this probably needs more exploration,<br>
> there might be cases with two zeros.<br>
><br>
> Also same thing with rd=1.5e-6. Note that the zero is very near the upper<br>
> limit.<br>
><br>
> I suspect there will none or two zeros in the supersaturated case.<br>
><br>
> Chuck<br>
<br>
</div>Thanks for spending your time and producing those plots. Could you<br>
please provide the code that you used to create the figures? This<br>
might help me to better understand some of the points you have made in<br>
your latest reply.<br>
<br></blockquote><div><br>I've attached the module with the lhs, rhs functions. I hope I got them right ;) The plots were done using x = linspace(small number > 0, 5*rd, 500) and a loop for the values of kappa. They might actually look better as a semilogx plot.<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Your comment on having no or two zero worries me a bit. I can't easily<br>
see how apart these two zeros from each if they ever exist. One of<br>
them could be unrealistic to easily disregard, but yet to verify this<br>
claim.<br>
<br></blockquote><div><br>The reason I think there will be two zeros is that the upper branch of the hyperbolic rhs is concave up while the lhs is concave down, so if they intersect it will be at two points or a tangent (double zero). At least the supersaturated case shows up as being a bit squirrelly, which is probably a good sign for the model ;) Also note that the zeros go off to +inf as rh -> 1, which might be a good argument for using rd/x as the independent variable.<br>
 <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
I went ahead and tested the secant and fsolve solvers to see if they<br>
produce any significant differences in terms of the root they return.<br>
I assume fsolve is a more robust solver. You can see this comparison<br>
in the attached figure. I use a tolerance value of 1.e-20 for both<br>
solvers. Again this comparison is based on the estimate of about 20k<br>
different values. Most of the difference is zero. I focused in to a<br>
more interesting part of the figure. Still the difference is about<br>
1.e-17 which is quite insignificant.<br>
<br></blockquote><div><br>I think you are right that the secant solver needs a user input for the initial step size. Although working near singularities is always going to be a problem, hence variable changes. In fact, the whole newton thing could probably use a think through.<br>
<br>Chuck<br></div></div>