Datasets:
Upload folder using huggingface_hub (part 12)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- scipy/compound_atwood/277/video.mp4 +3 -0
- scipy/compound_atwood/284/cot.json +150 -0
- scipy/compound_atwood/284/params.json +21 -0
- scipy/compound_atwood/284/simulation_code.py +112 -0
- scipy/compound_atwood/284/video.mp4 +3 -0
- scipy/compound_atwood/296/cot.json +150 -0
- scipy/compound_atwood/296/params.json +21 -0
- scipy/compound_atwood/296/simulation_code.py +112 -0
- scipy/compound_atwood/296/video.mp4 +3 -0
- scipy/compound_atwood/299/cot.json +150 -0
- scipy/compound_atwood/299/params.json +21 -0
- scipy/compound_atwood/299/simulation_code.py +112 -0
- scipy/compound_atwood/299/video.mp4 +3 -0
- scipy/conveyor_belt_drop/029/cot.json +123 -0
- scipy/conveyor_belt_drop/029/params.json +14 -0
- scipy/conveyor_belt_drop/029/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/029/video.mp4 +3 -0
- scipy/conveyor_belt_drop/034/cot.json +123 -0
- scipy/conveyor_belt_drop/034/params.json +14 -0
- scipy/conveyor_belt_drop/034/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/034/video.mp4 +3 -0
- scipy/conveyor_belt_drop/035/cot.json +123 -0
- scipy/conveyor_belt_drop/035/params.json +14 -0
- scipy/conveyor_belt_drop/035/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/035/video.mp4 +3 -0
- scipy/conveyor_belt_drop/041/cot.json +123 -0
- scipy/conveyor_belt_drop/041/params.json +14 -0
- scipy/conveyor_belt_drop/041/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/041/video.mp4 +3 -0
- scipy/conveyor_belt_drop/080/cot.json +123 -0
- scipy/conveyor_belt_drop/080/params.json +14 -0
- scipy/conveyor_belt_drop/080/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/080/video.mp4 +3 -0
- scipy/conveyor_belt_drop/095/cot.json +123 -0
- scipy/conveyor_belt_drop/095/params.json +14 -0
- scipy/conveyor_belt_drop/095/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/095/video.mp4 +3 -0
- scipy/conveyor_belt_drop/244/cot.json +123 -0
- scipy/conveyor_belt_drop/244/params.json +14 -0
- scipy/conveyor_belt_drop/244/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/244/video.mp4 +3 -0
- scipy/conveyor_belt_drop/257/cot.json +123 -0
- scipy/conveyor_belt_drop/257/params.json +14 -0
- scipy/conveyor_belt_drop/257/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/257/video.mp4 +3 -0
- scipy/conveyor_belt_drop/260/cot.json +123 -0
- scipy/conveyor_belt_drop/260/params.json +14 -0
- scipy/conveyor_belt_drop/260/simulation_code.py +122 -0
- scipy/conveyor_belt_drop/260/video.mp4 +3 -0
- scipy/conveyor_belt_drop/271/cot.json +123 -0
scipy/compound_atwood/277/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e4f39a6b15286240ba376082d91eb7f075c1a2e605684daf0f61cbbf3b47b030
|
| 3 |
+
size 8540
|
scipy/compound_atwood/284/cot.json
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "compound_atwood",
|
| 3 |
+
"physical_observation": "Compound (double) Atwood machine: a fixed pulley A on the ceiling carries a string with mass m1=2.444 kg on one side and the axle of a movable pulley B on the other. A rope over B carries mass m2=1.909 kg and m3=1.649 kg. Gravity g=9.800 m/s^2 drives the system; all motions start from rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + massless inextensible-cord constraints + massless pulleys",
|
| 6 |
+
"statement": "Each mass obeys m_i \\ddot{y}_i = m_i g - T_i; the cord constraints couple accelerations; a massless movable pulley enforces T_A = 2 T_B.",
|
| 7 |
+
"formula": "T_B = 4 g / (1/m2 + 1/m3 + 4/m1); T_A = 2 T_B; a_i = g - T_i/m_i; a_B = -a_1."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"y1, y2, y3 (cube depths, m, +y down)",
|
| 12 |
+
"yB (movable pulley depth)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"\\dot{y}_i = v_i; \\dot{v}_i = a_i (constants)",
|
| 16 |
+
"a1 = -1.793729; a2 = 2.379439; a3 = 1.208019; aB = 1.793729"
|
| 17 |
+
],
|
| 18 |
+
"equations_python": [
|
| 19 |
+
"y_dot_i = v_i; v_dot_i = a_i (constants)",
|
| 20 |
+
"a1 = -1.793729; a2 = 2.379439; a3 = 1.208019; aB = 1.793729"
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
"derivation_steps": [
|
| 24 |
+
"Massless movable pulley B: tension balance gives T_A = 2 T_B (so T_A = 28.3344 N, T_B = 14.1672 N).",
|
| 25 |
+
"Constraint on string A: y1 + yB = const => \\ddot{y}1 + \\ddot{y}B = 0 => a_B = -a_1.",
|
| 26 |
+
"Constraint on rope B: (y2 - yB) + (y3 - yB) = const => a_2 + a_3 - 2 a_B = 0.",
|
| 27 |
+
"Newton II for each mass (down = +): m_i \\ddot{y}_i = m_i g - T_i (T_1 = T_A on m1; T_2 = T_3 = T_B on m2, m3).",
|
| 28 |
+
"Solving the linear system yields T_B = 4 g / (1/m2 + 1/m3 + 4/m1).",
|
| 29 |
+
"Therefore a_1 = -1.7937 m/s^2, a_2 = +2.3794, a_3 = +1.2080, a_B = +1.7937."
|
| 30 |
+
],
|
| 31 |
+
"physical_constants_derived": {
|
| 32 |
+
"T_A_N": 28.334408699039933,
|
| 33 |
+
"T_B_N": 14.167204349519967,
|
| 34 |
+
"a_1_m_s2": -1.7937289008575554,
|
| 35 |
+
"a_2_m_s2": 2.379439052696598,
|
| 36 |
+
"a_3_m_s2": 1.2080187490185104,
|
| 37 |
+
"a_B_m_s2": 1.7937289008575554
|
| 38 |
+
},
|
| 39 |
+
"numerical_method": {
|
| 40 |
+
"solver": "Closed form (constant accelerations); positions are quadratic in t. No ODE integrator required.",
|
| 41 |
+
"tolerance": "Machine precision.",
|
| 42 |
+
"justification": "All four accelerations are time-independent, so y_i(t) = y_i_0 + v_i_0 t + 0.5 a_i t^2."
|
| 43 |
+
},
|
| 44 |
+
"code_validation": {
|
| 45 |
+
"ode_source": "Newton II for three point masses with two cord constraints and a tension ratio T_A=2 T_B.",
|
| 46 |
+
"energy_check": "\\SigmaKE - \\SigmaPE evolves consistent with constant accelerations (no friction).",
|
| 47 |
+
"physical_plausibility": true
|
| 48 |
+
},
|
| 49 |
+
"expected_behavior": [
|
| 50 |
+
"Mass with the largest a_i descends fastest. a_1, a_2, a_3, a_B = -1.794, +2.379, +1.208, +1.794 m/s^2.",
|
| 51 |
+
"Motion stops in the render once the descender reaches the floor."
|
| 52 |
+
],
|
| 53 |
+
"parameters": {
|
| 54 |
+
"m1": {
|
| 55 |
+
"value": 2.44394266429191,
|
| 56 |
+
"unit": "",
|
| 57 |
+
"description": ""
|
| 58 |
+
},
|
| 59 |
+
"m2": {
|
| 60 |
+
"value": 1.909182398760334,
|
| 61 |
+
"unit": "",
|
| 62 |
+
"description": ""
|
| 63 |
+
},
|
| 64 |
+
"m3": {
|
| 65 |
+
"value": 1.6488867859088496,
|
| 66 |
+
"unit": "",
|
| 67 |
+
"description": ""
|
| 68 |
+
},
|
| 69 |
+
"g": {
|
| 70 |
+
"value": 9.8,
|
| 71 |
+
"unit": "",
|
| 72 |
+
"description": ""
|
| 73 |
+
},
|
| 74 |
+
"x_A": {
|
| 75 |
+
"value": 2.0,
|
| 76 |
+
"unit": "",
|
| 77 |
+
"description": ""
|
| 78 |
+
},
|
| 79 |
+
"x_B": {
|
| 80 |
+
"value": 2.5,
|
| 81 |
+
"unit": "",
|
| 82 |
+
"description": ""
|
| 83 |
+
},
|
| 84 |
+
"r_pulley": {
|
| 85 |
+
"value": 0.5,
|
| 86 |
+
"unit": "",
|
| 87 |
+
"description": ""
|
| 88 |
+
},
|
| 89 |
+
"cube_side": {
|
| 90 |
+
"value": 0.45,
|
| 91 |
+
"unit": "",
|
| 92 |
+
"description": ""
|
| 93 |
+
},
|
| 94 |
+
"x_m1": {
|
| 95 |
+
"value": 1.5,
|
| 96 |
+
"unit": "",
|
| 97 |
+
"description": ""
|
| 98 |
+
},
|
| 99 |
+
"x_m2": {
|
| 100 |
+
"value": 2.0,
|
| 101 |
+
"unit": "",
|
| 102 |
+
"description": ""
|
| 103 |
+
},
|
| 104 |
+
"x_m3": {
|
| 105 |
+
"value": 3.0,
|
| 106 |
+
"unit": "",
|
| 107 |
+
"description": ""
|
| 108 |
+
},
|
| 109 |
+
"y1_0": {
|
| 110 |
+
"value": 1.5,
|
| 111 |
+
"unit": "",
|
| 112 |
+
"description": ""
|
| 113 |
+
},
|
| 114 |
+
"y2_0": {
|
| 115 |
+
"value": 5.0,
|
| 116 |
+
"unit": "",
|
| 117 |
+
"description": ""
|
| 118 |
+
},
|
| 119 |
+
"y3_0": {
|
| 120 |
+
"value": 3.5,
|
| 121 |
+
"unit": "",
|
| 122 |
+
"description": ""
|
| 123 |
+
},
|
| 124 |
+
"yB_0": {
|
| 125 |
+
"value": 2.5,
|
| 126 |
+
"unit": "",
|
| 127 |
+
"description": ""
|
| 128 |
+
},
|
| 129 |
+
"v1_0": {
|
| 130 |
+
"value": 0.0,
|
| 131 |
+
"unit": "",
|
| 132 |
+
"description": ""
|
| 133 |
+
},
|
| 134 |
+
"v2_0": {
|
| 135 |
+
"value": 0.0,
|
| 136 |
+
"unit": "",
|
| 137 |
+
"description": ""
|
| 138 |
+
},
|
| 139 |
+
"v3_0": {
|
| 140 |
+
"value": 0.0,
|
| 141 |
+
"unit": "",
|
| 142 |
+
"description": ""
|
| 143 |
+
},
|
| 144 |
+
"vB_0": {
|
| 145 |
+
"value": 0.0,
|
| 146 |
+
"unit": "",
|
| 147 |
+
"description": ""
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
}
|
scipy/compound_atwood/284/params.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"m1": 2.44394266429191,
|
| 3 |
+
"m2": 1.909182398760334,
|
| 4 |
+
"m3": 1.6488867859088496,
|
| 5 |
+
"g": 9.8,
|
| 6 |
+
"x_A": 2.0,
|
| 7 |
+
"x_B": 2.5,
|
| 8 |
+
"r_pulley": 0.5,
|
| 9 |
+
"cube_side": 0.45,
|
| 10 |
+
"x_m1": 1.5,
|
| 11 |
+
"x_m2": 2.0,
|
| 12 |
+
"x_m3": 3.0,
|
| 13 |
+
"y1_0": 1.5,
|
| 14 |
+
"y2_0": 5.0,
|
| 15 |
+
"y3_0": 3.5,
|
| 16 |
+
"yB_0": 2.5,
|
| 17 |
+
"v1_0": 0.0,
|
| 18 |
+
"v2_0": 0.0,
|
| 19 |
+
"v3_0": 0.0,
|
| 20 |
+
"vB_0": 0.0
|
| 21 |
+
}
|
scipy/compound_atwood/284/simulation_code.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Compound Atwood machine — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
import matplotlib.patches as patches
|
| 8 |
+
|
| 9 |
+
m1, m2, m3 = 2.44394266429191, 1.909182398760334, 1.6488867859088496
|
| 10 |
+
g = 9.8
|
| 11 |
+
r_pulley = 0.5
|
| 12 |
+
cube_side = 0.45
|
| 13 |
+
x_A, x_B = 2.0, 2.5
|
| 14 |
+
x_m1, x_m2, x_m3 = 1.5, 2.0, 3.0
|
| 15 |
+
y1_0 = 1.5; y2_0 = 5.0; y3_0 = 3.5; yB_0 = 2.5
|
| 16 |
+
v1_0 = 0.0; v2_0 = 0.0; v3_0 = 0.0; vB_0 = 0.0
|
| 17 |
+
duration = 12
|
| 18 |
+
fps = 30
|
| 19 |
+
|
| 20 |
+
T_B = 4.0 * g / (1.0/m2 + 1.0/m3 + 4.0/m1)
|
| 21 |
+
T_A = 2.0 * T_B
|
| 22 |
+
a1 = g - T_A/m1
|
| 23 |
+
a2 = g - T_B/m2
|
| 24 |
+
a3 = g - T_B/m3
|
| 25 |
+
aB = -a1
|
| 26 |
+
|
| 27 |
+
y_floor = max(y1_0, y2_0, y3_0) + 2.5
|
| 28 |
+
y_A = r_pulley + 0.05
|
| 29 |
+
|
| 30 |
+
n_frames = int(duration * fps) + 1
|
| 31 |
+
t_grid = np.linspace(0, duration, n_frames)
|
| 32 |
+
y1 = y1_0 + v1_0 * t_grid + 0.5 * a1 * t_grid ** 2
|
| 33 |
+
y2 = y2_0 + v2_0 * t_grid + 0.5 * a2 * t_grid ** 2
|
| 34 |
+
y3 = y3_0 + v3_0 * t_grid + 0.5 * a3 * t_grid ** 2
|
| 35 |
+
yB = yB_0 + vB_0 * t_grid + 0.5 * aB * t_grid ** 2
|
| 36 |
+
|
| 37 |
+
ok = ((y1 >= y_A) & (y2 >= yB + r_pulley) & (y3 >= yB + r_pulley)
|
| 38 |
+
& (yB >= r_pulley)
|
| 39 |
+
& (y1 + cube_side <= y_floor)
|
| 40 |
+
& (y2 + cube_side <= y_floor)
|
| 41 |
+
& (y3 + cube_side <= y_floor)
|
| 42 |
+
& (yB + r_pulley <= y_floor))
|
| 43 |
+
if not ok.all():
|
| 44 |
+
first_bad = int(np.argmax(~ok))
|
| 45 |
+
last_good = max(first_bad - 1, 0)
|
| 46 |
+
y1[first_bad:] = y1[last_good]
|
| 47 |
+
y2[first_bad:] = y2[last_good]
|
| 48 |
+
y3[first_bad:] = y3[last_good]
|
| 49 |
+
yB[first_bad:] = yB[last_good]
|
| 50 |
+
|
| 51 |
+
y_A = r_pulley + 0.05
|
| 52 |
+
y_floor_render = max(y1.max(), y2.max(), y3.max()) + cube_side + 0.5
|
| 53 |
+
|
| 54 |
+
fig_w, fig_h = 5.0, 8.0
|
| 55 |
+
fig_aspect = fig_w / fig_h
|
| 56 |
+
x_lo_d = min(x_m1, x_m2, x_m3) - cube_side/2 - 0.4
|
| 57 |
+
x_hi_d = max(x_m1, x_m2, x_m3) + cube_side/2 + 0.4
|
| 58 |
+
y_lo_d = -0.4
|
| 59 |
+
y_hi_d = y_floor_render + 0.4
|
| 60 |
+
dx, dy = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 61 |
+
if dx/dy < fig_aspect:
|
| 62 |
+
extra = (fig_aspect * dy - dx) / 2.0
|
| 63 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d - extra, x_hi_d + extra, y_lo_d, y_hi_d
|
| 64 |
+
else:
|
| 65 |
+
extra = (dx/fig_aspect - dy) / 2.0
|
| 66 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d, x_hi_d, y_lo_d - extra, y_hi_d + extra
|
| 67 |
+
|
| 68 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 69 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 70 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_hi, y_lo)
|
| 71 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 72 |
+
|
| 73 |
+
ax.add_patch(patches.Rectangle((x_lo, y_lo), x_hi - x_lo, -y_lo, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 74 |
+
ax.plot([x_lo, x_hi], [0, 0], color="#adb5bd", lw=2.5, zorder=2)
|
| 75 |
+
ax.add_patch(patches.Rectangle((x_lo, y_floor_render), x_hi - x_lo, y_hi - y_floor_render, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 76 |
+
ax.plot([x_lo, x_hi], [y_floor_render, y_floor_render], color="#adb5bd", lw=2.5, zorder=2)
|
| 77 |
+
|
| 78 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4))
|
| 79 |
+
ax.plot([x_A, x_A], [0, y_A - r_pulley], color="#adb5bd", lw=2.5, zorder=3)
|
| 80 |
+
ax.add_patch(patches.Arc((x_A, y_A), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5))
|
| 81 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6))
|
| 82 |
+
|
| 83 |
+
pulley_B_body = patches.Circle((x_B, yB_0), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4)
|
| 84 |
+
arc_B = patches.Arc((x_B, yB_0), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5)
|
| 85 |
+
hub_B = patches.Circle((x_B, yB_0), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6)
|
| 86 |
+
ax.add_patch(pulley_B_body); ax.add_patch(arc_B); ax.add_patch(hub_B)
|
| 87 |
+
|
| 88 |
+
cube1 = patches.Rectangle((x_m1 - cube_side/2, y1_0), cube_side, cube_side, facecolor="#e63946", edgecolor="white", lw=1.5, zorder=7)
|
| 89 |
+
cube2 = patches.Rectangle((x_m2 - cube_side/2, y2_0), cube_side, cube_side, facecolor="#f4d35e", edgecolor="white", lw=1.5, zorder=7)
|
| 90 |
+
cube3 = patches.Rectangle((x_m3 - cube_side/2, y3_0), cube_side, cube_side, facecolor="#a8dadc", edgecolor="white", lw=1.5, zorder=7)
|
| 91 |
+
ax.add_patch(cube1); ax.add_patch(cube2); ax.add_patch(cube3)
|
| 92 |
+
|
| 93 |
+
str_A_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 94 |
+
str_A_right, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 95 |
+
rope_B_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 96 |
+
rope_B_right,= ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 97 |
+
|
| 98 |
+
def update(f):
|
| 99 |
+
y1f, y2f, y3f, yBf = y1[f], y2[f], y3[f], yB[f]
|
| 100 |
+
cube1.set_y(y1f); cube2.set_y(y2f); cube3.set_y(y3f)
|
| 101 |
+
pulley_B_body.center = (x_B, yBf)
|
| 102 |
+
hub_B.center = (x_B, yBf)
|
| 103 |
+
arc_B.set_center((x_B, yBf))
|
| 104 |
+
str_A_left.set_data([x_A - r_pulley, x_A - r_pulley], [y_A, y1f])
|
| 105 |
+
str_A_right.set_data([x_A + r_pulley, x_B], [y_A, yBf - r_pulley])
|
| 106 |
+
rope_B_left.set_data([x_B - r_pulley, x_B - r_pulley], [yBf, y2f])
|
| 107 |
+
rope_B_right.set_data([x_B + r_pulley, x_B + r_pulley], [yBf, y3f])
|
| 108 |
+
return cube1, cube2, cube3, pulley_B_body, hub_B, arc_B, str_A_left, str_A_right, rope_B_left, rope_B_right
|
| 109 |
+
|
| 110 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000/fps, blit=True)
|
| 111 |
+
ani.save("compound_atwood.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 112 |
+
plt.close(); print("Saved compound_atwood.mp4")
|
scipy/compound_atwood/284/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8cce51920bf6542989aba203366a49fd35675b4c0f58f94e7cbe460ff2c907a1
|
| 3 |
+
size 7823
|
scipy/compound_atwood/296/cot.json
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "compound_atwood",
|
| 3 |
+
"physical_observation": "Compound (double) Atwood machine: a fixed pulley A on the ceiling carries a string with mass m1=2.256 kg on one side and the axle of a movable pulley B on the other. A rope over B carries mass m2=1.713 kg and m3=1.241 kg. Gravity g=9.800 m/s^2 drives the system; all motions start from rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + massless inextensible-cord constraints + massless pulleys",
|
| 6 |
+
"statement": "Each mass obeys m_i \\ddot{y}_i = m_i g - T_i; the cord constraints couple accelerations; a massless movable pulley enforces T_A = 2 T_B.",
|
| 7 |
+
"formula": "T_B = 4 g / (1/m2 + 1/m3 + 4/m1); T_A = 2 T_B; a_i = g - T_i/m_i; a_B = -a_1."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"y1, y2, y3 (cube depths, m, +y down)",
|
| 12 |
+
"yB (movable pulley depth)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"\\dot{y}_i = v_i; \\dot{v}_i = a_i (constants)",
|
| 16 |
+
"a1 = -1.186310; a2 = 2.563555; a3 = -0.190935; aB = 1.186310"
|
| 17 |
+
],
|
| 18 |
+
"equations_python": [
|
| 19 |
+
"y_dot_i = v_i; v_dot_i = a_i (constants)",
|
| 20 |
+
"a1 = -1.186310; a2 = 2.563555; a3 = -0.190935; aB = 1.186310"
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
"derivation_steps": [
|
| 24 |
+
"Massless movable pulley B: tension balance gives T_A = 2 T_B (so T_A = 24.7899 N, T_B = 12.3950 N).",
|
| 25 |
+
"Constraint on string A: y1 + yB = const => \\ddot{y}1 + \\ddot{y}B = 0 => a_B = -a_1.",
|
| 26 |
+
"Constraint on rope B: (y2 - yB) + (y3 - yB) = const => a_2 + a_3 - 2 a_B = 0.",
|
| 27 |
+
"Newton II for each mass (down = +): m_i \\ddot{y}_i = m_i g - T_i (T_1 = T_A on m1; T_2 = T_3 = T_B on m2, m3).",
|
| 28 |
+
"Solving the linear system yields T_B = 4 g / (1/m2 + 1/m3 + 4/m1).",
|
| 29 |
+
"Therefore a_1 = -1.1863 m/s^2, a_2 = +2.5636, a_3 = -0.1909, a_B = +1.1863."
|
| 30 |
+
],
|
| 31 |
+
"physical_constants_derived": {
|
| 32 |
+
"T_A_N": 24.789919133158584,
|
| 33 |
+
"T_B_N": 12.394959566579292,
|
| 34 |
+
"a_1_m_s2": -1.1863099226324891,
|
| 35 |
+
"a_2_m_s2": 2.563555066819448,
|
| 36 |
+
"a_3_m_s2": -0.1909352215544704,
|
| 37 |
+
"a_B_m_s2": 1.1863099226324891
|
| 38 |
+
},
|
| 39 |
+
"numerical_method": {
|
| 40 |
+
"solver": "Closed form (constant accelerations); positions are quadratic in t. No ODE integrator required.",
|
| 41 |
+
"tolerance": "Machine precision.",
|
| 42 |
+
"justification": "All four accelerations are time-independent, so y_i(t) = y_i_0 + v_i_0 t + 0.5 a_i t^2."
|
| 43 |
+
},
|
| 44 |
+
"code_validation": {
|
| 45 |
+
"ode_source": "Newton II for three point masses with two cord constraints and a tension ratio T_A=2 T_B.",
|
| 46 |
+
"energy_check": "\\SigmaKE - \\SigmaPE evolves consistent with constant accelerations (no friction).",
|
| 47 |
+
"physical_plausibility": true
|
| 48 |
+
},
|
| 49 |
+
"expected_behavior": [
|
| 50 |
+
"Mass with the largest a_i descends fastest. a_1, a_2, a_3, a_B = -1.186, +2.564, -0.191, +1.186 m/s^2.",
|
| 51 |
+
"Motion stops in the render once the descender reaches the floor."
|
| 52 |
+
],
|
| 53 |
+
"parameters": {
|
| 54 |
+
"m1": {
|
| 55 |
+
"value": 2.256437266719537,
|
| 56 |
+
"unit": "",
|
| 57 |
+
"description": ""
|
| 58 |
+
},
|
| 59 |
+
"m2": {
|
| 60 |
+
"value": 1.7128520538788201,
|
| 61 |
+
"unit": "",
|
| 62 |
+
"description": ""
|
| 63 |
+
},
|
| 64 |
+
"m3": {
|
| 65 |
+
"value": 1.2406205517015436,
|
| 66 |
+
"unit": "",
|
| 67 |
+
"description": ""
|
| 68 |
+
},
|
| 69 |
+
"g": {
|
| 70 |
+
"value": 9.8,
|
| 71 |
+
"unit": "",
|
| 72 |
+
"description": ""
|
| 73 |
+
},
|
| 74 |
+
"x_A": {
|
| 75 |
+
"value": 2.0,
|
| 76 |
+
"unit": "",
|
| 77 |
+
"description": ""
|
| 78 |
+
},
|
| 79 |
+
"x_B": {
|
| 80 |
+
"value": 2.5,
|
| 81 |
+
"unit": "",
|
| 82 |
+
"description": ""
|
| 83 |
+
},
|
| 84 |
+
"r_pulley": {
|
| 85 |
+
"value": 0.5,
|
| 86 |
+
"unit": "",
|
| 87 |
+
"description": ""
|
| 88 |
+
},
|
| 89 |
+
"cube_side": {
|
| 90 |
+
"value": 0.45,
|
| 91 |
+
"unit": "",
|
| 92 |
+
"description": ""
|
| 93 |
+
},
|
| 94 |
+
"x_m1": {
|
| 95 |
+
"value": 1.5,
|
| 96 |
+
"unit": "",
|
| 97 |
+
"description": ""
|
| 98 |
+
},
|
| 99 |
+
"x_m2": {
|
| 100 |
+
"value": 2.0,
|
| 101 |
+
"unit": "",
|
| 102 |
+
"description": ""
|
| 103 |
+
},
|
| 104 |
+
"x_m3": {
|
| 105 |
+
"value": 3.0,
|
| 106 |
+
"unit": "",
|
| 107 |
+
"description": ""
|
| 108 |
+
},
|
| 109 |
+
"y1_0": {
|
| 110 |
+
"value": 1.5,
|
| 111 |
+
"unit": "",
|
| 112 |
+
"description": ""
|
| 113 |
+
},
|
| 114 |
+
"y2_0": {
|
| 115 |
+
"value": 5.0,
|
| 116 |
+
"unit": "",
|
| 117 |
+
"description": ""
|
| 118 |
+
},
|
| 119 |
+
"y3_0": {
|
| 120 |
+
"value": 3.5,
|
| 121 |
+
"unit": "",
|
| 122 |
+
"description": ""
|
| 123 |
+
},
|
| 124 |
+
"yB_0": {
|
| 125 |
+
"value": 2.5,
|
| 126 |
+
"unit": "",
|
| 127 |
+
"description": ""
|
| 128 |
+
},
|
| 129 |
+
"v1_0": {
|
| 130 |
+
"value": 0.0,
|
| 131 |
+
"unit": "",
|
| 132 |
+
"description": ""
|
| 133 |
+
},
|
| 134 |
+
"v2_0": {
|
| 135 |
+
"value": 0.0,
|
| 136 |
+
"unit": "",
|
| 137 |
+
"description": ""
|
| 138 |
+
},
|
| 139 |
+
"v3_0": {
|
| 140 |
+
"value": 0.0,
|
| 141 |
+
"unit": "",
|
| 142 |
+
"description": ""
|
| 143 |
+
},
|
| 144 |
+
"vB_0": {
|
| 145 |
+
"value": 0.0,
|
| 146 |
+
"unit": "",
|
| 147 |
+
"description": ""
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
}
|
scipy/compound_atwood/296/params.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"m1": 2.256437266719537,
|
| 3 |
+
"m2": 1.7128520538788201,
|
| 4 |
+
"m3": 1.2406205517015436,
|
| 5 |
+
"g": 9.8,
|
| 6 |
+
"x_A": 2.0,
|
| 7 |
+
"x_B": 2.5,
|
| 8 |
+
"r_pulley": 0.5,
|
| 9 |
+
"cube_side": 0.45,
|
| 10 |
+
"x_m1": 1.5,
|
| 11 |
+
"x_m2": 2.0,
|
| 12 |
+
"x_m3": 3.0,
|
| 13 |
+
"y1_0": 1.5,
|
| 14 |
+
"y2_0": 5.0,
|
| 15 |
+
"y3_0": 3.5,
|
| 16 |
+
"yB_0": 2.5,
|
| 17 |
+
"v1_0": 0.0,
|
| 18 |
+
"v2_0": 0.0,
|
| 19 |
+
"v3_0": 0.0,
|
| 20 |
+
"vB_0": 0.0
|
| 21 |
+
}
|
scipy/compound_atwood/296/simulation_code.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Compound Atwood machine — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
import matplotlib.patches as patches
|
| 8 |
+
|
| 9 |
+
m1, m2, m3 = 2.256437266719537, 1.7128520538788201, 1.2406205517015436
|
| 10 |
+
g = 9.8
|
| 11 |
+
r_pulley = 0.5
|
| 12 |
+
cube_side = 0.45
|
| 13 |
+
x_A, x_B = 2.0, 2.5
|
| 14 |
+
x_m1, x_m2, x_m3 = 1.5, 2.0, 3.0
|
| 15 |
+
y1_0 = 1.5; y2_0 = 5.0; y3_0 = 3.5; yB_0 = 2.5
|
| 16 |
+
v1_0 = 0.0; v2_0 = 0.0; v3_0 = 0.0; vB_0 = 0.0
|
| 17 |
+
duration = 12
|
| 18 |
+
fps = 30
|
| 19 |
+
|
| 20 |
+
T_B = 4.0 * g / (1.0/m2 + 1.0/m3 + 4.0/m1)
|
| 21 |
+
T_A = 2.0 * T_B
|
| 22 |
+
a1 = g - T_A/m1
|
| 23 |
+
a2 = g - T_B/m2
|
| 24 |
+
a3 = g - T_B/m3
|
| 25 |
+
aB = -a1
|
| 26 |
+
|
| 27 |
+
y_floor = max(y1_0, y2_0, y3_0) + 2.5
|
| 28 |
+
y_A = r_pulley + 0.05
|
| 29 |
+
|
| 30 |
+
n_frames = int(duration * fps) + 1
|
| 31 |
+
t_grid = np.linspace(0, duration, n_frames)
|
| 32 |
+
y1 = y1_0 + v1_0 * t_grid + 0.5 * a1 * t_grid ** 2
|
| 33 |
+
y2 = y2_0 + v2_0 * t_grid + 0.5 * a2 * t_grid ** 2
|
| 34 |
+
y3 = y3_0 + v3_0 * t_grid + 0.5 * a3 * t_grid ** 2
|
| 35 |
+
yB = yB_0 + vB_0 * t_grid + 0.5 * aB * t_grid ** 2
|
| 36 |
+
|
| 37 |
+
ok = ((y1 >= y_A) & (y2 >= yB + r_pulley) & (y3 >= yB + r_pulley)
|
| 38 |
+
& (yB >= r_pulley)
|
| 39 |
+
& (y1 + cube_side <= y_floor)
|
| 40 |
+
& (y2 + cube_side <= y_floor)
|
| 41 |
+
& (y3 + cube_side <= y_floor)
|
| 42 |
+
& (yB + r_pulley <= y_floor))
|
| 43 |
+
if not ok.all():
|
| 44 |
+
first_bad = int(np.argmax(~ok))
|
| 45 |
+
last_good = max(first_bad - 1, 0)
|
| 46 |
+
y1[first_bad:] = y1[last_good]
|
| 47 |
+
y2[first_bad:] = y2[last_good]
|
| 48 |
+
y3[first_bad:] = y3[last_good]
|
| 49 |
+
yB[first_bad:] = yB[last_good]
|
| 50 |
+
|
| 51 |
+
y_A = r_pulley + 0.05
|
| 52 |
+
y_floor_render = max(y1.max(), y2.max(), y3.max()) + cube_side + 0.5
|
| 53 |
+
|
| 54 |
+
fig_w, fig_h = 5.0, 8.0
|
| 55 |
+
fig_aspect = fig_w / fig_h
|
| 56 |
+
x_lo_d = min(x_m1, x_m2, x_m3) - cube_side/2 - 0.4
|
| 57 |
+
x_hi_d = max(x_m1, x_m2, x_m3) + cube_side/2 + 0.4
|
| 58 |
+
y_lo_d = -0.4
|
| 59 |
+
y_hi_d = y_floor_render + 0.4
|
| 60 |
+
dx, dy = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 61 |
+
if dx/dy < fig_aspect:
|
| 62 |
+
extra = (fig_aspect * dy - dx) / 2.0
|
| 63 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d - extra, x_hi_d + extra, y_lo_d, y_hi_d
|
| 64 |
+
else:
|
| 65 |
+
extra = (dx/fig_aspect - dy) / 2.0
|
| 66 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d, x_hi_d, y_lo_d - extra, y_hi_d + extra
|
| 67 |
+
|
| 68 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 69 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 70 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_hi, y_lo)
|
| 71 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 72 |
+
|
| 73 |
+
ax.add_patch(patches.Rectangle((x_lo, y_lo), x_hi - x_lo, -y_lo, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 74 |
+
ax.plot([x_lo, x_hi], [0, 0], color="#adb5bd", lw=2.5, zorder=2)
|
| 75 |
+
ax.add_patch(patches.Rectangle((x_lo, y_floor_render), x_hi - x_lo, y_hi - y_floor_render, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 76 |
+
ax.plot([x_lo, x_hi], [y_floor_render, y_floor_render], color="#adb5bd", lw=2.5, zorder=2)
|
| 77 |
+
|
| 78 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4))
|
| 79 |
+
ax.plot([x_A, x_A], [0, y_A - r_pulley], color="#adb5bd", lw=2.5, zorder=3)
|
| 80 |
+
ax.add_patch(patches.Arc((x_A, y_A), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5))
|
| 81 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6))
|
| 82 |
+
|
| 83 |
+
pulley_B_body = patches.Circle((x_B, yB_0), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4)
|
| 84 |
+
arc_B = patches.Arc((x_B, yB_0), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5)
|
| 85 |
+
hub_B = patches.Circle((x_B, yB_0), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6)
|
| 86 |
+
ax.add_patch(pulley_B_body); ax.add_patch(arc_B); ax.add_patch(hub_B)
|
| 87 |
+
|
| 88 |
+
cube1 = patches.Rectangle((x_m1 - cube_side/2, y1_0), cube_side, cube_side, facecolor="#e63946", edgecolor="white", lw=1.5, zorder=7)
|
| 89 |
+
cube2 = patches.Rectangle((x_m2 - cube_side/2, y2_0), cube_side, cube_side, facecolor="#f4d35e", edgecolor="white", lw=1.5, zorder=7)
|
| 90 |
+
cube3 = patches.Rectangle((x_m3 - cube_side/2, y3_0), cube_side, cube_side, facecolor="#a8dadc", edgecolor="white", lw=1.5, zorder=7)
|
| 91 |
+
ax.add_patch(cube1); ax.add_patch(cube2); ax.add_patch(cube3)
|
| 92 |
+
|
| 93 |
+
str_A_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 94 |
+
str_A_right, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 95 |
+
rope_B_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 96 |
+
rope_B_right,= ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 97 |
+
|
| 98 |
+
def update(f):
|
| 99 |
+
y1f, y2f, y3f, yBf = y1[f], y2[f], y3[f], yB[f]
|
| 100 |
+
cube1.set_y(y1f); cube2.set_y(y2f); cube3.set_y(y3f)
|
| 101 |
+
pulley_B_body.center = (x_B, yBf)
|
| 102 |
+
hub_B.center = (x_B, yBf)
|
| 103 |
+
arc_B.set_center((x_B, yBf))
|
| 104 |
+
str_A_left.set_data([x_A - r_pulley, x_A - r_pulley], [y_A, y1f])
|
| 105 |
+
str_A_right.set_data([x_A + r_pulley, x_B], [y_A, yBf - r_pulley])
|
| 106 |
+
rope_B_left.set_data([x_B - r_pulley, x_B - r_pulley], [yBf, y2f])
|
| 107 |
+
rope_B_right.set_data([x_B + r_pulley, x_B + r_pulley], [yBf, y3f])
|
| 108 |
+
return cube1, cube2, cube3, pulley_B_body, hub_B, arc_B, str_A_left, str_A_right, rope_B_left, rope_B_right
|
| 109 |
+
|
| 110 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000/fps, blit=True)
|
| 111 |
+
ani.save("compound_atwood.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 112 |
+
plt.close(); print("Saved compound_atwood.mp4")
|
scipy/compound_atwood/296/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1973d99a57eacb6e7e61d2e2d3bb0a77e57e3a0ea3124c2a2537bc1a0ea6a53e
|
| 3 |
+
size 7483
|
scipy/compound_atwood/299/cot.json
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "compound_atwood",
|
| 3 |
+
"physical_observation": "Compound (double) Atwood machine: a fixed pulley A on the ceiling carries a string with mass m1=2.376 kg on one side and the axle of a movable pulley B on the other. A rope over B carries mass m2=0.848 kg and m3=1.121 kg. Gravity g=9.800 m/s^2 drives the system; all motions start from rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + massless inextensible-cord constraints + massless pulleys",
|
| 6 |
+
"statement": "Each mass obeys m_i \\ddot{y}_i = m_i g - T_i; the cord constraints couple accelerations; a massless movable pulley enforces T_A = 2 T_B.",
|
| 7 |
+
"formula": "T_B = 4 g / (1/m2 + 1/m3 + 4/m1); T_A = 2 T_B; a_i = g - T_i/m_i; a_B = -a_1."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"y1, y2, y3 (cube depths, m, +y down)",
|
| 12 |
+
"yB (movable pulley depth)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"\\dot{y}_i = v_i; \\dot{v}_i = a_i (constants)",
|
| 16 |
+
"a1 = 1.013799; a2 = -2.512182; a3 = 0.484585; aB = -1.013799"
|
| 17 |
+
],
|
| 18 |
+
"equations_python": [
|
| 19 |
+
"y_dot_i = v_i; v_dot_i = a_i (constants)",
|
| 20 |
+
"a1 = 1.013799; a2 = -2.512182; a3 = 0.484585; aB = -1.013799"
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
"derivation_steps": [
|
| 24 |
+
"Massless movable pulley B: tension balance gives T_A = 2 T_B (so T_A = 20.8799 N, T_B = 10.4400 N).",
|
| 25 |
+
"Constraint on string A: y1 + yB = const => \\ddot{y}1 + \\ddot{y}B = 0 => a_B = -a_1.",
|
| 26 |
+
"Constraint on rope B: (y2 - yB) + (y3 - yB) = const => a_2 + a_3 - 2 a_B = 0.",
|
| 27 |
+
"Newton II for each mass (down = +): m_i \\ddot{y}_i = m_i g - T_i (T_1 = T_A on m1; T_2 = T_3 = T_B on m2, m3).",
|
| 28 |
+
"Solving the linear system yields T_B = 4 g / (1/m2 + 1/m3 + 4/m1).",
|
| 29 |
+
"Therefore a_1 = +1.0138 m/s^2, a_2 = -2.5122, a_3 = +0.4846, a_B = -1.0138."
|
| 30 |
+
],
|
| 31 |
+
"physical_constants_derived": {
|
| 32 |
+
"T_A_N": 20.87993613401704,
|
| 33 |
+
"T_B_N": 10.43996806700852,
|
| 34 |
+
"a_1_m_s2": 1.0137985734817132,
|
| 35 |
+
"a_2_m_s2": -2.5121818299273873,
|
| 36 |
+
"a_3_m_s2": 0.4845846829639662,
|
| 37 |
+
"a_B_m_s2": -1.0137985734817132
|
| 38 |
+
},
|
| 39 |
+
"numerical_method": {
|
| 40 |
+
"solver": "Closed form (constant accelerations); positions are quadratic in t. No ODE integrator required.",
|
| 41 |
+
"tolerance": "Machine precision.",
|
| 42 |
+
"justification": "All four accelerations are time-independent, so y_i(t) = y_i_0 + v_i_0 t + 0.5 a_i t^2."
|
| 43 |
+
},
|
| 44 |
+
"code_validation": {
|
| 45 |
+
"ode_source": "Newton II for three point masses with two cord constraints and a tension ratio T_A=2 T_B.",
|
| 46 |
+
"energy_check": "\\SigmaKE - \\SigmaPE evolves consistent with constant accelerations (no friction).",
|
| 47 |
+
"physical_plausibility": true
|
| 48 |
+
},
|
| 49 |
+
"expected_behavior": [
|
| 50 |
+
"Mass with the largest a_i descends fastest. a_1, a_2, a_3, a_B = +1.014, -2.512, +0.485, -1.014 m/s^2.",
|
| 51 |
+
"Motion stops in the render once the descender reaches the floor."
|
| 52 |
+
],
|
| 53 |
+
"parameters": {
|
| 54 |
+
"m1": {
|
| 55 |
+
"value": 2.37644632992339,
|
| 56 |
+
"unit": "",
|
| 57 |
+
"description": ""
|
| 58 |
+
},
|
| 59 |
+
"m2": {
|
| 60 |
+
"value": 0.8479380999419572,
|
| 61 |
+
"unit": "",
|
| 62 |
+
"description": ""
|
| 63 |
+
},
|
| 64 |
+
"m3": {
|
| 65 |
+
"value": 1.120719550519224,
|
| 66 |
+
"unit": "",
|
| 67 |
+
"description": ""
|
| 68 |
+
},
|
| 69 |
+
"g": {
|
| 70 |
+
"value": 9.8,
|
| 71 |
+
"unit": "",
|
| 72 |
+
"description": ""
|
| 73 |
+
},
|
| 74 |
+
"x_A": {
|
| 75 |
+
"value": 2.0,
|
| 76 |
+
"unit": "",
|
| 77 |
+
"description": ""
|
| 78 |
+
},
|
| 79 |
+
"x_B": {
|
| 80 |
+
"value": 2.5,
|
| 81 |
+
"unit": "",
|
| 82 |
+
"description": ""
|
| 83 |
+
},
|
| 84 |
+
"r_pulley": {
|
| 85 |
+
"value": 0.5,
|
| 86 |
+
"unit": "",
|
| 87 |
+
"description": ""
|
| 88 |
+
},
|
| 89 |
+
"cube_side": {
|
| 90 |
+
"value": 0.45,
|
| 91 |
+
"unit": "",
|
| 92 |
+
"description": ""
|
| 93 |
+
},
|
| 94 |
+
"x_m1": {
|
| 95 |
+
"value": 1.5,
|
| 96 |
+
"unit": "",
|
| 97 |
+
"description": ""
|
| 98 |
+
},
|
| 99 |
+
"x_m2": {
|
| 100 |
+
"value": 2.0,
|
| 101 |
+
"unit": "",
|
| 102 |
+
"description": ""
|
| 103 |
+
},
|
| 104 |
+
"x_m3": {
|
| 105 |
+
"value": 3.0,
|
| 106 |
+
"unit": "",
|
| 107 |
+
"description": ""
|
| 108 |
+
},
|
| 109 |
+
"y1_0": {
|
| 110 |
+
"value": 1.5,
|
| 111 |
+
"unit": "",
|
| 112 |
+
"description": ""
|
| 113 |
+
},
|
| 114 |
+
"y2_0": {
|
| 115 |
+
"value": 5.0,
|
| 116 |
+
"unit": "",
|
| 117 |
+
"description": ""
|
| 118 |
+
},
|
| 119 |
+
"y3_0": {
|
| 120 |
+
"value": 3.5,
|
| 121 |
+
"unit": "",
|
| 122 |
+
"description": ""
|
| 123 |
+
},
|
| 124 |
+
"yB_0": {
|
| 125 |
+
"value": 2.5,
|
| 126 |
+
"unit": "",
|
| 127 |
+
"description": ""
|
| 128 |
+
},
|
| 129 |
+
"v1_0": {
|
| 130 |
+
"value": 0.0,
|
| 131 |
+
"unit": "",
|
| 132 |
+
"description": ""
|
| 133 |
+
},
|
| 134 |
+
"v2_0": {
|
| 135 |
+
"value": 0.0,
|
| 136 |
+
"unit": "",
|
| 137 |
+
"description": ""
|
| 138 |
+
},
|
| 139 |
+
"v3_0": {
|
| 140 |
+
"value": 0.0,
|
| 141 |
+
"unit": "",
|
| 142 |
+
"description": ""
|
| 143 |
+
},
|
| 144 |
+
"vB_0": {
|
| 145 |
+
"value": 0.0,
|
| 146 |
+
"unit": "",
|
| 147 |
+
"description": ""
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
}
|
scipy/compound_atwood/299/params.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"m1": 2.37644632992339,
|
| 3 |
+
"m2": 0.8479380999419572,
|
| 4 |
+
"m3": 1.120719550519224,
|
| 5 |
+
"g": 9.8,
|
| 6 |
+
"x_A": 2.0,
|
| 7 |
+
"x_B": 2.5,
|
| 8 |
+
"r_pulley": 0.5,
|
| 9 |
+
"cube_side": 0.45,
|
| 10 |
+
"x_m1": 1.5,
|
| 11 |
+
"x_m2": 2.0,
|
| 12 |
+
"x_m3": 3.0,
|
| 13 |
+
"y1_0": 1.5,
|
| 14 |
+
"y2_0": 5.0,
|
| 15 |
+
"y3_0": 3.5,
|
| 16 |
+
"yB_0": 2.5,
|
| 17 |
+
"v1_0": 0.0,
|
| 18 |
+
"v2_0": 0.0,
|
| 19 |
+
"v3_0": 0.0,
|
| 20 |
+
"vB_0": 0.0
|
| 21 |
+
}
|
scipy/compound_atwood/299/simulation_code.py
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Compound Atwood machine — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
import matplotlib.patches as patches
|
| 8 |
+
|
| 9 |
+
m1, m2, m3 = 2.37644632992339, 0.8479380999419572, 1.120719550519224
|
| 10 |
+
g = 9.8
|
| 11 |
+
r_pulley = 0.5
|
| 12 |
+
cube_side = 0.45
|
| 13 |
+
x_A, x_B = 2.0, 2.5
|
| 14 |
+
x_m1, x_m2, x_m3 = 1.5, 2.0, 3.0
|
| 15 |
+
y1_0 = 1.5; y2_0 = 5.0; y3_0 = 3.5; yB_0 = 2.5
|
| 16 |
+
v1_0 = 0.0; v2_0 = 0.0; v3_0 = 0.0; vB_0 = 0.0
|
| 17 |
+
duration = 12
|
| 18 |
+
fps = 30
|
| 19 |
+
|
| 20 |
+
T_B = 4.0 * g / (1.0/m2 + 1.0/m3 + 4.0/m1)
|
| 21 |
+
T_A = 2.0 * T_B
|
| 22 |
+
a1 = g - T_A/m1
|
| 23 |
+
a2 = g - T_B/m2
|
| 24 |
+
a3 = g - T_B/m3
|
| 25 |
+
aB = -a1
|
| 26 |
+
|
| 27 |
+
y_floor = max(y1_0, y2_0, y3_0) + 2.5
|
| 28 |
+
y_A = r_pulley + 0.05
|
| 29 |
+
|
| 30 |
+
n_frames = int(duration * fps) + 1
|
| 31 |
+
t_grid = np.linspace(0, duration, n_frames)
|
| 32 |
+
y1 = y1_0 + v1_0 * t_grid + 0.5 * a1 * t_grid ** 2
|
| 33 |
+
y2 = y2_0 + v2_0 * t_grid + 0.5 * a2 * t_grid ** 2
|
| 34 |
+
y3 = y3_0 + v3_0 * t_grid + 0.5 * a3 * t_grid ** 2
|
| 35 |
+
yB = yB_0 + vB_0 * t_grid + 0.5 * aB * t_grid ** 2
|
| 36 |
+
|
| 37 |
+
ok = ((y1 >= y_A) & (y2 >= yB + r_pulley) & (y3 >= yB + r_pulley)
|
| 38 |
+
& (yB >= r_pulley)
|
| 39 |
+
& (y1 + cube_side <= y_floor)
|
| 40 |
+
& (y2 + cube_side <= y_floor)
|
| 41 |
+
& (y3 + cube_side <= y_floor)
|
| 42 |
+
& (yB + r_pulley <= y_floor))
|
| 43 |
+
if not ok.all():
|
| 44 |
+
first_bad = int(np.argmax(~ok))
|
| 45 |
+
last_good = max(first_bad - 1, 0)
|
| 46 |
+
y1[first_bad:] = y1[last_good]
|
| 47 |
+
y2[first_bad:] = y2[last_good]
|
| 48 |
+
y3[first_bad:] = y3[last_good]
|
| 49 |
+
yB[first_bad:] = yB[last_good]
|
| 50 |
+
|
| 51 |
+
y_A = r_pulley + 0.05
|
| 52 |
+
y_floor_render = max(y1.max(), y2.max(), y3.max()) + cube_side + 0.5
|
| 53 |
+
|
| 54 |
+
fig_w, fig_h = 5.0, 8.0
|
| 55 |
+
fig_aspect = fig_w / fig_h
|
| 56 |
+
x_lo_d = min(x_m1, x_m2, x_m3) - cube_side/2 - 0.4
|
| 57 |
+
x_hi_d = max(x_m1, x_m2, x_m3) + cube_side/2 + 0.4
|
| 58 |
+
y_lo_d = -0.4
|
| 59 |
+
y_hi_d = y_floor_render + 0.4
|
| 60 |
+
dx, dy = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 61 |
+
if dx/dy < fig_aspect:
|
| 62 |
+
extra = (fig_aspect * dy - dx) / 2.0
|
| 63 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d - extra, x_hi_d + extra, y_lo_d, y_hi_d
|
| 64 |
+
else:
|
| 65 |
+
extra = (dx/fig_aspect - dy) / 2.0
|
| 66 |
+
x_lo, x_hi, y_lo, y_hi = x_lo_d, x_hi_d, y_lo_d - extra, y_hi_d + extra
|
| 67 |
+
|
| 68 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 69 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 70 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_hi, y_lo)
|
| 71 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 72 |
+
|
| 73 |
+
ax.add_patch(patches.Rectangle((x_lo, y_lo), x_hi - x_lo, -y_lo, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 74 |
+
ax.plot([x_lo, x_hi], [0, 0], color="#adb5bd", lw=2.5, zorder=2)
|
| 75 |
+
ax.add_patch(patches.Rectangle((x_lo, y_floor_render), x_hi - x_lo, y_hi - y_floor_render, facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 76 |
+
ax.plot([x_lo, x_hi], [y_floor_render, y_floor_render], color="#adb5bd", lw=2.5, zorder=2)
|
| 77 |
+
|
| 78 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4))
|
| 79 |
+
ax.plot([x_A, x_A], [0, y_A - r_pulley], color="#adb5bd", lw=2.5, zorder=3)
|
| 80 |
+
ax.add_patch(patches.Arc((x_A, y_A), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5))
|
| 81 |
+
ax.add_patch(patches.Circle((x_A, y_A), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6))
|
| 82 |
+
|
| 83 |
+
pulley_B_body = patches.Circle((x_B, yB_0), r_pulley, facecolor="#4a4e69", edgecolor="white", lw=1.6, zorder=4)
|
| 84 |
+
arc_B = patches.Arc((x_B, yB_0), 2*r_pulley, 2*r_pulley, angle=0, theta1=180, theta2=360, color="#a8dadc", lw=2.5, zorder=5)
|
| 85 |
+
hub_B = patches.Circle((x_B, yB_0), r_pulley * 0.18, facecolor="#1a1a2e", edgecolor="#adb5bd", lw=1.0, zorder=6)
|
| 86 |
+
ax.add_patch(pulley_B_body); ax.add_patch(arc_B); ax.add_patch(hub_B)
|
| 87 |
+
|
| 88 |
+
cube1 = patches.Rectangle((x_m1 - cube_side/2, y1_0), cube_side, cube_side, facecolor="#e63946", edgecolor="white", lw=1.5, zorder=7)
|
| 89 |
+
cube2 = patches.Rectangle((x_m2 - cube_side/2, y2_0), cube_side, cube_side, facecolor="#f4d35e", edgecolor="white", lw=1.5, zorder=7)
|
| 90 |
+
cube3 = patches.Rectangle((x_m3 - cube_side/2, y3_0), cube_side, cube_side, facecolor="#a8dadc", edgecolor="white", lw=1.5, zorder=7)
|
| 91 |
+
ax.add_patch(cube1); ax.add_patch(cube2); ax.add_patch(cube3)
|
| 92 |
+
|
| 93 |
+
str_A_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 94 |
+
str_A_right, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 95 |
+
rope_B_left, = ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 96 |
+
rope_B_right,= ax.plot([], [], color="#a8dadc", lw=2.5, zorder=5)
|
| 97 |
+
|
| 98 |
+
def update(f):
|
| 99 |
+
y1f, y2f, y3f, yBf = y1[f], y2[f], y3[f], yB[f]
|
| 100 |
+
cube1.set_y(y1f); cube2.set_y(y2f); cube3.set_y(y3f)
|
| 101 |
+
pulley_B_body.center = (x_B, yBf)
|
| 102 |
+
hub_B.center = (x_B, yBf)
|
| 103 |
+
arc_B.set_center((x_B, yBf))
|
| 104 |
+
str_A_left.set_data([x_A - r_pulley, x_A - r_pulley], [y_A, y1f])
|
| 105 |
+
str_A_right.set_data([x_A + r_pulley, x_B], [y_A, yBf - r_pulley])
|
| 106 |
+
rope_B_left.set_data([x_B - r_pulley, x_B - r_pulley], [yBf, y2f])
|
| 107 |
+
rope_B_right.set_data([x_B + r_pulley, x_B + r_pulley], [yBf, y3f])
|
| 108 |
+
return cube1, cube2, cube3, pulley_B_body, hub_B, arc_B, str_A_left, str_A_right, rope_B_left, rope_B_right
|
| 109 |
+
|
| 110 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000/fps, blit=True)
|
| 111 |
+
ani.save("compound_atwood.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 112 |
+
plt.close(); print("Saved compound_atwood.mp4")
|
scipy/compound_atwood/299/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a7a477e8d0fc66e0a06b83c050515e40cd1778480a342b5ae4711a759023fbc
|
| 3 |
+
size 9970
|
scipy/conveyor_belt_drop/029/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.450 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.261 m/s rightward. Coulomb friction mu_belt=0.25272488955055605, mu_floor=0.3741802575064322 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 2.4792; ends when vx = v_belt = 1.2609200575127593",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -3.6707; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 2.4792; ends * when * vx = v_belt = 1.2609200575127593",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -3.6707; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.270 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2345 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 2.4792 m/s^2; t2 = v_belt/a = 0.5086 s; dx2 = 0.3206 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 0.9102 m -> t3 = 0.7219 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.5693 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 3.6707; t5 = 0.3435 s; dx5 = v_belt^2/(2 a_fl) = 0.2166 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.23448536522336647,
|
| 38 |
+
"t2_slip_s": 0.5085931778186846,
|
| 39 |
+
"t3_ride_s": 0.7218831934446154,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.34350864887141697,
|
| 42 |
+
"dx2_slip_m": 0.32064766951286644,
|
| 43 |
+
"dx4_off_belt_m": 0.5693352153600982,
|
| 44 |
+
"dx5_floor_m": 0.21656847264553863,
|
| 45 |
+
"final_x_m": 2.585903688005637
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.509 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.344 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.586 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.2609200575127593,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.25272488955055605,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.3741802575064322,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5691153326914549,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.4496935108018039,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/029/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.2609200575127593,
|
| 4 |
+
"mu_belt": 0.25272488955055605,
|
| 5 |
+
"mu_floor": 0.3741802575064322,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5691153326914549,
|
| 13 |
+
"y_drop_top": 1.4496935108018039
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/029/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.2609200575127593
|
| 12 |
+
mu_belt = 0.25272488955055605
|
| 13 |
+
mu_floor = 0.3741802575064322
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5691153326914549
|
| 21 |
+
y_drop_top = 1.4496935108018039
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/029/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aa153076e104cb89da33c3318a658047b22f656138788fcb6f7d8cd5034be046
|
| 3 |
+
size 15614
|
scipy/conveyor_belt_drop/034/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.633 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.087 m/s rightward. Coulomb friction mu_belt=0.3765730539484565, mu_floor=0.4102183112577019 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 3.6942; ends when vx = v_belt = 1.087473851973722",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -4.0242; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 3.6942; ends * when * vx = v_belt = 1.087473851973722",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -4.0242; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.453 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.3037 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 3.6942 m/s^2; t2 = v_belt/a = 0.2944 s; dx2 = 0.1601 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 1.1756 m -> t3 = 1.0811 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.4910 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 4.0242; t5 = 0.2702 s; dx5 = v_belt^2/(2 a_fl) = 0.1469 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.30374564271843263,
|
| 38 |
+
"t2_slip_s": 0.2943747634216525,
|
| 39 |
+
"t3_ride_s": 1.0810755895105577,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.27023075427124726,
|
| 42 |
+
"dx2_slip_m": 0.16006242895099876,
|
| 43 |
+
"dx4_off_belt_m": 0.4910201531199527,
|
| 44 |
+
"dx5_floor_m": 0.1469344396345588,
|
| 45 |
+
"final_x_m": 2.4379545927545117
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.294 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.270 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.438 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.087473851973722,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.3765730539484565,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.4102183112577019,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.4642961354491928,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.6325422428824774,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/034/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.087473851973722,
|
| 4 |
+
"mu_belt": 0.3765730539484565,
|
| 5 |
+
"mu_floor": 0.4102183112577019,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.4642961354491928,
|
| 13 |
+
"y_drop_top": 1.6325422428824774
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/034/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.087473851973722
|
| 12 |
+
mu_belt = 0.3765730539484565
|
| 13 |
+
mu_floor = 0.4102183112577019
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.4642961354491928
|
| 21 |
+
y_drop_top = 1.6325422428824774
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/034/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:345e0338afd359b7e5692d590c10e57b70dfda0d638160bcdcb12847242da690
|
| 3 |
+
size 15181
|
scipy/conveyor_belt_drop/035/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.545 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=0.955 m/s rightward. Coulomb friction mu_belt=0.27619220618152307, mu_floor=0.2804261022675867 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 2.7094; ends when vx = v_belt = 0.9552151069878713",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -2.7510; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 2.7094; ends * when * vx = v_belt = 0.9552151069878713",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -2.7510; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.365 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2726 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 2.7094 m/s^2; t2 = v_belt/a = 0.3526 s; dx2 = 0.1684 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 0.9929 m -> t3 = 1.0394 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.4313 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 2.7510; t5 = 0.3472 s; dx5 = v_belt^2/(2 a_fl) = 0.1658 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.2726143740529498,
|
| 38 |
+
"t2_slip_s": 0.3525500298695348,
|
| 39 |
+
"t3_ride_s": 1.039444136553637,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.3472272008620485,
|
| 42 |
+
"dx2_slip_m": 0.16838055725020246,
|
| 43 |
+
"dx4_off_belt_m": 0.4313022030317381,
|
| 44 |
+
"dx5_floor_m": 0.16583833391027034,
|
| 45 |
+
"final_x_m": 2.3971405369420085
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.353 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.347 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.397 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 0.9552151069878713,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.27619220618152307,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.2804261022675867,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.6387267006437998,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.5445327179920814,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/035/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 0.9552151069878713,
|
| 4 |
+
"mu_belt": 0.27619220618152307,
|
| 5 |
+
"mu_floor": 0.2804261022675867,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.6387267006437998,
|
| 13 |
+
"y_drop_top": 1.5445327179920814
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/035/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 0.9552151069878713
|
| 12 |
+
mu_belt = 0.27619220618152307
|
| 13 |
+
mu_floor = 0.2804261022675867
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.6387267006437998
|
| 21 |
+
y_drop_top = 1.5445327179920814
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/035/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:32a073ab3357517b2f78765b1093e245970e5be91d0ef78dede6a6a1acc8e952
|
| 3 |
+
size 15313
|
scipy/conveyor_belt_drop/041/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.573 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.169 m/s rightward. Coulomb friction mu_belt=0.4135161181563597, mu_floor=0.3389781300055946 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 4.0566; ends when vx = v_belt = 1.169202623140597",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -3.3254; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 4.0566; ends * when * vx = v_belt = 1.169202623140597",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -3.3254; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.393 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2829 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 4.0566 m/s^2; t2 = v_belt/a = 0.2882 s; dx2 = 0.1685 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 1.1705 m -> t3 = 1.0011 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.5279 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 3.3254; t5 = 0.3516 s; dx5 = v_belt^2/(2 a_fl) = 0.2055 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.28293566800960934,
|
| 38 |
+
"t2_slip_s": 0.2882227989865531,
|
| 39 |
+
"t3_ride_s": 1.0010819221152623,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.3516001843514599,
|
| 42 |
+
"dx2_slip_m": 0.16849542631200143,
|
| 43 |
+
"dx4_off_belt_m": 0.5279226254505097,
|
| 44 |
+
"dx5_floor_m": 0.20554592892022222,
|
| 45 |
+
"final_x_m": 2.533468554370732
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.288 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.352 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.533 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.169202623140597,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.4135161181563597,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.3389781300055946,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.46103696437220315,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.572657964898175,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/041/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.169202623140597,
|
| 4 |
+
"mu_belt": 0.4135161181563597,
|
| 5 |
+
"mu_floor": 0.3389781300055946,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.46103696437220315,
|
| 13 |
+
"y_drop_top": 1.572657964898175
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/041/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.169202623140597
|
| 12 |
+
mu_belt = 0.4135161181563597
|
| 13 |
+
mu_floor = 0.3389781300055946
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.46103696437220315
|
| 21 |
+
y_drop_top = 1.572657964898175
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/041/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:88579e4751d97ed23fff63510e3f27c7c4cdfea07aa2989c2b44c01c6f88fc74
|
| 3 |
+
size 13058
|
scipy/conveyor_belt_drop/080/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.492 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.230 m/s rightward. Coulomb friction mu_belt=0.43438504772240105, mu_floor=0.42858530097377967 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 4.2613; ends when vx = v_belt = 1.229860093733831",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -4.2044; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 4.2613; ends * when * vx = v_belt = 1.229860093733831",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -4.2044; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.312 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2524 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 4.2613 m/s^2; t2 = v_belt/a = 0.2886 s; dx2 = 0.1775 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 1.1156 m -> t3 = 0.9071 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.5553 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 4.2044; t5 = 0.2925 s; dx5 = v_belt^2/(2 a_fl) = 0.1799 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.2523623240712337,
|
| 38 |
+
"t2_slip_s": 0.2886103056661856,
|
| 39 |
+
"t3_ride_s": 0.9071264376028906,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.2925158681717193,
|
| 42 |
+
"dx2_slip_m": 0.17747514878958237,
|
| 43 |
+
"dx4_off_belt_m": 0.5553109074257517,
|
| 44 |
+
"dx5_floor_m": 0.17987679652415184,
|
| 45 |
+
"final_x_m": 2.5351877039499033
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.289 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.293 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.535 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.229860093733831,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.43438504772240105,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.42858530097377967,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5068862456316905,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.4923834725051617,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/080/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.229860093733831,
|
| 4 |
+
"mu_belt": 0.43438504772240105,
|
| 5 |
+
"mu_floor": 0.42858530097377967,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5068862456316905,
|
| 13 |
+
"y_drop_top": 1.4923834725051617
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/080/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.229860093733831
|
| 12 |
+
mu_belt = 0.43438504772240105
|
| 13 |
+
mu_floor = 0.42858530097377967
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5068862456316905
|
| 21 |
+
y_drop_top = 1.4923834725051617
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/080/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8fd167057a61c1689235b124c81b94262139dede94b68ce040af58f5f33ceaf3
|
| 3 |
+
size 13705
|
scipy/conveyor_belt_drop/095/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.608 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.366 m/s rightward. Coulomb friction mu_belt=0.34436149271107924, mu_floor=0.3618359595338859 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 3.3782; ends when vx = v_belt = 1.3664233263792682",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -3.5496; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 3.3782; ends * when * vx = v_belt = 1.3664233263792682",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -3.5496; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.428 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2955 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 3.3782 m/s^2; t2 = v_belt/a = 0.4045 s; dx2 = 0.2763 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 0.9409 m -> t3 = 0.6886 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.6170 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 3.5496; t5 = 0.3850 s; dx5 = v_belt^2/(2 a_fl) = 0.2630 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.29553012228736086,
|
| 38 |
+
"t2_slip_s": 0.4044843084096268,
|
| 39 |
+
"t3_ride_s": 0.6885508106507919,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.3849501868238257,
|
| 42 |
+
"dx2_slip_m": 0.27634839708265,
|
| 43 |
+
"dx4_off_belt_m": 0.6169724354546009,
|
| 44 |
+
"dx5_floor_m": 0.26300245738506633,
|
| 45 |
+
"final_x_m": 2.679974892839667
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.404 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.385 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.680 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.3664233263792682,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.34436149271107924,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.3618359595338859,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5827997138467532,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.60839315084389,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/095/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.3664233263792682,
|
| 4 |
+
"mu_belt": 0.34436149271107924,
|
| 5 |
+
"mu_floor": 0.3618359595338859,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5827997138467532,
|
| 13 |
+
"y_drop_top": 1.60839315084389
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/095/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.3664233263792682
|
| 12 |
+
mu_belt = 0.34436149271107924
|
| 13 |
+
mu_floor = 0.3618359595338859
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5827997138467532
|
| 21 |
+
y_drop_top = 1.60839315084389
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/095/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2f6dceb3a9510ed9f908836fff160f997064ad5fc982edd4b22b397c5d22f3e6
|
| 3 |
+
size 15765
|
scipy/conveyor_belt_drop/244/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.604 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=1.483 m/s rightward. Coulomb friction mu_belt=0.33294151078801415, mu_floor=0.36278662540912265 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 3.2662; ends when vx = v_belt = 1.4827812683679797",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -3.5589; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 3.2662; ends * when * vx = v_belt = 1.4827812683679797",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -3.5589; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.424 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2939 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 3.2662 m/s^2; t2 = v_belt/a = 0.4540 s; dx2 = 0.3366 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 0.8854 m -> t3 = 0.5971 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.6695 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 3.5589; t5 = 0.4166 s; dx5 = v_belt^2/(2 a_fl) = 0.3089 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.2938610017142196,
|
| 38 |
+
"t2_slip_s": 0.4539835721608513,
|
| 39 |
+
"t3_ride_s": 0.5971454429526873,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.41663602184264104,
|
| 42 |
+
"dx2_slip_m": 0.33657916847344665,
|
| 43 |
+
"dx4_off_belt_m": 0.6695107970789503,
|
| 44 |
+
"dx5_floor_m": 0.30889004445781026,
|
| 45 |
+
"final_x_m": 2.7784008415367607
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.454 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.417 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.778 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 1.4827812683679797,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.33294151078801415,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.36278662540912265,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5779847542250085,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.6035677842512168,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/244/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 1.4827812683679797,
|
| 4 |
+
"mu_belt": 0.33294151078801415,
|
| 5 |
+
"mu_floor": 0.36278662540912265,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5779847542250085,
|
| 13 |
+
"y_drop_top": 1.6035677842512168
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/244/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 1.4827812683679797
|
| 12 |
+
mu_belt = 0.33294151078801415
|
| 13 |
+
mu_floor = 0.36278662540912265
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5779847542250085
|
| 21 |
+
y_drop_top = 1.6035677842512168
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/244/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebdf5286f478a9d29854c295bb20e960a41084b51ee205a153cb1bdfd3970056
|
| 3 |
+
size 15562
|
scipy/conveyor_belt_drop/257/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.618 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=0.968 m/s rightward. Coulomb friction mu_belt=0.34298813719428556, mu_floor=0.22859095354435696 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 3.3647; ends when vx = v_belt = 0.9680709723656657",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -2.2425; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 3.3647; ends * when * vx = v_belt = 0.9680709723656657",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -2.2425; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.438 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2988 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 3.3647 m/s^2; t2 = v_belt/a = 0.2877 s; dx2 = 0.1393 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 1.1075 m -> t3 = 1.1440 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.4371 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 2.2425; t5 = 0.4317 s; dx5 = v_belt^2/(2 a_fl) = 0.2090 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.2988341073006338,
|
| 38 |
+
"t2_slip_s": 0.28771273873676134,
|
| 39 |
+
"t3_ride_s": 1.14402390638891,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.431697120014153,
|
| 42 |
+
"dx2_slip_m": 0.13926317537544264,
|
| 43 |
+
"dx4_off_belt_m": 0.4371069301751423,
|
| 44 |
+
"dx5_floor_m": 0.2089567253697793,
|
| 45 |
+
"final_x_m": 2.446063655544922
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.288 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.432 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.446 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 0.9680709723656657,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.34298813719428556,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.22859095354435696,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5532404891570779,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.6180254451806477,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/257/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 0.9680709723656657,
|
| 4 |
+
"mu_belt": 0.34298813719428556,
|
| 5 |
+
"mu_floor": 0.22859095354435696,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5532404891570779,
|
| 13 |
+
"y_drop_top": 1.6180254451806477
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/257/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 0.9680709723656657
|
| 12 |
+
mu_belt = 0.34298813719428556
|
| 13 |
+
mu_floor = 0.22859095354435696
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5532404891570779
|
| 21 |
+
y_drop_top = 1.6180254451806477
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/257/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6d6d52e5ccf6e0e41e14325d4d97cfd915c7a0b66fbcdb5250d06553e51bae9e
|
| 3 |
+
size 15232
|
scipy/conveyor_belt_drop/260/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.434 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=0.981 m/s rightward. Coulomb friction mu_belt=0.3126096564704527, mu_floor=0.2517886259367248 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 3.0667; ends when vx = v_belt = 0.9808614451044682",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -2.4700; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 3.0667; ends * when * vx = v_belt = 0.9808614451044682",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -2.4700; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.254 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2274 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 3.0667 m/s^2; t2 = v_belt/a = 0.3198 s; dx2 = 0.1569 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 1.0520 m -> t3 = 1.0725 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.4429 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 2.4700; t5 = 0.3971 s; dx5 = v_belt^2/(2 a_fl) = 0.1948 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.22738489248792534,
|
| 38 |
+
"t2_slip_s": 0.31984257072010386,
|
| 39 |
+
"t3_ride_s": 1.072494931954687,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.3971024337793752,
|
| 42 |
+
"dx2_slip_m": 0.15686062306122459,
|
| 43 |
+
"dx4_off_belt_m": 0.4428821309960951,
|
| 44 |
+
"dx5_floor_m": 0.19475123352566967,
|
| 45 |
+
"final_x_m": 2.4376333645217647
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.320 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.397 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.438 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 0.9808614451044682,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.3126096564704527,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.2517886259367248,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.5911704481144829,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.433607577172211,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|
scipy/conveyor_belt_drop/260/params.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"g": 9.81,
|
| 3 |
+
"v_belt": 0.9808614451044682,
|
| 4 |
+
"mu_belt": 0.3126096564704527,
|
| 5 |
+
"mu_floor": 0.2517886259367248,
|
| 6 |
+
"m_cube": 0.5,
|
| 7 |
+
"x_belt_left": 0.3,
|
| 8 |
+
"x_belt_right": 1.8,
|
| 9 |
+
"y_belt_top": 1.0,
|
| 10 |
+
"r_pulley": 0.07,
|
| 11 |
+
"cube_size": 0.18,
|
| 12 |
+
"x_drop": 0.5911704481144829,
|
| 13 |
+
"y_drop_top": 1.433607577172211
|
| 14 |
+
}
|
scipy/conveyor_belt_drop/260/simulation_code.py
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
Conveyor Belt Drop — auto-generated.
|
| 3 |
+
"""
|
| 4 |
+
import numpy as np
|
| 5 |
+
import matplotlib.pyplot as plt
|
| 6 |
+
import matplotlib.animation as animation
|
| 7 |
+
from matplotlib.patches import Rectangle, Circle, Polygon
|
| 8 |
+
from matplotlib.collections import LineCollection
|
| 9 |
+
|
| 10 |
+
g = 9.81
|
| 11 |
+
v_belt = 0.9808614451044682
|
| 12 |
+
mu_belt = 0.3126096564704527
|
| 13 |
+
mu_floor = 0.2517886259367248
|
| 14 |
+
m_cube = 0.5
|
| 15 |
+
x_belt_left = 0.3
|
| 16 |
+
x_belt_right = 1.8
|
| 17 |
+
y_belt_top = 1.0
|
| 18 |
+
r_pulley = 0.07
|
| 19 |
+
cube_size = 0.18
|
| 20 |
+
x_drop = 0.5911704481144829
|
| 21 |
+
y_drop_top = 1.433607577172211
|
| 22 |
+
duration = 12
|
| 23 |
+
fps = 30
|
| 24 |
+
|
| 25 |
+
fall_dist_1 = (y_drop_top - cube_size) - y_belt_top
|
| 26 |
+
t1_dur = np.sqrt(max(2.0 * fall_dist_1 / g, 0.0))
|
| 27 |
+
a_friction = mu_belt * g
|
| 28 |
+
t2_dur = v_belt / a_friction if a_friction > 0 else 0.0
|
| 29 |
+
dx2 = 0.5 * a_friction * t2_dur ** 2
|
| 30 |
+
x_at_phase3_start = x_drop + dx2
|
| 31 |
+
t3_dur = max(0.0, (x_belt_right - x_at_phase3_start) / v_belt) if v_belt > 0 else 0.0
|
| 32 |
+
fall_dist_4 = y_belt_top
|
| 33 |
+
t4_dur = np.sqrt(2.0 * fall_dist_4 / g)
|
| 34 |
+
dx4 = v_belt * t4_dur
|
| 35 |
+
a_floor = mu_floor * g
|
| 36 |
+
t5_dur = v_belt / a_floor if a_floor > 0 else 0.0
|
| 37 |
+
dx5 = v_belt ** 2 / (2.0 * a_floor) if a_floor > 0 else 0.0
|
| 38 |
+
t1_end = t1_dur
|
| 39 |
+
t2_end = t1_end + t2_dur
|
| 40 |
+
t3_end = t2_end + t3_dur
|
| 41 |
+
t4_end = t3_end + t4_dur
|
| 42 |
+
t5_end = t4_end + t5_dur
|
| 43 |
+
|
| 44 |
+
def cube_com(t):
|
| 45 |
+
if t <= t1_end:
|
| 46 |
+
return (x_drop, (y_drop_top - cube_size/2) - 0.5*g*t**2)
|
| 47 |
+
if t <= t2_end:
|
| 48 |
+
dt = t - t1_end
|
| 49 |
+
return (x_drop + 0.5*a_friction*dt**2, y_belt_top + cube_size/2)
|
| 50 |
+
if t <= t3_end:
|
| 51 |
+
dt = t - t2_end
|
| 52 |
+
return (x_at_phase3_start + v_belt*dt, y_belt_top + cube_size/2)
|
| 53 |
+
if t <= t4_end:
|
| 54 |
+
dt = t - t3_end
|
| 55 |
+
return (x_belt_right + v_belt*dt, (y_belt_top + cube_size/2) - 0.5*g*dt**2)
|
| 56 |
+
if t <= t5_end:
|
| 57 |
+
dt = t - t4_end
|
| 58 |
+
return (x_belt_right + dx4 + v_belt*dt - 0.5*a_floor*dt**2, cube_size/2)
|
| 59 |
+
return (x_belt_right + dx4 + dx5, cube_size/2)
|
| 60 |
+
|
| 61 |
+
fig_w, fig_h = 11.0, 6.0
|
| 62 |
+
fig_aspect = fig_w / fig_h
|
| 63 |
+
x_lo_d = -0.20
|
| 64 |
+
x_hi_d = x_belt_right + dx4 + dx5 + 0.30
|
| 65 |
+
y_lo_d = -0.25
|
| 66 |
+
y_hi_d = y_drop_top + 0.20
|
| 67 |
+
dx_d, dy_d = x_hi_d - x_lo_d, y_hi_d - y_lo_d
|
| 68 |
+
if dx_d / dy_d < fig_aspect:
|
| 69 |
+
extra = (fig_aspect * dy_d - dx_d) / 2.0
|
| 70 |
+
x_lo, x_hi = x_lo_d - extra, x_hi_d + extra
|
| 71 |
+
y_lo, y_hi = y_lo_d, y_hi_d
|
| 72 |
+
else:
|
| 73 |
+
extra = (dx_d / fig_aspect - dy_d) / 2.0
|
| 74 |
+
x_lo, x_hi = x_lo_d, x_hi_d
|
| 75 |
+
y_lo, y_hi = y_lo_d - extra, y_hi_d + extra
|
| 76 |
+
|
| 77 |
+
fig = plt.figure(figsize=(fig_w, fig_h), facecolor="#1a1a2e")
|
| 78 |
+
ax = fig.add_axes([0, 0, 1, 1]); ax.set_facecolor("#16213e")
|
| 79 |
+
ax.set_xlim(x_lo, x_hi); ax.set_ylim(y_lo, y_hi)
|
| 80 |
+
ax.set_aspect("equal"); ax.axis("off")
|
| 81 |
+
ax.add_patch(Polygon([(x_lo, y_lo), (x_hi, y_lo), (x_hi, 0.0), (x_lo, 0.0)],
|
| 82 |
+
facecolor="#4a4e69", edgecolor="none", zorder=0))
|
| 83 |
+
ax.plot([x_lo, x_hi], [0.0, 0.0], color="#adb5bd", lw=2.0, zorder=1)
|
| 84 |
+
y_pulley_c = y_belt_top - r_pulley
|
| 85 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top, y_belt_top],
|
| 86 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 87 |
+
ax.plot([x_belt_left, x_belt_right], [y_belt_top - 2*r_pulley, y_belt_top - 2*r_pulley],
|
| 88 |
+
color="#4a4e69", lw=10, solid_capstyle="butt", zorder=2)
|
| 89 |
+
ax.add_patch(Circle((x_belt_left, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 90 |
+
ax.add_patch(Circle((x_belt_right, y_pulley_c), r_pulley, facecolor="#3a4357", edgecolor="#adb5bd", lw=1.2, zorder=3))
|
| 91 |
+
|
| 92 |
+
hash_spacing = 0.12; hash_w = 0.025
|
| 93 |
+
hash_lc = LineCollection([], colors="#adb5bd", linewidths=2.0, zorder=4)
|
| 94 |
+
ax.add_collection(hash_lc)
|
| 95 |
+
|
| 96 |
+
cube_patch = Rectangle((0, 0), cube_size, cube_size, facecolor="#e63946",
|
| 97 |
+
edgecolor="#adb5bd", lw=1.2, zorder=5)
|
| 98 |
+
ax.add_patch(cube_patch)
|
| 99 |
+
|
| 100 |
+
def update(f):
|
| 101 |
+
t = f / fps
|
| 102 |
+
cx, cy = cube_com(t)
|
| 103 |
+
cube_patch.set_xy((cx - cube_size/2, cy - cube_size/2))
|
| 104 |
+
s0 = (v_belt * t) % hash_spacing
|
| 105 |
+
span = x_belt_right - x_belt_left
|
| 106 |
+
n_marks = int(np.ceil(span / hash_spacing)) + 1
|
| 107 |
+
segs = []
|
| 108 |
+
for k in range(n_marks):
|
| 109 |
+
x_m = x_belt_left + s0 + k * hash_spacing
|
| 110 |
+
if x_belt_left <= x_m <= x_belt_right:
|
| 111 |
+
segs.append([(x_m, y_belt_top - hash_w), (x_m, y_belt_top + hash_w)])
|
| 112 |
+
x_m_b = x_belt_right - s0 - k * hash_spacing
|
| 113 |
+
if x_belt_left <= x_m_b <= x_belt_right:
|
| 114 |
+
y_b = y_belt_top - 2 * r_pulley
|
| 115 |
+
segs.append([(x_m_b, y_b - hash_w), (x_m_b, y_b + hash_w)])
|
| 116 |
+
hash_lc.set_segments(segs)
|
| 117 |
+
return cube_patch, hash_lc
|
| 118 |
+
|
| 119 |
+
n_frames = int(duration * fps) + 1
|
| 120 |
+
ani = animation.FuncAnimation(fig, update, frames=n_frames, interval=1000.0/fps, blit=False)
|
| 121 |
+
ani.save("conveyor_belt_drop.mp4", writer=animation.FFMpegWriter(fps=fps, bitrate=1800), dpi=120)
|
| 122 |
+
plt.close(); print("Saved conveyor_belt_drop.mp4")
|
scipy/conveyor_belt_drop/260/video.mp4
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a4ba3809052c4b1022ceac30bc766190d1669a002b01c1bece2e94957744dd7
|
| 3 |
+
size 15859
|
scipy/conveyor_belt_drop/271/cot.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"simulation": "conveyor_belt_drop",
|
| 3 |
+
"physical_observation": "A cube (m=0.500 kg, side=0.180 m) is dropped from height y_drop_top=1.575 m above a conveyor belt whose top is at y=1.000 m and runs at v_belt=0.989 m/s rightward. Coulomb friction mu_belt=0.2004926860740261, mu_floor=0.21798917796520362 couples cube to belt and to the floor. Cube exits the belt's right edge at x=1.800 m, falls to the floor, and slides to rest.",
|
| 4 |
+
"physical_law": {
|
| 5 |
+
"name": "Newton II + Coulomb kinetic friction + perfectly inelastic vertical contact",
|
| 6 |
+
"statement": "Vertical free fall under gravity; friction f = mu_k m g acts to oppose relative slip; cube does not bounce vertically off the belt or floor.",
|
| 7 |
+
"formula": "Free fall: y'' = -g. Slipping on belt: vx' = mu_belt g. No-slip ride: vx = v_belt. Off belt: vx const, y free fall. Floor slide: vx' = -mu_floor g until vx=0."
|
| 8 |
+
},
|
| 9 |
+
"ode_system": {
|
| 10 |
+
"state_variables": [
|
| 11 |
+
"x_cube (m)",
|
| 12 |
+
"y_cube (m)"
|
| 13 |
+
],
|
| 14 |
+
"equations_latex": [
|
| 15 |
+
"Phase 1 (drop): y(t) = y0 - 0.5 g t^2; x = x_drop",
|
| 16 |
+
"Phase 2 (slipping): vx' = mu_belt \\cdot g = 1.9668; ends when vx = v_belt = 0.9887897620447693",
|
| 17 |
+
"Phase 3 (riding): x' = v_belt; y on belt top",
|
| 18 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 19 |
+
"Phase 5 (floor): vx' = -mu_floor \\cdot g = -2.1385; stops at v=0"
|
| 20 |
+
],
|
| 21 |
+
"equations_python": [
|
| 22 |
+
"Phase 1 * (drop): y(t) = y0 - 0.5 * g * t**2; x = x_drop",
|
| 23 |
+
"Phase 2 * (slipping): vx' = mu_belt * g = 1.9668; ends * when * vx = v_belt = 0.9887897620447693",
|
| 24 |
+
"Phase 3 * (riding): x' = v_belt; y * on * belt * top",
|
| 25 |
+
"Phase 4 (off belt): x' = v_belt; y free fall",
|
| 26 |
+
"Phase 5 * (floor): vx' = -mu_floor * g = -2.1385; stops * at * v=0"
|
| 27 |
+
]
|
| 28 |
+
},
|
| 29 |
+
"derivation_steps": [
|
| 30 |
+
"Phase 1 free fall through 0.395 m: t1 = \\sqrt(2 (y_drop_top - cube_size - y_belt_top)/g) = 0.2838 s.",
|
| 31 |
+
"Phase 2 slipping: cube starts at vx=0, belt moves at v_belt. Friction f = mu_belt m g pulls cube forward. a = mu_belt g = 1.9668 m/s^2; t2 = v_belt/a = 0.5027 s; dx2 = 0.2485 m.",
|
| 32 |
+
"Phase 3 no-slip: cube co-moves with belt at v_belt; remaining distance to right edge = 0.9401 m -> t3 = 0.9507 s.",
|
| 33 |
+
"Phase 4 off-belt projectile: vy free fall from y_belt_top to floor (drop 1.000 m); t4 = 0.4515 s; horizontal travel dx4 = 0.4465 m.",
|
| 34 |
+
"Phase 5 floor friction: deceleration a_fl = mu_floor g = 2.1385; t5 = 0.4624 s; dx5 = v_belt^2/(2 a_fl) = 0.2286 m."
|
| 35 |
+
],
|
| 36 |
+
"physical_constants_derived": {
|
| 37 |
+
"t1_drop_s": 0.28384204566176324,
|
| 38 |
+
"t2_slip_s": 0.5027318720845381,
|
| 39 |
+
"t3_ride_s": 0.9507235012244237,
|
| 40 |
+
"t4_fall_s": 0.4515236409857309,
|
| 41 |
+
"t5_floor_slide_s": 0.46238104272012037,
|
| 42 |
+
"dx2_slip_m": 0.2485480640853959,
|
| 43 |
+
"dx4_off_belt_m": 0.4464619535278687,
|
| 44 |
+
"dx5_floor_m": 0.22859882060262007,
|
| 45 |
+
"final_x_m": 2.4750607741304886
|
| 46 |
+
},
|
| 47 |
+
"numerical_method": {
|
| 48 |
+
"solver": "Closed-form per phase; no ODE solver needed.",
|
| 49 |
+
"tolerance": "Machine precision.",
|
| 50 |
+
"justification": "Each phase has constant acceleration with analytic transition times."
|
| 51 |
+
},
|
| 52 |
+
"code_validation": {
|
| 53 |
+
"ode_source": "Newton II for each phase; standard friction-on-belt textbook problem.",
|
| 54 |
+
"energy_check": "KE evolves consistent with the work-energy theorem; friction dissipates KE while belt does positive work in phase 2.",
|
| 55 |
+
"physical_plausibility": true
|
| 56 |
+
},
|
| 57 |
+
"expected_behavior": [
|
| 58 |
+
"Drop, then slip on belt for ~0.503 s, ride to right edge, projectile to floor in ~0.452 s, and stop after ~0.462 s on the floor.",
|
| 59 |
+
"Final cube rest position x ~ 2.475 m."
|
| 60 |
+
],
|
| 61 |
+
"parameters": {
|
| 62 |
+
"g": {
|
| 63 |
+
"value": 9.81,
|
| 64 |
+
"unit": "",
|
| 65 |
+
"description": ""
|
| 66 |
+
},
|
| 67 |
+
"v_belt": {
|
| 68 |
+
"value": 0.9887897620447693,
|
| 69 |
+
"unit": "",
|
| 70 |
+
"description": ""
|
| 71 |
+
},
|
| 72 |
+
"mu_belt": {
|
| 73 |
+
"value": 0.2004926860740261,
|
| 74 |
+
"unit": "",
|
| 75 |
+
"description": ""
|
| 76 |
+
},
|
| 77 |
+
"mu_floor": {
|
| 78 |
+
"value": 0.21798917796520362,
|
| 79 |
+
"unit": "",
|
| 80 |
+
"description": ""
|
| 81 |
+
},
|
| 82 |
+
"m_cube": {
|
| 83 |
+
"value": 0.5,
|
| 84 |
+
"unit": "",
|
| 85 |
+
"description": ""
|
| 86 |
+
},
|
| 87 |
+
"x_belt_left": {
|
| 88 |
+
"value": 0.3,
|
| 89 |
+
"unit": "",
|
| 90 |
+
"description": ""
|
| 91 |
+
},
|
| 92 |
+
"x_belt_right": {
|
| 93 |
+
"value": 1.8,
|
| 94 |
+
"unit": "",
|
| 95 |
+
"description": ""
|
| 96 |
+
},
|
| 97 |
+
"y_belt_top": {
|
| 98 |
+
"value": 1.0,
|
| 99 |
+
"unit": "",
|
| 100 |
+
"description": ""
|
| 101 |
+
},
|
| 102 |
+
"r_pulley": {
|
| 103 |
+
"value": 0.07,
|
| 104 |
+
"unit": "",
|
| 105 |
+
"description": ""
|
| 106 |
+
},
|
| 107 |
+
"cube_size": {
|
| 108 |
+
"value": 0.18,
|
| 109 |
+
"unit": "",
|
| 110 |
+
"description": ""
|
| 111 |
+
},
|
| 112 |
+
"x_drop": {
|
| 113 |
+
"value": 0.6113862713685363,
|
| 114 |
+
"unit": "",
|
| 115 |
+
"description": ""
|
| 116 |
+
},
|
| 117 |
+
"y_drop_top": {
|
| 118 |
+
"value": 1.5751777352731542,
|
| 119 |
+
"unit": "",
|
| 120 |
+
"description": ""
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
}
|