Can i calculate the eigenvalue without any stellar model input?

General discussion of all things GYRE-related (e.g., results, talks, ideas, tips)
Post Reply
cdd
Posts: 12
Joined: Thu Jul 02, 2015 7:44 am

Can i calculate the eigenvalue without any stellar model input?

Post by cdd » Tue Dec 24, 2019 11:40 pm

Hi,

I want to solve laplace's tidal equation and draw the figure like in figure 1 of paper Lee & Saio 1997 referenced by paper Townsend 2003 with GYRE. But from your maual, it seems that a stellar model must be inputed in the gyre.in file. If i do not want to relate the tidal equation to any stellar model now, can i use GYRE to get the result figure of Lee&Saio1997 ?
Hope to hear from you soon and thank you for any help in advance.

Chen

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

Re: Can i calculate the eigenvalue without any stellar model input?

Post by rhtownsend » Thu Dec 26, 2019 11:38 pm

cdd wrote:
Tue Dec 24, 2019 11:40 pm
Hi,

I want to solve laplace's tidal equation and draw the figure like in figure 1 of paper Lee & Saio 1997 referenced by paper Townsend 2003 with GYRE. But from your maual, it seems that a stellar model must be inputed in the gyre.in file. If i do not want to relate the tidal equation to any stellar model now, can i use GYRE to get the result figure of Lee&Saio1997 ?
Hope to hear from you soon and thank you for any help in advance.

Chen
Hi Chen --

Yes, if you want to use the 'gyre' program to calculate the eigenvalues of Laplace's tidal equation (LTE), then you need to supply a stellar model.

However, I don't recommend following this approach. Instead, you should look inside the $GYRE_DIR/src/tar subdirectory of the GYRE distribution (I'm assuming you're using release 5.2 of GYRE; if not, I recommend upgrading). In this subdirectory are a number of Fortran and Python files that are used internally by GYRE for evaluating the LTE eigenvalues. Since it is computationally expensive to calculate these eigenvalues directly, GYRE uses pre-computed fits to the LTE eigenvalues. These fits are stored in files inside the $GYRE_DIR/data/tar subdirectory -- one file for each combination of m and k.

As an example of plotting the eigenvalue fit for m=-1 and k=1, as a function of spin parameter nu=2*Omega/omega, run this command inside the $GYRE_DIR/src/tar subdirectory:

./plot_tar_fit.py -10 10 1001 ../../data/tar/tar_fit.m-1.k+1.h5 plot.pdf

This will create a plot of lambda (the eigenvalue) for nu spanning the range [-10,10] in 1001 points. The '../../data/tar/tar_fit.m-1.k+1.h5' argument gives the path to the file containing GYRE's fit to the eigenvalue data. The 'plot.pdf' file is the name of the plot file to create.

The plot_tar_fit.py script demonstrates how to read and evaluate the eigenvalue fit data. I suggest you examine it and adapt it to your needs.

Best wishes,

Rich

cdd
Posts: 12
Joined: Thu Jul 02, 2015 7:44 am

Re: Can i calculate the eigenvalue without any stellar model input?

Post by cdd » Fri Dec 27, 2019 11:59 pm

Hi Rich,

Thank you so much for your reply and help :D . Now i can draw that figure. I read into your source code in $GYRE_DIR/src/tar and find that you only calculate the LTE eigenvalues of|m|<=5 and |k|<=5, is that due to computationally expensive? If i want to search modes with |m|>5 or |k|>5, how can i do?

Merry Christmas
Chen

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

Re: Can i calculate the eigenvalue without any stellar model input?

Post by rhtownsend » Sun Dec 29, 2019 1:17 am

cdd wrote:
Fri Dec 27, 2019 11:59 pm
Hi Rich,

Thank you so much for your reply and help :D . Now i can draw that figure. I read into your source code in $GYRE_DIR/src/tar and find that you only calculate the LTE eigenvalues of|m|<=5 and |k|<=5, is that due to computationally expensive? If i want to search modes with |m|>5 or |k|>5, how can i do?

Merry Christmas
Chen
It's really because I didn't expect anyone to need files with |m|>5 and/or |k|>5, and so I chose not to calculate them. But you can calculate these files yourself, using the following steps:
  1. Change into the $GYRE_DIR/src/tar subdirectory
  2. Run 'make'
  3. Edit the build_tar_fits.py file to set the range of m and/or k you want
  4. Run './build_tar_fits.py'
I've only tested this up to |m|<= 10 and |k| <=10, but it should work for larger values.

cheers,

Rich

cdd
Posts: 12
Joined: Thu Jul 02, 2015 7:44 am

Re: Can i calculate the eigenvalue without any stellar model input?

Post by cdd » Sun Dec 29, 2019 9:57 am

Cheers!
I test some larger |m| and |k|and can draw them successfully. Thank you so much for your patiently help. :lol:

Best Wishes
Chen

Post Reply