mesa icon indicating copy to clipboard operation
mesa copied to clipboard

fix rates detailed balance

Open Debraheem opened this issue 11 months ago • 4 comments

See https://github.com/MESAHub/mesa/issues/575. I've modified the detailed balance routine to account for an arbitrary number of reactants and products in the forward and reverse channel. Someone should double check me if they can.

I've made a quick plot using: $MESA_DIR/rates/test/show_rates ../../data/rates_data/cache/r_be9_to_neut_he4_he4_1.bin

The forward rates are identical so I did not plot them, but in the reverse channel I plot the rate from 'main' and from 'EbF/fix_rates_detailed_balance'.

reverse_rates.pdf

Note that with this fix, the Conductive_flame test_suite produces a thinner, faster flame.

See testing the branch : https://testhub.mesastar.org/EbF%2Ffix_rates_detailed_balance/commits/0135798 https://logs.mesastar.org/01357980178c967fc0e8dd41b45d8e7c22bb4850/cannon_conroy_intel/conductive_flame/out.txt

See main: https://logs.mesastar.org/5992b8ed6c3033a560ee4361f4cc86335c2bb6f4/cannon_conroy_intel/conductive_flame/out.txt

Debraheem avatar Mar 19 '24 15:03 Debraheem

a_few_rates.pdf Here are some of the rates plotted with round2 using the python scripts shared by @AldanaGrichener.

Testing for round 2 can be found here https://testhub.mesastar.org/EbF%2Ffix_rates_detailed_balance/commits/e374f1c

Debraheem avatar Mar 25 '24 21:03 Debraheem

getting closer! partition functions off on these plots?

fxt44 avatar Mar 25 '24 21:03 fxt44

getting closer! partition functions off on these plots?

I tested setting the partition function terms to 1 and 0 on lines 184 and 185, respectively, in $MESA_DIR/rates/private/reaclib_eval.f90.

The resulting plots are identical, so no observable effect... see round2_with_partition_functions_set_to_1.pdf

Debraheem avatar Mar 25 '24 22:03 Debraheem

@fxt44 I will venture to guess there is still another error lurking here. Also, I'm not sure what results in the differences between 'he3_he3 to h1_h1_he4' at high T?

Debraheem avatar Mar 26 '24 04:03 Debraheem

I've made/attached three plots comparing the top 15 isotopes at logT = 9.84, logRho = 8.47 using the bbq burner inlists shared by @AldanaGrichener, which are based on the 'hydrostatic' test case. There seems to be good consistency across the three networks I tested, mesa_201.net, mesa_330.net, and mesa_495.net. pie_charts.pdf

I think this pr is good to merge now, @fxt44? I will just add some documentation to the changelog for this bug

Debraheem avatar May 06 '24 17:05 Debraheem

looks good! both the 330 and 495 (my standard workhorse) agree very well for the 15 isotopes shown. the 220 is slightly different beyond the first 4 isotopes, but they make sense given the neutron richness this network is capable of.

fxt44 avatar May 06 '24 19:05 fxt44