diff options
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 17 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/solver.py | 7 |
2 files changed, 22 insertions, 2 deletions
diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 8fdc78c..75789b6 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -243,6 +243,12 @@ class RadioHalo: """ Diffusion term/coefficient for the Fokker-Planck equation. + NOTE + ---- + The diffusion coefficients cannot be zero or negative, which + may cause unstable or wrong results. So constrain ``tau_acc`` + be a sufficient large but finite number. + Parameters ---------- gamma : float @@ -322,7 +328,12 @@ class RadioHalo: A reference value of the acceleration time due to TTD (transit-time damping) resonance is ~0.1 Gyr (Ref.[brunetti2011], Eq.(27) below); the formula derived by [cassano2005] (Eq.(40)) - has a dependence on eta_turb. + has a dependence on ``eta_turb``. + + NOTE + ---- + A zero diffusion coefficient may lead to unstable/wrong results, + so constrain this acceleration timescale be finite. Returns ------- @@ -332,9 +343,11 @@ class RadioHalo: """ # The reference/typical acceleration timescale tau_ref = 0.1 # [Gyr] + # The maximum timescale to avoid unstable results + tau_max = 100.0 # [Gyr] if t > self.age_merger + self.time_crossing: - tau = np.inf + tau = tau_max else: tau = tau_ref / self.eta_turb return tau diff --git a/fg21sim/extragalactic/clusters/solver.py b/fg21sim/extragalactic/clusters/solver.py index 6c0e653..dea7f3f 100644 --- a/fg21sim/extragalactic/clusters/solver.py +++ b/fg21sim/extragalactic/clusters/solver.py @@ -102,6 +102,13 @@ class FokkerPlanckSolver: by extrapolating an power law to avoid unphysical accumulations. This fix is ignored if this parameter is not specified. + NOTE + ---- + The diffusion coefficients (i.e., calculated by ``f_diffusion()``) + should be *positive* (i.e., C(x) > 0), otherwise unstable or wrong + results may occur, due to the current numerical scheme/algorithm + adopted. + References ---------- [1] Park & Petrosian 1996, ApJS, 103, 255 |