aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/configs/20-extragalactic.conf.spec2
-rw-r--r--fg21sim/extragalactic/clusters/halo.py10
2 files changed, 7 insertions, 5 deletions
diff --git a/fg21sim/configs/20-extragalactic.conf.spec b/fg21sim/configs/20-extragalactic.conf.spec
index f7f96a8..94b2fe4 100644
--- a/fg21sim/configs/20-extragalactic.conf.spec
+++ b/fg21sim/configs/20-extragalactic.conf.spec
@@ -192,7 +192,7 @@
# an approximately steady initial electron spectrum. During this period,
# the acceleration is turned off and only leaves energy loss mechanisms.
# Unit: [Gyr]
- time_init = float(default=0.4, min=0)
+ time_init = float(default=0.6, min=0)
# Extragalactic point sources
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]