Skip to content

Commit

Permalink
include higher taylor terms for fast_atan (#1611)
Browse files Browse the repository at this point in the history
Pointed out by Eric: in screening, atan is used in cases like gamma - atan(gamma), so we should use a higher order term rather than simply letting atan(gamma) ~ gamma when gamma is small.
  • Loading branch information
zhichen3 authored Jul 15, 2024
1 parent a5408ba commit 24fc854
Show file tree
Hide file tree
Showing 4 changed files with 399 additions and 392 deletions.
52 changes: 26 additions & 26 deletions unit_test/test_nse_net/ci-benchmarks/nse_net_unit_test.out
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Initializing AMReX (23.07-395-ge6c93bf22695)...
AMReX (23.07-395-ge6c93bf22695) initialized
Initializing AMReX (23.07-445-gc09c45c31007)...
AMReX (23.07-445-gc09c45c31007) initialized
starting the single zone burn...
reading in network electron-capture / beta-decay tables...
chemical potential of proton is -3
Expand All @@ -8,28 +8,28 @@ State Density (g/cm^3): 10000000
State Temperature (K): 6000000000
electron fraction is 0.5
NSE state:
n : 0.000607569351
H1 : 0.001992432526
He4 : 0.5190078752
C12 : 1.326101988e-05
N13 : 9.477376579e-11
N14 : 2.56548683e-09
O16 : 3.225455214e-05
F18 : 5.422064122e-11
Ne20 : 7.427509352e-07
Ne21 : 4.99891257e-08
Na22 : 2.608008157e-09
Na23 : 1.008842941e-06
Mg24 : 0.0001022222498
Al27 : 0.0005548826564
Si28 : 0.03680966808
P31 : 0.0422922376
S32 : 0.0386577195
Ar36 : 0.02464742425
Ca40 : 0.0288515261
Ti44 : 0.001661231048
Cr48 : 0.009967017622
Fe52 : 0.05968005276
Ni56 : 0.2351208186
n : 0.0006075779147
H1 : 0.001992190328
He4 : 0.519153618
C12 : 1.326242057e-05
N13 : 9.476378074e-11
N14 : 2.565252696e-09
O16 : 3.225118799e-05
F18 : 5.421427915e-11
Ne20 : 7.426541003e-07
Ne21 : 4.998331295e-08
Na22 : 2.607634144e-09
Na23 : 1.008712481e-06
Mg24 : 0.0001022062575
Al27 : 0.0005547964335
Si28 : 0.03680294966
P31 : 0.0422845632
S32 : 0.03864965592
Ar36 : 0.02464164049
Ca40 : 0.02884400365
Ti44 : 0.001660754609
Cr48 : 0.009963899266
Fe52 : 0.05965982508
Ni56 : 0.2350349989
We're in NSE.
AMReX (23.07-395-ge6c93bf22695) finalized
AMReX (23.07-445-gc09c45c31007) finalized
10 changes: 7 additions & 3 deletions unit_test/test_nse_net/make_table/burn_cell.H
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,13 @@ void burn_cell_c()
state.rho = rho;
state.y_e = Ye;

if (state.y_e > 0.52_rt){
state.mu_p = -4.0_rt;
state.mu_n = -14.0_rt;
if (state.y_e >= 0.63_rt) {
state.mu_p = -3.0_rt;
state.mu_n = -14.9_rt;
}
else if (state.y_e > 0.52_rt){
state.mu_p = -6.0_rt;
state.mu_n = -11.0_rt;
}
else if (state.y_e > 0.48_rt){
state.mu_p = -8.0_rt;
Expand Down
Loading

0 comments on commit 24fc854

Please sign in to comment.