[Mesa-users] Time step problems

Ebraheem Farag ekfarag at asu.edu
Mon Apr 17 10:48:53 UTC 2023


This issue was resolved in a private communication.

Here is a small recap and response/correction to my initial suggestions
to end the thread.
---------------------
The model run was a modified version of
$MESA_DIR/binary/test_suite/star_plus_point_mass, intended to model a low
mass x-ray binary.
---------------------
"It looks like you have developed a large radiative envelope with a weak
(flat) temperature gradient at logT< 4.0,  by depositing extra heat into
the surface regions. (Just a guess) Inefficient heat transport through this
region could be causing your timesteps to become prohibitively small."

Yes, the inlists and run_star_extras routine and shared by Shunyi
approximates x-ray irradiation of the surface of a 0.5Msun star by
depositing a large amount of heat into the first optical depth of the star.
The large heat input into the surface zones flatten the temperature
gradient resulting in an unstable radiative envelope. This thin envelope
then moves around with velocities that approach a large fraction of the
sound speed, resulting in a timestep dive.

"I'm not sure, but this could be potentially relieved through adopting some
MLT++ treatment in your model"

No, we are in the regime of gradT ~ 0. This is not a superadiabatic regime
(gradT-grad_ad > 0), instead gradT-grad_ad << 0, hence we have an unstable
radiative envelope. Applying extra surface pressure helps stabilize the
surface zones, but is not enough to remedy the issue.

One solution was to decrease the heat input into the surface by one order
of magnitude through the control:
 s% x_ctrl(1) = 1d-3, instead of 1d-2, where the irradiation_efficiency =
s% x_ctrl(1). Increasing the mass loss rate is also an option, but too
large of a mass loss rate removes all the layers in which the heat was
deposited.

-EbF

On Mon, Apr 10, 2023 at 12:48 AM Shunyi Lan <lanshunyi at ynao.ac.cn> wrote:

> Dear Ebraheem:
>
> Thank you for your detailed and helpful response to my questions. I
> appreciate your suggestions and will test them out.
>
> Best regards,
>
> Shunyi Lan
>
> -----原始邮件-----
> *发件人:*"Ebraheem Farag" <ekfarag at asu.edu>
> *发送时间:*2023-04-10 14:41:00 (星期一)
> *收件人:* "Shunyi Lan" <lanshunyi at ynao.ac.cn>
> *抄送:* mesa-users at lists.mesastar.org
> *主题:* Re: Re: [Mesa-users] Time step problems
>
> No worries,
>
> It looks like you have developed a large radiative envelope with a weak
> (flat) temperature gradient at logT< 4.0,  by depositing extra heat into
> the surface regions. (Just a guess) Inefficient heat transport through this
> region could be causing your timesteps to become prohibitively small.
> I'm not sure, but this could be potentially relieved through adopting some
> MLT++ treatment in your model (artificially reducing grad_T closer to
> grad_a), & control: 'okay_to_reduce_gradT_excess = .true.').
> see section 7.1/7.2 in MESA II
> <https://urldefense.com/v3/__https://iopscience.iop.org/article/10.1088/0067-0049/208/1/4*apjs477373s7__;Iw!!IKRxdwAv5BmarQ!ZEpJjMwOTdwgbw1_hNKJRilSvmviIzur43ZX7EUxGazYZJ7rjz-c0Bi_YkrXwNoLZnvl9XcGE_3bjzPy3nga$> or
> section 7.2 of MESA VI
> <https://urldefense.com/v3/__https://iopscience.iop.org/article/10.3847/1538-4365/acae8d/meta__;!!IKRxdwAv5BmarQ!ZEpJjMwOTdwgbw1_hNKJRilSvmviIzur43ZX7EUxGazYZJ7rjz-c0Bi_YkrXwNoLZnvl9XcGE_3bj1GSrnqz$> (for
> an implicit method employed in r22.11.1 of MESA, useful for binaries with
> Mass loss).
> --------
> Another approach that might or might not help, albeit more unphysical,
> would be to apply some extra pressure to the surface. If you are using a
> 'fixed' or 'iterated' T-tau relationship for your atmosphere, you can apply
> some artificial extra pressure to the surface, which could help decrease
> gradT near the surface, &control : "Pextra_factor = 2" ! You can set this
> value higher to flatten log T vs log Rho gradient near the surface, but it
> can produce incorrect radii, see section 6.1 of MESA VI
> <https://urldefense.com/v3/__https://iopscience.iop.org/article/10.3847/1538-4365/acae8d/meta__;!!IKRxdwAv5BmarQ!ZEpJjMwOTdwgbw1_hNKJRilSvmviIzur43ZX7EUxGazYZJ7rjz-c0Bi_YkrXwNoLZnvl9XcGE_3bj1GSrnqz$>
>
> If one fix does not work on its own, you could try adopting both
> 'okay_to_reduce_gradT_excess' (MLT++) and 'Pextra_factor' together... or,
> you could use the "superad_reduction" instead of mlt++, if you can run your
> models in r22.11.1. This scheme is especially useful if there are large
> step to step variations in mass loss.
>
> Hope this helps,
> EbF
>
> On Sun, Apr 9, 2023 at 9:31 PM Shunyi Lan <lanshunyi at ynao.ac.cn> wrote:
>
>> Dear Ebraheem:
>>
>> Thanks for your reply.
>>
>> The attachments are some selected profiles during the evolution. It
>> should be noticed that this star is currently in a binary system and losing
>> mass while the outer region is heated. The single star energy injection
>> also tested, the timestep is also very small.
>>
>> BTW, the " heat = " is not a typo, just indicate the heat is a free
>> parameter.
>>
>> Best regards,
>>
>> Shunyi Lan
>>
>> Sorry for not sending to the main thread. Please forgive me for my first
>> MESA community inquiry.
>>
>>
>>
>>
>> -----原始邮件-----
>> *发件人:*"Ebraheem Farag" <ekfarag at asu.edu>
>> *发送时间:*2023-04-10 11:43:55 (星期一)
>> *收件人:* "兰顺义" <lanshunyi at ynao.ac.cn>
>> *抄送:* mesa-users at lists.mesastar.org
>> *主题:* Re: [Mesa-users] Time step problems
>>
>> 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/20230417/fac9bd92/attachment.htm>


More information about the Mesa-users mailing list