[Mesa-users] Unable to change temperature gradient when atomic diffusion is turned on

Joey Mombarg joey.mombarg at kuleuven.be
Tue Aug 24 14:26:53 UTC 2021


Hi Evan,

Thank you for your answer!

I am using release 11701 (with some modifications to the radiative levitation routines I have done myself, but only at the level of star/private/diffusion_procs, so this should not make a difference).

I have done some additional tests, and I can confirm that for my setup the lines I quoted are executed though. However, I now also see that when ‘do_conv_premix = .true.’, the gradient is indeed changed and not overwritten afterwards. Thus, if I understand you correctly, the fact that changing the temperature gradient without premixing does not work is because of a bug in MESA?

Cheers,
Joey

> On 23 Aug 2021, at 22:42, Evan Bauer <evan.bauer.astro at gmail.com> wrote:
> 
> After digging around for a bit, I have a correction on the timeline of the bug I was referring to...
> 
> The bug was introduced in some dev versions between 12778 and 15140, but was fixed in svn revision 14984, so it never did impact any release versions.
> 
> Cheers,
> Evan
> 
>> On Aug 23, 2021, at 4:19 PM, Evan Bauer <evan.bauer.astro at gmail.com> wrote:
>> 
>> Hi Joey,
>> 
>> What MESA version are you using? In 11701 (and other release versions), when diffusion is on, there is a call to update_vars after diffusion updating things to reflect the new composition, but it should also be setting skip_mixing_info = .true. for that call after diffusion. So the lines you've quoted in your email should be skipped for that particular call to update_vars, and diffusion should have no impact on adjust_mlt_gradT_fraction.
>> 
>> There WAS a bug in some dev versions (soon after 15140) that broke some of this logic, but as far as I recall, that bug was fixed fairly promptly and never impacted a release version. So if you're using a dev version, can you point me to the commit number/hash? I should probably be able to help you diagnose a fix.
>> 
>> Cheers,
>> Evan
>> 
>> 
>>> On Aug 23, 2021, at 12:26 PM, Joey Mombarg <joey.mombarg at kuleuven.be> wrote:
>>> 
>>> Dear mesa-users,
>>> 
>>> I am trying to change the temperature gradient to the adiabatic one in the overshoot zone using the run_star_extras routine from Michielsen et al. 2019, where also atomic diffusion and radiative levitation are turned on. While mesa does indeed report that s% adjust_mlt_gradT_fraction(k) = 1 just before calling adjust_gradT_fraction (around line 668 in star/private/mlt_info.f90, r11701), it seems to be overwritten later in star/private/hydro_vars.f90, around line 565:
>>> 
>>>          if (.not. skip_mixing_info) then
>>>             s% mixing_type(1:nz) = no_mixing
>>>             s% adjust_mlt_gradT_fraction(1:nz) = -1
>>>          end if
>>> 
>>> This condition seems to be fulfilled during the main-sequence evolution when atomic diffusion is turned on. I was wondering why adjust_mlt_gradT_fraction is changed to -1 here, and if there are any objections in removing this behaviour for this particular case? 
>>> 
>>> Kind regards,
>>> Joey
>>> _______________________________________________
>>> mesa-users at lists.mesastar.org
>>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>> 
>> 
> 



More information about the Mesa-users mailing list