[Mesa-users] do_element_diffusion = .false. != diffusion_class_factor(:) = 0
Ed Brown
ebrown at pa.msu.edu
Thu Dec 14 15:29:18 EST 2017
FYI that the following, however, is legal and works (at least under gfortran):
! array_variable is an array of length 5
array_variable = 1.0,2.0,3.0,4.0,5.0
or even
! array_variable = 1, 2, 0, 0, 0
array_variable = 1.0,2.0,3*0.0
On Dec 14, 2017, at 10:16 PM, mesa-users <mesa-users at lists.mesastar.org<mailto:mesa-users at lists.mesastar.org>> wrote:
On Dec 14, 2017, at 12:47 PM, Evan Bauer <ebauer at physics.ucsb.edu<mailto: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<mailto: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<http://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/aa567ac6/attachment.html>
More information about the Mesa-users
mailing list