[Mesa-users] Why does MESA interpret nuclear reaction rates this way?

Ebraheem Farag ekfarag at asu.edu
Thu May 23 16:11:15 UTC 2024


> I'm happy to report this as an issue on GitHub and provide more technical
information.

Thanks for documenting your issue on the Github!

> I've been thinking about this for a few days. I think maybe the best
solution for now is to manually make rate tables which may make more sense,
each with the 10001 T8 nodes in MESA caches.

Yes, perhaps the most immediate solution is to provide a dense table for
MESA to interpolate from would help minimize this issue, as the NACRE II
rates are quite sparse to begin with in this T range.

> As for C12(a,g)O16, NACRE II starts at (T8 = 0.6, rate = 6e-26).
Admittedly this rate is small, but I'm a little worried about the
cumulative effect.

You can test this by adding points to the rate file below T8 = 0.6. Just
add values in and MESA will use them instead of interpolating from 6e-26 to
0. FYI, we are still adopting a rate floor at 10MK as there are some issues
that arise when we let the rates go to lowT. It is a work in progress to
lower this, see https://github.com/MESAHub/mesa/issues/645.

-EbF


On Thu, May 23, 2024 at 5:57 AM Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
wrote:

> Hi Eb,
>
> Thank you for your response and all this information.
>
> Linear-log was also my first guess, but I didn't see simple patterns in
> semi-log plots either. I'm happy to report this as an issue on GitHub and
> provide more technical information.
>
> I've been thinking about this for a few days. I think maybe the best
> solution for now is to manually make rate tables which may make more sense,
> each with the 10001 T8 nodes in MESA caches.
>
> As for C12(a,g)O16, NACRE II starts at (T8 = 0.6, rate = 6e-26).
> Admittedly this rate is small, but I'm a little worried about the
> cumulative effect.
>
> Cheers,
> Kaili
> ------------------------------
> *From:* Ebraheem Farag <ekfarag at asu.edu>
> *Sent:* Wednesday, May 22, 2024 3:35 PM
> *To:* Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> *Cc:* MESA Users List <mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] Why does MESA interpret nuclear reaction
> rates this way?
>
> Hi Kaili, Thanks for raising this issue! As far as I'm aware, the rates
> are not interpolated in log-log space as you've identified. This is the
> same case for the latest MESA release version. You can look into
> $MESA_DIR/rates/private/rates_support. f90
> Hi Kaili,
>
> Thanks for raising this issue! As far as I'm aware, the rates are not
> interpolated in log-log space as you've identified. This is the same case
> for  the latest MESA release version. You can look into
> $MESA_DIR/rates/private/rates_support.f90 to see how the rates are
> tabulated. The only course of action I can see at the moment is to rewrite
> this portion of the rates module which appears to interpolate over the rate
> in linear-log space, i.e. the raw/screened rate vs logT.
>
> I don't have any immediate solution for you, but this is a great issue for
> the MESAhub github
> <https://urldefense.com/v3/__https://github.com/MESAHub/mesa/issues__;!!KGKeukY!3jE4BTEfgd85y_-hylKrOzy1Yg59CVG0eoGhM90t4-iKgkVpVXHVcKxwCsL4dd11XgD1ZDuIkkt0JpsFKX1dJn_cx0Ub$>,
> if you'd like to open an issue there, we can take a closer look and see
> what can be done to address this in the near term and ultimately in a
> future MESA releases.
>
> As for "C12(a,g)O16", this is a helium burning nuclear reaction rate
> which only dominates near the end of Helium burning to set the C/O ratio
> for later phases of evolution. This is to say the rate floor being at T8 =
> 0.6 should be a non-issue, although not ideal.
>
> -EbF
>
> On Tue, May 21, 2024 at 8:43 AM Cao, Kaili via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
> Dear MESA developers and users,
>
> Thanks again to Mathieu (Renzo) for teaching me how to check nuclear
> reaction rates in MESA.
>
> Employing $MESA_DIR/rates/test/show_rates, I managed to visualize how MESA
> interprets NACRE II rates. Using h2_he3_to_h1_he4 as an example, the plot
> below compares MESA's interpretation (black curve; I have been using
> release/r22.11.1) with its underlying NACRE II data (red crosses) shipped
> with MESA ($MESA_DIR/data/rates_data/rate_tables/r_*_nacreII.dat).
>
> I find the results quite unsettling, principally for two reasons:
> - For temperatures below the first node or above the last one, it seems
> that MESA uses a nearest-neighbor extrapolator. For some reactions, e.g.,
> C12(a,g)O16, for which NACRE II starts at T8 = 0.6, this indicates that
> MESA assumes the rate at solar surface is identical to that at solar center.
> - As can be seen on http://www.astro.ulb.ac.be/nacreii/index.html
> <https://urldefense.com/v3/__http://www.astro.ulb.ac.be/nacreii/index.html__;!!IKRxdwAv5BmarQ!c4bjDS3MpzcYVlEzXF7wJX2bZDe29vLOaOhgvrkOWW5Wzf3oXksUkagITelOKylEOSB-tKTF-DhiqX-uzktLbt5ZPrySVg$>,
> NACRE II nuclear reaction rates are smooth functions of the temperature in
> log-log space. However, MESA's interpolation scheme seems to be "wavy"
> (best shown in the interval between first two NACRE II nodes).
>
> Are there scientifical justifications for the above choices? If not, have
> these issues been addressed in r23.05.1, r24.03.1, or the development
> version? Or do you have suggestions to make the results closer to what one
> would expect from published tables and figures? Thank you.
>
> Cheers,
> Kaili
>
>
> ------------------------------
> *From:* Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of
> Cao, Kaili via Mesa-users <mesa-users at lists.mesastar.org>
> *Sent:* Saturday, May 18, 2024 9:43 AM
> *To:* Ebraheem Farag <ekfarag at asu.edu>
> *Cc:* mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] [EXT] How to check a nuclear reaction rate?
>
> This Message Is From an External Sender
> This message came from outside your organization.
> Report Suspicious
> <https://us-phishalarm-ewt.proofpoint.com/EWT/v1/KGKeukY!vIQcEWaND6YARRdwH-4E9wlFBBf_XzPeL4iwrAAzMJWVX_H1yXjAuZJtTvX8rXtCw1Ax1KTJsplG1ROx9KwsLQammciCxiJBWRSlOiJFnSzOTpJbPc0zTuD3-3NLmoI7ZnwMxG2TMqxXY31zQmg$>
>
> Hello Eb,
>
> Thanks. I removed reactions not in pp_and_cno_extras and it worked. The
> test rates (r1 to r9) and those for al26 isomers are also not included, so
> I thought redundant rates were fine, but I was wrong.
>
> Cheers,
> Kaili
> ------------------------------
> *From:* Ebraheem Farag <ekfarag at asu.edu>
> *Sent:* Saturday, May 18, 2024 4:16 AM
> *To:* Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> *Cc:* mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] [EXT] How to check a nuclear reaction rate?
>
> Hello Kaili,
>
> The isotope li6 is not contained in the 'pp_and_cno_extras.net
> <https://urldefense.com/v3/__http://pp_and_cno_extras.net__;!!KGKeukY!wRpNUs2FYL9xM-l5TQ68oEWuZPWUU2fsjtBKO3aUGUFGOn32_m3SRislwndYL2tTCECDplkDSyamxc4P899l8CxNO3dG$>',
> let alone that reaction rate. You'll have to decide whether this is a
> reaction you need for your science or not. If so, you can make your own
> network to include it.
>
> -EbF
>
> On Fri, May 17, 2024 at 7:15 AM Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> wrote:
>
> Hello Eb,
>
> Thank you for your previous help regarding nuclear reaction rates and
> local cache directories.
>
> Following your instructions, specifically your method 3, I made a local
> copy of rate_tables/, and added lines like:
> r_h1_h1_ag_li6         'r_h1_h1_ag_li6_nacreII.dat'
> into rate_list.txt therein.
>
> However, when I tried to ./rn the model, I got:
> add_reaction_for_handle failed in reaclib_parse_handle r_h1_h1_ag_li6
>  invalid rate file r_h1_h1_ag_li6
>  rates_init failed in init_raw_rates_records
>  read_raw_rates_records failed in net_setup_tables
>  set_net failed in net_tables
>  failed in set_net
>
> I have been using MESA release/r22.11.1, and
>       change_net = .true.
>       new_net_name = 'pp_and_cno_extras.net
> <https://urldefense.com/v3/__http://pp_and_cno_extras.net__;!!KGKeukY!wRpNUs2FYL9xM-l5TQ68oEWuZPWUU2fsjtBKO3aUGUFGOn32_m3SRislwndYL2tTCECDplkDSyamxc4P899l8CxNO3dG$>
> '
>
> Is there anything else I need to do if I want to use NACRE II rates?
> Please let me know if you need additional information. Thanks.
>
> Cheers,
> Kaili
> ------------------------------
> *From:* Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of
> Cao, Kaili via Mesa-users <mesa-users at lists.mesastar.org>
> *Sent:* Thursday, March 28, 2024 9:32 AM
> *To:* Ebraheem Farag <ekfarag at asu.edu>
> *Cc:* mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] [EXT] How to check a nuclear reaction rate?
>
> Hello Eb,
>
> Thank you for sharing these approaches, and sorry for the delay. I think
> your method 3 is especially good for running models in parallel.
>
> Cheers,
> Kaili
> ------------------------------
> *From:* Ebraheem Farag <ekfarag at asu.edu>
> *Sent:* Tuesday, March 26, 2024 9:08 PM
> *To:* Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> *Cc:* Mathieu Renzo <mrenzo at arizona.edu>; mesa-users at lists.mesastar.org <
> mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] [EXT] How to check a nuclear reaction rate?
>
> Hello Kaili,
>
> Yes, it's probably wise to always clear the cache if you are going to
> regenerate new rates, just in case.
>
> 1- Setting those controls in the inlists is one approach, especially if
> you want to provide a special rate factor.
> 2- Another approach is to change the global default in MESA by navigating
> to $MESA_DIR/star/data/rate_tables/rate_list.txt and adding a line that
> says 'r_n14_pg_o15     r_n14_pg_o15_nacreII.dat'.
> 3- One more approach (that I personally opt for in most cases) is to
> repeat 2 but with a local copy of /rate_tables in your MESA model folder.
> MESA should by default use this local rate_tables directory over the main
> default.
>
> In fact, in most of my inlists, I place the following in star_job so that
> my rate_tables and rates_cache are stored locally with some other caches
> and not bound to MESA's default rates or other data folders. (useful for
> running on a cluster)
>
> ! local directories data
>       mesa_dir =''
>       eosDT_cache_dir      = './eosDT_cache'
>       kap_cache_dir        = './kap_cache'
>       rate_tables_dir      = './rate_tables'
>       rates_cache_dir      = './rates_cache'
>
> > Would this be due to different forms of fitting functions?
> Possibly, MESA constructs its own piecewise monotonic cubic spline
> functions to interpolate and tabulate the rate. You can find the calls that
> do this in the same raw_rates.f90 file I referred to previously.
>
> -EbF
>
> On Tue, Mar 26, 2024 at 5:44 PM Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> wrote:
>
> Hello Eb,
>
>
> Thanks a lot for this information.
>
>
> Following the changelog, I suppose if I want to replace the default 14N
> proton capture rate with the NACRE II value shipped with MESA, I should
> write:
>
> num_special_rate_factors = 1
>
> reaction_for_special_factor(1) = 'r_n14_pg_o15'
>
> special_rate_factor(1) = 1
>
> filename_of_special_rate(1) = 'r_n14_pg_o15_nacreII.dat'
>
> in my inlists, and run $MESA_DIR/empty_caches before running my models;
> and if I want to replace multiple rates, I set num_special_rate_factors to
> the number I want and define other entries in a similar way. Please tell me
> if this is wrong, thank you.
>
>
> I have not changed nuclear reaction rates before, so I should have been
> using the defaults. I used `show_rates` to convert r_n14_pg_o15_1.bin, and
> the txt file tells me that:
>
> when T8 = 1.0000690699539715E-01, rate = 2.0247671654597788E-022.
>
> However, this is slightly (about 3.3%) below the NACRE rate provided by
> REACLIB Database
>
> https://reaclib.jinaweb.org/n14(p,g)o15/nacr/
> <https://urldefense.com/v3/__https://reaclib.jinaweb.org/n14(p,g)o15/nacr/__;!!IKRxdwAv5BmarQ!Z-CvDte8VjT4Inevmze_uCwVFvUjK3D6-CqjkxLALmrWBnmcVoiN3LIAbdO7AujD4bq5F0RgnDTghEqcs_gG6NChnPveJPM$>
>
> which claims: when T9 = 1.0000690699539715E-02, rate = 2.09489965936E-22.
>
> Could this be due to different forms of fitting functions? Thanks.
>
>
> Cheers,
>
> Kaili
> ------------------------------
> *From:* Ebraheem Farag <ekfarag at asu.edu>
> *Sent:* Tuesday, March 26, 2024 6:58 PM
> *To:* Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> *Cc:* Mathieu Renzo <mrenzo at arizona.edu>; mesa-users at lists.mesastar.org <
> mesa-users at lists.mesastar.org>
> *Subject:* Re: [Mesa-users] [EXT] How to check a nuclear reaction rate?
>
> Hello Kaili and thanks Mathieu,
>
> Be careful that you are sure which rate you are reading in. The default
> n14pg rate in MESA is from NACRE1, and is set in
> $MESA_DIR/rates/private/raw_rates.f90
> <https://urldefense.com/v3/__https://github.com/MESAHub/mesa/blob/5992b8ed6c3033a560ee4361f4cc86335c2bb6f4/rates/private/raw_rates.f90*L239__;Iw!!KGKeukY!zVv5mOzul0tRIDw0i-sHh034ARffwLjtJr6Dx4ry-uN7hRx4Tqorb_93tx9KO1RmpSUQcSGJSwue5kueu_2eyYbXs7cD$>
> :
> 239            case(ir_n14_pg_o15)
> 240               call do1(rate_n14pg_nacre)
>
> The controls for changing which n14_pg rate you adopt have been removed,
> but you can still adopt the rate by placing it in your local ./rate_tables
> directory or the global one that lives in
> $MESA_DIR/data/rates_data/rate_tables. See the changelog for rates in
> version r22.05.1
> <https://urldefense.com/v3/__https://docs.mesastar.org/en/release-r24.03.1/changelog.html*id10__;Iw!!KGKeukY!zVv5mOzul0tRIDw0i-sHh034ARffwLjtJr6Dx4ry-uN7hRx4Tqorb_93tx9KO1RmpSUQcSGJSwue5kueu_2eyZmYtvWT$>
> which describes all of this in detail.
>
> The default $MESA_DIR/data/rates_data/rate_tables directory also provides
> the n14_pg rate from cf88 as well as NACREII if you want to give those a
> try.
>
> Cheers,
> EbF
>
> On Tue, Mar 26, 2024 at 2:25 PM Cao, Kaili via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
> Dear Mathieu,
>
> Thank you very much for your quick reply! The `show_rates` script is very
> handy.
>
> For those who are interested, I checked several values and found a slight
> disagreement between MESA and JINALAB. I will think more about this.
>
> Cheers,
> Kaili
>
> ------------------------------
> *From:* Mathieu Renzo <mrenzo at arizona.edu>
> *Sent:* Tuesday, March 26, 2024 4:47 PM
> *To:* mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
> *Cc:* Cao, Kaili <cao.1191 at buckeyemail.osu.edu>
> *Subject:* Re: [EXT][Mesa-users] How to check a nuclear reaction rate?
>
> Dear Kaili,
>
> there is a way to have MESA print out in a txt file the value of the rate
> used for a specific reaction as a function of T. This requires using a
> small script called `show_rates` to convert rates cached in binary format
> into a human-readable format. The script is available in
> $MESA_DIR/rates/test, see also the relevant section in the documentation
> <https://urldefense.com/v3/__https://docs.mesastar.org/en/latest/net/nets.html*inspect-the-temperature-dependence-of-used-rates__;Iw!!KGKeukY!0QlmTdnJvC0E1CaZrSUz7TvYvpiV-rjmVoz9yx6tnS8Bq_rNHy-Qb3j8dCKZJbXvYMrjHylRUXvL-uRn3JfLrjyeo4yp7N0$>
> .
>
> Hope this helps!
> Mathieu (with many thanks to Rob Farmer who taught me how to do this)
>
>
> On 3/26/24 13:41, Cao, Kaili via Mesa-users wrote:
>
> *External Email*
>
> Dear MESA Users,
>
>
>
> Thank you for reading this email.
>
>
>
> I would like to ask about how to check a nuclear reaction rate used in
> MESA, specifically the proton capture rate of 14N, which was halved in
> 2006 and is important for my purposes.
>
>
>
> I understand that the jina_reaclib_filename control is default to "current
> standard version," but I find the corresponding file
> (jina_reaclib_results_20171020_default) hard to decipher, and I wish to
> make a direct comparison to:
>
> https://reaclib.jinaweb.org/n14(p,g)o15/im05/
> <https://urldefense.com/v3/__https://reaclib.jinaweb.org/n14(p,g)o15/im05/__;!!KGKeukY!0QlmTdnJvC0E1CaZrSUz7TvYvpiV-rjmVoz9yx6tnS8Bq_rNHy-Qb3j8dCKZJbXvYMrjHylRUXvL-uRn3JfLrjyefN_wm2c$>
>
>
>
> Can someone please confirm that this rate is up to date, or instruct me
> how to check it? Thanks a lot.
>
>
>
> Best regards,
>
> Kaili Cao
>
> _______________________________________________mesa-users at lists.mesastar.orghttps://lists.mesastar.org/mailman/listinfo/mesa-users <https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!KGKeukY!0QlmTdnJvC0E1CaZrSUz7TvYvpiV-rjmVoz9yx6tnS8Bq_rNHy-Qb3j8dCKZJbXvYMrjHylRUXvL-uRn3JfLrjye3_SwXpY$>
>
>
> --
> Mathieu Renzo
> <https://urldefense.com/v3/__https://users.flatironinstitute.org/*mrenzo/__;fg!!KGKeukY!0QlmTdnJvC0E1CaZrSUz7TvYvpiV-rjmVoz9yx6tnS8Bq_rNHy-Qb3j8dCKZJbXvYMrjHylRUXvL-uRn3JfLrjyeqnLyNwI$>
> Assistant Professor
> University of Arizona & Steward Observatory
> _______________________________________________
> mesa-users at lists.mesastar.org
>
> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!IKRxdwAv5BmarQ!foyQi1VBFivv-y4at5IxR0HkoxALt1Rstta9UwJqBMM8kJ_UfaXxwO9Qrm5MyeMiMleRNa7811_iIG1mJbHjW5zrweVEBw$
>
> _______________________________________________
> mesa-users at lists.mesastar.org
>
> https://urldefense.com/v3/__https://lists.mesastar.org/mailman/listinfo/mesa-users__;!!IKRxdwAv5BmarQ!c4bjDS3MpzcYVlEzXF7wJX2bZDe29vLOaOhgvrkOWW5Wzf3oXksUkagITelOKylEOSB-tKTF-DhiqX-uzktLbt4SVH-O2A$
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240523/305aeab0/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-uu1mhty0.png
Type: image/png
Size: 35134 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20240523/305aeab0/attachment.png>


More information about the Mesa-users mailing list