[mesa-users] Extra diffusion

Josiah Schwab jwschwab at berkeley.edu
Tue Aug 9 18:07:30 EDT 2016

Hello Corentin,

> I am trying to add a custom routine accounting for diffusion of chemical
> elements that is related to the rotation rate (Omega) of the star and other
> parameters.
> To do that, I'm using a custom 'other_D_mix' routine in the
> 'src/run_star_extras.f' file that is mostly doing:
>> s%D_mix = s%D_mix + factor*diffusion_coefficient
> Where factor is 0.8 and the diffusion coefficient is ~15 (cm²/s).
> If I then launch MESA, I get the error:
>> mixing_type conv_vel           1           0    5.9868160194578010D-07
>> STOP set mixing info
> Looking at star/private/mix_info.f90:364 (where the error is thrown), I
> see that MESA is stopping if the mixing_type is 0 and the convection
> velocity positive. What should be mixing_type?

The mixing types are listed in


I often set the mixing type of mixing I introduce via other_D_mix to
anonymous_mixing, i.e.,

  s% mixing_type(k) = anonymous_mixing

There's a rotation_mixing type that I think you could also safely use.

> I also saw there was an 'other_diffusion' hook. What's the difference
> with 'other_D_mix'? And which one should I use?

The basic rule-of-thumb (at least in my mind) is that the "diffusion"
routines are for cases where different species will have different
diffusion coefficients.


More information about the Mesa-users mailing list