Tabulated optically thin radiative cooling module with Townsend integration #349
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have implemented optically thin radiative cooling module for Idefix. I have tested this for by allowing cooling of a collection of cells (initially at$2\times 10^6 \ \rm K$ ) in a uniform domain (and calculating temperature and $-\dot{e}/n_H^2$ from the code over time) which seems to exactly reproduce the cooling rate as supplied by the table read during runtime by the code (screenshot attached). The setup and analysis code is attached here for reference and further testing. I have also put in a sample
Cloudygenerated equilibrium cooling rate table for plasma at solar metallicity in presence of HM12 UV photo-ionizing background at redshift 0.The integration method follows the Townsend algorithm (https://ui.adsabs.harvard.edu/abs/2009ApJS..181..391T/abstract), which is quite efficient in calculating the pressure drop due to radiative cooling. There is also a way to set a floor that switches off cooling below some temperature, as required by many popular setups. I have also included a small
.rstdocumentation for this module.Let me know if this is something worth integrating to the main repo and if something additional needs to be done.
Test setup:
cooling-test.tar.gz
Test result (purple: supplied table; green: code result):
