-
Notifications
You must be signed in to change notification settings - Fork 22
Tabulated optically thin radiative cooling module with Townsend integration #349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dutta-alankar
wants to merge
11
commits into
idefix-code:master
Choose a base branch
from
dutta-alankar:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+444
−12
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b36dafa
Tolerance updated in `RegressionTest` in `test/HD/sod/testme.py`
dutta-alankar 58de06b
[FIX] Dump datatype agnostic file xdmf IO
dutta-alankar c7f83dd
Merge branch 'idefix-code:master' into master
dutta-alankar 92992da
[ADD] tabulated optically thin radiative cooling module
dutta-alankar 1357703
[FIX] additional tags for successful `cmake` compilation
dutta-alankar b07f7ff
[FIX] minor typo in documentation
dutta-alankar 70d6c40
[FIX] decrement internal energy by radiative cooling
dutta-alankar d4aa609
[FIX] cpplint edits
dutta-alankar 231951b
[DOC] radiative cooling module documentation
dutta-alankar 16a3844
[DOC] unit conversion
dutta-alankar 6f7733f
[FIX] reverse old change
dutta-alankar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| .. _radiativeCoolingModule: | ||
|
|
||
| Radiative Cooling module | ||
| =================== | ||
|
|
||
| Equations solved and method | ||
| --------------------------- | ||
|
|
||
| The ``RadiativeCooling`` module implements the computation of the loss of internal thermal energy | ||
| due radiation in an optically thin medium. Physically, it solves for :math:`\dot_{e}=\mathcal{L}`, | ||
| where we have used :math:`\mathcal{L}=-n_H^2 \Lambda (T)` (where :math:`T` is the gas temperature, | ||
| :math:`n_H=\rho X_H/m_p` is the total hydrogen number density, and :math:`\Lambda(T)`) is the | ||
| radiative cooling rate computed seperately from quantum mechanical calculations | ||
| by other plasma modeling codes, for example, Cloudy (Ferland et. al, PASP 110, 749 (1998)). | ||
|
|
||
| This computation becomes especially relevant for multiphase gas in astrophysical environments | ||
| prevalent in the ISM, the CGM, and the ICM, for which this module has been designed. | ||
|
|
||
| The ``RadiativeCooling`` module implemented in *Idefix* follows the algorithm of the Townsend | ||
| to integrate the loss of internal thermal energy (Townsend, ApJS 181, 2 (2009)) at every timestep | ||
| in an operator split manner. The cooling rate is read from a table at runtime where the `first` row | ||
| is temperature (in :math:`\rm K`) and second row is :math:`\Lambda (T)` (in :math:`\rm erg cm^3 s^{-1}`). | ||
|
|
||
| .. note:: | ||
| We assume a normalization of :math:`n_H`, the total hydrogen number density for the | ||
| of the cooling curve supplied by the rate table at runtime to *Idefix*. Different might cooling curves with | ||
| different normalisation is known to exist in literature and special attention must be given to | ||
| what is supplied to the code. Right now, this module has been tested only with the ideal gas equation of state. | ||
| We also assume the mean particle mass :math:`\mu=0.609`, i.e., constant in the current implementation (appropriate | ||
| for fully ionized plasma). | ||
| It is recommended to include conversion factors between code and physical units in ``definitions.hpp``. For example, | ||
| `` | ||
| #define UNIT_LENGTH 3.086e+18 | ||
| #define UNIT_DENSITY (1.0e-02*0.609*1.673e-24) | ||
| #define UNIT_VELOCITY 1.000e+05 | ||
| `` | ||
|
|
||
| Main parameters of the module | ||
| ----------------------------- | ||
|
|
||
| The ``RadiativeCooling`` module is a submodule of the ``Hydro`` module to compute the loss of internal thermal energy (pressure) | ||
| of the gas. The parameters specific to radiative cooling are to be set in a dedicated line starting with the word | ||
| ``Cooling`` in the ``[Hydro]`` block. An example is as follows succeded by a detailed explanation. | ||
|
|
||
| `` | ||
| Cooling Tabulated cooltable.dat Townsend TcoolFloor 1.0e+04 | ||
| `` | ||
|
|
||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ | ||
| | Entry name | Parameter type | Comment | | ||
| +======================+=========================+==============================================================================================+ | ||
| | cooling mode | string | | Type of radiative cooling. Only `Tabulated` supported right now. | | ||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ | ||
| | table name | string | | name/location of the cooling table w.r.t. *Idefix* binary to be loaded at runtime. | | ||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ | ||
| | integration method | string | | Integration method to calculate the internal thermal energy loss due to radiative cooling. | | ||
| | | | | Only `Townsend` supported right now. | | ||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ | ||
| | TcoolFloor (skip) | string | | Floor temperature in K below which cooling is turned off. | | ||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ | ||
| | temperature floor | float (optional) | | Default is 1.0e+04 | | ||
| +----------------------+-------------------------+----------------------------------------------------------------------------------------------+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| target_sources(idefix | ||
| PUBLIC ${CMAKE_CURRENT_LIST_DIR}/cooling.hpp | ||
| PUBLIC ${CMAKE_CURRENT_LIST_DIR}/cooling.cpp | ||
| ) | ||
|
|
||
| target_include_directories(idefix | ||
| PUBLIC ${CMAKE_CURRENT_LIST_DIR} | ||
| ) |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be corrected as this is not specific energy but energy density per unit volume.