Different results from FGONG or AMDL version of model file

Bug/problem reports for any of the GYRE executables (gyre_ad, gyre_nad, etc)
Post Reply
User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Different results from FGONG or AMDL version of model file

Post by warrick » Thu May 16, 2019 2:35 am

Hi,

I seem to be getting different oscillation frequencies for a stellar model depending on whether I use an FGONG file or an AMDL file, converted using either ADIPLS' internal fgong converter (if you have MESA, it's at $MESA_DIR/adipls/adipack.c/adiajobs/fgong-amdl.d.f) or my own Python-based converter (using TOMSO). I've attached example files for Model S, with the AMDL file gzipped because otherwise it was rejected as an attachment.

For the summary using the FGONG model, I get

Code: Select all

                                                                                                                                                                                                                                                                



                        1                        2                        3                        4                        5                        6
                        l                     n_pg                      n_p                      n_g                 Re(freq)                 Im(freq)
                        0                       21                       21                        0  0.3038081409866325E+004  0.0000000000000000E+000
                        0                       22                       22                        0  0.3174111887772760E+004  0.0000000000000000E+000
                        0                       23                       23                        0  0.3310180199798498E+004  0.0000000000000000E+000
                        0                       24                       24                        0  0.3446893236132409E+004  0.0000000000000000E+000
                        0                       25                       25                        0  0.3583918263283139E+004  0.0000000000000000E+000
                        0                       26                       26                        0  0.3721163831988589E+004  0.0000000000000000E+000
                        0                       27                       27                        0  0.3858790528140903E+004  0.0000000000000000E+000
                        0                       28                       28                        0  0.3996454584650650E+004  0.0000000000000000E+000
                        0                       29                       29                        0  0.4134355457053003E+004  0.0000000000000000E+000
                        0                       30                       30                        0  0.4272334189292133E+004  0.0000000000000000E+000
                        0                       31                       31                        0  0.4410314077774772E+004  0.0000000000000000E+000
                        0                       32                       32                        0  0.4548466828006668E+004  0.0000000000000000E+000
                        0                       33                       33                        0  0.4686358934199711E+004  0.0000000000000000E+000
                        0                       34                       34                        0  0.4824085736439642E+004  0.0000000000000000E+000
                        0                       35                       35                        0  0.4961514516938695E+004  0.0000000000000000E+000
whereas with the AMDL file I get

Code: Select all

                                                                                                                                                                                                                                                                



                        1                        2                        3                        4                        5                        6
                        l                     n_pg                      n_p                      n_g                 Re(freq)                 Im(freq)
                        0                       15                       15                        0  0.3102764484173943E+004  0.0000000000000000E+000
                        0                       16                       16                        0  0.3290559811239307E+004  0.0000000000000000E+000
                        0                       17                       17                        0  0.3479404763661229E+004  0.0000000000000000E+000
                        0                       18                       18                        0  0.3669127390608365E+004  0.0000000000000000E+000
                        0                       19                       19                        0  0.3859486183176797E+004  0.0000000000000000E+000
                        0                       20                       20                        0  0.4050645670093928E+004  0.0000000000000000E+000
                        0                       21                       21                        0  0.4242285556617217E+004  0.0000000000000000E+000
                        0                       22                       22                        0  0.4434049354298812E+004  0.0000000000000000E+000
                        0                       23                       23                        0  0.4625786127087709E+004  0.0000000000000000E+000
                        0                       24                       24                        0  0.4817157007065860E+004  0.0000000000000000E+000
The FGONG output is what I expect.

I started looking into the GYRE's source (and comparing it with the source for ADIPLS's FGONG to AMDL script) but nothing has jumped out at me as being incorrect. I'll keep digging, though.

Cheers,
Warrick
Attachments
gyre.in
(538 Bytes) Downloaded 630 times

User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Re: Different results from FGONG or AMDL version of model file

Post by warrick » Thu May 16, 2019 3:30 am

As usual, shortly after answering the question, I find the answer.

This is almost certainly a bug in the calculation of V_2. e.g. in gyre_amdl_file.fpp, V_2 is set (for x > 0) by

Code: Select all

       V_2 = V_g*Gamma_1
whereas I've inferred from the other (working) model readers that it should be

Code: Select all

       V_2 = V_g*Gamma_1/x**2
The same bug affects the FAMDL reader. I'll open a pull request.

Cheers,
Warrick

User avatar
warrick
Posts: 84
Joined: Wed Aug 28, 2013 2:47 am

Re: Different results from FGONG or AMDL version of model file

Post by warrick » Thu May 16, 2019 4:12 am

Finally, to close this off for anywhere else who finds this thread, Rich already fixed this in the development version. I just cleaned up my input file to use Model S's value of G (6.67232e-8) and I get the same radial mode frequencies for the FGONG and the AMDL at the machine precision level.

W

User avatar
rhtownsend
Site Admin
Posts: 397
Joined: Sun Mar 31, 2013 4:22 pm

Re: Different results from FGONG or AMDL version of model file

Post by rhtownsend » Thu May 16, 2019 11:16 am

warrick wrote:
Thu May 16, 2019 4:12 am
Finally, to close this off for anywhere else who finds this thread, Rich already fixed this in the development version. I just cleaned up my input file to use Model S's value of G (6.67232e-8) and I get the same radial mode frequencies for the FGONG and the AMDL at the machine precision level.

W
Machine precision is nice! Thanks for following through on this.

Post Reply