[mesa-users] Creating more opacity tables (for interpolation)

Warrick Ball wball at astro.physik.uni-goettingen.de
Tue Oct 22 04:22:11 EDT 2013


Hi everyone,

In another experiment I'm conducting with MESA, I'm seeing if I can get 
reasonable results by interpolating observable features (T_eff, log g, 
etc) in a grid of stellar models.  Currently, MESA is performing very 
well: it's fast and, with some trickery, I can get some really smooth 
results.

However, when I interpolate in initial metallicity and hydrogen abundance 
(Z_0 and X_0), I get a kind of "ringing": the interpolated observables 
oscillate around the modelled values.  I think this is because my own 
cubic spline interpolation is sensitive to the underlying interpolation in 
the opacity tables.  I suspect so because changing between Type 1 and 2 
opacities (even though I only have main sequence models) made a 
difference, as did changing from linear to cubic interpolation in Z.  Note 
that my range of X_0 is 0.68 to 0.74 and Z_0 covers 0.016 to 0.022. 
As far as I can tell, both X_0 = 0.70 and Z_0 = 0.02 are points in the 
opacity interpolations.

So, my question: can I generate extra opacity tables of, say, 'gs98' 
variety, that MESA will read?  I would then be able to see if adding a 
few more tables around my region calms the interpolation down to 
acceptable levels.

I tried tinkering in mesa/kap/preprocessor but I quickly started breaking 
things.  I tried adding a few extra metallicities to the rn_fixed_metal 
script but they weren't created and I tried adding hydrogen abundances but 
that started producing errors in the rebuild_all script.  To be more 
comprehensive about my attempts, here's some detail of what I did, but if 
you're not interested in the nitty-gritty, there's no need to read on.

I tried supplying a different number of hydrogen abundances by changing 
the following line in rn_fixed_metal:do_one().  (Basically, I added X_0 = 
0.60 to the default list.)

    ./ckap $1 $2 -1
to
    for X in 0.00 0.10 0.20 0.35 0.50 0.60 0.70 0.80 0.90 0.95
    do
       ./ckap $1 $2 $X
    done

I thought this because I had a look at the source of how the input 
arguments were read and processed.  That gave me errors like "unknown X 
value 0.5999999998       60000", which I tracked down to the last case 
statements in src/fixed_metal.f.  I know I could just add the necessary 
case (60000) but I also got errors like

  bad composition in setup for kap builder
                                        Z    5.9999999999999998D-02
                                        X    9.4999999999999996D-01
                                    Zbase    5.9999999999999998D-02
                                      dXC    0.0000000000000000D+00
                                      dXO    0.0000000000000000D+00
                          Zbase+X+dXC+dXO    1.0100000000000000D+00

so I stopped on that line.  These errors seem to be in the Type 2 tables, 
which I didn't want to modify.  I don't get these errors when I run 
rebuild the tables without modification.

When I tried added extra metallicities (with lines like do_one $1 0.0250 
in rn_fixed_metal) I got more errors like

unknown Z value for fixed metal   2.5000000000000001E-002

which also just involved a few lines in the relevant case statement.  I 
ran ./rebuild_all without a problem but I couldn't find any new opacity 
tables in mesa/kap/preprocessor/data/kap_data/.

Thanks for any advice!

Cheers,
Warrick


------------
Warrick Ball
Postdoc, Institut für Astrophysik Göttingen
wball at astro.physik.uni-goettingen.de
+49 (0) 551 39 5069


More information about the Mesa-users mailing list