{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "\n", "from ipywidgets import interact, interactive, fixed, interact_manual\n", "from ipywidgets import HBox, VBox, Label\n", "import ipywidgets as widgets\n", "\n", "%matplotlib inline\n", "import matplotlib.pyplot as plt\n", "plt.style.use('seaborn-whitegrid') # global style for plotting" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Suspended objects\n", "\n", "**Question:** Estimate which counterweight allows to suspend wet jeans (3kg) on the cable so that the cable is taut as shown on the diagram below? \n", "\n", "\n", "\n", "Select your answer below, then use the virtual lab to determine *order of magnitude* of the mass necessary for the counterweight." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "f = lambda w: \"Choice registered: \"+str(w)\n", "interact(f, w=[('1,5 kg', 1.5), ('3 kg', 3), ('6 kg', 6), ('20 kg', 20), ('50 kg or more', 50)]);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Virtual lab" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Parameters of the situation\n", "m_jeans = 3 # mass of the wet jeans, in kg\n", "\n", "distance = 5 # distance between the poles, in m\n", "height = 1.5 # height of the poles, in m\n", "\n", "x_origin = 0 # x coordinate of point of origin of the figure = x position of the left pole, in m\n", "y_origin = 0 # y coordinate of point of origin of the figure = y position of the lower point (ground), in m" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Compute the angle that the line makes with the horizon depending on the counterweight chosen\n", "def get_alpha_from_masses(m_jeans, m_counterweight):\n", " # default angle value \n", " alpha = np.pi / 2\n", " \n", " # let's check that there is actually a counterweight\n", " if m_counterweight > 0:\n", " # then we compute the ratio of masses\n", " ratio = 0.5 * m_jeans / m_counterweight\n", "\n", " # we check if the ratio of masses is in the domaine of validity of arcsin ([-1;1]) and compute the angle\n", " if ratio >= -1 and ratio <= 1:\n", " alpha = np.arcsin(ratio)\n", " \n", " return alpha\n", "\n", "# Update the position of the jean from the angle\n", "def update_jeans(angle, x_origin, y_origin, distance, height):\n", " # the jean is midway between the poles\n", " x_jeans = x_origin + 0.5 * distance\n", " \n", " # default y value: the jean is on the ground \n", " y_jeans = y_origin \n", " \n", " # we check that the angle is comprised between horizontal (greater than 0) and vertical (smaller than pi/2)\n", " if angle > 0 and angle < (np.pi / 2): \n", " # we compute the delta between the horizon and the point given by the angle\n", " delta = (0.5 * distance * np.tan(angle))\n", " # we check that the delta is smaller than the height of the poles (otherwise it just means the jean is on the ground)\n", " if delta <= height:\n", " y_jeans = y_origin + height - delta\n", " \n", " print(\"height of the point at which the jeans are hanged:\", y_jeans) \n", " \n", " return [x_jeans, y_jeans]" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "# Create visualisation\n", "def create_graph(m_counterweight = 0):\n", " # get angle of line then coordinates of jean\n", " alpha = get_alpha_from_masses(m_jeans, m_counterweight)\n", " coord_jeans = update_jeans(alpha, x_origin, y_origin, distance, height)\n", "\n", " # Create the figure\n", " fig, ax = plt.subplots(1, figsize=(12, 4))\n", " \n", " # Fix graph to problem boundaries\n", " ax.set_ylim(bottom = y_origin) # limit bottom of y axis to ground\n", " ax.set_ylim(top = y_origin + height + .2) # limit top of y axis to values just above height\n", "\n", " # Draw poles\n", " x_pole1 = np.array([x_origin, x_origin])\n", " y_pole1 = np.array([y_origin, y_origin+height])\n", " ax.plot(x_pole1, y_pole1, \"b-\")\n", " x_pole2 = np.array([x_origin+distance, x_origin+distance])\n", " y_pole2 = np.array([y_origin, y_origin+height])\n", " ax.plot(x_pole2, y_pole2, \"b-\")\n", "\n", " # Draw the hanging line\n", " x = np.array([x_origin, coord_jeans[0], x_origin+distance])\n", " y = np.array([y_origin+height, coord_jeans[1], y_origin+height])\n", " ax.plot(x, y, \"ro-\")\n", "\n", "\n", "# Launch interactive visualisation\n", "interact(create_graph, m_counterweight=(0, 100, .5)); \n", "## TODO ideas : draw the forces (tension in cable, resulting tension)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Conceptual explanation\n", "\n", "TODO" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analytic explanation\n", "\n", "### Hypotheses and simplifications:\n", "\n", "* the jeans are exactly mid-way between the poles so the tension is equal on both sides of the cable\n", "* we represent the jeasn by the point at which they are suspended\n", "* the cable is considered as rigid (not bended)\n", "* we consider the static equilibrium obtained after changing the weight, once the system is stabilized\n", "\n", "### Resolution\n", "\n", "We are looking for the expression of the mass of the counterweight as a function of the other parameters of the problem.\n", "\n", "\n", "\n", "The forces applied on the *jeans* are the following:\n", "* the weight: $\\vec F_j = m_j \\vec g$ \n", "* the force exerted by the cable on each side of the jeans: assuming the jeans are suspended at the exact center of the cable, then the tension applied on each of the two sides is is equally distributed $\\vec T$, which combine into a vertical resulting tention $\\vec T_r = 2.\\vec T$\n", "\n", "From Newton's second law in a static equilibrium we can write: $\\sum \\vec F_j = \\vec 0$\n", "\n", "With the forces: $\\vec F_j + \\vec T_r = 0$\n", "\n", "Using the fact that the tension is equal on both sides of the jeans: $\\vec F_j + 2.\\vec T = 0$\n", "\n", "If we project on $x$ and $y$ axes, we get:\n", "\n", "$\\left\\{\\begin{matrix} F_{jx} + 2.T_x = 0 \\\\ F_{jy} + 2.T_y = 0\\end{matrix}\\right. $\n", "\n", "Since the weight does not have a component on the x axis, it simplifies into:\n", "\n", "$\\left\\{\\begin{matrix} T_x = 0 \\\\ F_{jy} + 2.T_y = 0\\end{matrix}\\right. $\n", "\n", "NB: $T_x = 0$ means that the tension on each side of the jeans cancel out.\n", "\n", "The component of the weight on the y axis is $F_{jy} = - m_j.g$, which gives us:\n", "\n", "$\\left\\{\\begin{matrix} T_x = 0 \\\\ - m_j.g + 2.T_y = 0\\end{matrix}\\right. $\n", "\n", "Using the angle $\\alpha$ we can get the tension $T_y$ expressed as a function of T since $sin(\\alpha) = \\frac{T_y}{T}$, therefore $T_y = T.sin(\\alpha)$\n", "\n", "So we get:\n", "\n", "$\\left\\{\\begin{matrix} T_x = 0 \\\\ - m_j.g + 2.T.sin(\\alpha) = 0\\end{matrix}\\right. $\n", "\n", "From there we can get $T$:\n", "\n", "$T = \\frac{m_j.g}{2.sin(\\alpha)}$ $(1)$\n", "\n", "\n", "On the other hand, the forces applied on the *counterweight* are following:\n", "* the weight: $\\vec F_{cw} = m_{cw} \\vec g$ \n", "* the force exerted by the line: a simple pulley simply changes the direction of the tension so the tension applied on the counterweight is therefore $\\vec T$\n", "\n", "From Newton's second law in a static equilibrium we can write: $\\sum \\vec F_{cw} = \\vec 0$ \n", "\n", "With the forces: $\\vec F_{cw} + \\vec T = \\vec 0$\n", "\n", "All forces being vertical, there is no need to project on $x$ so we get: $- F_{cw} + T = 0$\n", "\n", "With the detail of the weight: $-m_{cw}.g + T = 0$\n", "\n", "Which gives us $T = m_{cw}.g$ $(2)$\n", "\n", "From equations $(1)$ and $(2)$ we get:\n", "\n", "$\\left\\{\\begin{matrix}T = \\frac{m_j.g}{2.sin(\\alpha)} \\\\ T = m_{cw}.g\\end{matrix}\\right. $\n", "\n", "Which allows us to find the mass of the counterweight as a function of the *mass of the jeans* and of the *angle that the line makes with the horizon*:\n", "\n", "$m_{cw} = \\frac{m_j}{2.sin(\\alpha)}$\n", "\n", "For the line to be taut as show on the figure, $\\alpha$ has to be really small i.e. close to zero. \n", "This means that $sin(\\alpha)$ will also be close to zero, which means in turn that $m_{cw}$ will be very big.\n", "Actually, **the more we want the line to be close to the horizon, the bigger $m_{cw}$ we will need!**\n", "In fact, it is impossible to get the line taut so that it is absolutely straight...\n", "\n", "### Application\n", "\n", "For a pair of wet jeans of $3 kg$ and an angle of $4^\\circ = \\frac{\\pi}{45}$, which is approximately like depicted on the figure, we need to put a counterweight of more than 20 kg!\n", "\n", "You can try out the manual calculation below and check that you get a similar result with the virtual lab above:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "m_j = 3\n", "alpha = np.pi / 45\n", "\n", "m_cw = m_j / (2 * np.sin(alpha))\n", "print(m_cw)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.8" } }, "nbformat": 4, "nbformat_minor": 2 }