# No. 11 (Brown 1868): "Another method of effecting the same result as 3, without guide-pulleys."
#
# Model (cm): the quarter-turn drive. A drum (6 cm across, 12 cm long) on a shaft running left and right, 50 cm above a
# 12 cm pulley whose shaft points at the viewer, driven by a round cord (6 mm, friction, 120-link elastic chain,
# 20 N) in a groove at the middle of the drum and in the pulley's groove. Nothing guides it between them: the drum is set
# back 3 cm behind the pulley's plane and 6 cm to the left of its centre, so the leaf that comes down off the drum's front
# leaves it already in the pulley's plane (slanting to the pulley's right side), and the leaf that goes up off the pulley's left side
# rises in the drum's plane to its back, each run turning a quarter between the wheels. Only the drum is driven (velocity, 30 rpm);
# the pulley turns by the cord's grip against a light load.
# Generator: opencode-runs/batch17/gen011.py.
number: 11
slug: right-angle-belt-transition
name: Right Angle Belt Transition
brown: "Another method of effecting the same result as 3, without guide-pulleys."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 50, duration_s: 8.0, floor: false}
bodies:
  - {id: drum, shape: assembly, pos: [-6.0, 3.0, 50.0], color: "#ded2b6"}
  - {id: p_low, shape: pulley, radius: 6.0, width: 2.4, groove: 1.2, flange: 0.5, pos: [0, 0, 0], mass: 0.8, spokes: 4, hub: 1.6}
wheels:
  - {id: p_drum, body: drum, pos: [0, 0, 0], quat: [0.7071068, 0, 0, -0.7071068], radius: 3.0, width: 12.0, groove: 1.6, flange: 0.4, mass: 1.0, spokes: 0, hub: 3, color: "#ded2b6"}
shafts:
  - {id: drum_shaft, body: drum, from: [-11.0, 0, 0], to: [11.0, 0, 0], radius: 0.6}
joints:
  - {id: j_drum, type: hinge, body: drum, axis: [1, 0, 0], damping: 0.002}   # the driver
  - {id: j_low, type: hinge, body: p_low, axis: [0, 1, 0], damping: 0.01}   # the load
belts:
  - id: belt
    around: [p_drum, p_low]
    senses: [1, 1]
    section: round
    links: 120
    segments: 12
    thickness: 0.6
    width: 0.6
    density: 950
    stiffness: 30000
    damping: 2
    pretension: 20.0
    joint_armature: 0.000001
    friction: 0.6
contact: {solref: [0.002, 1], solimp: [0.9, 0.95, 0.001], margin: 0}
driver: {joint: j_drum, kind: velocity, rpm: 30.0, kv: 2, max_torque: 5}
checks:
  - {type: ratio, out: j_low, in: j_drum, expect: 0.5238, tol: 0.06, settle_s: 1, window_s: 6.0}
  - {type: belt_on, belt: belt, max_radial_dev: 1.5, max_lateral: 1.0, duration_s: 2}
  - {type: penetration, max: 0.0025, settle_s: 0.5}
camera: {target: [-3, 0, 16], position: [12.0, -120, 30], fov: 36}
display:
  output: j_low
  labels: {j_drum: "Drum (driver)", j_low: "Pulley (shaft at right angles)"}

