[mesa-users] Varying the tilmestep
Pablo Marchant
pamarca at gmail.com
Sat Aug 20 16:38:59 EDT 2016
Copy pasting from older answers from Rob and me, to define the timestep in
terms of changes in log_R
In extras_startup:
s%xtra1=0.d0
extras_finish_step:
s%xtra1=s%log_R
extras_check_model:
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 if you wish, you can also set s% dt_next in extras_finish step without
retrying, so it works like the non-hard timestep limits
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
On Sat, Aug 20, 2016 at 9:41 PM, Mathieu Renzo <m.renzo at uva.nl> wrote:
> Hi Rich,
>
> I do this modifying s% dt_next in extras_finish_step.
> This means I use the quantities describing the star now to decide how to
> calculate from there.
>
> Cheers,
>
> Mathieu
>
>
> On 08/20/2016 09:34 PM, RICHARD H D TOWNSEND wrote:
>
> Hi folks —
>
> Is there a preferred way to alter the timestep — for instance, something in extras_check_model?
>
> cheers,
>
> Rich
>
> ------------------------------------------------------------------------------
> _______________________________________________
> mesa-users mailing listmesa-users at lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
>
> --
> Mathieu Renzo <https://staff.fnwi.uva.nl/m.renzo/>
> PhD student
> Anton Pannekoek Institute,
> University of Amsterdam
>
> Contacts:
>
> Address: PO Box 94249, 1090 GE Amsterdam
> Office: C4.128a
> Telephone: (+31) 020-5258352
> Skype name: m4thr3n
> Mail: m.renzo at uva.nl
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> 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/20160820/ca87ac0d/attachment.html>
More information about the Mesa-users
mailing list