From f4d6abe91386bf4063ae91703327e7edd52a88ab Mon Sep 17 00:00:00 2001 From: Gamelin Alexis <alexis.gamelin@synchrotron-soleil.fr> Date: Mon, 19 Jun 2023 16:30:13 +0200 Subject: [PATCH] [Fix] Typo for vacuum impedance --- mbtrack2/instability/instabilities.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mbtrack2/instability/instabilities.py b/mbtrack2/instability/instabilities.py index 195f035..8e3985e 100644 --- a/mbtrack2/instability/instabilities.py +++ b/mbtrack2/instability/instabilities.py @@ -5,7 +5,7 @@ General calculations about instability thresholds. import numpy as np import matplotlib.pyplot as plt -from scipy.constants import c, m_e, e, pi, epsilon_0 +from scipy.constants import c, m_e, e, pi, epsilon_0, mu_0 import math def mbi_threshold(ring, sigma, R, b): @@ -308,7 +308,7 @@ def rwmbi_growth_rate(ring, current, beff, rho_material, plane='x'): E0 = ring.E0 R = ring.L/(2*np.pi) frac_tune, int_tune = math.modf(ring.tune[index]) - Z0 = 377.7 # Vacuum impedance [Ohm] + Z0 = mu_0*c gr = (beta0*omega0*current*R) /(4*np.pi*E0*beff**3) * ((2*c*Z0*rho_material) / ((1-frac_tune)*omega0))**0.5 @@ -343,7 +343,7 @@ def rwmbi_threshold(ring, beff, rho_material, plane='x'): E0 = ring.E0 tau_rad = ring.tau[index] frac_tune, int_tune = math.modf(ring.tune[index]) - Z0 = 377.7 # Vacuum impedance [Ohm] + Z0 = mu_0*c Ith = (4*np.pi*E0*beff**3) / (c*beta0*tau_rad) * (((1-frac_tune)*omega0) / (2*c*Z0*rho_material))**0.5 -- GitLab