diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-21 16:14:11 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-21 16:14:11 +0800 |
commit | af7818ed9d6e9e2e2bbc293948797215df113392 (patch) | |
tree | d3146c35dddd78d18835bfb5c916829ea7b045ef /fg21sim | |
parent | ffd12eeb34b04c04f2cbaffe6e0de6bc8305d8db (diff) | |
download | fg21sim-af7818ed9d6e9e2e2bbc293948797215df113392.tar.bz2 |
clusters/helper: Add density_gas() function
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/helper.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py index e9fa338..ad43f32 100644 --- a/fg21sim/extragalactic/clusters/helper.py +++ b/fg21sim/extragalactic/clusters/helper.py @@ -257,6 +257,14 @@ def density_number_thermal(mass, z=0.0): return n_th +def density_gas(mass, z=0.0): + """ + Calculate the mean gas density. + Unit: [g/cm^3] + """ + return density_number_thermal(M_main, z) * AC.mu*AC.u # [g/cm^3] + + def density_energy_thermal(mass, z=0.0, configs=CONFIGS): """ Calculate the thermal energy density of the ICM. |