diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-21 15:17:01 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-21 15:17:01 +0800 |
commit | 4f1b9b0cc8828cb81fb2cfee89b5153cc7ace0ae (patch) | |
tree | 7d4a9ce88d785095bbc2163067e95d5b563e07e4 /fg21sim/extragalactic/clusters/helper.py | |
parent | fd20ab688759f3dfc3f7796ac0b1118e21ee5b22 (diff) | |
download | fg21sim-4f1b9b0cc8828cb81fb2cfee89b5153cc7ace0ae.tar.bz2 |
clusters/halo: Add function "speed_sound()"
Also add "gamma" the adiabatic index of ideal gas to utils/units.py
Diffstat (limited to 'fg21sim/extragalactic/clusters/helper.py')
-rw-r--r-- | fg21sim/extragalactic/clusters/helper.py | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py index 1c6e48e..d77c63e 100644 --- a/fg21sim/extragalactic/clusters/helper.py +++ b/fg21sim/extragalactic/clusters/helper.py @@ -33,6 +33,10 @@ References .. [zandanel2014] Zandanel, Pfrommer & Prada 2014, MNRAS, 438, 124 http://adsabs.harvard.edu/abs/2014MNRAS.438..124Z + +.. [zhuravleva2014] + Zhuravleva et al. 2014, Nature, 515, 85; + http://adsabs.harvard.edu/abs/2014Natur.515...85Z """ import logging @@ -256,6 +260,30 @@ def density_energy_electron(spectrum, gamma): return e_re +def speed_sound(kT): + """ + The adiabatic sound speed in cluster ICM. + + Parameters + ---------- + kT : float + The cluster ICM temperature + Unit: [keV] + + Returns + ------- + cs : float + The speed of sound in cluster ICM. + Unit: [km/s] + + Reference: Ref.[zhuravleva2014],Appendix(Methods) + """ + # The gas adiabatic index + gamma = AC.gamma + cs = np.sqrt(gamma * kT*AUC.keV2erg / (AC.mu * AC.u)) # [cm/s] + return cs * AUC.cm2km # [km/s] + + def velocity_impact(M_main, M_sub, z=0.0): """ Estimate the relative impact velocity between the two merging |