def P_skin(I_peak, d_wire, f, sigma=sigma_cu): #INPUT: d -> diameter of cable [mm] # f -> frecuency of current [1/s] #OUTPUT: R_prox -> resictance due to prox-effect [ohm] delta = 1 / np.sqrt(np.pi * f * sigma * mu_0) # skin depth [m] xi = float(d_wire / (np.sqrt(2) * delta)) R_DC = 4 / (sigma * np.pi * d_wire**2) kelvin = (mp.ber(0, xi) * mp.bei(1, xi) - mp.ber(0, xi) * mp.ber(1, xi)) / (mp.ber(1, xi)**2 + mp.bei(1, xi)**2) \ - (mp.bei(0, xi) * mp.ber(1, xi) + mp.bei(0, xi) * mp.bei(1, xi)) / (mp.ber(1, xi)**2 + mp.bei(1, xi)**2) F_R = xi / (4 * np.sqrt(2)) * kelvin return R_DC * F_R * I_peak**2
def P_prox(I_peak, d_wire, f, sigma=sigma_cu): #INPUT: d_cable -> diameter of cable [mm] # f -> frecuency of current [1/s] #OUTPUT: R_prox -> resictance due to prox-effect [ohm] delta = 1 / np.sqrt(np.pi * f * sigma * mu_0) xi = float(d_wire / (np.sqrt(2) * delta)) R_DC = 4 / (sigma * np.pi * d_wire**2) kelvin = (mp.ber(2, xi) * mp.ber(1, xi) + mp.ber(2, xi) * mp.bei(1, xi)) / (mp.ber(0, xi)**2 + mp.bei(0, xi)**2) \ + (mp.bei(2, xi) * mp.bei(1, xi) + mp.bei(2, xi) * mp.ber(1, xi)) / (mp.ber(0, xi)**2 + mp.bei(0, xi)**2) G_R = xi * (np.pi * d_wire)**2 / (2 * np.sqrt(2)) * kelvin H_peak = I_peak / (np.pi * d_wire) return R_DC * G_R * H_peak**2
def wave_resist_coeff(self): #OUTPUT: F_R -> coeff for skin effekt [ohm] # G_R -> coeff for prox effekt [ohm] delta = 1 / np.sqrt( np.pi * self.f_el * (1 / (self.coil.rho_mat * 10**-6)) * mu_0) # skin depth [m] xi = self.coil.d_wire / (np.sqrt(2) * delta) kelvin_skin = (mp.ber(0, xi) * mp.bei(1, xi) - mp.ber(0, xi) * mp.ber(1, xi)) / (mp.ber(1, xi)**2 + mp.bei(1, xi)**2) \ - (mp.bei(0, xi) * mp.ber(1, xi) + mp.bei(0, xi) * mp.bei(1, xi)) / (mp.ber(1, xi)**2 + mp.bei(1, xi)**2) kelvin_prox = (mp.ber(2, xi) * mp.ber(1, xi) + mp.ber(2, xi) * mp.bei(1, xi)) / (mp.ber(0, xi)**2 + mp.bei(0, xi)**2) \ + (mp.bei(2, xi) * mp.bei(1, xi) - mp.bei(2, xi) * mp.ber(1, xi)) / (mp.ber(0, xi)**2 + mp.bei(0, xi)**2) self.F_R = xi / (4 * np.sqrt(2)) * kelvin_skin self.G_R = -(xi * (np.pi * self.coil.d_wire)**2 / (2 * np.sqrt(2))) * kelvin_prox
def test_bei(self): assert_mpmath_equal(sc.bei, _exception_to_nan(lambda z: mpmath.bei(0, z, **HYPERKW)), [Arg(-1e30, 1e30)])
def test_bei(self): assert_mpmath_equal( sc.bei, _exception_to_nan(lambda z: mpmath.bei(0, z, **HYPERKW)), [Arg(-1e30, 1e30)])