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

Rob Farmer r.j.farmer at uva.nl
Thu Dec 14 15:35:49 EST 2017


Setting arrays like that works in the default files because they get
compiled into the code not read as a name list.

Rob


On 14 Dec 2017 21:28, "Warrick Ball via Mesa-users" <
mesa-users at lists.mesastar.org> wrote:

Hi Earl, Rich, et al.,

That's interesting and unexpected (at least for me).  An unfortunate
by-product is then that the defaults files use this "feature". e.g.

       xa_function_weight(:) = 0

in &controls (r10108), among many other places.

Is there any way to make it obvious to users that this doesn't actually
work?  Writing a comment at each one of these statements in the inlists
doesn't seem the right way to do it.  Maybe there's a way to crash if the
user tries?

Cheers,
Warrick

------------
Warrick Ball
Postdoc, School of Physics and Astronomy
University of Birmingham, Edgbaston, Birmingham B15 2TT
wball at bison.ph.bham.ac.uk
+44 (0)121 414 4552

On Thu, 14 Dec 2017, mesa-users at lists.mesastar.org wrote:

>
>
>> 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>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20171214/ca138368/attachment.html>


More information about the Mesa-users mailing list