[Mesa-users] How to change the reaction rates in the simplex_solar_calibration model
aman awasthi
amanawasthi4444 at gmail.com
Fri May 9 05:11:12 UTC 2025
HI Ebraheem,
I took so much time to respond as I was trying to implement the option 3
suggested by you. I further have questions based on my efforts till now.
I am trying to understand and derive the *analytical formula for the
reaction rates* as used in the nacre subdirectory in MESA. I have outlined
the formula in the attached PDF file.
Could you kindly suggest some references or resources where I can find *the
exact analytical form used in MESA (as in the NACRE compilation)*?
Additionally, I would like to understand *how the coefficients in the
analytical formula would change if I modify the S(0) value for a reaction.*
I have tried solving the integration involved, but I was not able to
reproduce the analytical expression. I would be grateful for any
suggestions or insights you might have on how best to derive or access this
formula, and how the coefficients would be affected by changes in S(0).
I am also attaching a reference paper which is cited by MESA while
calculating the reaction rates using the analytical expression .
Thank you very much for your time and guidance. Any suggestions you can
offer would be greatly appreciated.
Best Regards
Aman Awasthi
On Thu, Apr 10, 2025 at 11:07 AM Farag, Ebraheem <ebraheem.farag at yale.edu>
wrote:
> Hello Aman,
>
> I see you made two separate emails/threads for this issue on the mailing
> list. Perhaps that was in error, but let's try to keep it to one thread per
> issue 🙂.
>
> >1. How to change the reaction rates of the above reactions in
> the simplex_solar_calibration model?
> >2.Are there other methods available within MESA to change the reaction
> rates aside from modifying the rate_tables directory?
>
> There is more than one option, depending on how deep you are willing to go.
>
> The first option is to just apply a factor to the current rates to achieve
> the desired effect. See
> https://docs.mesastar.org/en/latest/reference/star_job.html#filename-of-special-rate.
> I don't know if this will work for the pp reaction since it is a weak
> reaction though.
>
> The second option is to calculate the rates yourself, tabulate them, and
> read them into MESA.
>
> The third, and likely most robust option is below.
> --- beware I'm about to suggest touching MESA source code below---
> The more involved although not terribly difficult option is to directly
> change the s_factor when MESA calculates the rate. Navigate to
> $MESA_DIR/rates/private/ratelib.f90, and check out this example branch I
> made where I directly modified the astrophysical s-factor for n14pg (albeit
> through a factor instead of replacing the default). You can ignore most of
> the files and focus on ratelib.f90.
> https://github.com/MESAHub/mesa/compare/main...EbF/add_rate_uncertainty_option
>
> If you change the s_factor in the ratelib, you will need to recompile
> rates and recompute the rate files.
>
> This involves cleaning your rates_cache directory (The global directory is
> contained in $MESA_DIR/data/rates_data).
>
> The easiest way forward is to add a file in $MESA_DIR called "skip_test",
> change what needs changed in $MESA_DIR/ratelib, then do a fresh install
> "./clean" "./install" of MESA. This will allow you to make your desired
> changes without worrying about satisfying the unit tests MESA conducts
> during installation.
>
> If you want MESA to perform testing during the installation, you'll have
> to do the following instead:
>
> I would recommend first cleaning the rates_cache, then:
> Navigate into $MESA_DIR/rates and change what you see fit. then:
> "cd $MESA_DIR/rates"
> "./clean"
> "./mk"
> "./build_and_test"
>
> You'll probably receive an error stating that the "tmp.txt" file does not
> match "test_output", so do:
> "cp $MESA_DIR/rates/test/tmp.txt $MESA_DIR/rates/test/test_output", to
> replace the old test data with your new test data.
>
> Now, in $MESA_DIR/rates, you can again do:
> "./clean"
> "./mk"
> "./build_and_test"
>
> if this is successful, follow it with:
> "./export"
>
> .or. In my opinion, do a fresh install to make sure everything checks out:
> In $MESA_DIR, do:
> "./clean"
> "./install"
>
> if you run into testing issues in "$MESA_DIR/net", you will likely have to
> repeat the procedure above for updating the testing files.
>
>
> >3. Is it possible to update the reaction data directly on the REACLIB
> website? I am unsure about how to proceed with the verification process and
> editing the libraries on the site.
>
> I'm not sure.
>
> ---
>
> On solar models in MESA:
> If your plans are to use the simplex module for solar calibration, keep in
> mind it is only a starting point for computing standard solar models. The
> standard is to only change the initial Y, Z, and alpha_mlt, and then to run
> the calibration until L ~ Lsun, R~ Rsun, and Z_surf/X_surf ~ the observed
> Z_surf/X_surf at age ~ solar age (say ~4.568d9 yr). I have an example of
> using the simplex calibration for solar models in my own work (see
> https://ui.adsabs.harvard.edu/abs/2024ApJ...968...56F/abstract, where the
> MESA files can be found in the zenodo here
> https://zenodo.org/records/10798600). Keep in mind, i used a very large
> resolution and strict timestepping in my models, which could be considered
> overkill. I also make other inlist choices that you should consider
> carefully before adopting. Another thing to note is that evolving from the
> pre-ms can make the calibration noisy (a mystery yet to be solved). If you
> instead evolve from the ZAMS with smart initial conditions, you should be
> able to create a converged solar model in under 5-10 iterations (as opposed
> to 100s in my work). I would recommend checking out the methods in (
> https://doi.org/10.1093/mnras/199.3.735) for good insight into how to
> structure a solar model for faster convergence.
>
> While the simplex_solar_calibration works, it is not yet a plug and play
> test_suite for computing standard solar models.
>
>
> -EbF
> ------------------------------
> *From:* Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of
> aman awasthi via Mesa-users <mesa-users at lists.mesastar.org>
> *Sent:* Wednesday, April 9, 2025 5:40 PM
> *To:* mesa-users <mesa-users at lists.mesastar.org>
> *Subject:* [Mesa-users] How to change the reaction rates in the
> simplex_solar_calibration model
>
> Hi everyone,
>
> I am currently working on modifying the reaction rates of the following
> reactions in MESA's simplex_solar_calibration module
> 1. For p(p, e+𝜈e)d, taking S factor as S11 (0) = (4.03 ± 0.006). 10^{−25}
> MeVb
> 2. For 7Be(p, 𝛾)8B, taking S factor as S17 (0) = (2.13 ± 0.01). 10^{−5}
> MeVb
> 3. For 14N(p, 𝛾)15O, taking S factor as S114 (0) = 1.59. 10^{−5} MeVb
> 4.For 3He(4He, 𝛾)7Be, taking S factor as S34 (0) = (5.72 ± 0.12).
> 10^{−4} MeVb
>
> So I tried to look for it, I found a good conversation for it on mesa-user
> email arxiv (
> https://lists.mesastar.org/pipermail/mesa-users/2016-December/007313.html)
> that discusses how to modify reaction rates.
> However, I’m unclear on how to generate the new data files for these
> updated reaction rates, which I would need to place in my rate_tables
> local directory.
> For this I explored the REACLIB database (website link -
> https://reaclib.jinaweb.org/index.php). It mentions that we can change
> and edit libraries there. I created an account in hopes of gaining
> access to modify the reaction rate data, but I am still awaiting the
> verification email to complete the process.
>
> I have a few questions regarding this process:
> 1. How to change the reaction rates of the above reactions in the
> simplex_solar_calibration model?
> 2.Are there other methods available within MESA to change the reaction
> rates aside from modifying the rate_tables directory?
> 3. Is it possible to update the reaction data directly on the REACLIB
> website? I am unsure about how to proceed with the verification process and
> editing the libraries on the site.
>
> I would greatly appreciate your guidance on these points. Thank you for
> taking the time to consider my questions.
>
> Regards
> Aman Awasthi
> Phd student
> IIT Bombay , India
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250509/273f589a/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NACRE_reaction_rate_calculation_formula-1.pdf
Type: application/pdf
Size: 156757 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250509/273f589a/attachment-0002.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: A_compilation_of_charged_particle_induced_thermonuclear_ reaction_rates_Angulo_et_al.pdf
Type: application/pdf
Size: 7630059 bytes
Desc: not available
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20250509/273f589a/attachment-0003.pdf>
More information about the Mesa-users
mailing list