aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-10-19 21:09:21 +0800
committerAaron LI <aly@aaronly.me>2017-10-19 21:09:21 +0800
commitd680f1714673e93f330b2c6f0d2be5fb87d340ff (patch)
treed8e1529f4d0d3d2ed3a6640faad9c601693e6a3a /fg21sim
parentbac5d68002444faa9c2bf3c9c3c2e284b47cfd28 (diff)
downloadfg21sim-d680f1714673e93f330b2c6f0d2be5fb87d340ff.tar.bz2
clusters/helper: Add kT_virial() to calculate the virial temperature
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/extragalactic/clusters/helper.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py
index 6b835a0..20ad9d9 100644
--- a/fg21sim/extragalactic/clusters/helper.py
+++ b/fg21sim/extragalactic/clusters/helper.py
@@ -22,6 +22,10 @@ References
Cassano et al. 2012, A&A, 548, A100
http://adsabs.harvard.edu/abs/2012A%26A...548A.100C
+.. [fujita2003]
+ Fujita et al. 2003, ApJ, 584, 190;
+ http://adsabs.harvard.edu/abs/2003ApJ...584..190F
+
.. [murgia2009]
Murgia et al. 2009, A&A, 499, 679
http://adsabs.harvard.edu/abs/2009A%26A...499..679M
@@ -103,6 +107,38 @@ def radius_halo(M_main, M_sub, z=0.0):
return R_halo
+def kT_virial(mass, z=0.0, radius=None):
+ """
+ Calculate the virial temperature of a cluster.
+
+ Parameters
+ ----------
+ mass : float
+ The virial mass of the cluster.
+ Unit: [Msun]
+ z : float, optional
+ The redshift of the cluster.
+ radius : float, optional
+ The virial radius of the cluster.
+ If no provided, then invoke the above ``radius_virial()``
+ function to calculate it.
+ Unit: [kpc]
+
+ Returns
+ -------
+ kT : float
+ The virial temperature of the cluster.
+ Unit: [keV]
+
+ Reference: Ref.[fujita2003],Eq.(48)
+ """
+ if radius is None:
+ radius = radius_virial(mass=mass, z=z) # [kpc]
+ kT = AC.mu*AC.u * AC.G * mass*AUC.Msun2g / (2*radius*AUC.kpc2cm) # [erg]
+ kT *= AUC.erg2keV # [keV]
+ return kT
+
+
def mass_to_kT(mass, z=0.0):
"""
Calculate the cluster ICM temperature from its mass using the