diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-24 16:26:53 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-24 16:26:53 +0800 |
commit | e3fb2c4c3fc3f616295ee57bb03a7c739b5cf73c (patch) | |
tree | 007f2227685b2a18e5fa5ac45c396c72abbffd87 /fg21sim/extragalactic | |
parent | 705933f5ca83f4f5179c8506b9dd46612c5195ef (diff) | |
download | fg21sim-e3fb2c4c3fc3f616295ee57bb03a7c739b5cf73c.tar.bz2 |
clusters/halo: Add method "_magnetic_field()"
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 1efaf8f..575decd 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -746,6 +746,28 @@ class RadioHalo: mass = rate * (t - t_merger) + self.M_main return mass + def _magnetic_field(self, t): + """ + Calculate the mean magnetic field strength of the main cluster mass + at the given (cosmic) time. + + Parameters + ---------- + t : float + The (cosmic) time/age. + Unit: [Gyr] + + Returns + ------- + B : float + The mean magnetic field strength of the main cluster. + Unit: [uG] + """ + z = COSMO.redshift(t) + mass = self._mass(t) # [Msun] + B = helper.magnetic_field(mass=mass, z=z) # [uG] + return B + def _loss_ion(self, gamma, t): """ Energy loss through ionization and Coulomb collisions. @@ -783,8 +805,7 @@ class RadioHalo: ---------- Ref.[sarazin1999],Eq.(6,7) """ + B = self._magnetic_field(t) # [uG] z = COSMO.redshift(t) - mass = self._mass(t) # [Msun] - B = helper.magnetic_field(mass=mass, z=z) # [uG] loss = -4.32e-4 * gamma**2 * ((B/3.25)**2 + (1+z)**4) return loss |