[mesa-users] Timestep control
Bill Paxton
paxton at kitp.ucsb.edu
Wed Aug 27 13:04:42 EDT 2014
I routinely use the control 'max_years_for_timestep' in my inlists. You can of course also set it from your run_star_extras.
Alternatively, if you'd like to go deeper, take a look at run1_star in star/job/run_star_support for the following lines:
result = star_evolve_step(id, first_try, just_did_backup)
if (result == keep_going) result = star_check_model(id)
if (result == keep_going) result = extras_check_model(id, id_extra)
if (result == keep_going) result = star_pick_next_timestep(id)
This happens for each step -- it does "star_evolve_step", then calls check_model in star, followed by your extras check_model.
After those, it calls star_pick_next_timestep which sets s% dt_next, the timestep for the next step.
Then after a few more housekeeping tasks, run1_star calls extras_finish_step.
So if you change dt_next in your extras_finish_step it will change the next timestep.
You should probably only decrease dt_next -- trying to force larger timesteps is likely to give convergence problems.
Hope that helps.
Cheers,
Bill
On Aug 27, 2014, at 9:30 AM, Dean Townsley wrote:
> Hi Warrick,
>
> On 08/27/2014 01:37 AM, Warrick Ball wrote:
>> Are there already hooks for the maximum timestep? Or is it enough
>> simply to add something like
>>
>> s% dt = min(dt, my_dt_limit)
>>
>> to extras_check_model in run_star_extras?
>>
>
> I think you should probably do it in extras_finish_step() instead, and
> it is s% dt_next. This is what we have done to control the timestep for
> accreting WD setups.
>
> I think s%dt is the either the timestep currently being attempted (when
> extras_check_model() is called) or the timestep just finished (when
> extras_finish_step() is called).
>
> There is also a string somewhere that indicates what is constraining the
> timestep and is printed in the summary info to the terminal, but I don't
> know what that is called. That should probably be changed too, to
> something like "mylimit" or something more meaningful.
>
> Dean
>
>
> ------------------------------------------------------------------------------
> Slashdot TV.
> Video for Nerds. Stuff that matters.
> http://tv.slashdot.org/
> _______________________________________________
> 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