Page 1 of 1

scaling of eigenfunctions

Posted: Mon Apr 15, 2013 11:29 am
by pieterd
Hi Rich,

is it possible that the scaling of the adiabatic and nonadiabatic eigenfunctions is different? If I run the attached gyre_nad.in and model with "gyre_nad" and "gyre_ad" I get a factor of ~6.32 x 10^7 difference. I tried looking into the code where the difference could be, but I couldn't find any differences in at least the "gyre_*eigfunc" and "gyre*output" files. I'm not yet familiar enough with the code to look any deeper...

Imagining what could go wrong, I noticed that the factor 6.32e7 is on the one hand close to 2*PI*1e7 (but then I don't know where the factor 1e7 comes from), and on the other hand it is of the same magnitude as the dynamical time scale of the model (I think). just wild guesses here...

You can find the model and input file I used attached.

Cheers,
Pieter

Re: scaling of eigenfunctions

Posted: Mon Apr 15, 2013 2:20 pm
by rhtownsend
pieterd wrote:
> Hi Rich,
>
> is it possible that the scaling of the adiabatic and nonadiabatic eigenfunctions
> is different? If I run the attached gyre_nad.in and model with "gyre_nad" and "gyre_ad"
> I get a factor of ~6.32 x 10^7 difference. I tried looking into the code where the
> difference could be, but I couldn't find any differences in at least the "gyre_*eigfunc"
> and "gyre*output" files. I'm not yet familiar enough with the code to look any deeper...
>
> Imagining what could go wrong, I noticed that the factor 6.32e7 is on the one hand
> close to 2*PI*1e7 (but then I don't know where the factor 1e7 comes from), and on
> the other hand it is of the same magnitude as the dynamical time scale of the model
> (I think). just wild guesses here...
>
> You can find the model and input file I used attached.
>

Currently, the eigenfunctions produced by GYRE are normalized in a very ideosyncratic method -- for adiabatic pulsation, y_4 is set to 1 at x=1, but for non-adiabatic pulsation y_6 is set to 1 at x=1 (this is handled in matrix/gyre_linalg.fpp).

There isn't anything mathematically wrong with this choice, but its obviously a bit inconvenient, so I should certainly fix it. How about normalizing modes by default so that the total mode kinetic energy is unity?

cheers,

Rich

Re: scaling of eigenfunctions

Posted: Mon Apr 15, 2013 2:39 pm
by pieterd
Hi Rich,

I think there is a strong case for a uniform scaling of the adiabatic vs nonadiabatic modes. I don't have a real opinion on what the scaling needs to be exactly, as long as it is fairly easy to compare them. Having them scaled so that the total kinetic energy is unity could be a good idea, it feels intuitive.

Cheers,
Pieter

Re: scaling of eigenfunctions

Posted: Tue Apr 16, 2013 8:57 am
by rhtownsend
Fixed in the new 0.9.4 release -- thanks for the feedback!

cheers,

Rich