From 712bac5b86b2068c2a558e4dcdf77e20c5dc6b9a Mon Sep 17 00:00:00 2001 From: gleck97 <86471143+gleck97@users.noreply.github.com> Date: Fri, 30 Aug 2024 17:52:29 +0200 Subject: [PATCH] Fix sign in Barnes scheme prefactor --- update_packets.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update_packets.cc b/update_packets.cc index 196eb706d..d75839306 100644 --- a/update_packets.cc +++ b/update_packets.cc @@ -42,7 +42,7 @@ void do_nonthermal_predeposit(Packet &pkt, const int nts, const double t2) { const double v_ej = std::sqrt(E_kin * 2 / grid::mtot_input); const double prefactor = (pkt.pellet_decaytype == decay::DECAYTYPE_ALPHA) ? 7.74 : 7.4; - const double tau_ineff = prefactor * 86400 * std::sqrt(grid::mtot_input / (5.e-3 * 1.989 * 1.e33)) * + const double tau_ineff = prefactor * 86400 * std::sqrt(grid::mtot_input / (5.e-3 * 1.989 * 1.e33)) / std::pow((0.2 * 29979200000) / v_ej, 3. / 2.); const double f_p = std::log(1 + (2. * ts * ts / tau_ineff / tau_ineff)) / (2. * ts * ts / tau_ineff / tau_ineff); assert_always(f_p >= 0.);