[Mesa-users] A typo in atm module?

Yixiao Zhou peter.zhou at anu.edu.au
Wed Oct 24 22:20:06 EDT 2018


Thank you Warrick! This is indeed only a misleading notation (between ln and log10), no influence on numerical values in the code.


best,

Yixiao

________________________________
From: Warrick Ball <W.H.Ball at bham.ac.uk>
Sent: Thursday, 25 October 2018 12:35:51 AM
To: Yixiao Zhou
Cc: mesa-users at lists.mesastar.org
Subject: Re: [Mesa-users] A typo in atm module?

Hi Yixiao,

I think you're right that this is a typo but I think the typo is that
`d_logg_dln?` should be `d_lng_dln?`, where I'm using `?` in place of `M`
or `R`.  The only places that those two variables are used are in the
derivatives

     dP0_dln? = d_logg_dln?*P0

a few lines later.  To detail the maths, we're doing something like

     dP0          dlnP0          d      tau * g         dlng
     ————  = P0 . ————— = P0 . ———— ln  ——————— =  P0 . ————
     dln?         dln?         dln?      kappa          dln?

which is exactly what's in the code, except that there's a misleading
variable name.

Cheers,
Warrick





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


On Wed, 24 Oct 2018, mesa-users at lists.mesastar.org wrote:

>
> Dear MESA developers and users,
>
>
> There might be a small problem in the grey atmosphere routine "eval_grey" in mod_atm.f90.
>
>
> The derivative used in "eval_grey", d_logg_dlnR should equals to -2/ln10 if assuming surface gravity g is propotional to GM/R^2. Similraly, d_logg_dlnM = 1/ln10.
>
>
> This is indeed the case in other part of atmosphere module (e.g., routine "do_atm_get" in mod_atm.f90). However, in "eval_grey" they are set to be
>
> d_logg_dlnR = -2
>
> d_logg_dlnM = 1
>
>
> Is this a typo or I misunderstood something?
>
>
> Thanks,
>
> Yixiao Zhou
>
> PhD student
>
> RSAA
>
> ANU
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20181025/bc06e8f0/attachment.html>


More information about the Mesa-users mailing list