diff options
author | Aaron LI <aly@aaronly.me> | 2017-10-25 14:41:25 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-10-25 14:41:25 +0800 |
commit | bd8b01302d77df4a74da4e8374f0e32a8ec2598b (patch) | |
tree | 2d3a5a44736511f74d330bab4da2c1e4c309a9ad /fg21sim/extragalactic/clusters | |
parent | ed5ccfd562bff2e2c790395f8379eb36c4745c8d (diff) | |
download | fg21sim-bd8b01302d77df4a74da4e8374f0e32a8ec2598b.tar.bz2 |
clusters/halo: Adjust initial electron spectrum calculation
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 02d8891..d543dcc 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -407,10 +407,12 @@ class RadioHalo: n0_e = n_inj * self.age_merger logger.debug("Derive the initial electron spectrum ...") - tstart = self.age_merger - self.time_init - tstop = self.age_merger + # NOTE: subtract ``time_step`` to avoid the acceleration at the + # last step at ``age_merger``. + tstart = self.age_merger - self.time_init - self.time_step + tstop = self.age_merger - self.time_step # Use a bigger time step to save time - self.fpsolver.tstep *= 2 + self.fpsolver.tstep = 3 * self.time_step n_e = self.fpsolver.solve(u0=n0_e, tstart=tstart, tstop=tstop) # Restore the original time step self.fpsolver.tstep = self.time_step @@ -730,7 +732,7 @@ class RadioHalo: if (t < self.age_merger) or (t > self.age_merger+self.time_crossing): # NO acceleration; use a large enough timescale to avoid # unstable results. - tau_acc = 10.0 # [Gyr] + tau_acc = 100 # [Gyr] else: # Turbulence acceleration tau_acc = self.tau_acceleration # [Gyr] |