[mesa-users] bad angular_momentum_j

Pablo Marchant pamarca at gmail.com
Wed Aug 3 22:50:52 EDT 2016

Kenny, I'd recommend you to manually adjust the timestep, this is something
we discussed here in mesa-users a while ago, copy from Rob Farmer's answer
to create a hard timestep limit


In extras_startup:



if( abs( 10**s%xtra1_old - 10**s%log_R) > EPS) then
    extras_check_model = retry
    s% dt = s%dt * SOME_SCALE_FACTOR
end if

And to create a soft timestep limit:

(also untested)

if( abs( 10**s%xtra1_old - 10**s%log_R) > EPS) then
    s% dt_next = min(s% dt_next, s%dt * SOME_SCALE_FACTOR)
end if

If the first timestep is the issue, then set a smaller initial timestep.
Check this from defaults/star_job.defaults

 435          !### set_initial_dt
 436          !### years_for_initial_dt
 437          !### seconds_for_initial_dt
 438          ! if true, set initial timestep, dt, in years
 440       set_initial_dt = .false.
 441       years_for_initial_dt = 0
 442       seconds_for_initial_dt = 0

On Wed, Aug 3, 2016 at 4:56 PM, Kenny Van <kvan at ualberta.ca> wrote:

> Hi,
> I'm currently working on adapting additional magnetic braking terms into
> MESA using the run_binary_extras.f file. I'm currently running into an
> issue where the amount of angular momentum being removed is too great in a
> single timestep and causing the simulation to break. Looking at the code it
> seems like the MESA binary evolution dies immediately if the angular
> momentum loss is too great instead of retrying with a smaller timestep. Is
> there a way to get MESA to retry with a smaller timestep when it encounters
> this issue?
> Thanks
> ------------------------------------------------------------------------------
> _______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users

Pablo Marchant Campos
M.Sc on Astrophysics, Universidad Católica de Chile
PhD student, Argelander-Institut für Astronomie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20160804/a928990e/attachment.html>

More information about the Mesa-users mailing list