L1-python/source/Exercice-solution.ipynb

728 lines
58 KiB
Plaintext

{
"cells": [
{
"cell_type": "markdown",
"id": "bf0cd470",
"metadata": {},
"source": [
"# Exercice"
]
},
{
"cell_type": "code",
"execution_count": 1,
"id": "c0302414",
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
"from scipy.optimize import curve_fit"
]
},
{
"cell_type": "markdown",
"id": "908b1a9d",
"metadata": {},
"source": [
"### Data generation"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "76ccfc6f",
"metadata": {},
"outputs": [],
"source": [
"# constants\n",
"g = 10.\n",
"V0 = 1.\n",
"H = 1."
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "d58ffe3e",
"metadata": {},
"outputs": [],
"source": [
"# Model \n",
"l = V0 * np.sqrt(2.*H/g)"
]
},
{
"cell_type": "markdown",
"id": "9a03ead6",
"metadata": {},
"source": [
"### Données\n",
"pour file \"V1msHvariable.csv\""
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "dd458e01",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.40 0.80 0.01\n",
"0.42 0.90 0.01\n",
"0.45 1.00 0.01\n",
"0.47 1.10 0.01\n",
"0.49 1.20 0.01\n"
]
}
],
"source": [
"#\n",
"error = 0.01\n",
"for h in [0.8, 0.9,1,1.1,1.2]:\n",
" l = V0 * np.sqrt(2.*h/g)\n",
" print('{0:.2f} {1:0.2f} {2:.2f}'.format(l,h,error))"
]
},
{
"cell_type": "markdown",
"id": "a06afab7",
"metadata": {},
"source": [
"### Données\n",
"pour file \"H1mVvariable.csv\""
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "ca4407db",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.45 1.00 0.10\n",
"0.54 1.20 0.10\n",
"0.67 1.50 0.10\n",
"0.89 2.00 0.10\n",
"1.34 3.00 0.10\n"
]
}
],
"source": [
"error = 0.1\n",
"for v in [1, 1.2,1.5,2,3]:\n",
" l = v * np.sqrt(2.*H/g)\n",
" print('{0:.2f} {1:0.2f} {2:.2f}'.format(l,v,error))"
]
},
{
"cell_type": "markdown",
"id": "81b6f7b3",
"metadata": {},
"source": [
"## Solution"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "a748d198",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<img src=\"experience.png\" width=\"500\" height=\"500\"/>"
],
"text/plain": [
"<IPython.core.display.Image object>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# import image module\n",
"from IPython.display import Image\n",
" \n",
"# get the image\n",
"Image(url=\"experience.png\", width=500, height=500)"
]
},
{
"cell_type": "markdown",
"id": "301b6ab8",
"metadata": {},
"source": [
" Une bille supposée ponctuelle avec une vitesse horizontale $V_0$ tombe d'une table de hauteur $H$ et rencontre le sol à une longueur $L$.\n",
"\n",
"Nous disposons de deux fichiers de mesures expérimentales (fichiers formatés csv séparés par des \";\")\n",
"- \"V1msHvariable.csv\" expérience de mesure de la longueur $L$ à vitesse $V_0=1 \\ m/s$ constante pour des différentes hauteurs $H$ avec l'erreur correspondante\n",
"- \"H1mVvariable.csv\" expérience de mesure de la longueur $L$ à hauteur $H= 1 \\ m$ constante pour des différentes vitesses $V_0$ avec l'erreur correspondante\n",
"\n",
"On propose un modèle pour la longueur $L$\n",
"\n",
"$$ L = C V_0^\\alpha H^\\beta $$\n",
"\n",
"nous allons évaluer les coefficients $\\alpha$ et $\\beta$, ainsi que la constante $C$."
]
},
{
"cell_type": "markdown",
"id": "bb58b946",
"metadata": {},
"source": [
"### Point 1.1\n",
"En utilisant la bibliothèque Pandas, lisez le fichier \"V1msHvariable.csv\" et définisez les variables $L$, $H$, \n",
"et $erreur$ (de la mesure de hauteur)"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "8aa94441",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" L H error\n",
"0 0.40 0.8 0.01\n",
"1 0.42 0.9 0.01\n",
"2 0.45 1.0 0.01\n",
"3 0.47 1.1 0.01\n",
"4 0.49 1.2 0.01\n"
]
}
],
"source": [
"d = pd.read_csv(\"V1msHvariable.csv\",delimiter=\";\")\n",
"print(d)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "296b12e0",
"metadata": {},
"outputs": [],
"source": [
"d.head()\n",
"# taking values from headers\n",
"L = d[\"L\"]\n",
"H = d[\"H\"]\n",
"e = d[\"error\"]"
]
},
{
"cell_type": "markdown",
"id": "fc7a10ed",
"metadata": {},
"source": [
"### Point 1.2\n",
"Faites une figure de $L$ vs $H$ avec barres d'erreur"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "d8aab11d",
"metadata": {},
"outputs": [],
"source": [
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "67ec753b",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x7f84498dfc70>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYgAAAGDCAYAAAAxhIflAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAaM0lEQVR4nO3df4xd5Z3f8ffX9mSHJEPj2pMlscE/UoTxJsHgMZikRLsk2QLdggioGEiyRF0BVaFJm6TQXbWgRpEWEa2ghRYIobQKWbMKYAFySrbZ7C5VMLUnmICDnZpJHMaE4HjteEjGYcb+9o97zV6GZ8b3ztzjOx6/X9IV5zznec79zuPBHz/nnntvZCaSJI01q9MFSJKmJwNCklRkQEiSigwISVKRASFJKjIgJElFBoQkqciAkA4jIn4SER87gs+XEfGPxrTdHBFfP1I1SGBASJLGYUBIbRARvxUReyPi/Q1tvRExHBHvjoj5EfF4v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
"text/plain": [
"<Figure size 432x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig = plt.figure(figsize=(6,6)) # s\n",
"ax = plt.subplot() \n",
"ax.errorbar(H,L,e, marker='.', linestyle=\"none\", label=\"data\")\n",
"ax.set_title(\"L vs H\")\n",
"ax.set_xlabel(\"H[m]\")\n",
"ax.set_ylabel(\"L[m]\")\n",
"ax.legend()"
]
},
{
"cell_type": "markdown",
"id": "a84939cd",
"metadata": {},
"source": [
"### Point 1.3\n",
"Utilisez la fonction \"curve_fit\" pour faire une regression linéaire des données exprimées en une échelle log-log\n",
"et trouve la valeur de $\\alpha$"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "4d6afbe8",
"metadata": {},
"outputs": [],
"source": [
"# fit\n",
"def func(x, a, b):\n",
" return a * x + b"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "db8be79d",
"metadata": {},
"outputs": [],
"source": [
"from scipy.optimize import curve_fit"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "b1b62edc",
"metadata": {},
"outputs": [],
"source": [
"popt= curve_fit(func, np.log(H), np.log(L))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "10616c91",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a = 0.512\n",
"b= -0.805\n"
]
}
],
"source": [
"popt[0]\n",
"a=popt[0][0]\n",
"b=popt[0][1]\n",
"print(\"a = %.3f\" % a)\n",
"print(\"b= %.3f\" % b)"
]
},
{
"cell_type": "markdown",
"id": "763aab30",
"metadata": {},
"source": [
"### Point 1.4\n",
"Faites un figure log-log de $L$ vs $H$ en ajoutant la regression linéaire trouvée dans le point précédent"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "5403d854",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSU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iahsRCKMmU0EDgMXAHXxJi4dAlwMvO+cGxpYOJEiqGxEwkNFM/v4mJ9P5/gTZVYFrsZbynk+cCkwElhtZi2ccx8f57UiZU5lIxIeDjvnWnz/g5kNBY53rmW+c86Z2VrgW+fc2vzXfQrUAz72LanISdAFAiKR6Uj+/+Yd8/33P+sfkRJ2VDYiIuI7lY2IiPhOw22RMOCcO7XAzxOBiUVsO/SY77cCTQp7TiScaGQjEv72AfefzE2dQAMg25dUIiWglTpFRMR3GtmIiIjvVDYiIuI7lY2IiPhOZSMiIr5T2YiIiO/+H0aoRnVVB25aAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig = plt.figure(figsize=(6,6)) # s\n",
"ax = plt.subplot() \n",
"ax.errorbar(H,L,e, marker='.', linestyle=\"none\", label=\"data\")\n",
"ax.plot(H,np.exp(b)*H**a,\"-\",label=\"model\")\n",
"ax.set_title(\"with error bars\")\n",
"ax.set_title(\"L vs H\")\n",
"ax.set_xlabel(\"H[m]\")\n",
"ax.set_ylabel(\"L[m]\")\n",
"ax.legend()\n",
"ax.loglog()"
]
},
{
"cell_type": "markdown",
"id": "07f7c827",
"metadata": {},
"source": [
"Estimation de la constante $C$"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "d619b153",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 0.447214\n",
"1 0.442719\n",
"2 0.450000\n",
"3 0.448127\n",
"4 0.447307\n",
"dtype: float64\n"
]
}
],
"source": [
"C=L/H**0.5\n",
"print(C)"
]
},
{
"cell_type": "markdown",
"id": "9f02fc0f",
"metadata": {},
"source": [
"## Partie 2\n",
"Etude de la longueur $L$ à hauteur $H= 1 \\ m$ constante pour des différentes vitesses $V_0$ "
]
},
{
"cell_type": "markdown",
"id": "4692da2f",
"metadata": {},
"source": [
"### Point 2.1\n",
"En utilisant la bibliothèque Pandas, lisez le fichier \"H1mVvariable.csv\" et définisez les variables $L$, $V_0$, \n",
"et $erreur$ (de la mesure de vitesse)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "86a78bb1",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" L V error\n",
"0 0.45 1.0 0.1\n",
"1 0.54 1.2 0.1\n",
"2 0.67 1.5 0.1\n",
"3 0.89 2.0 0.1\n",
"4 1.34 3.0 0.1\n"
]
}
],
"source": [
"d = pd.read_csv(\"H1mVvariable.csv\",delimiter=\";\")\n",
"print(d)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "9d9b92cc",
"metadata": {},
"outputs": [],
"source": [
"# taking values from headers\n",
"L = d[\"L\"]\n",
"V = d[\"V\"]\n",
"e = d[\"error\"]"
]
},
{
"cell_type": "markdown",
"id": "bcc73921",
"metadata": {},
"source": [
"### Point 2.2\n",
"Faites une figure de $L$ vs $V_0$ avec barres d'erreur"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "2b001194",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x7f8428d243a0>"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAYIAAAGICAYAAABMYefvAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAag0lEQVR4nO3df5BdZZ3n8fc3SWtAeySTxAEJJsRhCKgESANBxUEHB9ARFrE2AUoLVzc4pVNas+vKzjjKlmXtWLhV4qpLIjJoLQIzCiy4qOPuDMoOaSeJgkkIuCEQbTIsIQbSSCJp+rt/3Bu8dvrHbbrPPd153q+qLs+P5577vceH+8lzzj3nRGYiSSrXjLoLkCTVyyCQpMIZBJJUOINAkgpnEEhS4QwCSSqcQSBJ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fthyq6aMRBvcx8dHz+cA3m9OvB66OiEFgP/CnE9y2NCE+j0AaQUS8DPgisA/4P5l5Y/Oh599unuQdz7Z+DJyRmfvHaPco0JOZT764qqXxMwikcYiIY2g8pnDXBK4lGG67hwFraTy28PX52w9NlyplEEhS4fzVkCQVziCQpMIZBJJUOINAkgpnEEhS4QwCSSqcQSBJhTMIJKlw/x9+gBlrqT7I0QAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig = plt.figure(figsize=(6,6)) # s\n",
"ax = plt.subplot() \n",
"ax.errorbar(V,L,e, marker='.', linestyle=\"none\", label=\"data\")\n",
"ax.set_title(\"with error bars\")\n",
"ax.set_title(\"L vs $V_0$\")\n",
"ax.set_xlabel(\"$V_0$[m/s]\")\n",
"ax.set_ylabel(\"L[m]\")\n",
"ax.legend()"
]
},
{
"cell_type": "markdown",
"id": "70f7b0cd",
"metadata": {},
"source": [
"### Point 2.3\n",
"Utilisez la fonction \"curve_fit\" pour faire une regression linéaire des données exprimées en une échelle log-log\n",
"et trouve la valeur de $\\beta$"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "21162560",
"metadata": {},
"outputs": [],
"source": [
"popt= curve_fit(func, np.log(V), np.log(L))"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "ad96315b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"a = 0.991\n",
"b = -0.800\n"
]
}
],
"source": [
"popt[0]\n",
"a=popt[0][0]\n",
"b=popt[0][1]\n",
"print(\"a = %.3f\" % a)\n",
"print(\"b = %.3f\" % b)"
]
},
{
"cell_type": "markdown",
"id": "8b31f498",
"metadata": {},
"source": [
"### Point 2.4\n",
"Faites un figure log-log de $L$ vs $V_0$ en ajoutant la regression linéaire trouvée dans le point précédent"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "78a36fc1",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[]"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAZ8AAAGMCAYAAAAFoK+hAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjQuMywgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/MnkTPAAAACXBIWXMAAAsTAAALEwEAmpwYAAAgs0lEQVR4nO3deZScdZ3v8fc3SUNAQ4hBrkogCYTLGiQkQFSiM4BcFhNERha5MxqQRM94j7NcvegswRFkRrgzgDiyyKJjWDSCA47LCIoIJIoZkMWAhpjElotAB2MIiST09/7RBTSV7qSXquep5f06p8/pevpXT30rRfPp51NPVUVmIklSkUaUPYAkqf0YPpKkwhk+kqTCGT6SpMIZPpKkwhk+kqTCGT6SpMIZPlIBImJlRBxdwO2MjIgNEXFgHz+7ISKurfcM0kCMKnsASbWTmS9GxKPAAcDDL22PiBnAu4B9yppN6s0jH6lBRMQ5EbGoatslEXFp5fv/ExG/iYh1EfFYRBzVz64eBvav2nYhcFFmPlH7yaXB88hHahw3AH8fETtl5u8jYiRwCnBSROwDfAQ4NDOfiIhJwMh+9vMIMOOlCxExG9gbOKGu00uD4JGP1CAycxXwX8C7K5uOBJ7PzCXAi8D2wP4R0ZGZKzPz8X529fKRTyXA/hH4m8x8vrLt/Ij4UUQsiogd63ePpP4ZPlJjuR44vfL9+yqXyczlwF8A5wJPRcSNEfGmfvbxCLB3RHQAZwEbgS8DVE5E2CszZwG3A2fW525IW2f4SI3la8AfRcQE4CQq4QOQmddn5hHARCCBf+pnHyvpCZxp9ITVX+Urb18/C/h25ftvA0fUeH5pQAwfqTgdETG619cWz7lm5tPAncC1wK8ycxlAROwTEUdGxPb0BMsGeqq4LVSCZhlwOfDjzPxhrx+PA9ZWvl8LvK42d00aHMNHKs636AmNl77O7Wfd9cDR9Drqoef5nn8EngGeBHYFPrmV23oYOBD4eNX2Z4G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334lTdRY/LeQWk8tjnwiYmlmztjWOs92kyQVzvCRJBXO8JEkFc7wkSQVzvCRJBXO8JEkFc7wqbNTr1j88umLtXbuuedy0UUX9fvzb3zjG/z85z+vy21L0nAYPi3M8JHUqAyfJnP++eezzz77cPTRR/PYY48BcNVVV3HooYfy5je/mZNPPpnnn3+ee++9l1tvvZWPfexjHHzwwTz++ON9rpOkMhg+dbZu4yZ+87sNLF317LD3tXTpUm688Ubuv/9+br75Zu677z4A3vOe93Dffffxs5/9jP3224+rr76at771rcyZM4cLL7yQBx54gL322qvPdZJUBsOnjpauepZHn1xH57MbOOOLS4YdQD/60Y846aST2HHHHdlpp52YM2cOAA8//DCzZs1i6tSpLFy4kEceeaTP6w90naT2VMs/lrfF8KmjJSu66K68dd6mzd0sWdE17H329ZEIH/jAB7jssst46KGHWLBgARs3buzzugNdJ6n9vPLH8vM1+WN5WwyfOpq553hGVLKiY9QIZu45flj7e/vb384tt9zChg0bWLduHbfddhsA69at441vfCObNm161SeQjhkzhnXr1r18ub91krTk0dWQ3UDU7I/lrTF86mj6xHHs+4YxTBi3Aws/OJPpE8cNa3+HHHIIp556KgcffDAnn3wys2bNAuDTn/40hx9+OO985zvZd999X15/2mmnceGFFzJt2jQef/zxftdJanOr7mXm/R9nOzYRZE3+WN4WP1KhH7X6SIUiP5ypSH6kgtQCurvhnn+B758H4yZz5qaP8YvN/41LTps25D+W/UgFSVL/1j8DC/8E7vgHOOAkmP9D1r92ErvtvMOwW5qB8JNM66zVjngktYBV98KiM+H5NfCui2H6B6CPk5nqyfCRpHZRVbPxwa/CGw8qZRTDZ5Ays8/TnduJzxNKTWj9M3DzPHj8DjjwZJh9CWw/prRxDJ9BGD16NF1dXYwfP75tAygz6erqYvTo0WWPImmgGqBmq2b4DMKECRPo7Ozk6aefLnuUUo0ePZoJEyaUPYakbWmgmq2a4TMIHR0dTJ48uewxJGnbGqxmq2b4SFKracCarZrhI0mt4uWa7XwYN6mharZqho8ktYLqmu1dF8Poncqeql+G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rsN/DZy7retWjoQejYgvRsTDEbEwIo6OiHsi4pcRcVivtfsBvwBGR8R/RMTPKtc5tR73SxoKw0cq1jJg38r3fw7cmpkrB3jdKcAlwEGVfbwPOAL438Ane607jp5PqjwWeCIz35yZB1a2SQ3B8JGKtYyet6h/LT3hc35EvCYivhQRV1U+1rg/v8rMhypHUI8Ad2TPOwM/ROVoquJ/0BM0DwFHR8Q/RcSszFxbl3skDYHhIxXrpSOfj9LzaaG/Bd4DLMrMs4E5W7nuH3p9393rcjcwCiAidgR2zswnMvMXwHR6QuiCiPj7mt4TaRhGlT2A1GaWAefQ8wmTh1S2TaAnIABeHOb+/xj4AUBEvAlYk5lfiYjngA8Mc99SzRg+UrEeA6YCf9OrBuukJ4AeYPhtxHHAosr3U4ELI6Ib2AR8eJj7lmrGD5OTShYRrwEuAzYCd2fmwoiYBHyzcqLAYPb1X8DhmblpG+tWAjMy85mhTS0Nj+EjNaCI2B24F+gaxmt9+trvDsBi4PXA1MxcU6t9S4Nh+EiSCufZbpKkwhk+kqTCGT6SpMIZPpKkwhk+kqTCGT6SpMIZPpKkwhk+kqTC/X+lCLbwJCPwYgAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x432 with 1 Axes>"
]
},
"metadata": {
"needs_background": "light"
},
"output_type": "display_data"
}
],
"source": [
"fig = plt.figure(figsize=(6,6)) # s\n",
"ax = plt.subplot() \n",
"ax.errorbar(V,L,e, marker='.', linestyle=\"none\", label=\"data\")\n",
"ax.plot(V,np.exp(b)*V**a,\"-\",label=\"model\")\n",
"ax.set_title(\"with error bars\")\n",
"ax.set_title(\"L vs $V_0$\")\n",
"ax.set_xlabel(\"$V_0$[m/s]\")\n",
"ax.set_ylabel(\"L[m]\")\n",
"ax.legend()\n",
"ax.loglog()"
]
},
{
"cell_type": "markdown",
"id": "b27babbe",
"metadata": {},
"source": [
"Estimation de la constante $C$"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "6ae3c7c3",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0 0.450000\n",
"1 0.450000\n",
"2 0.446667\n",
"3 0.445000\n",
"4 0.446667\n",
"dtype: float64\n"
]
}
],
"source": [
"C1=L/V\n",
"print(C1)"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "e34d2bdb",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"0.447073328032969 0.44766666666666677\n"
]
}
],
"source": [
"print(C.mean(),C1.mean())"
]
},
{
"cell_type": "markdown",
"id": "c215342d",
"metadata": {},
"source": [
"Le modèle peut s'écrire donc\n",
"$$L = C V H^{1/2}$$\n",
"avec $C=0.447$.\n",
" L'unité de $C$ est $\\sqrt{T^2/L}$\n",
"$$ L = [C] L/T L^{1/2}$$.\n",
"\n",
"Comme le moteur de la chute c'est la gravité et $[g] = L/T^2$ nous pouvons écrire\n",
"$$ C = \\sqrt{2/ g}$$ alors\n",
"$$ L = V_0 \\sqrt{ \\frac{2 H}{g}}$$."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "ca1f0efd",
"metadata": {},
"outputs": [],
"source": []
}
],
"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.9.7"
}
},
"nbformat": 4,
"nbformat_minor": 5
}