diff --git a/integration/RKC/_parameters b/integration/RKC/_parameters index 26ce4131f7..599c712981 100644 --- a/integration/RKC/_parameters +++ b/integration/RKC/_parameters @@ -1,5 +1,12 @@ @namespace: integrator +# do we scale the ODE system we integrate to make it O(1)? +# for Strang, this simply means scaling e by the initial energy? +scale_system integer 1 100 + + # use the Gershgorin circle theorem to estimate the spectral radius? # note: requires integrator.scale_system = 1 -use_circle_theorem integer 0 +use_circle_theorem integer 1 + + diff --git a/networks/ignition_simple/actual_rhs.H b/networks/ignition_simple/actual_rhs.H index 596d0b0c6f..5daf9de7dd 100644 --- a/networks/ignition_simple/actual_rhs.H +++ b/networks/ignition_simple/actual_rhs.H @@ -162,7 +162,7 @@ void actual_jac (burn_t& state, MatrixType& jac) // carbon jacobian elements jac(C12, C12) = -(1.0_rt / 6.0_rt) * dens * rate * xc12tmp; - jac(Mg24, C12) = -jac(C12, C12); + jac(Mg24, C12) = -0.5_rt * jac(C12, C12); // add the temperature derivatives: df(y_i) / dT Real jac_C12_T = -(1.0_rt / 12.0_rt) * (dens * dratedt * xc12tmp * xc12tmp); @@ -174,12 +174,13 @@ void actual_jac (burn_t& state, MatrixType& jac) // Now store as df(y_i) / de jac(C12, net_ienuc) = temperature_to_energy_jacobian(state, jac_C12_T); + jac(Mg24, net_ienuc) = temperature_to_energy_jacobian(state, -0.5_rt * jac_C12_T); // Energy generation rate Jacobian elements with respect to species ener_gener_rate(jac(C12, C12), jac(net_ienuc, C12)); // Energy generation rate Jacobian element with respect to energy - ener_gener_rate(jac(net_ienuc, net_ienuc), jac_C12_T); + ener_gener_rate(jac(C12, net_ienuc), jac(net_ienuc, net_ienuc)); } #endif diff --git a/unit_test/burn_cell/ci-benchmarks/aprox13_RKC_unit_test.out b/unit_test/burn_cell/ci-benchmarks/aprox13_RKC_unit_test.out index 0b90ab2f1d..3d539cc6e8 100644 --- a/unit_test/burn_cell/ci-benchmarks/aprox13_RKC_unit_test.out +++ b/unit_test/burn_cell/ci-benchmarks/aprox13_RKC_unit_test.out @@ -32,41 +32,41 @@ RHS at t = 0 Ni56 3.938787868e-40 ------------------------------------ successful? 1 - - Hnuc = 8.558278158e+18 - - added e = 8.558278158e+16 - - final T = 1516420694 + - Hnuc = 8.558390239e+18 + - added e = 8.558390239e+16 + - final T = 1516425860 ------------------------------------ e initial = 1.284393683e+17 -e final = 2.140221499e+17 +e final = 2.140232707e+17 ------------------------------------ new mass fractions: -He4 0.8760729004 -C12 0.1064105138 -O16 0.0001403212837 -Ne20 8.124852121e-05 -Mg24 0.0002973242454 -Si28 0.01113130507 -S32 0.005296312742 -Ar36 0.0005639653326 -Ca40 6.106588023e-06 -Ti44 2.002611523e-09 -Cr48 3.268456246e-14 -Fe52 7.117832617e-20 -Ni56 1.223647062e-26 +He4 0.8760723967 +C12 0.1064099566 +O16 0.0001403204362 +Ne20 8.129701233e-05 +Mg24 0.0002972369574 +Si28 0.01113151728 +S32 0.005297014797 +Ar36 0.0005641483161 +Ca40 6.109847027e-06 +Ti44 2.004306621e-09 +Cr48 3.272104798e-14 +Fe52 7.12614193e-20 +Ni56 1.224820021e-26 ------------------------------------ species creation rates: -omegadot(He4): -12.39270996 -omegadot(C12): 10.64105138 -omegadot(O16): 0.01403212837 -omegadot(Ne20): 0.008124852121 -omegadot(Mg24): 0.02973242454 -omegadot(Si28): 1.113130507 -omegadot(S32): 0.5296312742 -omegadot(Ar36): 0.05639653326 -omegadot(Ca40): 0.0006106588023 -omegadot(Ti44): 2.002611523e-07 -omegadot(Cr48): 3.268456246e-12 -omegadot(Fe52): 7.117832617e-18 -omegadot(Ni56): 1.223547062e-24 -number of steps taken: 260 +omegadot(He4): -12.39276033 +omegadot(C12): 10.64099566 +omegadot(O16): 0.01403204362 +omegadot(Ne20): 0.008129701233 +omegadot(Mg24): 0.02972369574 +omegadot(Si28): 1.113151728 +omegadot(S32): 0.5297014797 +omegadot(Ar36): 0.05641483161 +omegadot(Ca40): 0.0006109847027 +omegadot(Ti44): 2.004306621e-07 +omegadot(Cr48): 3.272104798e-12 +omegadot(Fe52): 7.12614193e-18 +omegadot(Ni56): 1.224720021e-24 +number of steps taken: 255 AMReX (23.06-6-g1e1c433b401c) finalized diff --git a/unit_test/test_rhs/ci-benchmarks/ignition_simple.out b/unit_test/test_rhs/ci-benchmarks/ignition_simple.out index 62867d9c0b..6249285494 100644 --- a/unit_test/test_rhs/ci-benchmarks/ignition_simple.out +++ b/unit_test/test_rhs/ci-benchmarks/ignition_simple.out @@ -12,7 +12,7 @@ Edot 1.4856487707e-52 1.0426954626e+28 J_carbon-12_carbon-12 -41369549490 -2.6524790935e-69 J_oxygen-16_carbon-12 0 0 - J_magnesium-24_carbon-12 2.6524790935e-69 41369549490 + J_magnesium-24_carbon-12 1.3262395468e-69 20684774745 J_E_carbon-12 1.7827785248e-50 2.7805212337e+29 J_carbon-12_oxygen-16 0 0 J_oxygen-16_oxygen-16 0 0 @@ -24,6 +24,6 @@ J_E_magnesium-24 0 0 J_carbon-12_E -3.0258460306e-08 -5.079112025e-85 J_oxygen-16_E 0 0 - J_magnesium-24_E 0 0 - J_E_E 0 0 + J_magnesium-24_E 2.5395560125e-85 1.5129230153e-08 + J_E_E 3.4137618146e-66 2.033725105e+11