Skip to content

Updated primordial chem network#1966

Open
psharda wants to merge 3 commits intoAMReX-Astro:developmentfrom
psharda:update26.03
Open

Updated primordial chem network#1966
psharda wants to merge 3 commits intoAMReX-Astro:developmentfrom
psharda:update26.03

Conversation

@psharda
Copy link
Copy Markdown
Collaborator

@psharda psharda commented Mar 20, 2026

This PR updates the primordial chemistry network to incorporate a couple of additional He reactions that are important at high temperatures, and use the same combination of H2 dissociation rates as Hunter et al. 2023.

@psharda psharda requested a review from zingale March 20, 2026 11:45
@psharda psharda marked this pull request as ready for review March 20, 2026 11:45
@psharda psharda requested a review from BenWibking March 20, 2026 11:55
@BenWibking
Copy link
Copy Markdown
Collaborator

Is this all SymPy-generated changes? Since the tests pass I will not perform a line-by-line review if that's the case.

Copy link
Copy Markdown
Collaborator

@BenWibking BenWibking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's all symbolic regenerated stuff, I won't perform a line-by-line review.

I think it would be good to adopt the standard practice of including what version (including git commit) you used to symbolically generate this for future reference.

//Last updated July 2024
//Update notes: 1. the original version of this file used std::pow, which we replaced with a combo of std::exp/std::log wherever possible.
//Update notes: 2. added free-free cooling which was missing from the previous version
//Last updated March 2026
//Author: Piyush Sharda (sharda@strw.leidenuniv.nl)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add what version of your code you used to generate this? I think this will help in the future if it has to be regenerated.

@BenWibking
Copy link
Copy Markdown
Collaborator

This doesn't have to go in this PR, but we should discuss in the near future if we can find a way to avoid calling pow in this network. Performance should be much better if we can avoid it.

One option is to precalculate most of the rates and tabulate them, along the lines of JAFF's export_table feature: https://github.com/jaff-chemistry/jaff/blob/main/examples/export_table.ipynb

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