diff --git a/TeachingExamples/01_Demonstrations.ipynb b/TeachingExamples/01_Demonstrations.ipynb index 091114c..83fc4ac 100644 --- a/TeachingExamples/01_Demonstrations.ipynb +++ b/TeachingExamples/01_Demonstrations.ipynb @@ -1,167 +1,154 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Virtual demonstrations - Using digital artefacts to illustrate explanations\n", "\n", "Classroom demonstrations, i.e. showing phenomena in class, make great illustrations that stimulate students’ interest and motivation. \n", "Jupyter Notebooks allow you to design very easily *virtual demonstrations* to show students *things that you could not demonstrate in real life*.\n", "But how to make sure that your demonstrations are **more than just entertainment**?\n", "\n", "A few simple ingredients can transform your virtual demonstrations into *powerful teaching and learning tools*. On this page, we summarize briefly some of the [ideas from research on the impact of demonstrations on students learning](#Ingredients-for-effective-virtual-demonstrations-in-class) and share with you [example notebooks](#Examples) which implement these ideas in practice.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Ingredients for effective virtual demonstrations in class\n", "\n", "### Questions\n", "\n", "Questionning students can really help students engage actively with your demonstration: \n", "* Catherine Crouch and her colleagues from Harvard University for instance, have shown that having students **predict the outcome of a demonstration before observing it** makes an essential difference in terms of what students remember and understand from a demonstration [(Crouch et al., 2004)](https://aapt.scitation.org/doi/10.1119/1.1707018). This result has been reproduced in a number of other studies, and the reason why this technique works so well seems to be fundamentally linked to how our brain works, according to relatively recent models [(Dehaene, 2011)](https://www.college-de-france.fr/site/en-stanislas-dehaene/course-2011-2012.htm). \n", "* When observing a demonstration, it can be hard for students to focus their attention at the right place at the right time. Asking them **questions that drive them to observe specific features** of what you are showing can greatly help them see what you want them to see. \n", "* Very often, students have a hard time identifying what they need to remember from a demonstration. Asking them **questions at the end of a demonstration to reflect on the important points** which have been illustrated is a very effective way to draw their attention to the right elements.\n", "\n", - "

In brief: ask students questions before (prediction questions), during (observation questions) and after (reflection questions) your demonstrations.

" + "

\n", + "Key points:
\n", + " For a maximized impact on learning, ask students questions before (prediction questions), during (observation questions) and after (reflection questions) your demonstrations with notebooks.\n", + "

" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Discussions with peers\n", "\n", - "Very frequently, the \"why\" things happen is more important than the \"what\" happens in a demonstration. A key to effective demonstrations is therefore to give students an opportunity to formulate why they think things happen that way. \n", + "Usually, the \"why\" things happen is more important than the \"what\" happens in a demonstration. However, it is very difficult for students with a prior misconception to really change their understanding if they do not realize that they have a misconception.\n", + "A key to effective demonstrations is therefore to give students an opportunity to **formulate** why they think things happen that way, as a mean for them to clarify their own thinking.\n", + "\n", "A simple tool to do this is peer discussion. By encouraging students to **discuss the \"why\" with others**, you give them a chance to put words on the implicit model they have in mind and to confront it to the reasoning of others. After verbalizing their understanding of the concepts, students will be better able to assess it against your own explanations, which will then have much more impact.\n", "\n", - "

In brief: ask students to discuss the \"why\" with peers before presenting your own explanation.

\n", - " " + "

\n", + "Key points:
\n", + " To help students develop their reasoning, have them discuss \"why\" things happen this way in the virtual demonstration with their peers before presenting your own explanation.\n", + "

\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Multiple representations\n", "\n", "Presenting students with multiple representations of concepts has been shown to have positive effects on learning [(Mayer, 2009)](http://dx.doi.org/10.1017/CBO9780511811678). Graphical visualizations play an important role in this, but it has been shown that it is the combination of the representations which actually is efficient, which means that *text, equations, tables, videos* or other types of embedded media also are important.\n", "\n", "Two key elements are worth considering particularly in virtual demonstrations:\n", "* Showing explicitely (through visual cues, text, arrows, etc.) **how the different representations relate to each other** is a great way to illustrate different ways of modeling the same reality, which is essential for students to develop their modeling skills.\n", "* Presenting students with the **type of representations that they need to use** when they solve problems in your discipline (for instance when they need to analyze the situation, when they need to choose a model or when they need to check their solution) can help your students develop their problem solving skills \n", "\n", "\n", - "

In brief: whenever possible, present your demonstrations with multiple connected representations, which match the representations you want students to use when solving problems.

\n" + "

\n", + "Key points:
\n", + " Virtual demonstrations can serve as a bridge to develop problem solving skills if you design your notebooks with multiple connected representations, which match the representations you want students to use when solving problems.\n", + "

\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", - "### Examples\n", + "## Examples\n", "\n", "The following examples show how using the above elements in demonstrations can look like, in different formats:\n", "\n", - "\n", + "
\n", " \n", - " \n", - " \n", + " \n", + " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
What is involved?What is involved?Show me an example
\"Low tech\"Ask students questions which they have to answer on a piece of paper.

Show visualizations that you want students to use when they solve problems.
Have a look at the falling objects demo
Interactive questionsUse the notebook to poll students using interactive questions where students vote for the answer of their choice.

Combine and synchronize interactively a diagram and different function plots.
[WORK IN PROGRESS]
Have a look at the suspended objects demo
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "## Sharing your demonstration notebooks with students\n", "\n", - "Making the virtual demonstrations available to the students can be a good idea. But how will students know which parameters to change and what to observe? \n", + "Making the virtual demonstrations available to the students can be a good idea. But how will students know (or remember) which parameters to change and what to observe? \n", "By **including questions and instructions** into the notebook together with the virtual demonstration, you will ensure that students can use them effectively in autonomy.\n", "\n", - "The following examples are demonstration notebooks extended with questions and instructions for students:\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
What is involved?Show me an example
\"Low tech\"By adding text cells to your notebook, you can transform it into a notebook \"to complete\", in which students write their own explanations and observations.Have a look at the falling objects exercise
Auto-corrected quizzInclude interactive questions into your notebook to augment your notebook with auto-corrected quizze.[WORK IN PROGRESS]
Have a look at the suspended objects exercise
Computational exerciseAsk your students to modify or complete the code of your demonstration.[WORK IN PROGRESS]
Have a look at the falling objects computational exercise
\n" + "Have a look at the examples of notebooks for exercises or assignements.\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "## Bibliography\n", "\n", "Crouch, C., Fagen, A. P., Callan, J. P., & Mazur, E. (2004). Classroom demonstrations: Learning tools or entertainment? American Journal of Physics, 72(6), 835–838. \n", "https://aapt.scitation.org/doi/10.1119/1.1707018\n", "\n", "Dehaen, S. (2011). The Statistician Brain: The Bayesian Revolution in Cognitive Sciences. Lectures at Collège de France. \n", "https://www.college-de-france.fr/site/en-stanislas-dehaene/course-2011-2012.htm\n", "\n", "Mayer, R. E. (2009). Multimedia learning (2nd ed.). Cambridge University Press. \n", "http://dx.doi.org/10.1017/CBO9780511811678\n" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/02_Textbooks.ipynb b/TeachingExamples/02_Textbooks.ipynb index c8f0ac9..31974df 100644 --- a/TeachingExamples/02_Textbooks.ipynb +++ b/TeachingExamples/02_Textbooks.ipynb @@ -1,32 +1,41 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Multimedia textbooks - Providing students with rich learning resources" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/03_Assignments.ipynb b/TeachingExamples/03_Assignments.ipynb index 148f3a3..5552ff1 100644 --- a/TeachingExamples/03_Assignments.ipynb +++ b/TeachingExamples/03_Assignments.ipynb @@ -1,33 +1,66 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Assignments - Giving students activities to do\n", - "\n" + "\n", + "The following examples are demonstration notebooks extended with questions and instructions for students:\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
What is involved?Show me an example
\"Low tech\"By adding text cells to your notebook, you can transform it into a notebook \"to complete\", in which students write their own explanations and observations.Have a look at the falling objects exercise
Auto-corrected quizzInclude interactive questions into your notebook to augment your notebook with auto-corrected quizze.[WORK IN PROGRESS]
Have a look at the suspended objects exercise
Computational exerciseAsk your students to modify or complete the code of your demonstration.[WORK IN PROGRESS]
Have a look at the falling objects computational exercise
\n" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/FallingObjects-computational.ipynb b/TeachingExamples/FallingObjects-computational.ipynb index 4fc5387..9e5951c 100644 --- a/TeachingExamples/FallingObjects-computational.ipynb +++ b/TeachingExamples/FallingObjects-computational.ipynb @@ -1,214 +1,193 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Falling objects - computational exercise\n", "\n", "## 1. Get into the \"Falling objects\" virtual lab\n", "\n", "A. First, do the [exercise with the \"Falling objects\" virtual lab](FallingObjects-exercise.ipynb)" ] }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "07b23378e6f84eca8de8c7490444b8c3", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(Output(layout=Layout(margin='2px 6px')), HBox(children=(VBox(children=(HBox(children=(Label(val…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "%matplotlib inline\n", "from lib.fallingobjects import *\n", "FallingObjectsLab();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "B. Draw a diagram representing the different elements of the code [available in this python file](lib/suspendedobjects.py). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## 2. Extend the virtual lab\n", "\n", "You can extend the virtual lab by redefining the following elements:\n", "* The list of the objects available in the lab so that you can add properties to these objects\n", "* The functions representing the equations of motion\n", " \n", "**Goal:** redefine the necessary elements to implement **a quadratic model of air friction** and **Archimed's principle** in the virtual lab.\n", "\n", "### 2.1. Rewrite the functions below" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "###--- Functions representing the equations of the movement as functions of time and the problem parameters\n", "def accel_time_withair(obj, g, h_0, v_0, t):\n", " # TODO to replace!! -->\n", " lamb = obj.k / obj.mass\n", " return -g * np.exp(- lamb * t)\n", " # <--\n", "\n", "def veloc_time_withair(obj, g, h_0, v_0, t):\n", " # TODO to replace!! -->\n", " lamb = obj.k / obj.mass\n", " return (v_0 + (g / lamb)) * np.exp(- lamb * t) - (g / lamb)\n", " # <--\n", "\n", "def height_time_withair(obj, g, h_0, v_0, t):\n", " # TODO to replace!! -->\n", " lamb = obj.k / obj.mass\n", " return (1 / lamb) * (v_0 + (g / lamb)) * (1 - np.exp(- lamb * t)) - (g / lamb) * t + h_0\n", " # <--" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.2. Extend the list of objects with the characteristics that you need in the equations" ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ "###--- Static list of objects with which we can experiment.\n", "# Objects come with a number of attributes, of which:\n", "# - a name and a color : mandatory so that the virtual lab executes\n", "# - a mass and a friction coefficient : used by the functions implementing the motion equations, can be replaced or renamed \n", "# as long as the three functions accel_time_withair, veloc_time_withair and height_time_withair are redefined\n", "objects_with_k = [{\n", " 'name':'Bowling ball',\n", " 'mass':5.0,\n", " 'k': (6*np.pi*0.11) * 1.8*10**-5,\n", " 'color':'#DC143C'\n", " },{\n", " 'name':'Tennis ball',\n", " 'mass':0.0567,\n", " 'k': (6*np.pi*0.032) * 1.8*10**-5,\n", " 'color':'#2E8B57'\n", " },{\n", " 'name':'Ping-pong ball',\n", " 'mass':0.0027,\n", " 'k': (6*np.pi*0.02) * 1.8*10**-5,\n", " 'color':'#FF4500'\n", " },{\n", " 'name':'Balloon',\n", " 'mass':0.013,\n", " 'k': 0.02,#(6*np.pi*0.28) * 1.8*10**-5,\n", " 'color':'#000080'\n", "}]\n", "\n", "## Utility function to print objects nicely\n", "def object_string(obj):\n", " return '{!s}:\\n mass = {} kg \\n friction coeff. = {:.2e}'.format(obj.name, obj.mass, obj.k)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 2.3. Test your code \n", "\n", "Execute the following cell:" ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "30e74080b95643999e5d70fc3957234a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(Output(layout=Layout(margin='2px 6px')), HBox(children=(VBox(children=(HBox(children=(Label(val…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "FallingObjectsLab(objects = objects_with_k, \n", " accel_time = accel_time_withair, veloc_time = veloc_time_withair, height_time = height_time_withair);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## References : \n", "\n", "frottements linéaires vs. quadratiques : \n", "\n", "http://www.physagreg.fr/mecanique/m12/M12-chute-libre-frottements.pdf\n", "\n", "https://femto-physique.fr/mecanique/problemes-de-chute.php\n", "\n", "equations avec frottements linéaires :\n", "\n", "https://fr.wikipedia.org/wiki/Frottement_fluide\n", "\n", "equations avec frottements quadratiques :\n", "\n", "http://hyperphysics.phy-astr.gsu.edu/hbase/Mechanics/fallq.html\n", "\n", "https://studylibfr.com/doc/4875224/chute-libre-avec-frottement---gilles-auriol\n", "\n", "https://fr.wikipedia.org/wiki/Chute_avec_r%C3%A9sistance_de_l%27air" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/FallingObjects-demo.ipynb b/TeachingExamples/FallingObjects-demo.ipynb index cf5facc..c4cba24 100644 --- a/TeachingExamples/FallingObjects-demo.ipynb +++ b/TeachingExamples/FallingObjects-demo.ipynb @@ -1,172 +1,181 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is about demonstrating:\n", - "* using **different types of questions** to engage students with the virtual demonstration\n", - "* using the type of **visualisations** that students will be asked to use **when solving similar problems**, i.e. in this case graphing height, velocity and acceleration as functions of time\n", - "\n", - "The example chosen is voluntarily *simple* so that anyone can understand what is illustrated and focus the pedagogical features of the example.\n", - "\n", - "---" + "
\n", + "

Use case scenario
\n", + " This notebook is made to be used in class as a virtual demonstration which is operated by the teacher (the notebook is not meant to be used by students).

\n", + "

Features
\n", + " This notebook embeds different types of questions to engage students with the virtual demonstration and uses the type of visualisations that students will be asked to use when solving similar problems (i.e. in this case graphing height, velocity and acceleration as functions of time).
\n", + " The example chosen is voluntarily simple so that anyone can understand what is illustrated and focus the pedagogical features of the example.

\n", + "

More information on using notebooks for virtual demonstrations.

\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Falling objects\n", - "\n", - "## In-class scenario\n", - "\n", + "\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "### Problem\n", "\n", + "Present the following problem to your students:\n", + "\n", "We **drop** an object from a given height with **no initial velocity**. Just like an apple would fall from a tree. \n", "We consider the movement of the object, **ignoring resistance from the air**.\n", "\n", "### Questions\n", - "1. Ask the following **prediction questions** to students - make sure they write down their answers on a piece of paper:\n", + "1. Ask the following **prediction questions** to your students - make sure they write down their answers on a piece of paper:\n", " * Which object would reach the ground first: a bowling ball (5 kg) or a tennis ball (0.05 kg)?\n", - " * Why? Describe in words your explanation for this behavior.\n", + " * Why? **Discuss your explanations with your neighbour.**\n", " * Sketch your prediction for the *height* of the object as a function of time. Describe in words what this graph means.\n", " * Sketch your prediction for the *velocity* of the object as a function of time. Describe in words what this graph means.\n", " * Sketch your prediction for the *acceleartion* of the object as a function of time. Describe in words what this graph means.\n", "\n", "\n", "2. **Run the demo** and ask the following **observation questions** :\n", " * When does the each object reaches the ground (time in seconds)?\n", " * What do you observe when we plot multiple objects at the same time?\n", " * What can you conclude from this experiment?\n", "\n", "\n", "3. Provide the explanation (e.g. solving the problem on the board), and have students compare their explanation with your own explanation. \n", "Then ask the following **reflection questions**:\n", " * What happens if we don't ignore the resistance from the air? -- here you can use the virtual lab to show the effect of air resistance: `FallingObjectsLab(show_withair=True);`\n", " * What are the criteria to decide when we can ignore resistance from the air or not when solving problems?\n", "\n", "\n", "4. For additional impact, you can show an excerpt of the video below, which demonstrates how a bowling ball and ostrich feathers fall in a vacuum chamber" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Virtual demo" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from lib.fallingobjects import *\n", "\n", "FallingObjectsLab(show_withair=False);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*If you wonder how the virtual lab works and would like to see the code, [you can have a look at it at the end of this notebook](#How-does-the-virtual-demo-work%3F).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Video" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('E43-CfukEgs', 560, 315, start=171)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ + " \n", + "\n", "---\n", "\n", "# How does the virtual demo work?\n", "\n", "You can have a look at the code of the virtual demo by [opening this python file](lib/fallingobjects.py). \n", "\n", "## Use of the virtual demo\n", "\n", "Execute the cell below to see the documentation:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "FallingObjectsLab?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Utility computation functions\n", "\n", "You can see the code of the functions used to compute the movement equations for the falling objects using the same kind of syntax. \n", "Below are two examples showing the code of the function computing height without and with air resistance.\n", "\n", "These functions can be redefined and given as parameters when initializing the lab." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "height_time??" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "height_time_withair??" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/FallingObjects-exercise.ipynb b/TeachingExamples/FallingObjects-exercise.ipynb index 7e94ace..351baec 100644 --- a/TeachingExamples/FallingObjects-exercise.ipynb +++ b/TeachingExamples/FallingObjects-exercise.ipynb @@ -1,350 +1,337 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is about demonstrating:\n", - "* How to make a **demonstration available to students** in the form of an **exercise including different types of questions**\n", - "* Using notebook cells to encourage students to **take notes** when they use a virtual demonstration\n", - "\n", - "The example chosen is voluntarily *simple* so that anyone can understand what is illustrated and focus the pedagogical features of the example.\n", - "\n", - "---" + "
\n", + "

Use case scenario
\n", + " This notebook is made to be used by students as an assignment or exercise, in autonomy (at home or in an exercise session).

\n", + "

Features
\n", + " This notebook uses plain text cells to encourage students to take notes when they use a virtual demonstration.

\n", + "

It also embeds different types of questions to engage students with the virtual demonstration and uses the type of visualisations that students will be asked to use when solving similar problems (i.e. in this case graphing height, velocity and acceleration as functions of time).
\n", + " The example chosen is voluntarily simple so that anyone can understand what is illustrated and focus the pedagogical features of the example.

\n", + "

More information on using notebooks for exercises or assignements.

\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Falling objects \"apple \n", "\n", "## The problem \n", "We **drop** an object from a given height with **no initial velocity**. Just like an apple would fall from a tree. \n", "We consider the movement of the object, **ignoring resistance from the air**.\n", "\n", " \n", "\n", "## Initial questions\n", "\n", "Answer the following questions _before_ using the virtual lab.\n", "\n", "**Question 1:** Which object would reach the ground first: a bowling ball (5 kg) or a tennis ball (0.05 kg)? Write down your answer in the cell below." ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 2:** Why? In the cell below, describe in words your explanation for this behavior." ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Tip:* In physics, as in many disciplines, sketching your ideas can really help you figure out problems. \n", "It might be a good idea to take a piece of paper and sketch what you think the following variables will look like as a function of time: the *height* of the object, the *velocity* of the object and the *acceleration* of the object." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "## Virtual lab\n", "The virtual demonstration below illustrates the movement of different objects. \n", "Execute the cell below to launch the virtual demonstration, then *answer the questions below*." ] }, { "cell_type": "code", - "execution_count": 2, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "application/vnd.jupyter.widget-view+json": { - "model_id": "cb5ed06adcc341d38169b49a6149f51a", - "version_major": 2, - "version_minor": 0 - }, - "text/plain": [ - "VBox(children=(Output(layout=Layout(margin='2px 6px')), HBox(children=(VBox(children=(HBox(children=(Label(val…" - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], + "outputs": [], "source": [ "%matplotlib inline\n", "from lib.fallingobjects import *\n", "FallingObjectsLab(show_withair=False);" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "**Question 1:** Choose an initial height that will be the same for all the objects you will observe, e.g. 5 meters. \n", "When does the each object reaches the ground? \n", "Note down the time in seconds below." ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Object 1 reaches the ground at:\n", "### Object 2 reaches the ground at:\n", "### Object 3 reaches the ground at:" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*Tip:* Actually, the interactive figure allows you to plot the movement of several objects simultaneously by maintaining the 'ctrl' key selected while clicking with your mouse on the objects you want to display. \n", "Try to select several objects to display simultaneously.\n", "\n", "**Question 2:** What can you conclude from this experiment? \n", "*If you wonder how the virtual lab works and would like to see the code, [you can have a look at it at the end of this notebook](#How-does-the-virtual-lab-work%3F).*" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "## Synthesis\n", "\n", "**Question 1:** How does your own explanation compare with the explanation provided below?" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Problem analysis\n", "\n", "\n", "We are looking for the time at which the object will reach the ground. Therefore *we are looking for an equation giving us the height of the object as a function of time*.\n", "\n", "We know the initial height and velocity of the object, as well as its mass. \n", "In addition, if we ignore the friction from air, we know that the only force applied on the object is the weight: $\\vec F = m \\vec g$\n", "\n", "#### Movement of the object\n", "Since there is only one force involved, it seems quite straightforward to use Newton's second law: $\\sum \\vec F = m \\vec a$\n", "\n", "With the weight the only force on the object, we get: $\\vec F = m \\vec a$ \n", "Using the expression of the weight it gives us: $m \\vec g = m \\vec a$ \n", "Therefore the movement of the object is described by $\\vec a = \\vec g$.\n", "\n", "To get the equation of acceleration as a function of time, we project onto our coordinate system: $a = -g$, therefore $a(t) = -g$. \n", "This means that the ball is under **constant acceleration**.\n", "\n", "From there we can get the equations for velocity and height by integrating successively: \n", "$\\left\\{\\begin{matrix} a(t) = -g \\\\ v(t) = -g\\,t + v_0 \\\\ h(t) = -\\frac{1}{2}\\,g\\,t^2 + v_0\\,t + h_0\\end{matrix}\\right. $\n", "\n", "The above equations have the following parameters:\n", "* the initial height $h_0$ from which the object is dropped\n", "* the initial velocity of the object $v_0$, with $v_0 = 0$ when the object is dropped with no initial velocity\n", "* and of course the acceleration due to gravity $g$\n", "\n", "#### Conclusion\n", "We see clearly that **the mass $m$ of the object plays no role at all in the equations of the movement**.\n", "\n", "**Question 2:** What happens if we don't ignore the resistance of the air?" ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Execute the cell below, then click on the button to show the effect of friction from the air. \n", "Select different objects to see how they are affected depending on their characteristics." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "FallingObjectsLab();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Question 3:** When is it reasonable to ignore the resistance of the air and why? \n", "List the criteria that you could you to decide if resistance from the air can be ignored or not when solving a problem." ] }, { "cell_type": "raw", "metadata": {}, "source": [ "### Type your answer here." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", " \n", "\n", "---\n", "\n", "## How does that look in real life?\n", "\n", "The following video demonstrates how a bowling ball and ostrich feathers fall in a vacuum chamber, thus illustrating how what we have seen so far looks in the real world." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from IPython.display import YouTubeVideo\n", "YouTubeVideo('E43-CfukEgs', 560, 315)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "---\n", "## How does the virtual lab work?\n", "\n", "You can have a look at the code of the virtual lab by [opening this python file](lib/fallingobjects.py). \n", "By executing the following three cells, you will see the code of the three functions used to compute the movement equations for the falling object.\n", "\n", "#### Code of $a(t) = -g$\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "accel_time??" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Code of $v(t) = -g\\,t + v_0$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "veloc_time??" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Code of $h(t) = -\\frac{1}{2}\\,g\\,t^2 + v_0\\,t + h_0$" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "height_time??" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "---\n", "\n", "## Other resources on the web\n", "\n", "Detailed explanations with examples on falling objects: https://opentextbc.ca/physicstestbook2/chapter/falling-objects/\n", "\n", "Impact of air resistance on falling objects (in French): http://www.physagreg.fr/mecanique/m12/M12-chute-libre-frottements.pdf" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/SuspendedObjects-demo.ipynb b/TeachingExamples/SuspendedObjects-demo.ipynb index 46f7c24..ed206ae 100644 --- a/TeachingExamples/SuspendedObjects-demo.ipynb +++ b/TeachingExamples/SuspendedObjects-demo.ipynb @@ -1,145 +1,151 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is about demonstrating:\n", - "* using **different types of questions** to engage students with the virtual demonstration\n", - "* using **different types of visualizations** to help students understand the phenomena\n", - "\n", - "The example chosen is voluntarily *simple* so that anyone can understand what is illustrated and focus the pedagogical features of the example.\n", - "\n", - "---" + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "

Use case scenario
\n", + " This notebook is made to be used in class as a virtual demonstration which is operated by the teacher (the notebook is not meant to be used by students).

\n", + "

Features
\n", + " This notebook embeds different types of questions to engage students with the virtual demonstration and uses different types of visualisations to help students understand the phenomena.
\n", + " The example chosen is voluntarily simple so that anyone can understand what is illustrated and focus the pedagogical features of the example.

\n", + "

More information on using notebooks for virtual demonstrations.

\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Suspended objects\n", "\n", - "## In-class scenario\n", - "\n", "### Problem\n", + "Present the following problem to your students:\n", + "\n", "\n", "\n", - "We consider a clothesline made of two poles and a cable. \n", - "The cable is fixed on one pole. A pulley on the other pole allows to attach a counterweight to pull the cable taut.\n", + "We consider a clothesline made of two poles and a cable. The cable is fixed on one pole. A pulley on the other pole allows to attach a counterweight to pull the cable taut. \n", + "The focus of our problem is the counterweight.\n", "\n", "### Questions\n", "\n", - "1. Ask the following **prediction question** to students:\n", - " * Estimate which counterweight allows to suspend wet jeans (3kg) on the cable so that the cable is taut as shown on the diagram?\n", + "1. Ask the following **prediction question** to students **using the polling software of your choice** \n", + "\\[[For instance you could use clickers, more on that on the EPFL clickers website](http://clickers.epfl.ch)\\]\n", + " * Estimate which counterweight allows to suspend wet jeans (3kg) on the cable so that the cable is taut as shown on the diagram? The question is about the order of magnitude, NOT the exact value.\n", " * 1,5 kg\n", " * 3 kg\n", " * 6 kg\n", " * 20 kg\n", " * 50 kg or more\n", - " * Why? Describe in words your explanation for this behavior.\n", - " " - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ + " * Why? Discuss in words your explanation for this behavior. \n", + " \n", + " \n", "2. Run the demo and ask the following **observation questions** :\n", " * What is the height of the point at which the jeans are suspended for a counterweight of 3kg? 6kg? 20kg? 50kg?\n", " * What can you conclude from this experiment?\n", "\n", "\n", "3. Provide the explanation (e.g. solving the problem on the board), and have students compare their explanation with your own explanation." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Virtual demo" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from lib.suspendedobjects import *\n", "SuspendedObjectsLab();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "*If you wonder how the virtual lab works and would like to see the code, [you can have a look at it at the end of this notebook](#How-does-the-virtual-lab-work%3F).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "---\n", "\n", "# How does the virtual demo work?\n", "\n", "You can have a look at the code of the virtual demo by [opening this python file](lib/suspendedobjects.py). \n", "\n", "## Use of the virtual demo\n", "\n", "Execute the cell below to see the documentation:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "SuspendedObjectsLab?" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Utility computation function\n", "\n", "By executing the following cell, you will see the code of the function used to compute the angle that the line makes with the horizon depending on the masses of the object and the counterweight. \n", "This function can be redefined and given as parameter when initializing the lab." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "get_angle_from_masses??" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/SuspendedObjects-exercise.ipynb b/TeachingExamples/SuspendedObjects-exercise.ipynb index 665b1cb..244541a 100644 --- a/TeachingExamples/SuspendedObjects-exercise.ipynb +++ b/TeachingExamples/SuspendedObjects-exercise.ipynb @@ -1,226 +1,240 @@ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ - "This notebook is about demonstrating:\n", - "* making a demonstration available to students in the form of an exercise including **auto-corrected quizzes**\n", - "* using **different types of visualizations** to help students understand the phenomena\n", - "\n", - "The example chosen is voluntarily *simple* so that anyone can understand what is illustrated and focus the pedagogical features of the example.\n", - "\n", - "---" + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + "

Use case scenario
\n", + " This notebook is made to be used by students as an assignment or exercise, in autonomy (at home or in an exercise session).

\n", + "

Features
\n", + " This notebook embeds auto-corrected quizzes to engage students with the virtual demonstration and uses different types of visualisations to help students understand the phenomena.
\n", + " The example chosen is voluntarily simple so that anyone can understand what is illustrated and focus the pedagogical features of the example.

\n", + "

More information on using notebooks for exercises or assignements.

\n", + "
" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Suspended objects\n", "\n", - "## The problem\n", "\n", "\n", + "## The problem\n", "We consider a clothesline made of two poles and a cable.\n", "The cable is fixed on one pole. A pulley on the other pole allows to attach a counterweight to pull the cable taut.\n", + "The focus of this problem is the counterweight.\n", "\n", "## Initial questions\n", "\n", - "#### TODO: here, replace by auto-corrected quiz!!!\n", - "\n", - "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", - "* 1,5 kg\n", - "* 3 kg\n", - "* 6 kg\n", - "* 20 kg\n", - "* 50 kg or more\n", - "\n", - "\n" + "Execute the cell below to activate the interactive quizz." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "from IPython.display import IFrame\n", + "IFrame('https://h5p.org/h5p/embed/583522', 1024, 360)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Virtual lab\n", "\n", "The virtual demonstration below illustrates position of the clothesline for different counterweights. \n", "Execute the cell below to launch the virtual demonstration, then *answer the questions below*." ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "from lib.suspendedobjects import *\n", "SuspendedObjectsLab();" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### TODO here add observation questions in the form of auto-corrected quizzes.\n", "\n", " \n", "\n", "*If you wonder how the virtual lab works and would like to see the code, [you can have a look at it at the end of this notebook](#How-does-the-virtual-lab-work%3F).*\n", "\n", " " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Analytic explanation\n", "\n", "### Hypotheses and simplifications:\n", "\n", "* the jeans are considered as positioned exactly mid-way between the poles so the tension is equal on both sides of the cable\n", "* we represent the jeans by the point at which they are suspended\n", "* the cable is considered as rigid (not bended), with a negligible mass\n", "* the pulley is considered as perfect, without mass nor friction\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", "Given that the system is in static equilibrium, using Newton's second law should be easy (sum of external forces will be zero) and we will have the mass of the counterweight involved in the expression of the force it exerts on the system.\n", "\n", "First, let's draw a diagram and represent the different forces involved.\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", "With the forces on the jeans we get: $\\vec F_j + \\vec T_r = 0$ \n", "Using the fact that the tension is equal on both sides of the jeans we get: $\\vec F_j + 2.\\vec T = 0$\n", "\n", "If we project on $x$ and $y$ axes, we get: \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", "$\\left\\{\\begin{matrix} T_x = 0 \\\\ F_{jy} + 2.T_y = 0\\end{matrix}\\right. $\n", "\n", "The component of the weight on the y axis is $F_{jy} = - m_j.g$, which gives us: \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", "By replacing $T_y$ by this expression in the above equation we get: \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", "$T = \\frac{m_j.g}{2.sin(\\alpha)}$ $(1)$\n", "\n", " \n", "\n", "We now want to make the mass of the counterweight appear in this expression. \n", "So we will now look at the forces applied on the *counterweight*.\n", "\n", " \n", "\n", "The forces applied on the *counterweight* are:\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", "With the forces involved in our problem : $\\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", "Using the expression of the weight: $-m_{cw}.g + T = 0$ \n", "Which gives us $T = m_{cw}.g$ $(2)$\n", "\n", " \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", " \n", "\n", "### Conclusion\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", " \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:" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ " 3 / (2 * np.sin(np.pi / 45))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can **check that you get a similar result** with the virtual lab above!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ " \n", "\n", "---\n", "# How does the virtual lab work?\n", "\n", "You can have a look at the code of the virtual lab by [opening this python file](lib/suspendedobjects.py).\n", "\n", "By executing the following cell, you will see the code of the function used to compute the angle that the line makes with the horizon depending on the masses of the object and the counterweight. " ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "get_angle_from_masses??" ] } ], "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 + "nbformat_minor": 4 } diff --git a/TeachingExamples/SuspendedObjects-textbook.ipynb b/TeachingExamples/SuspendedObjects-textbook.ipynb index 1d4befd..ce670e5 100644 --- a/TeachingExamples/SuspendedObjects-textbook.ipynb +++ b/TeachingExamples/SuspendedObjects-textbook.ipynb @@ -1,279 +1,288 @@ { "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "
\n", + " WORK IN PROGRESS  This notebook is under development, please bear with us...\n", + "
" + ] + }, { "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 + "nbformat_minor": 4 }