I am comparing adiabatic oscillation frequencies from GYRE and GraCo (Moya et al. 2008), and have received fairly good agreement between the two. I will come to that later. For now, I like to discuss how well the MESA input models to GYRE satisfy the hydrostatic equilibrium. To assess that, I do a simplistic run with MESA for a 5Msun model, and store the first model (very young MS star), along with a GYRE profile.
Then, I read in the GYRE file, and follow the prescription by Pieter Degroote
I have attached my MESA inlist and run_star_extras.f.
I have attached the GYRE model (tar.gz file), and the MESA profile output (profile1.txt). The following plot shows that the hydrostatic equilibrium (HSE) is perfectly fulfilled in the MESA profile.
However, this is not the case with the GYRE model.
I also attach a short Python script that produces a plot of the departure from HSE inside the star from the core to the surface (black line) for the GYRE model. The left hand side (LHS) and right hand side (RHS) of the equation are also overplotted with blue and red, respectively. To run the script, unzip GYRE-test.tgz, and make sure the profile1.prof.GYRE is sitting beside the .py script.
As you notice, the model is not in a perfect HSE!
For now (if I have not made silly mistakes), I guess the difference between the two is that pressure, density, temperature etc in MESA profiles are cell-averaged, while in GYRE files, they are interpolated to cell edges. I wonder if this can violate the perfect HSE reached in the profiles. For now, I have no other explanations.
As you can see in run_star_extras, I call
Code: Select all
call star_get_gyre_info(s% id, keep_surface_point, add_atmosphere, &
G, M_star, R_star, L_star, r, w, L, p, rho, T, &
N2, Gamma_1, nabla_ad, delta, nabla, &
kappa, kappa_rho, kappa_T, &
epsilon, epsilon_rho, epsilon_T, omega, ierr)
to get p, rho, T, etc. and this is where I suspect the culprit lies. I know that all intensive quantities are consistently interpolated to cell edges, but the concern is that HSE is maintained with this anymore? On the other hand, if you use logP, logRho etc provided in the default profile_column.list, then the model is in perfect HSE!
I would be grateful to hear back your comments on how to improve this, and if other users also have similar result in their GYRE files.