aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim
diff options
context:
space:
mode:
Diffstat (limited to 'fg21sim')
-rw-r--r--fg21sim/configs/20-extragalactic.conf.spec5
-rw-r--r--fg21sim/extragalactic/clusters/halo.py2
2 files changed, 7 insertions, 0 deletions
diff --git a/fg21sim/configs/20-extragalactic.conf.spec b/fg21sim/configs/20-extragalactic.conf.spec
index 5c1d3aa..633ef78 100644
--- a/fg21sim/configs/20-extragalactic.conf.spec
+++ b/fg21sim/configs/20-extragalactic.conf.spec
@@ -77,6 +77,11 @@
# equation to calculate the electron spectrum.
pgrid_num = integer(default=100, min=10)
+ # Number of grid points used as the buffer region near the lower
+ # boundary, and the value within this buffer region will be fixed to
+ # avoid unphysical pile-up of low-energy electrons.
+ buffer_np = integer(default=5, min=0)
+
# Time step for solving the Fokker-Planck equation (unit: Gyr)
time_step = float(default=0.01, min=1e-5, max=1.0)
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py
index 26ff6de..072cdff 100644
--- a/fg21sim/extragalactic/clusters/halo.py
+++ b/fg21sim/extragalactic/clusters/halo.py
@@ -98,6 +98,7 @@ class HaloSingle:
self.pmin = self.configs.getn(comp+"/pmin")
self.pmax = self.configs.getn(comp+"/pmax")
self.pgrid_num = self.configs.getn(comp+"/pgrid_num")
+ self.buffer_np = self.configs.getn(comp+"/buffer_np")
self.time_step = self.configs.getn(comp+"/time_step")
self.injection_index = self.configs.getn(comp+"/injection_index")
# Cosmology model
@@ -121,6 +122,7 @@ class HaloSingle:
fpsolver = FokkerPlanckSolver(
xmin=self.pmin, xmax=self.pmax,
grid_num=self.pgrid_num,
+ buffer_np=self.buffer_np,
tstep=self.time_step,
f_advection=self.fp_advection,
f_diffusion=self.fp_diffusion,