Comparison between ADIPLS and GYRE

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

Comparison between ADIPLS and GYRE

Post by warrick » Tue Sep 10, 2013 11:00 am

I've been toying around with both ADIPLS and GYRE lately, and recently found that GYRE and ADIPLS seem to give me different results. I noticed this error because I was calculating frequencies for other solar models with GYRE and found that they didn't match observed frequencies (e.g. the BiSON 23 year data) properly. Not as well as the ADIPLS output for Model S, anyway.

I've attached some input files. I took the `FGONG` model for Model S [1] directly from Jørgen Christensen-Dalsgaard's webpage [2]. It didn't want to upload here for some reason, so I leave it to the reader to get it. The `.in` files are ADIPLS input to generate the adiabatic frequencies, plus the one GYRE input file. Here's a side-by-side comparison of the first few frequencies from the output.

Code: Select all

l  n    ADIPLS       GYRE
0  1  258.0090
0  2  404.4811
0  3  535.9398   536.6424
0  4  680.5734   681.4681
0  5  825.3655   826.4537
0  6  972.7470   974.0313
0  7 1118.1517  1119.6280
0  8 1263.5260  1265.1957
0  9 1407.6297  1409.4920
0 10 1548.5240  1550.5783
Now, before anyone starts getting worried, I'd like to point out that I'm not an experienced ADIPLS user, so I might be doing something daft here, like not adding a surface point or an atmosphere or something. I did change the boundary condition in the GYRE input to `JCD` but that didn't help. (I generally haven't found that changing the boundary conditions makes a noticeable difference.) GYRE was compiled on Scientific Linux 6.4 (Carbon) with the MESA SDK (April 2013 edition) and 4 cores. I used a 2nd-order integrator but I found no difference with the fourth-order integrator.

Let me know if any further information is useful, although I'll mostly be away for the next two weeks.

Cheers,
Warrick

[1] http://users-phys.au.dk/jcd/solar_model ... l5bi.d.15c
[2] http://users-phys.au.dk/jcd/solar_models/
Attachments
gyre_vs_adipls.tar
Input for GYRE and ADIPLS.
(10 KiB) Downloaded 201 times

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

Re: Comparison between ADIPLS and GYRE

Post by rhtownsend » Tue Sep 10, 2013 11:30 am

warrick wrote:I've been toying around with both ADIPLS and GYRE lately, and recently found that GYRE and ADIPLS seem to give me different results. I noticed this error because I was calculating frequencies for other solar models with GYRE and found that they didn't match observed frequencies (e.g. the BiSON 23 year data) properly. Not as well as the ADIPLS output for Model S, anyway.

I've attached some input files. I took the `FGONG` model for Model S [1] directly from Jørgen Christensen-Dalsgaard's webpage [2]. It didn't want to upload here for some reason, so I leave it to the reader to get it. The `.in` files are ADIPLS input to generate the adiabatic frequencies, plus the one GYRE input file. Here's a side-by-side comparison of the first few frequencies from the output.

Code: Select all

l  n    ADIPLS       GYRE
0  1  258.0090
0  2  404.4811
0  3  535.9398   536.6424
0  4  680.5734   681.4681
0  5  825.3655   826.4537
0  6  972.7470   974.0313
0  7 1118.1517  1119.6280
0  8 1263.5260  1265.1957
0  9 1407.6297  1409.4920
0 10 1548.5240  1550.5783
Now, before anyone starts getting worried, I'd like to point out that I'm not an experienced ADIPLS user, so I might be doing something daft here, like not adding a surface point or an atmosphere or something. I did change the boundary condition in the GYRE input to `JCD` but that didn't help. (I generally haven't found that changing the boundary conditions makes a noticeable difference.) GYRE was compiled on Scientific Linux 6.4 (Carbon) with the MESA SDK (April 2013 edition) and 4 cores. I used a 2nd-order integrator but I found no difference with the fourth-order integrator.

Let me know if any further information is useful, although I'll mostly be away for the next two weeks.

Cheers,
Warrick

[1] http://users-phys.au.dk/jcd/solar_model ... l5bi.d.15c
[2] http://users-phys.au.dk/jcd/solar_models/
Interesting stuff! As chance would have it, I've been looking into some differences between ADIPLS and GYRE frequencies for an RGB model that Dennis Stello sent me. It seems that the frequencies depend on how the pulsation equations are formulated -- something that shouldn't matter in the real world, but does matter when one's doing numerical simulations. In a day or two, I'll be making a new release of GYRE which allows the equation formulation to be switched to Jørgen's version; we should see whether that clears up the discrepancies you report above.

cheers,

Rich

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

Re: Comparison between ADIPLS and GYRE

Post by warrick » Fri Sep 13, 2013 6:25 am

Okay, it looks like the errors are actually much smaller. I wasn't normalizing the dimensionless frequencies correctly. While the new version is in the works, the real differences for the original table are (for example):

Code: Select all

l  n    ADIPLS       GYRE
0  1  258.0090
0  2  404.4811
0  3  535.9398   535.9457
0  4  680.5734   680.5834
0  5  825.3655   825.3807
0  6  972.7470   972.7666
0  7 1118.1517  1118.1742
0  8 1263.5260  1263.5528
0  9 1407.6297  1407.6617
0 10 1548.5240  1548.5648
So much smaller, but probably still worrisome. Anyway, I'll wait for the update, just thought I'd own up to my mistake!

W

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

Re: Comparison between ADIPLS and GYRE

Post by rhtownsend » Fri Sep 13, 2013 7:46 am

warrick wrote:Okay, it looks like the errors are actually much smaller. I wasn't normalizing the dimensionless frequencies correctly. While the new version is in the works, the real differences for the original table are (for example):

Code: Select all

l  n    ADIPLS       GYRE
0  1  258.0090
0  2  404.4811
0  3  535.9398   535.9457
0  4  680.5734   680.5834
0  5  825.3655   825.3807
0  6  972.7470   972.7666
0  7 1118.1517  1118.1742
0  8 1263.5260  1263.5528
0  9 1407.6297  1407.6617
0 10 1548.5240  1548.5648
So much smaller, but probably still worrisome. Anyway, I'll wait for the update, just thought I'd own up to my mistake!

W
Hi Warrick --

One thing worth checking is that ADIPLS and GYRE are using the same value for the gravitational constant G. You can set this in GYRE using the G parameter of the &coeffs namelist.

cheers,

Rich

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

Re: Comparison between ADIPLS and GYRE

Post by rhtownsend » Fri Sep 13, 2013 7:15 pm

rhtownsend wrote:
warrick wrote:Okay, it looks like the errors are actually much smaller. I wasn't normalizing the dimensionless frequencies correctly. While the new version is in the works, the real differences for the original table are (for example):

Code: Select all

l  n    ADIPLS       GYRE
0  1  258.0090
0  2  404.4811
0  3  535.9398   535.9457
0  4  680.5734   680.5834
0  5  825.3655   825.3807
0  6  972.7470   972.7666
0  7 1118.1517  1118.1742
0  8 1263.5260  1263.5528
0  9 1407.6297  1407.6617
0 10 1548.5240  1548.5648
So much smaller, but probably still worrisome. Anyway, I'll wait for the update, just thought I'd own up to my mistake!

W
Hi Warrick --

One thing worth checking is that ADIPLS and GYRE are using the same value for the gravitational constant G. You can set this in GYRE using the G parameter of the &coeffs namelist.

cheers,

Rich
Also, try v2.1, which I've just released.

cheers,

Rich

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

Re: Comparison between ADIPLS and GYRE

Post by warrick » Wed Oct 16, 2013 3:01 am

Rich,

I thought I'd return to this issue, now that we're a few versions down the line and I have a better idea what I'm doing. I've set G to the same values in ADIPLS and GYRE and selected the "JCD" boundary condition, and I'm using adiabatic GYRE 2.2 compiled with MESA SDK (2013/04/08) on Scientific Linux 6.4.

In short, I'm still finding some discrepancies, and they now appear to be frequency dependent. I've attached an input FGONG file as well as ADIPLS inputs and GYRE inputs that produce the table of frequencies. There were a few misidentified frequencies because of the sparse model grid, and ADIPLS covered a larger frequency range (by some arbitrary choice) so the table is just of the frequencies that appear in both outputs. Here's a plot of the frequency differences, in the sense (GYRE - ADIPLS) plotted as a function of the ADIPLS frequencies.

Image

At low frequencies, the results are basically now indistinguishable. The frequency differences are less than 0.001 uHz, which doesn't phase me. But, as you can see, the differences increase to several uHz at higher frequencies. They look to me like some kind of surface term.

I did these calculations without resampling the model grid, so I'm going to see if that closes the gap. It might increase the ADIPLS frequencies, for all I know.

Cheers,
Warrick

PS: I'm hope I'm being helpful and not still making foolish errors!
Attachments
table_noresample.txt
Table of frequencies for ADIPLS and GYRE
(4.32 KiB) Downloaded 203 times
GYRE-ADIPLS.png
Plot of frequency differences
GYRE-ADIPLS.png (3.33 KiB) Viewed 5736 times
gyre_ad.in
GYRE input namelists
(2.45 KiB) Downloaded 181 times
adipls.c.in
ADIPLS input file
(1.04 KiB) Downloaded 176 times
adipls.fgong
Stellar model
(982.13 KiB) Downloaded 183 times

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

Re: Comparison between ADIPLS and GYRE

Post by rhtownsend » Thu Oct 17, 2013 6:57 am

Hi Warrick --

I can reproduce these discrepancies, so I don't think you're doing anything wrong. I've tried increasing the shooting grid resolution, but that doesn't fix the problem.

Are you doing any post-processing to the ADIPLS frequencies --- e.g., a surface correction?

cheers,

Rich

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

Re: Comparison between ADIPLS and GYRE

Post by warrick » Thu Oct 17, 2013 9:06 am

Rich,

First off, no, I'm not doing any post-processing: this is straight from "set-obs.d 5 ...". But I think I've solved my problem anyway. After a lot of faffing and unnecessary posts (which I deleted, for the sake of everyone's sanity...) I've pinned down the error to the boundary condition. Here's a new inlist and a new plot (both axes in uHz) of the differences between the ADIPLS and GYRE frequencies. There's a tiny frequency dependent error remaining, but it reaches a maximum of 1.3 nHz at 4.5 mHz, so I'm going to take that as agreement. I just had to change the GYRE boundary condition to JCD.
GYRE-ADIPLS.png
GYRE-ADIPLS.png (3.65 KiB) Viewed 5724 times
Sorry to have sounded a false alarm!

Cheers,
Warrick
Attachments
gyre_ad.in
(2.45 KiB) Downloaded 187 times

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

Re: Comparison between ADIPLS and GYRE

Post by rhtownsend » Fri Oct 18, 2013 3:46 am

warrick wrote:Rich,

First off, no, I'm not doing any post-processing: this is straight from "set-obs.d 5 ...". But I think I've solved my problem anyway. After a lot of faffing and unnecessary posts (which I deleted, for the sake of everyone's sanity...) I've pinned down the error to the boundary condition. Here's a new inlist and a new plot (both axes in uHz) of the differences between the ADIPLS and GYRE frequencies. There's a tiny frequency dependent error remaining, but it reaches a maximum of 1.3 nHz at 4.5 mHz, so I'm going to take that as agreement. I just had to change the GYRE boundary condition to JCD.
GYRE-ADIPLS.png
Sorry to have sounded a false alarm!

Cheers,
Warrick
No problem! In fact, I'm not sure it was completely false. From looking through your ADIPLS input file, it looks like ADIPLS was told to use the "zero" BC and not the isothermal atmosphere BC -- so I'm surprised you get good agreement. Maybe I need to check the input file again.

Are you still having problems with radial modes, or did that go away?

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

Re: Comparison between ADIPLS and GYRE

Post by warrick » Fri Oct 18, 2013 5:18 am

With the 'ZERO' boundary condition, I got the small (up to ~3uHz) difference. With the 'JCD' boundary conditions, the differences decrease to less than 1.3 nHz.
rhtownsend wrote:From looking through your ADIPLS input file, it looks like ADIPLS was told to use the "zero" BC and not the isothermal atmosphere BC -- so I'm surprised you get good agreement.
Whoa, I'd have to look through as well. I modified the default input generated by Joao Marques's Python modules for CES(T)AM. So not sure what atmosphere it's using...
rhtownsend wrote:Are you still having problems with radial modes, or did that go away?
The radial mode problem is gone for now. I'll have to re-establish out how I produced it in the first place! I think it happened if I used variable_type = 'JCD' without increasing the shooting mesh resolution. I'll post again if I can reproduce that bug.

Post Reply