[Mesa-users] do_element_diffusion = .false. != diffusion_class_factor(:) = 0

RICHARD H D TOWNSEND townsend at astro.wisc.edu
Thu Dec 14 15:16:50 EST 2017



> On Dec 14, 2017, at 12:47 PM, Evan Bauer <ebauer at physics.ucsb.edu> wrote:
> 
> Hi Earl,
> 
> It looks like your inlist command is only setting the first class factor to 0. That is
> 	diffusion_class_factor(:) = 0
> somehow only gets diffusion_class_factor(1) and leaves the rest of them untouched. Since the default number of diffusion classes is five, I think your inlist needs
> 	diffusion_class_factor(1) = 0
> 	diffusion_class_factor(2) = 0
> 	diffusion_class_factor(3) = 0
> 	diffusion_class_factor(4) = 0
> 	diffusion_class_factor(5) = 0
> 
> Somebody who understands fortran namelists better than me can probably explain exactly why this is happening, but hopefully the above is an adequate solution.
> 

Array assignment in namelists doesn't work; never quite figured out whether this is standard-mandated, or an issue with the compiler(s) we use. That's why, for array-valued controls, we have to default initialize them explicitly rather than doing it from the namelists in star/defaults. Have a look e.g. at set_default_controls() in ctrls_io.f90.

cheers,

Rich


> Cheers,
> Evan
> 
> 
>> On Dec 14, 2017, at 3:58 AM, Earl Bellinger <bellinger at mps.mpg.de> wrote:
>> 
>> Dear mesa-users,
>> 
>> I am wondering if someone can help me to understand why turning off
>> element diffusion yields a different result than setting the diffusion
>> factor to 0? I would expect, perhaps naively, for them to yield the
>> same result.
>> 
>> Some simple inlists are attached for calculating the first Gyr of
>> evolution for a solar mass track. There's a small difference in
>> several quantities, for example the effective temperature changes from
>> 5643.763 to 5643.913. This is somewhat different from running it with
>> diffusion class factor of 1, which gives Teff of 5643.915.
>> 
>> Best regards,
>> Earl Bellinger
>> 
>> ---
>> earlbellinger.github.io
>> Earl Bellinger, Ph.D. Candidate
>> Stellar Ages & Galactic Evolution Group
>> Max Planck Institute for Solar System Research
>> <inlist_diff_off><inlist_diff_0><diff_off.data><diff_0.data>
> 




More information about the Mesa-users mailing list