feat(GridFire): updated
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -135,4 +135,5 @@ cross/python_includes
|
|||||||
*.pdf
|
*.pdf
|
||||||
|
|
||||||
*pynuc.txt
|
*pynuc.txt
|
||||||
|
*.dat
|
||||||
*pynucastro_network.py
|
*pynucastro_network.py
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ int main(int argc, char** argv) {
|
|||||||
|
|
||||||
solver::PointSolverContext solver_ctx(*blob);
|
solver::PointSolverContext solver_ctx(*blob);
|
||||||
solver::PointSolver solver(engine);
|
solver::PointSolver solver(engine);
|
||||||
solver_ctx.stdout_logging=false;
|
solver_ctx.stdout_logging=true;
|
||||||
|
|
||||||
double current_time = 180;
|
double current_time = 180;
|
||||||
nlohmann::json j;
|
nlohmann::json j;
|
||||||
|
|||||||
20
utils/reaclib/gen_rates.py
Normal file
20
utils/reaclib/gen_rates.py
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import pynucastro as pyna
|
||||||
|
|
||||||
|
def main():
|
||||||
|
lib = pyna.ReacLibLibrary()
|
||||||
|
|
||||||
|
filtered_rates = []
|
||||||
|
|
||||||
|
for rate in lib.get_rates():
|
||||||
|
if all(nuc.Z <= 26 for nuc in rate.reactants):
|
||||||
|
filtered_rates.append(rate)
|
||||||
|
|
||||||
|
out_file = "reaclib_pynucastro_latest_Z26.dat"
|
||||||
|
|
||||||
|
with open(out_file, "w") as f:
|
||||||
|
for rate in filtered_rates:
|
||||||
|
rate.write_to_file(f)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -58,6 +58,18 @@ those changes get upstreamed into this utility script. It is a key development g
|
|||||||
that all of our tools are well documented and easy for non `SERiF` developers
|
that all of our tools are well documented and easy for non `SERiF` developers
|
||||||
to use.
|
to use.
|
||||||
|
|
||||||
|
## Pynucastro rates
|
||||||
|
If you have pynucastro installed you may use the `gen_rates.py` function to generate
|
||||||
|
a rate file dump. Currently this file filters by Z but you can update this with
|
||||||
|
arbitrary internal logic. After generating this file run it through format.py with -f bin and -o reactions.bin
|
||||||
|
and then the bin to header script.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
python ../bin_to_header.py reactions.bin reactions_data.h raw_reaction_data
|
||||||
|
```
|
||||||
|
|
||||||
|
then copy the reactions_data.h files to `GridFire/src/include/gridfire/reactions`
|
||||||
|
|
||||||
## Citations
|
## Citations
|
||||||
REACLIB:
|
REACLIB:
|
||||||
- Rauscher, T., Heger, A., Hoffman, R. D., & Woosley, S. E. 2010, ApJS, 189, 240.
|
- Rauscher, T., Heger, A., Hoffman, R. D., & Woosley, S. E. 2010, ApJS, 189, 240.
|
||||||
|
|||||||
Reference in New Issue
Block a user