weak rates that exist in reaclib do not respect user custom weak rate tables?
- Dominant language
- Fortran
- Stars
- 249
- Forks
- 82
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 3
Description
**Describe the bug**
When using a custom reaction table for the `r_co59_wk_fe59` and / or `r_fe59_wk-minus_co59` via a `weak_rate_list.txt` file, MESA still uses (or at least outputs to cache) the default `_1.bin` rate for each reaction.
My suspicion is that since the `custom_rates` test suite modifies the weak rates `r_n14_wk_c14` and `r_c14_wk-minus_n14`, which are not in REACLIB, they are not overwritten. But, for weak rates which exist in REACLIB, somewhere the user rate is overwritten?
Sharing this here incase it is not a bug and someone with better knowledge of the rates module can help me track down the issue.
My best guess is that potentially this [commit](https://github.com/MESAHub/mesa/commit/8a3e2bc4afad6eab2b210e498a5df6017a62739f) needs to be modified to respect already defined weak custom rates.
**To Reproduce**
Steps to reproduce the behavior:
1. Run a model with current release.
2. Provide a custom rate table `rate_list.txt` and `weak_rate_list.txt`.
3. If the custom weak rate exists in REACLIB, it will be ignored for the default.
**Expected behavior**
The users custom rate should be used and not overwritten. Either the forward rate, reverse from detailed balance, or both.
Contributor guide
Research direction
Start by reproducing the issue with rate_list.txt and weak_rate_list.txt, using the custom_rates test suite as the comparison point. Inspect the rates-module change in commit 8a3e2bc4afad6eab2b210e498a5df6017a62739f and trace how REACLIB weak rates replace user-defined rates. Done means custom weak rates are retained for reactions that also exist in REACLIB, with the expected forward or reverse rate used.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- fortran
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100