aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim/extragalactic/clusters')
-rw-r--r--fg21sim/extragalactic/clusters/halo.py10
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]