Lugovtsov/3.5.1-ne-plasma/processing.ipynb

538 lines
390 KiB
Plaintext
Raw Normal View History

2022-09-19 11:40:09 +03:00
{
"cells": [
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 2,
2022-09-19 11:40:09 +03:00
"id": "d77ea758-4368-4ffc-86c7-2980c84ceaa9",
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import pandas as pd\n",
2022-09-22 16:20:36 +03:00
"import numpy as np\n",
"from scipy.optimize import curve_fit"
2022-09-19 11:40:09 +03:00
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 3,
2022-09-22 16:20:36 +03:00
"id": "c1c0385c-84ab-479f-a1ad-c2fc34e59e8a",
"metadata": {},
"outputs": [],
"source": [
"def line(x, k, b):\n",
" return x*k + b"
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 4,
2022-09-19 11:40:09 +03:00
"id": "805a285a-8aaf-4e25-8c23-4503c8cca594",
"metadata": {},
"outputs": [],
"source": [
2022-09-22 16:20:36 +03:00
"df = pd.read_csv(r\"raw-data/discharge.txt\")\n",
"U = df['U']*10\n",
"I = df['I']*6/155"
2022-09-19 11:40:09 +03:00
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 5,
2022-09-22 16:20:36 +03:00
"id": "141d5962-2dcc-4795-ac71-5d497f89418b",
"metadata": {},
"outputs": [],
"source": [
"I_line = I[:8]\n",
"U_line = U[:8]\n",
"opt, cov = curve_fit(line, U_line, I_line)"
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 6,
2022-09-19 11:40:09 +03:00
"id": "e0b87229-443c-4642-b053-7ce974af2817",
"metadata": {},
"outputs": [
{
2022-09-22 16:20:36 +03:00
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAABiEAAARXCAYAAACWZcLjAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zL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hRFpaGgEEAAAAgEpTo0YNpaWlue0jhAAAAACqAGut27BnSapTp06UqgEAAABQXXmGEPn5+WXWrYs3hBAAAACo9oqKisrsi/d5VwEAAADEH8//h1hrCSEAAACAeOftH/VMxQQAAACgsnlbQNvbm6biCSEEAAAAAAAAAACICEIIAAAAAAAAAAAQEYQQAAAAAAAAAAAgIgghAAAAAAAAAABARBBCAAAAAAAAAACAiCCEAAAAAAAAAAAAEUEIAQAAAAAAAAAAIoIQAgAAAAAAAAAARAQhBAAAAAAAAAAAiAhCCAAAAAAAAAAAEBGEEAAAAAAQI9avXy9jjPNj5MiR0S6pQvFYMwAAsWL+/Pluv0cnTJgQ7ZLCrjq8RpSvRrQLAKqrwsxM7Zo23eux9IwRcqSlVXJFAAAAAICqLi8vT6tWrdL69eu1efNmZWVlKT8/X2lpaWrQoIE6deqko446Sg6HIy6uEw5r167VwoULtWnTJuXl5al+/fpq3769evbsqZSUlGiXhwjKzc3VsmXLtHLlSu3evVvZ2dlKS0tT48aN1blzZx1xxBEyxkS7zIjLycnR0qVLtWbNGm3fvl05OTmqWbOmmjRponbt2um4445TYmJitMtEHCOEAAAAAIAAtW7dWhs2bAipj2uuuUaTJk0KT0Godnbv3q309PQKz6tRo4bq1q2rFi1aqGvXrjr33HN1zjnnKCGBiRGqk3feeUdz5szRt99+q1W
"text/plain": [
"<Figure size 1800x1200 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(6, 4), dpi=300)\n",
"\n",
"# plt.minorticks_on()\n",
"plt.grid(which='minor', linestyle=':', color='0.9')\n",
"plt.grid(which='major', linestyle='-', color='0.8', linewidth=0.3)\n",
"\n",
"plt.errorbar(U, I, yerr=6/155, xerr=0.003*U, linestyle='', marker='.', markersize=0, label=\"Experiment\", color=\"tab:red\", alpha=0.5)\n",
"plt.plot(U_line, line(U_line, opt[0], opt[1]), label=r\"Fitting: $R_{diff}=$ \" + f\"{-1/opt[0]:.1f}\" + r\"$\\pm 1.48$ kOhm\", color=\"tab:red\", linestyle='-')\n",
"\n",
"# plt.title(\"ВАХ разряда\", fontsize=16)\n",
"plt.ylabel(\"Amperage, mA\")\n",
"plt.xlabel(\"Voltage, V\")\n",
"\n",
"plt.legend()\n",
"plt.savefig(r\"images\\vah-discharge.png\", facecolor=\"white\")\n",
"plt.show()"
]
},
{
"cell_type": "markdown",
"id": "02c19433-6f3d-4376-a176-883abf2da51e",
"metadata": {
"jp-MarkdownHeadingCollapsed": true,
"tags": []
},
"source": [
"**Кривая соответствует участку ГД** -- поднормальный тлеющий разряд"
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 7,
2022-09-22 16:20:36 +03:00
"id": "43c138ed-008c-46e0-b45c-8ab96cf134d0",
"metadata": {},
"outputs": [],
"source": [
"pr = []\n",
"pr.append(pd.read_csv(r\"raw-data\\probe5.txt\"))\n",
"pr.append(pd.read_csv(r\"raw-data\\probe3.txt\"))\n",
"pr.append(pd.read_csv(r\"raw-data\\probe1-5.txt\"))\n",
"\n",
"I_name = [5, 3, 1.5]\n",
"colors = [\"orange\", \"green\", \"blue\"]\n",
2022-10-01 15:24:23 +03:00
"I_corr = [5.65, 4.16, 2.25]"
2022-09-22 16:20:36 +03:00
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 8,
2022-09-22 16:20:36 +03:00
"id": "404f94e8-091e-4186-8d13-09452313493e",
"metadata": {},
"outputs": [
{
"data": {
2022-10-01 15:24:23 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABnsAAARHCAYAAAA7hdb5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAC4jAAAuIwF4pT92AAEAAElEQVR4nOzdd3hUVf7H8c+kE5IQOoQSkCLNUEVBwCAIqKiglAgqIC62XctPBF0bIusiigUburqQgICCgqK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XAwYMUK1atXT2rGVj2oULF2rGjBkKDAx0Q4QAAAAol1Y8Z18SQ5Lif5HeaVO28ZSGt3+eJE5TSyLHOkOngX0JneL4VpHuXVT07CfJsnSbPbOfUCZI9gAAKrXs7Gxt3LhRu3fv1vnz5xUSEqJGjRopMjJS1apVc9o4+/bt086dO3XmzBklJiaqRo0aCgsLU48ePVSjRg2njSNJu3fv1p49e3TixAmlpKSobt26uv/+++Xr6+vUcfLavHmzDhw4oGPHjsnLy0vNmjVT7969SzyH6enpWr9+vfbs2aPk5GRVr15drVq1Us+ePeXj45yPKa489zt37tSWLVt0+vRp+fv7q169eurevbuaNGni1HHKEvv1QPLMa9psNmvOnDnWsp+fn4YNGyYfHx8NHz5cH3zwgSQpKSlJixcv1siRI69oPAAAAFRwhiGlnJaObpa2Rbs7Gvv4BOSZodM0z9JruQkdr7Id37eKdPs70o0Tpe1zpcO/ShnJkn+w8/Y1QqmR7AFQeVw8I1UPd3cUyOPuu+/W119/bS33799fy5cvl8lkKrFtYmKiOnbsqIMHD1qPvfb
2022-09-22 16:20:36 +03:00
"text/plain": [
"<Figure size 1800x1200 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"plt.figure(figsize=(6, 4), dpi=300)\n",
"\n",
"# plt.minorticks_on()\n",
"plt.grid(which='minor', linestyle=':', color='0.9')\n",
"plt.grid(which='major', linestyle='-', color='0.8', linewidth=0.3)\n",
"\n",
"for index, probe in enumerate(pr):\n",
2022-10-01 15:24:23 +03:00
" U = probe['U']\n",
" I = probe['I'] + I_corr[index]\n",
2022-09-22 16:20:36 +03:00
" plt.errorbar(U, I, yerr=0.003*I, xerr=0.003*U, linestyle='-', marker='.', markersize=5, label=r\"Experiment $I_d = $\" + f\"{I_name[index]}\" +\" mA\", color=f\"tab:{colors[index]}\", alpha=1)\n",
"# plt.plot(U_line, line(U_line, opt[0], opt[1]), label=r\"Fitting: $R_{diff}=$ \" + f\"{-1/opt[0]:.1f}\" + r\"$\\pm 1.48$ kOhm\", color=\"tab:red\", linestyle='-')\n",
"\n",
"# plt.title(\"ВАХ разряда\", fontsize=16)\n",
"plt.ylabel(\"Amperage, $\\mu A$\")\n",
"plt.xlabel(\"Voltage, V\")\n",
"\n",
"plt.legend()\n",
"plt.savefig(r\"images\\vah-probe.png\", facecolor=\"white\")\n",
"plt.show()"
]
},
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 9,
"id": "54664dff-391c-4b6f-886e-e1bd4654c809",
"metadata": {},
"outputs": [],
"source": [
"I_in = []\n",
"dIdU = []"
]
},
{
"cell_type": "code",
"execution_count": 10,
2022-09-22 16:20:36 +03:00
"id": "bfaa33ac-4c2a-4f2e-9060-4a5cec648b1c",
"metadata": {},
"outputs": [
{
"name": "stdout",
2022-09-19 11:40:09 +03:00
"output_type": "stream",
"text": [
2022-10-01 15:24:23 +03:00
"I_plus_5 = 95.8328\t I_minus_5 = -95.9134\n",
"I_plus_3 = 52.4716\t I_minus_3 = -52.5127\n",
"I_plus_1.5 = 25.8552\t I_minus_1.5 = -25.8095\n"
2022-09-19 11:40:09 +03:00
]
},
{
"data": {
2022-10-01 15:24:23 +03:00
"image/png": "iVBORw0KGgoAAAANSUhEUgAABnsAAARHCAYAAAA7hdb5AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAC4jAAAuIwF4pT92AAEAAElEQVR4nOzdd5yU5b3///c9fQtbWcBFepEmoogFxWAwaqIesUSwBYzGetQTgyX2qMdEY5pH+Zr8jLAQNZYTY7CdKMFgBSyoSJUuZYGF7dPn/v1x787ubJ3dndnZ8no+HvvYue65rvu+FnZg937P9bkM0zQFAAAAAAAAAACA7smW6gkAAAAAAAAAAACg/Qh7AAAAAAAAAAAAujHCHgAAAAAAAAAAgG6MsAcAAAAAAAAAAKAbI+wBAAAAAAAAAADoxgh7AAA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wK+63gJ+itG293W89L1p9Ve8MxtAthDwAASKqvvvpKoVBdXeGCggINHDgwhTMC6tRf1SNJl112mc4880z17dtXBw4ckCS99NJLevzxx5WezrvSAAAAgB7JNKXqg1ZwIlmreoJeK8wwbNaKF7vTCjvCISk9zwp8IhGrdJkZrtk3J1TvWM0qGrsrOUGPJCkilWyW+o1tveuRF1mfWwp0Wgqx3FnW1x4OSGk5zf8ZSdbX7M7q8FeHtiHsAQAgBb744gt98skn2rdvn9xutwYMGKCpU6dq6NChHT53KBTSBx98oG+++UbFxcXyeDwaMWKEpk2bpry8vI5Pvo3YrweStGrVKm3atEm7du2SzWbTiBEjdOqppyo7O7vFcT6fT++//77WrVuniooK5eb
2022-09-19 11:40:09 +03:00
"text/plain": [
2022-09-22 16:20:36 +03:00
"<Figure size 1800x1200 with 1 Axes>"
2022-09-19 11:40:09 +03:00
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
2022-09-22 16:20:36 +03:00
"plt.figure(figsize=(6, 4), dpi=300)\n",
2022-09-19 11:40:09 +03:00
"\n",
2022-09-22 16:20:36 +03:00
"# plt.minorticks_on()\n",
"plt.grid(which='minor', linestyle=':', color='0.9')\n",
"plt.grid(which='major', linestyle='-', color='0.8', linewidth=0.3)\n",
2022-09-19 11:40:09 +03:00
"\n",
2022-09-22 16:20:36 +03:00
"for index, probe in enumerate(pr):\n",
2022-10-01 15:24:23 +03:00
" U = probe['U']\n",
" I = probe['I'] + I_corr[index]\n",
" plt.errorbar(U, I, yerr=0.003*I, xerr=0.003*U, linestyle='-', marker='.', markersize=5, alpha=0.1, color=f\"tab:{colors[index]}\")\n",
2022-09-22 16:20:36 +03:00
" \n",
" U_plus = np.concatenate([U[:5], [0]])\n",
" U_minus = np.concatenate([U[-5:], [0]])\n",
" \n",
" ptr_plus, _ = curve_fit(line, U[:5], I[:5])\n",
" ptr_minus, _ = curve_fit(line, U[-5:], I[-5:])\n",
" \n",
" plt.plot(U_plus, line(U_plus, ptr_plus[0], ptr_plus[1]), color=f\"tab:{colors[index]}\", linestyle='--', label=r\"Fitting $I_d = $\" + f\"{I_name[index]}\" +\" mA\")\n",
" plt.plot(U_minus, line(U_minus, ptr_minus[0], ptr_minus[1]), color=f\"tab:{colors[index]}\", linestyle='--')\n",
" \n",
" print(f\"I_plus_{I_name[index]} = {line(0, ptr_plus[0], ptr_plus[1]):.4f}\\t I_minus_{I_name[index]} = {line(0, ptr_minus[0], ptr_minus[1]):.4f}\")\n",
"\n",
2022-10-01 15:24:23 +03:00
" I_in.append(line(0, ptr_plus[0], ptr_plus[1]) * 1e-6)\n",
" dIdU.append((I[11] - I[10]) / (U[11] - U[10]) * 1e-6)\n",
" \n",
2022-09-22 16:20:36 +03:00
"# plt.plot(U_line, line(U_line, opt[0], opt[1]), label=r\"Fitting: $R_{diff}=$ \" + f\"{-1/opt[0]:.1f}\" + r\"$\\pm 1.48$ kOhm\", color=\"tab:red\", linestyle='-')\n",
"\n",
"# plt.title(\"ВАХ разряда\", fontsize=16)\n",
"plt.ylabel(\"Amperage, $\\mu A$\")\n",
"plt.xlabel(\"Voltage, V\")\n",
2022-09-19 11:40:09 +03:00
"\n",
"plt.legend()\n",
2022-10-01 15:24:23 +03:00
"plt.savefig(r\"images\\vah-probe-fit.png\", facecolor=\"white\")\n",
2022-09-19 11:40:09 +03:00
"plt.show()"
]
},
2022-09-22 16:20:36 +03:00
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 11,
"id": "f8ecf512-050e-4b8d-b02b-00dadf17dadb",
"metadata": {},
"outputs": [],
"source": [
"I_in = np.array(I_in)\n",
"dIdU = np.array(dIdU)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "5f36f744-de49-4724-a855-8fd7956dc46f",
"metadata": {},
"outputs": [],
"source": [
"e = 1.6e-19\n",
"me = 9.1e-31\n",
"k = 1.38e-23\n",
"kTe = 0.5 * e * I_in / dIdU"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "2aaffe8e-6be3-47cd-aecd-099871fd5417",
"metadata": {},
"outputs": [],
"source": [
"dU = 2 * kTe / e\n",
"T = 11800 * dU"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "6ed2bd62-f4bd-4c2e-b9f2-64f8531ff7b2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([42973.01960467, 62783.49451912, 65561.29135539])"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"T"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "a1bc3c32-7e4c-4287-ad8e-986d0976f4e1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([1.82089066, 2.66031756, 2.77802082])"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"kTe / e"
]
},
{
"cell_type": "markdown",
"id": "30a91e74-973a-413e-964a-415419601631",
"metadata": {},
"source": [
"11. Концентрация электронов"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "a93eced5-57d8-4f5d-9a51-f67347be01db",
"metadata": {},
"outputs": [],
"source": [
"d=0.2e-3\n",
"l=5.2e-3\n",
"n_e = 2.5 * I_in / (e * 3.14 * l * d * np.sqrt((2 * kTe) / (22*1.66e-27)))"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "907c9a45-f6a8-463d-8d71-db964f1d45e1",
2022-09-22 16:20:36 +03:00
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
2022-10-01 15:24:23 +03:00
"array([1.14794130e+17, 5.20001953e+16, 2.50742641e+16])"
2022-09-22 16:20:36 +03:00
]
},
2022-10-01 15:24:23 +03:00
"execution_count": 17,
2022-09-22 16:20:36 +03:00
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
2022-10-01 15:24:23 +03:00
"n_e"
]
},
{
"cell_type": "markdown",
"id": "9e916a94-a15c-42fb-a371-73924e5b30cf",
"metadata": {},
"source": [
"12. Плазменная частота колебаний электронов"
2022-09-22 16:20:36 +03:00
]
},
2022-09-19 11:40:09 +03:00
{
"cell_type": "code",
2022-10-01 15:24:23 +03:00
"execution_count": 18,
"id": "e89bdcb2-4672-4f12-a3c1-5ad13837fc91",
2022-09-19 11:40:09 +03:00
"metadata": {},
"outputs": [],
2022-10-01 15:24:23 +03:00
"source": [
"w_p = np.sqrt((4*np.pi * e**2) / me) * np.sqrt(n_e)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "be2c9578-5b5f-49c2-aef7-aeec63f63f1b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([201448.50999052, 135583.45788038, 94149.5646552 ])"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"w_p"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "af2cc93e-e468-4554-b2bb-6125293856dc",
"metadata": {},
"outputs": [],
"source": [
"rDe = np.sqrt(kTe / (4*np.pi*(e**2)*n_e))"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "cc90fb89-62a5-4885-8d77-bd801c02c60a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([2.80877642, 5.04428168, 7.42315839])"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rDe"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "c75a366e-32fe-46e8-8247-8f0124d8ac43",
"metadata": {},
"outputs": [],
"source": [
"rD = np.sqrt(k * 300 / (4*np.pi*(e**2)*n_e))"
]
},
{
"cell_type": "code",
"execution_count": 31,
"id": "6f577488-e13e-462c-9be5-35154a18c99a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([0.3348231 , 0.49747673, 0.71640921])"
]
},
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"rD"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "986fdf69-d8c0-46b0-915c-c3d1f286e3fb",
"metadata": {},
"outputs": [],
"source": [
"ND = 4/3 * np.pi * (rD)**3 * n_e"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "84cf5b5c-1e1c-4bf7-b8ae-c5422056c777",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([1.80490578e+16, 2.68171048e+16, 3.86189338e+16])"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ND"
]
},
{
"cell_type": "code",
"execution_count": 26,
"id": "728229fc-6e84-4264-98e6-94e31ac6dd92",
"metadata": {},
"outputs": [],
"source": [
"alpha = n_e / (266.6 / (300 * k))"
]
},
{
"cell_type": "code",
"execution_count": 27,
"id": "c9f63713-eaed-472e-9526-08d915c9d245",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([1.78262453e-06, 8.07504908e-07, 3.89375294e-07])"
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"alpha"
]
2022-09-19 11:40:09 +03:00
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}