|
83 | 83 | "\n", |
84 | 84 | "3. After the cord is fully extended, it obeys [Hooke's Law](https://en.wikipedia.org/wiki/Hooke%27s_law); that is, it applies a force to the jumper proportional to the extension of the cord beyond its resting length.\n", |
85 | 85 | "\n", |
86 | | - "4. The jumper is subject to drag force proportional to the square of their velocity, in the opposite of their direction of motion.\n", |
| 86 | + "4. The jumper is subject to drag force proportional to the square of their velocity, opposite to their direction of motion.\n", |
87 | 87 | "\n", |
88 | 88 | "Our objective is to choose the length of the cord, `L`, and its spring constant, `k`, so that the jumper falls all the way to the tea cup, but no farther! \n", |
89 | 89 | "\n", |
90 | | - "First I'll create a `Param` object to contain the quantities we'll need:\n", |
| 90 | + "First I'll create a `Params` object to contain the quantities we'll need:\n", |
91 | 91 | "\n", |
92 | 92 | "1. Let's assume that the jumper's mass is 75 kg.\n", |
93 | 93 | "\n", |
94 | | - "2. With a terminal velocity of 60 m/s.\n", |
| 94 | + "2. Let's assume the jumper's terminal velocity is 60 m/s.\n", |
95 | 95 | "\n", |
96 | | - "3. The length of the bungee cord is `L = 40 m`.\n", |
| 96 | + "3. The length of the bungee cord is `L = 25 m`.\n", |
97 | 97 | "\n", |
98 | | - "4. The spring constant of the cord is `k = 20 N / m` when the cord is stretched, and 0 when it's compressed.\n" |
| 98 | + "4. The spring constant of the cord is `k = 40 N / m` when the cord is stretched, and 0 when it's compressed.\n" |
99 | 99 | ] |
100 | 100 | }, |
101 | 101 | { |
|
155 | 155 | "cell_type": "markdown", |
156 | 156 | "metadata": {}, |
157 | 157 | "source": [ |
158 | | - "Let's make a `System`" |
| 158 | + "Let's make a `System`." |
159 | 159 | ] |
160 | 160 | }, |
161 | 161 | { |
|
173 | 173 | "source": [ |
174 | 174 | "`spring_force` computes the force of the cord on the jumper.\n", |
175 | 175 | "\n", |
176 | | - "If the spring is not extended, it returns `zero_force`, which is either 0 Newtons or 0, depending on whether the `System` object has units. I did that so the slope function works correctly with and without units." |
| 176 | + "If the cord is not extended, it returns 0." |
177 | 177 | ] |
178 | 178 | }, |
179 | 179 | { |
|
187 | 187 | " \n", |
188 | 188 | " y: height of the jumper\n", |
189 | 189 | " \n", |
190 | | - " Uses these variables from system|\n", |
| 190 | + " Uses these variables from system:\n", |
191 | 191 | " y_attach: height of the attachment point\n", |
192 | 192 | " L: resting length of the cord\n", |
193 | 193 | " k: spring constant of the cord\n", |
|
390 | 390 | "cell_type": "markdown", |
391 | 391 | "metadata": {}, |
392 | 392 | "source": [ |
393 | | - "After reaching the lowest point, the jumper springs back almost to almost 70 m and oscillates several times. That looks like more oscillation that we expect from an actual jump, which suggests that there is some dissipation of energy in the real world that is not captured in our model. To improve the model, that might be a good thing to investigate.\n", |
| 393 | + "After reaching the lowest point, the jumper springs back almost to 70 m and oscillates several times. That looks like more oscillation than we expect from an actual jump, which suggests that there is some dissipation of energy in the real world that is not captured in our model. To improve the model, that might be a good thing to investigate.\n", |
394 | 394 | "\n", |
395 | 395 | "But since we are primarily interested in the initial descent, the model might be good enough for now.\n", |
396 | 396 | "\n", |
|
450 | 450 | "source": [ |
451 | 451 | "Although we compute acceleration inside the slope function, we don't get acceleration as a result from `run_solve_ivp`.\n", |
452 | 452 | "\n", |
453 | | - "We can approximate it by computing the numerical derivative of `ys`:" |
| 453 | + "We can approximate it by computing the numerical derivative of `results.v`:" |
454 | 454 | ] |
455 | 455 | }, |
456 | 456 | { |
|
561 | 561 | "metadata": {}, |
562 | 562 | "outputs": [], |
563 | 563 | "source": [ |
564 | | - "event_func.direction = 10" |
| 564 | + "event_func.direction = 1" |
565 | 565 | ] |
566 | 566 | }, |
567 | 567 | { |
|
0 commit comments