[mesa-users] MESA opacity tables

Bill Paxton paxton at kitp.ucsb.edu
Wed Mar 11 13:02:09 EDT 2015


Hi Jason,

Things have changed since the kap/notes were written (back in 2010) -- but obviously the notes have not kept pace.

The particular change that you are hitting is that we no longer combine low T tables and the high(er) T ones into a single mesa kap file.
That change was motived by the introduction of a variety of choices for both low and high so it was necessary to give N low options and M high one separately rather than N*M combinations.   If you look through the mesa/data/kap_data directory you'll find both kinds.  In mesa/star/defaults/star_job_defaults you'll find a section on "kap controls".  It includes a (certainly incomplete) list of options for high and low T tables -- you pick one of each.

         !### kappa_file_prefix
         ! Modify this to select a different set of opacity tables.
         ! alternatives: 

         ! + `'gn93'`
         ! + `'gs98'`
         ! + `'a09'`
         ! + `'OP_gs98'`
         ! + `'OP_a09'`

      kappa_file_prefix = 'gn93'


         !### kappa_lowT_prefix
         ! For lower temperatures.
         ! alternatives:

         ! + `'lowT_Freedman11'`
         ! + `'lowT_fa05_gs98'`
         ! + `'lowT_fa05_gn93'`
         ! + `'lowT_fa05_a09p'`
         ! + `'lowT_af94_gn93'`

      kappa_lowT_prefix = 'lowT_fa05_gs98'


If you decide to spare your class the experience of directly accessing the tables, you might just use the mesa/kap library instead.  It can be used independently of mesa/star.  Same goes for mesa/net and all the other pieces.  That way your students could focus on the 1D equations and just use existing routines for the input physics.

Good luck!

cheers,
Bill






On Mar 11, 2015, at 5:37 AM, Jason Wright wrote:

> Hi, all.  I'm teaching stellar evolution at Penn State and we're using MESA.  We're coding up our own 1D stellar models, and comparing to the "right" answers in MESA.
> 
> My first big issue is the opacity tables.  
> 
> My main purpose is to read the tables myself to reproduce the opacities reported in the logfile for a stellar evolution run.
> 
> My reading of the documentation is that the kap preprocessor takes the tables in the kap_input_data tarball, uses the inlist to decide which are needed, then blends and combines them into a MESA formatted table in the data/kap_data/ directory.  The notes in the kap/ directory state that:
>        
> file header (first 3 lines) of gn93_z2m2_x70.data
>         
> fixed metal distribution -- based on Grevesse & Noels (1993) solar abundances
>     form     version        X           Z          logRs    logR_min    logR_max       logTs    logT_min    logT_max
>        1          19    0.700000    0.020000          33   -8.000000    8.000000         142    2.700000    9.300000
> 
> which, based on the logT range, looks like a combination of the Wichita, OPAL, and higher T tables, which is what I want.  But that's not what I have in mine:
> 
>  > head -3 data/kap_data/gn93_z2m2_x70.data
> fixed metal distribution -- based on Grevesse & Noels (1993) solar abundances
>     form     version        X           Z          logRs    logR_min    logR_max       logTs    logT_min    logT_max
>        1          37    0.700000    0.020000          37   -8.000000    1.000000         138    3.750000    8.700000
> 
> The minimum logT is 3.75, not 2.7.  It looks like this is just the OPAL tables, and that the Furgeson tables are not included.
> 
> I'm using the default install.
> 
> This really confuses me, because MESA runs a 1-solar mass model fine, but when I compare the output opacities in the logfile to those I compute by interpolating that file myself, there is a 10% discrepancy for temperatures below logT=4, which smells like a lack of blending into the Wichita tables.  So it seems like MESA is using a blended table at runtime, but I can't seem to find that table in the mesa directories.
> 
> Also (and this isn't important to what I'm trying to do, but illustrates some of my difficulty), I've tried to recompile the opacities using the scripts in the preprocessor, but run into these errors:
> 
>  > ./rn_test inlist
>  data/kap_data/lowT_fa05_a09_aFe_p3_z2m2_x95.data
>                                                bad logK    9.4999999999999996D-01    2.0000000000000000D-02    2.7000000000000002D+00   -1.7899999999999999D+01    1.0000000000000027D-08    5.0118723362727242D-04
> STOP 1
> 
> >  ./rn_all
> using inlist_a05+Ne
> 
> Doing fixed Z = 0.0000
>  data/kap_data/a05+Ne_z0m0_x00.data
> At line 922 of file ../src/opal_type1.f (unit = 2, file = 'kap_input_data/opal/A05+Ne')
> Fortran runtime error: End of file
> 
> > file kap_input_data/opal/A05+Ne 
> opal/A05+Ne: empty
> 
> Thanks for any help to get me going...
> -- 
>                                                 - 
> ---------------
> Jason T Wright
> Assistant Professor of Astronomy 
> 525 Davey Lab
> The Pennsylvania State University
> University Park, PA 16802
> http://exoplanets.org
> http://astro.psu.edu/~jtwright/
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. http://goparallel.sourceforge.net/_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20150311/341886ac/attachment.html>


More information about the Mesa-users mailing list