jusohatam

Untitled

May 7th, 2021 (edited)
563
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from math import pi
  2. import matplotlib.pyplot as plt
  3.  
  4. I_ma_6V = [0.002, 0.04, 0.12, 0.25, 0.372, 0.474, 0.57, 0.64, 0.69, 0.722, 0.74, 0.76, 0.912, 0.93,
  5.            0.945, 0.955, 0.960, 0.975, 0.977, 0.98, 0.98, 0.978, 0.975, 0.98, 0.979, 0.981, 0.982,
  6.            0.983, 0.986]
  7.  
  8. I_ma_65V = [0.002, 0.041, 0.152, 0.3, 0.475, 0.631, 0.866, 1.1, 1.261, 1.448, 1.602, 1.734, 1.86, 1.971,
  9.             2.062, 2.152, 2.232, 2.307, 2.355, 2.390, 2.435, 2.461, 2.487, 2.510, 2.533, 2.546, 2.550,
  10.             2.570, 2.580]
  11.  
  12. I_ma_7V = [0.003, 0.06, 0.165, 0.327, 0.526, 0.741, 1.005, 1.190, 1.504, 1.746, 1.978, 2.202, 2.435,
  13.            2.610, 2.790, 2.967, 3.120, 3.260, 3.403, 3.528, 3.604, 3.723, 3.835, 3.921, 4.044, 4.135,
  14.            4.205, 4.260, 4.322]
  15.  
  16. U_V = [0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200,
  17.        210, 220, 230, 240, 250, 260, 270, 280]
  18. U_32_V = [u ** (3/2) for u in U_V]
  19.  
  20. print('Дано по условию:')
  21. D = 0.028
  22. print('D = {} м'.format(D))
  23. d = 0.026
  24. print('d = {} м'.format(d))
  25. eps_0 = 8.85418782 * 10**(-12)
  26. print('eps_0 = 8.85418782 * 10^(-12)')
  27.  
  28. print('\nРасчет U^(3/2) для напряжения 7 В:')
  29. print()
  30. for i in range(len(U_32_V)):
  31.     print('U_a^(3/2)_{} = {}^(3/2) = {} В^(3/2)'.format(i+1, U_V[i], U_32_V[i]))
  32.  
  33. print('\nРасчет эксперементального e / m')
  34. print('Выберем точку на графике, где он линейный, например: [{}, {}]'.format(U_32_V[6],
  35.                                                                              I_ma_7V[6]))
  36. C = (I_ma_7V[6] / 1000) / U_32_V[6]
  37. print('C = k = tg(alpha) = ({} * 10^(-3)) / {} = {}'.format(I_ma_7V[6], U_32_V[6], C))
  38.  
  39. e_div_m = (81 * C ** 2 * d ** 4) / (2 * pi ** 2 * eps_0 ** 2 * D ** 4)
  40. print('e / m = (81 * C^2 * d^4) / (2 * pi^2 * eps_0^2 * D^4) = {}'.format(e_div_m))
  41.  
  42. plt.plot(U_32_V[:11], I_ma_7V[:11], 'b')
  43. plt.ylabel('I_A, mA')
  44. plt.xlabel('U_a^(3/2), В^(3/2)')
  45. plt.xlim(0, 1000)
  46. plt.show()
  47.  
  48. plt.plot(
  49.     U_V,
  50.     I_ma_6V,
  51.     'r',
  52.     label='I_ma_6V'
  53. )
  54. plt.plot(
  55.     U_V,
  56.     I_ma_65V,
  57.     'b',
  58.     label='I_ma_65V'
  59. )
  60. plt.plot(
  61.     U_V,
  62.     I_ma_7V,
  63.     'g',
  64.     label='I_ma_7V'
  65. )
  66. plt.ylabel('I_A, mA')
  67. plt.xlabel('U_a, В')
  68. plt.legend()
  69. plt.show()
  70.  
RAW Paste Data