[mesa-users] about the tolerance of the code

Jeremy Sakstein j.a.sakstein at damtp.cam.ac.uk
Thu Jun 23 07:16:37 EDT 2011

Hi Maurice,

I also use MESA for modified gravity and I also hit this problem a while 
back. Are you trying to interpolate from a ZAMS model? In this case the 
Newton iterator tries to find a new solution to the equations based on the 
old ones except that gravity has changed so much that it tries to use 
smaller and smaller time steps in order to converge, in this case it takes 
to long and gives up.

My solution to this problem is the following, take your parameter that you 
are changing (in my case it was something related to the gravity) and write 
it as G = G_0+delta_G where G_0 is its original value and delta_G is the 
change due to your new scenario. Now add some time dependence so that G = 
G_0 + delta_G*(1-Exp(-t/t0)) so that at early times the parameter is 
unchanged and at late times you get your complete modification. You now 
just need to play around with t_0 so that the code interpolates properly 
and you avoid the convergence issues but at the same time the true value of 
your parameter is reached fast enough that it doesn't effect the results.

Hope this helps,


On Jun 23 2011, Leung Shing Chi wrote:

>Dear all,
>I am trying to modify the code in order to couple the effect of external 
>gravity to the structure of the star. But the effect seems to be too large 
>that the code reports with:
>first model is slow to converge: num tries         270
>stopping because of convergence problems
>terminated evolution: convergence problems
> I have tried to relaxed the tolerance (as suggested by the webpage of 
> MESA) so as to make the calculation easier and to see some primitive 
> results.
>tol_correction_norm = 1d-3     (default = 1d-5)
>tol_max_correction = 1d-1      (default = 1d-2)
>tol_correction_norm_alt = 1d-2 (default = 1d-3)
>tol_max_correction_alt = 1d0   (same as default)
>But the result is still the same. I am wondering whether I have corrected 
>the appropriate paramters. Or are there any other parameters that I should 
>change as well, besides the above parameters? 
>Best regards and with thanks,
>Open WebMail Project (http://openwebmail.org)
> ------------------------------------------------------------------------------ 
> Simplify data backup and recovery for your virtual environment with 
> vRanger. Installation's a snap, and flexible recovery options mean your 
> data is safe, secure and there when you need it. Data protection magic? 
> Nope - It's vRanger. Get your free trial download today. 
> http://p.sf.net/sfu/quest-sfdev2dev 
> _______________________________________________ mesa-users mailing list 
> mesa-users at lists.sourceforge.net 
> https://lists.sourceforge.net/lists/listinfo/mesa-users

More information about the Mesa-users mailing list