[Mesa-users] NaN values when getting zones' opacity (in run_star_extras.f90)

Pablo Marchant pamarca at gmail.com
Tue Jul 30 17:20:00 EDT 2019


Hi Matheus,

different variables are set at different points during a step in the
evolution. You're trying to implement a new wind routine, there are
guidelines on how to implement new wind physics under
$MESA_DIR/star/other/other_wind.f90, and in particular there you'll find
that

           ! NOTE: surface is outermost cell. not necessarily at
photosphere.
           ! NOTE: don't assume that vars are set at this point.
           ! so if you want values other than those given as args,
           ! you should use values from s% xh(:,:) and s% xa(:,:) only.
           ! rather than things like s% Teff or s% lnT(:) which have not
been set yet.

so you cannot directly access things like opacity at this point, it is
computed further ahead in the code. In particular, all those variables are
set after mass is adjusted. Perhaps one way you can work around this is by
calling the function star_set_vars which is part of star_lib (look in
$MESA_DIR/star/public/star_lib.f90 to see what arguments the function
receives). That will set many structure variables including opacity.

Cheers

On Tue, Jul 30, 2019 at 2:24 PM Matheus Bernini via Mesa-users <
mesa-users at lists.mesastar.org> wrote:

> I've forgotten some files :)
>
> Em ter, 30 de jul de 2019 às 16:19, Matheus Bernini <
> matheus.b.peron at gmail.com> escreveu:
>
>> Hello everyone.
>>
>> I'm having a problem to get the opacity in the star zones in
>> run_star_extras, using the pointer star_info during the evolution of the
>> model.
>>
>> Basically, when the model starts, before it relax the initial rotation,
>> the opacities(:) have real values, but after the rotation relaxation, the
>> returned opacities become NaN, and I can't figure out why this happens.
>>
>> Cheers
>>
>> [image: image.png]
>>
> _______________________________________________
> mesa-users at lists.mesastar.org
> https://lists.mesastar.org/mailman/listinfo/mesa-users
>
>

-- 
Pablo Marchant Campos
M.Sc on Astrophysics, Universidad Católica de Chile
PhD on Astrophysics, Argelander-Institut für Astronomie, Universität Bonn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20190730/06f32ca1/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 120534 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20190730/06f32ca1/attachment-0001.png>


More information about the Mesa-users mailing list