aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-01-18 15:44:41 +0800
committerAaron LI <aly@aaronly.me>2019-01-18 15:45:51 +0800
commit2e4a572a543587c6d69e10e78940d5fb652ff3d8 (patch)
tree2a3bdb2e8622561840d0b92129ad5fb70d90ac16 /fg21sim/extragalactic/clusters
parent4a5cbc5147ae4b0330e3154d5e4dda38601ecadd (diff)
downloadfg21sim-2e4a572a543587c6d69e10e78940d5fb652ff3d8.tar.bz2
clusters/helper: Pass beta to helper.radius_stripping()
* Add 'beta' parameter to radius_stripping() * Pass 'f_rc' and 'beta' to calc_gas_density_profile()
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py5
-rw-r--r--fg21sim/extragalactic/clusters/helper.py11
2 files changed, 9 insertions, 7 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index c1f0946..3984821 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -1,5 +1,5 @@
# Copyright (c) 2017-2019 Weitian LI <wt@liwt.net>
-# MIT license
+# MIT License
"""
Simulate (giant) radio halos originating from the recent merger
@@ -254,7 +254,8 @@ class RadioHalo1M:
z = COSMO.redshift(t)
M_main = self.mass_main(t)
M_sub = self.mass_sub(t)
- return helper.radius_stripping(M_main, M_sub, z, f_rc=self.f_rc)
+ return helper.radius_stripping(M_main, M_sub, z,
+ f_rc=self.f_rc, beta=self.beta)
def calc_radius(self):
"""
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py
index e27d763..e9fa338 100644
--- a/fg21sim/extragalactic/clusters/helper.py
+++ b/fg21sim/extragalactic/clusters/helper.py
@@ -1,5 +1,5 @@
-# Copyright (c) 2017-2018 Weitian LI <weitian@aaronly.me>
-# MIT license
+# Copyright (c) 2017-2019 Weitian LI <wt@liwt.net>
+# MIT License
"""
Functions to help simulate galaxy cluster diffuse emissions.
@@ -137,7 +137,7 @@ def radius_virial(mass, z=0.0):
return R_vir * AUC.cm2kpc # [kpc]
-def radius_stripping(M_main, M_sub, z, f_rc=0.1):
+def radius_stripping(M_main, M_sub, z, f_rc=0.1, beta=0.8):
"""
Calculate the stripping radius of the in-falling sub-cluster, which
is determined by the equipartition between the static and ram pressure.
@@ -152,7 +152,7 @@ def radius_stripping(M_main, M_sub, z, f_rc=0.1):
"""
r_vir = radius_virial(M_sub, z) # [kpc]
rho_main = density_number_thermal(M_main, z) * AC.mu*AC.u # [g/cm^3]
- f_rho_sub = calc_gas_density_profile(M_sub, z) # [Msun/kpc^3]
+ f_rho_sub = calc_gas_density_profile(M_sub, z, f_rc, beta) # [Msun/kpc^3]
vi = velocity_impact(M_main, M_sub, z) # [km/s]
kT_sub = kT_cluster(M_sub, z) # [keV]
rhs = rho_main * vi**2 * AC.mu*AC.u / kT_sub # [g/cm^3][g*km^2/s^2/keV]
@@ -344,7 +344,8 @@ def speed_sound(kT):
def velocity_virial(mass, z=0.0):
"""
- Calculate the virial velocity, i.e., free-fall velocity.
+ Calculate the virial velocity, i.e., circular velocity at the
+ virial radius.
Unit: [km/s]
"""