[Mesa-users] Time step problems

Ebraheem Farag ekfarag at asu.edu
Mon Apr 10 03:43:55 UTC 2023


Hello 兰顺义,

Could you try making a plot of rho(k) vs T(k)?
also, " heat = " - Is this a typo?

-EbF

On Sun, Apr 9, 2023 at 8:14 PM 兰顺义 <lanshunyi at ynao.ac.cn> wrote:

> 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
> _______________________________________________
> mesa-users at lists.mesastar.org
>
> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!IKRxdwAv5BmarQ!Zt8ZEgIll2Di3zr-hxXTDwqvzQTxfs5du_41m1tlVhJF92MtJEA1vdQtovNlgdkMCqv37QHvKXE9Jnf1dWE1$
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20230409/86ed8f8a/attachment.htm>


More information about the Mesa-users mailing list