# No. 257 (Brown 1868): "A concave-grooved pulley for a round band."
#
# Model (cm, gravity on, front view, shafts level): two pulleys, each with a concave (half-round) groove turned in its face, of radius 0.55, the rim 0.65 above its bottom,
# a little larger than the round band (0.8 thick) that lies in it. The larger (groove bottom radius 7) is on the driving shaft, turned at
# 40 rpm (the one driven joint); the smaller (4.5), 26 away, carries a load (a damper). The band, a cord of links on real contact, tensioned,
# lies in the hollows and drives the smaller by friction at the ratio of the pitch radii, r + 0.4111 (1.5090). The faces are solids of
# revolution of the groove's section (stacked frusta).
# Generator: opencode-runs/batch11/gen257.py.
number: 257
slug: concave-grooved-pulley
name: A concave-grooved pulley for a round band
brown: "A concave-grooved pulley for a round band."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 50, duration_s: 6, floor: false}
bodies:
  - {id: p_a, shape: pulley, radius: 7.65, width: 2.4, profile: [[-1.2, 7.65], [-0.57, 7.65], [-0.55, 7.55], [-0.4125, 7.1862], [-0.2475, 7.0588], [-0.11, 7.0111], [0.11, 7.0111], [0.2475, 7.0588], [0.4125, 7.1862], [0.55, 7.55], [0.57, 7.65], [1.2, 7.65]], flange: 0, pos: [0, 0, 0], mass: 2.0, spokes: 6, hub: 2.2}
  - {id: p_b, shape: pulley, radius: 5.15, width: 2.4, profile: [[-1.2, 5.15], [-0.57, 5.15], [-0.55, 5.05], [-0.4125, 4.6862], [-0.2475, 4.5588], [-0.11, 4.5111], [0.11, 4.5111], [0.2475, 4.5588], [0.4125, 4.6862], [0.55, 5.05], [0.57, 5.15], [1.2, 5.15]], flange: 0, pos: [26, 0, 0], mass: 1.2, spokes: 4, hub: 1.6, color: "#e6dcc4"}
shafts:
  - {id: s_a, body: p_a, from: [0, -3, 0], to: [0, 5, 0], radius: 0.8}
  - {id: s_b, body: p_b, from: [0, -3, 0], to: [0, 5, 0], radius: 0.7}
joints:
  - {id: j_a, type: hinge, body: p_a, axis: [0, 1, 0], damping: 0.002}   # the one driven joint
  - {id: j_b, type: hinge, body: p_b, axis: [0, 1, 0], damping: 0.03}   # the load
belts:
  - id: band
    around: [p_a, p_b]
    station: 0
    section: round
    links: 110
    thickness: 0.8
    width: 0.8
    density: 950
    stiffness: 30000
    damping: 2
    pretension: 25
    friction: 0.6
contact: {solref: [0.002, 1], solimp: [0.9, 0.95, 0.001], margin: 0}
driver: {joint: j_a, kind: velocity, rpm: 40, kv: 2, max_torque: 5}
checks:
  - {type: ratio, out: j_b, in: j_a, expect: 1.5090, tol: 0.03, settle_s: 1, window_s: 4.5}   # the ratio of the pitch radii, less creep
  - {type: belt_on, belt: band, max_radial_dev: 1.0, max_lateral: 0.4, duration_s: 2}
  - {type: penetration, max: 0.0025, settle_s: 1}
camera: {target: [13, 0, 0], position: [29, -88, 12], fov: 30}
display:
  output: j_b
  labels: {j_a: "Large pulley (driver)", j_b: "Small pulley"}
  expect: {default: 1.5090}

