[Mesa-users] Time step problems
兰顺义
lanshunyi at ynao.ac.cn
Mon Apr 10 03:14:07 UTC 2023
Dear MESA users and developers:
I'm using extra_energy hook to inject energy to stars. My MESA version is 10398. What I am encountering is, when the star is low mass star (0.5 Msun MS star, for example) and heating is relatively strong,(for example 10 times of luminosity of star) the time step will be very small. I tried to use control force_timestep_min_years to increase the timestep, e.g. 1d3 years, but it still can lower than this limit.
So my question is: how can I increase the timestep while securing the convergence at the same time? And how the exactly the force_timestep_min_years works?
Follow is part of my extra hook. All the variable have stated in right type and the hook works well (at least for other cases, e.g. inermediate mass MS stars, RG, etc.)
*****************************************
heat =
start = 0
s% extra_heat(:) = 0
tau_0 = 0.99
do k = 1, s% nz
if(s% tau(k)>tau_0) then
layer_max = k
exit
end if
end do
do k = 1, layer_max
heat_current = heat*(s% tau(k+1) - s% tau(k) + &
exp(-1.0*s% tau(k+1))-exp(-1.0*s% tau(k)))/ &
(s% tau(layer_max)-1+exp(-1.0*s% tau(layer_max)))
s% extra_heat(k) = heat_current/s% dm(k)
end do
*****************************************
Any suggestion would be very helpful!
Best regards,
Shunyi Lan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20230410/c6765894/attachment.htm>
More information about the Mesa-users
mailing list