[Mesa-users] Convergence issues solved by changing a_mlt

Jared Goldberg jgoldberg at flatironinstitute.org
Thu Nov 7 19:58:03 UTC 2024


>
> I'm using MESA-r22.11.1 where Steindl+ 2022 used v12778. The scheme is the
> same as in that paper, with an initial stellar seed.
>
Got it. And indeed, a fair amount has changed between 12778 and 22.11.1 in
terms of the treatment of convection and the turb module in general. Some
of the advances are described in MESA VI (Jermyn+2023).

I follow your intuition as well; that more efficient convection should help
> with the small convection zones.
>
Yes, and the behavior you show strongly appears to be numerics rather than
physics for why one alpha is happier than the other. For
engineering purposes, it might be OK to use the value of alpha that works,
but I'm not sure we'll find a good physical justification because one
likely doesn't exist. With whatever value you choose, I highly encourage
running a resolution test varying spatial and temporal resolution
(generally following best practices
https://docs.mesastar.org/en/24.08.1/using_mesa/best_practices.html ).


> For the MESA inlist controls in question, I can tell the following:
> - 'relax_until_radiative_core' is not in my inlist. I guess it's set to
> 'true' by default?
> https://docs.mesastar.org/en/22.11.1/reference/star_job.html#pre-ms-relax-to-start-radiative-core
>

Got it. Since you're starting with a very small seed mass, this doesn't
kick in, but for posterity it may be a nuisance (i.e. it should be set to
.false.) for other cases where you're trying to create accreting pre-MS
stars. This is only activated with an initial mass that's > 0.3 Msun, and
also not starting from a seed mass.


> - '*do_conv_premix*' is set to '*True*'.
>
> - '*prune_bad_cz**' and '*min_convective_gap*' have the following
> controls:
> i) *prune_bad_cz_min_Hp_height = 0.1*
> ii)* prune_bad_cz_min_log_eps_nuc = 99*
> iii)* min_convective_gap = 0.1*
>

Great, then these will already be taking effect.

> *If I'm understanding correctly, by decreasing 'alpha_mlt' from
> 'alpha_mlt = 1.9' to 'alpha_mlt = 1.85', you were able to solver most of
> your convergence issues? *
>
> In general yes, but sometimes I had the case where I also increased
> 'alpha_mlt' slightly and solved my issues. Overall I have a grid of models
> from 0.5-1.5 solar masses with 35 different accretion scenarios that gives
> a total of 735 models. I wanted to keep 'alpha_mlt' fixed at 1.9, but ended
> up varying it between 1.8-2.0 to get better grid coverage. In the end I
> ended up with ~85% grid coverage.
>

Got it. This might be OK, but this sounds like your issues are likely
numerical rather than physical. Run a resolution test!
Also, for science results, it's important to be aware that varying
alpha_MLT will change the temperature of your pre-main-sequence descending
Hayashi track for a convective envelope. This may be important to be aware
of depending on your science application. See review by Joyce & Tayar:
https://ui.adsabs.harvard.edu/abs/2023Galax..11...75J/abstract
Notice the faint hayashi tracks here:
[image: image.png]

> > *Finally, do the tiny spurious convection zones pop up near the base of
> the convective envelope, or the surface? *
>
As far as I can tell, the zones show up throughout the entire interior.
>
Looks like they are present at larger T, so they're seeded at the base, but
yes they're popping up throughout the envelope. From the kippenhahn diagram
you can see that this is when the star develops a radiative envelope, not
at the top of the outer subsurface convection zone.

>
> > *I think two plots could help in diagnosing what's happening. *
>
> I have attached the plots, although I have plotted the MESA 'schwarzschild
> criteria' against logT instead of ∇−∇ad, but this should convey the same
> information right? (I hope my naming scheme makes sense)
>
The schwarzschild criterion typically is a "yes or no" -- is it stable to
convection or not? So grad - grad_ad  contains much more information,
namely, how close your thermodynamic gradient is to the adiabat. See
gradT_sub_grada in your pgstar panels, it is very ratty.

> One thing I noticed, when examining the Kippenhahn diagrams in the MESA
> pngs, is that the model that fails with 'alpha_mlt'=1.9 has a larger region
> of strong burning in the outer parts  than the model with lower 'alpha_mlt'
> at the same age. At later stages the the model with lower 'alpha_mlt'
> will also develop strong off-center burning, yet still converges, so I'm
> not sure this is the cause of the problem in the model with higher
> 'alpha_mlt'.
>
The off-center burning is deuterium burning at the base of the H-rich
envelope. So, yes, it looks like the onset of deuterium burning may not be
playing nicely with MLT. See also the change in h3 abundance in the
abundance plot. I was looking for rattier behavior, though, which doesn't
seem to be the issue, so I agree this likely isn't the fundamental problem.

> > *I would also encourage you to stare at power profile plots.*
>
> Yes, thanks for the tip, I will get around to these plots as soon as I
> can, but I wanted to get the first plots to you both right now.
>
As with grad - grad_ad profiles, you also have this in your pgstar (and
therefore, for your own diagnostics, in profileN.data files).

> Final question for now: When examining the MESA solver outputs, I
> believe one column should display the index of the problematic cell? Is
> there a way to connect a given cell index with a radius or mass coordinate
> to illustrate what is going in the problematic cell?
>
The profile.data files for that and adjacent timesteps contain a bunch of
information and map from zone to mass/radius.  Sometimes it's helpful to
increase your profile output to every timestep just around the crash. For
information during the solve step, you can tell MESA to print information
in extras_check_model in run_star_extras.
Note that this "problematic cell" is just the one with the highest
residual, there may be multiple cells where there are issues.

Thanks to both of you for taking the time to help me, I really appreciate it
>
No problem!

Cheers,
~Jared










> Cheers, Johannes
> ------------------------------
> *Fra:* Jared Goldberg <jgoldberg at flatironinstitute.org>
> *Sendt:* 6. november 2024 20:38:52
> *Til:* Farag, Ebraheem
> *Cc:* mesa-users at lists.mesastar.org; Joergensen, Johannes Holm
> *Emne:* Re: [Mesa-users] Convergence issues solved by changing a_mlt
>
> Hi Johannes,
>
> I've been playing around with accretion on the pre-main-sequence in
> support of a student's project this past summer, and we've been breaking
> MESA in many interesting ways. The tiny convection zones popping in and out
> of existence definitely become a problem in this regime. Like Eb
> speculated, in my experience making convection *more* efficient
> (increasing alpha_MLT) tended to behave slightly better near the convective
> boundary, which I justified intuitively by thinking that it brings
> convective gradients closer to the adiabatic gradient, and also may be a
> bit better for composition gradients which may cause the tiny convection
> zones popping in and out of existence. I have less intuition for why a
> lower alpha_mlt might help the solver -- perhaps this is a sign that some
> of the numerics are ill-converged in general, and kicking the solver around
> (e.g. by changing alpha) could help with convergence.
>
> Convective boundaries are a notorious problem, and have had much work in
> MESA IV and V devoted to doing better and better, though there's still room
> for improvement. One work-around here is setting prune_bad_cz_* and
> min_convective_gap to prune these numerical jitters. Similarly
> do_conv_premix = .true. seems to help with numerical stability. Playing
> with overshooting may also help to this end.
>
> A few more questions to be more helpful and gauge what's going on:
>
> > First, what MESA revision are you using? Are you using the old revision
> from Steindl+2022 (9000s, I think?) or are you using a recent revision?
> A number of changes have been made since then which have put resolution
> away from composition gradients, and similarly there have been changes with
> convective boundary mixing schemes and the turbulence module in general
> which may impact the setup. There were also resolution controls near the
> core boundaries / composition boundaries in that old revision (useful for
> asteroseismology) which Steindl et al used that don't exist in modern
> revisions.
>
> > Also, what are you initial conditions? (E.g. We found that things are
> better-converged if relax_until_reach_radiative_core = .false. on the
> pre-MS.)
> Are you starting from a seed stellar model as in Steindl et al, or from
> one of MESA's built-in constructors for pre-ms initial conditions?
>
> > Finally, do the tiny spurious convection zones pop up near the base of
> the convective envelope, or the surface?
>
> I agree with Eb that
>
>> 1- logT vs logRho profile of the whole model (a pgstar will work well,
>> and it shows where convection operates along the profile)
>> 2- superadiabicity (∇−∇ad) vs logT (so we can match the superadiabatic
>> regions with regions in trho profile)
>
> are good plots to make.
>
> I would also encourage you to stare at power profile plots (are Li and
> Deuterium burning messing things up?) and composition profile plots (does
> jagged behavior in the composition profile cause local Ledoux-unstable
> behavior) as a function of mass coordinate. A kippenhahn diagram would also
> be helpful to see *when* in the star's evolution these spurious convection
> zones start to appear.
>
> Cheers,
> ~Jared
>
>
>
>
> On Wed, Nov 6, 2024 at 10:41 AM Farag, Ebraheem via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
>> Hello Johannes,
>>
>> > For context, I am running some "complicated" accreting pre-MS models
>> with the framework developed by Steindl+ 2022.
>>
>> Very cool! Thomas did some nice work on developing a framework for pre-MS
>> accretion.
>>
>> > From examining the output of the solver I see that the issues arise in
>> convection zones. By trial and error I solved a lot of my convergence
>> issues by simply changing the mixing length parameter slightly (e.g. from
>> 1.9 to 1.85). My question is: Is there any way to interpret this? My models
>> show interesting interiors with often many tiny convection cells which I
>> imagine are difficult to handle; could a change in a_mlt help in this
>> regard?
>>
>> If I'm understanding correctly, by decreasing 'alpha_mlt' from 'alpha_mlt
>> = 1.9' to 'alpha_mlt = 1.85', you were able to solver most of your
>> convergence issues?
>>
>> if decreasing alpha_mlt is indeed solving your issue, are these
>> problematic convective zones becoming radiative in the improved working
>> model? Naively, I would imagine the problem would become worse with lower
>> alpha_mlt unless the zone becomes entirely radiative.
>>
>> I think two plots could help in diagnosing what's happening.
>>
>> 1- logT vs logRho profile of the whole model (a pgstar will work well,
>> and it shows where convection operates along the profile)
>> 2- superadiabicity (∇−∇ad) vs logT (so we can match the superadiabatic
>> regions with regions in trho profile)
>>
>> If you can answer these questions, I can attempt to provide an
>> explanation.
>>
>> -EbF
>>
>>
>>
>>
>>
>> ------------------------------
>> *From:* Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of
>> Joergensen, Johannes Holm via Mesa-users <mesa-users at lists.mesastar.org>
>> *Sent:* Wednesday, November 6, 2024 4:50 AM
>> *To:* mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
>> *Subject:* [Mesa-users] Convergence issues solved by changing a_mlt
>>
>>
>> Hi everyone,
>>
>>
>> I am having convergence issues in MESA. For context, I am running some
>> "complicated" accreting pre-MS models with the framework developed by
>> Steindl+ 2022. From examining the output of the solver I see that the
>> issues arise in convection zones. By trial and error I solved a lot of my
>> convergence issues by simply changing the mixing length parameter slightly
>> (e.g. from 1.9 to 1.85). My question is: Is there any way to interpret
>> this? My models show interesting interiors with often many tiny convection
>> cells which I imagine are difficult to handle; could a change in a_mlt help
>> in this regard? I would gladly provide figures that showcase this, or my
>> inlists. Much gratitude for any help!
>>
>> Cheers, Johannes
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20241107/f02fffb4/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 518533 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20241107/f02fffb4/attachment.png>


More information about the Mesa-users mailing list