Microphysics icon indicating copy to clipboard operation
Microphysics copied to clipboard

[WIP] Adaptive Statistical Equilibrium

Open zhichen3 opened this issue 1 year ago • 1 comments

Current task: Need to be able to pick out individual rates in the network.

zhichen3 avatar Sep 17 '22 04:09 zhichen3

Seems like it is doing what I want it to do, but the test-reaction network doesn't pass the condition of the fast reaction network with extreme thermodynamic condition.

zhichen3 avatar Oct 08 '22 22:10 zhichen3

Currently testing using subch_full nuclei. It reaches NSE for density: 1e6~1e7, and T~6.5e9K. It seems like when I increased the density, then the temperature required for reaching NSE also increased. Especially when density is at ~1e9 g/cm^3, the temperature needs to be around ~10^10K.

I also tried to use no screening and set u_c = 0, then it just failed to reach NSE when the density is beyond 1e8 g/cm^3.

I'll add some print statements to see where went wrong.

zhichen3 avatar Nov 04 '22 02:11 zhichen3

I wonder if the issue is that we don't have the partition functions in yet.

zingale avatar Nov 04 '22 09:11 zingale

Oh, I thought we have it already because I saw there is a partition_function.H generated, but I guess its basically empty for now and only contains the spin. Yeah, then I guess that might be the issue.

zhichen3 avatar Nov 04 '22 15:11 zhichen3

After several bug fixes, I think it now works.

I had to set screening to null and set u_c=0, which makes sense since Alex explored these effects in pynucastro as well. Surprisingly, chugunov2007 also worked okay with u_c turned on. Perhaps I can add the potekhin_1998 screening to microphysics that Alex implemented in pynucastro and see how it works. It should work well.

For the network, I just copied and pasted the subch_simple.py script to the ase network directory for testing, the only change is I added neutron to the network.

For the unit_tests, I copied and pasted the make_table we had in nse_solver and added the part where we check whether we're in nse, perhaps I can just integrate them together, instead of creating a separate one in the test_ase.

Overall, it all just come down to calling in_nse(state, nse_state) by providing the current state and the nse state, and it returns a boolean stating whether we're in nse.

zhichen3 avatar Nov 09 '22 21:11 zhichen3

the output from the test changed slightly when the order of the rates are changed (I updated the output from subch_simple.py using the latest pynucastro pr-494), Probably another bug somewhere.

zhichen3 avatar Nov 10 '22 20:11 zhichen3