aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters/halo.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-12-31 17:13:49 +0800
committerAaron LI <aly@aaronly.me>2017-12-31 17:13:49 +0800
commitb42cea7321f6d5d1464a5445cb8f3fe3a9ee2995 (patch)
tree0e9c1413b741612535fe1bb4de21398831ad5a0e /fg21sim/extragalactic/clusters/halo.py
parent695cb0272a2d6ea22e2d8988fdf723c1b944072f (diff)
downloadfg21sim-b42cea7321f6d5d1464a5445cb8f3fe3a9ee2995.tar.bz2
clusters/halo: Add back "mach_turbulence" attribute
Diffstat (limited to 'fg21sim/extragalactic/clusters/halo.py')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 6605763..6b5a683 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -210,6 +210,15 @@ class RadioHalo:
z=self.z_merger, configs=self.configs)
@property
+ def mach_turbulence(self):
+ """
+ The turbulence Mach number determined from its velocity dispersion.
+ """
+ cs = helper.speed_sound(self.kT_main) # [km/s]
+ v_turb = self._velocity_turb() # [km/s]
+ return v_turb / cs
+
+ @property
def radius_virial_obs(self):
"""
The virial radius of the "current" cluster (``M_obs``) at
@@ -342,7 +351,7 @@ class RadioHalo:
R_vir = helper.radius_virial(mass=self.M_main, z=self.z_merger)
L = self.f_lturb * R_vir # [kpc]
cs = helper.speed_sound(self.kT_main) # [km/s]
- v_turb = self._velocity_turb(t=self.age_merger) # [km/s]
+ v_turb = self._velocity_turb() # [km/s]
tau = (self.x_cr * cs**3 * L /
(16*np.pi * self.zeta_ins * v_turb**4)) # [s kpc/km]
tau *= AUC.s2Gyr * AUC.kpc2km # [Gyr]
@@ -805,7 +814,7 @@ class RadioHalo:
mass = rate * (t - t_merger) + self.M_main
return mass
- def _velocity_turb(self, t):
+ def _velocity_turb(self, t=None):
"""
Calculate the turbulence velocity dispersion (i.e., turbulence
Mach number).
@@ -834,8 +843,10 @@ class RadioHalo:
The turbulence velocity dispersion
Unit: [km/s]
"""
- mass = self.M_main + self.M_sub
+ if t is None:
+ t = self.age_merger
z = COSMO.redshift(t)
+ mass = self.M_main + self.M_sub
R_vir = helper.radius_virial(mass=mass, z=z) * AUC.kpc2cm # [cm]
v2 = np.sqrt(AC.G * self.M_sub*AUC.Msun2g / R_vir) # [cm/s]
v2 *= AUC.cm2km # [km/s]