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

## Can i calculate the eigenvalue without any stellar model input?

- rhtownsend
- Site Admin
**Posts:**352**Joined:**Sun Mar 31, 2013 4:22 pm

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

Hi Chen --cdd wrote: ↑Tue Dec 24, 2019 11:40 pmHi,

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

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

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

Hi Rich,

Thank you so much for your reply and help . 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

Thank you so much for your reply and help . 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

- rhtownsend
- Site Admin
**Posts:**352**Joined:**Sun Mar 31, 2013 4:22 pm

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

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:cdd wrote: ↑Fri Dec 27, 2019 11:59 pmHi Rich,

Thank you so much for your reply and help . 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

- Change into the $GYRE_DIR/src/tar subdirectory
- Run 'make'
- Edit the build_tar_fits.py file to set the range of m and/or k you want
- Run './build_tar_fits.py'

cheers,

Rich

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

Cheers!

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

Best Wishes

Chen

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

Best Wishes

Chen