Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert rprox to the new reactions scheme #1300

Merged
merged 24 commits into from
Aug 10, 2023

Conversation

maxpkatz
Copy link
Member

There were errors in the analytic Jacobian for rprox related to the use of delta1 and delta2 for determining which reaction pathways we were taking. This means results will change; while the new Jacobian is more likely to be correct, it is still not successful for integrating test_react with integrator.jacobian = 1.

@maxpkatz maxpkatz marked this pull request as ready for review July 26, 2023 02:44
@zingale
Copy link
Member

zingale commented Aug 9, 2023

can you post the comparison of test_rhs here so it is contained in the PR

@maxpkatz
Copy link
Member Author

$ fcompare react_rprox_test_rhs.VODE_current/ react_rprox_test_rhs.VODE_new/

            variable name            absolute error            relative error
                                        (||A - B||)         (||A - B||/||A||)
 ----------------------------------------------------------------------------
 level = 0
 density                                          0                         0
 temperature                                      0                         0
 Ydot_carbon-12                     2.902418445e-05           1.078975279e-14
 Ydot_oxygen-14                     4.768371582e-06           1.468577957e-15
 Ydot_oxygen-15                     2.902418445e-05           4.764296549e-11
 Ydot_oxygen-16                     0.0001831054688           3.559968971e-15
 Ydot_flourine-17                   0.0001907348633           3.708309299e-15
 Ydot_magnesium-22                  1.311302185e-05           8.887528509e-15
 Ydot_sulfur-30                     1.263618469e-05           8.833687319e-15
 Ydot_nickel-56                     6.407499313e-07           1.058762232e-14
 Ydot_helium-4                      3.051757812e-05           4.374859973e-15
 Ydot_hydrogen-1                    0.0001907348633           3.568630134e-15
 Xold_carbon-12                                   0                         0
 Xold_oxygen-14                                   0                         0
 Xold_oxygen-15                                   0                         0
 Xold_oxygen-16                                   0                         0
 Xold_flourine-17                                 0                         0
 Xold_magnesium-22                                0                         0
 Xold_sulfur-30                                   0                         0
 Xold_nickel-56                                   0                         0
 Xold_helium-4                                    0                         0
 Xold_hydrogen-1                                  0                         0
 Edot                                3.39089386e+15            1.13809291e-13
 J_carbon-12_carbon-12                0.00048828125            1.53248301e-15
 J_oxygen-14_carbon-12                0.00048828125            1.53248301e-15
 J_oxygen-15_carbon-12                            0                         0
 J_oxygen-16_carbon-12                            0                         0
 J_flourine-17_carbon-12                          0                         0
 J_magnesium-22_carbon-12                         0                         0
 J_sulfur-30_carbon-12                            0                         0
 J_nickel-56_carbon-12                            0                         0
 J_helium-4_carbon-12                             0                         0
 J_hydrogen-1_carbon-12                0.0009765625            1.53248301e-15
 J_E_carbon-12                      9.007199255e+15            4.45972275e-15
 J_carbon-12_oxygen-14                            0                         0
 J_oxygen-14_oxygen-14              1.907348633e-06           1.258763698e-18
 J_oxygen-15_oxygen-14                            0                         0
 J_oxygen-16_oxygen-14                            0                         0
 J_flourine-17_oxygen-14            1.907348633e-06           1.258763698e-18
 J_magnesium-22_oxygen-14                         0                         0
 J_sulfur-30_oxygen-14                            0                         0
 J_nickel-56_oxygen-14                            0                         0
 J_helium-4_oxygen-14               1.907348633e-06           1.258763698e-18
 J_hydrogen-1_oxygen-14             1.907348633e-06           1.258763698e-18
 J_E_oxygen-14                      3.602879702e+16           2.066351079e-14
 J_carbon-12_oxygen-15               0.005099443693              0.8993132837
 J_oxygen-14_oxygen-15                            0                         0
 J_oxygen-15_oxygen-15               0.005099443693           1.903218363e-11
 J_oxygen-16_oxygen-15              1.014813233e-16           1.633239086e-14
 J_flourine-17_oxygen-15                          0                         0
 J_magnesium-22_oxygen-15           4.649162292e-06           1.735163987e-14
 J_sulfur-30_oxygen-15                            0                         0
 J_nickel-56_oxygen-15                            0                         0
 J_helium-4_oxygen-15                0.005099443693           1.903218363e-11
 J_hydrogen-1_oxygen-15              0.005099443693           6.344061211e-12
 J_E_oxygen-15                      4.183108241e+16           5.712817948e-12
 J_carbon-12_oxygen-16                            0                         0
 J_oxygen-14_oxygen-16                            0                         0
 J_oxygen-15_oxygen-16                            0                         0
 J_oxygen-16_oxygen-16              0.0001525878906           1.662720771e-15
 J_flourine-17_oxygen-16            0.0001525878906           1.663145771e-15
 J_magnesium-22_oxygen-16           1.490116119e-07           9.151477797e-16
 J_sulfur-30_oxygen-16                            0                         0
 J_nickel-56_oxygen-16                            0                         0
 J_helium-4_oxygen-16               1.490116119e-07           9.151477797e-16
 J_hydrogen-1_oxygen-16             0.0001525878906           1.662295989e-15
 J_E_oxygen-16                       2.25619786e+15           4.222318355e-14
 J_carbon-12_flourine-17                          0                         0
 J_oxygen-14_flourine-17                          0                         0
 J_oxygen-15_flourine-17             2.56113708e-09           1.184825125e-14
 J_oxygen-16_flourine-17                0.037109375           3.637749341e-15
 J_flourine-17_flourine-17                 0.0390625           3.819661573e-15
 J_magnesium-22_flourine-17           9.918212891e-05           3.889405282e-15
 J_sulfur-30_flourine-17                          0                         0
 J_nickel-56_flourine-17                          0                         0
 J_helium-4_flourine-17             9.918212891e-05           3.889405282e-15
 J_hydrogen-1_flourine-17               0.037109375           3.637749461e-15
 J_E_flourine-17                    7.205759404e+17           1.219346573e-13
 J_carbon-12_magnesium-22                         0                         0
 J_oxygen-14_magnesium-22                         0                         0
 J_oxygen-15_magnesium-22                         0                         0
 J_oxygen-16_magnesium-22                         0                         0
 J_flourine-17_magnesium-22                         0                         0
 J_magnesium-22_magnesium-22           1.907728578e+12                         2
 J_sulfur-30_magnesium-22           1.907728578e+12                         2
 J_nickel-56_magnesium-22                         0                         0
 J_helium-4_magnesium-22            1.907728578e+12          1.797693135e+308
 J_hydrogen-1_magnesium-22           7.630914311e+12                         1
 J_E_magnesium-22                   8.616916897e+31               1.246543327
 J_carbon-12_sulfur-30                            0                         0
 J_oxygen-14_sulfur-30                            0                         0
 J_oxygen-15_sulfur-30                            0                         0
 J_oxygen-16_sulfur-30                            0                         0
 J_flourine-17_sulfur-30                          0                         0
 J_magnesium-22_sulfur-30                         0                         0
 J_sulfur-30_sulfur-30              1.013179442e+11                         2
 J_nickel-56_sulfur-30              1.013179442e+11                         2
 J_helium-4_sulfur-30               3.292833188e+11          1.797693135e+308
 J_hydrogen-1_sulfur-30             1.317133275e+12                         1
 J_E_sulfur-30                      1.450189669e+31               1.234633766
 J_carbon-12_nickel-56                            0                         0
 J_oxygen-14_nickel-56                            0                         0
 J_oxygen-15_nickel-56                            0                         0
 J_oxygen-16_nickel-56                            0                         0
 J_flourine-17_nickel-56                          0                         0
 J_magnesium-22_nickel-56                         0                         0
 J_sulfur-30_nickel-56                            0                         0
 J_nickel-56_nickel-56                            0                         0
 J_helium-4_nickel-56                             0                         0
 J_hydrogen-1_nickel-56                           0                         0
 J_E_nickel-56                                    0                         0
 J_carbon-12_helium-4               1.571606845e-09           1.099587726e-14
 J_oxygen-14_helium-4               1.192092896e-07           2.101821064e-18
 J_oxygen-15_helium-4                   14062.52271            0.001444116499
 J_oxygen-16_helium-4               4.656612873e-09            8.73181875e-16
 J_flourine-17_helium-4             1.192092896e-07           2.101821064e-18
 J_magnesium-22_helium-4            2.390157127e+10               1.000426577
 J_sulfur-30_helium-4               2.291754585e+10                         1
 J_nickel-56_helium-4                   984025417.3                         1
 J_helium-4_helium-4                    28125.04543           4.957935055e-07
 J_hydrogen-1_helium-4               2.16797231e+11               1.354091297
 J_E_helium-4                       1.960304046e+30              0.9676853157
 J_carbon-12_hydrogen-1             0.0003263950348           1.213374914e-14
 J_oxygen-14_hydrogen-1             4.196166992e-05           1.559926844e-15
 J_oxygen-15_hydrogen-1             0.0003240214511           1.910958564e-07
 J_oxygen-16_hydrogen-1             0.0001372247934           1.897147425e-13
 J_flourine-17_hydrogen-1            5.36441803e-07           1.005704094e-15
 J_magnesium-22_hydrogen-1           0.0001371949911           7.223736505e-13
 J_sulfur-30_hydrogen-1                           0                         0
 J_nickel-56_hydrogen-1                           0                         0
 J_helium-4_hydrogen-1              0.0004309862852           2.269274801e-12
 J_hydrogen-1_hydrogen-1             0.000324021437           6.014035765e-15
 J_E_hydrogen-1                      2.72239079e+15           1.593810707e-14
 J_carbon-12_E                      1.613891727e-10           2.536064847e-12
 J_oxygen-14_E                      9.237055565e-14           1.451578114e-15
 J_oxygen-15_E                       0.006413048658              0.8138430061
 J_oxygen-16_E                      4.185035754e-12           1.114721616e-14
 J_flourine-17_E                    1.307398634e-12           3.546698913e-15
 J_magnesium-22_E                    0.006413048658           0.0003814839094
 J_sulfur-30_E                      1.296740493e-13           8.199624811e-15
 J_nickel-56_E                      1.110223025e-14           1.089016255e-14
 J_helium-4_E                           40.29478737               2.402131603
 J_hydrogen-1_E                         161.1791495              0.5101314391
 J_E_E                              1.100107417e+21               0.835355453

@zingale zingale merged commit d32b1a0 into AMReX-Astro:development Aug 10, 2023
21 checks passed
@maxpkatz maxpkatz deleted the convert_rprox branch August 10, 2023 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants