number: 507
slug: epicyclic-train-very-slow-motion
name: Epicyclic train for a very slow motion (25,000 to 1)
brown: "Another form of epicyclic train designed for producing a very slow motion. m is a fixed shaft upon which is loosely fitted a long sleeve, to the lower end of which is fixed a wheel, D, and to the upper end a wheel, E. Upon this long sleeve there is fitted a shorter one which carries at its extremities the wheels, A and H. A wheel, C, gears with both D and A, and a train-bearing arm, m, n, which revolves freely upon the shaft, m, p, carries upon a stud at n the united wheels, F and G. If A have 10 teeth, C 100, D 10, E 61, F 49, G 41, and H 51, there will be 25,000 revolutions of the train-bearing arm, m, n, for one the wheel, C."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 80
  solver: PGS          # as Nos. 503, 506: bevel meshes
  multiccd: true
  duration_s: 10
  floor: false
bodies:
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [0, 0, -22], to: [0, 0, 25.85], radius: 0.3, collide: 0}   # the fixed shaft m, p
      - {kind: poly, points: [[-8, -24], [26, -24], [26, -22], [-8, -22]], y: [-6, 6], collide: 0, color: "#a39d90"}   # the bed
      - {kind: rod, from: [0, 0, -22], to: [0, 0, -18.5], radius: 1.6, collide: 0}   # footstep of m
      - {kind: poly, points: [[9.5, -22], [11.5, -22], [11.5, 1.2], [9.5, 1.2]], y: [-1.6, 1.6], collide: 0}   # standard a for C's axle
      - {kind: rod, from: [9.5, 0, 0], to: [11.5, 0, 0], radius: 1.4, collide: 0}   # C's bearing
  - id: sDE                # the long sleeve: D at its foot, E at its head
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#cbbfa4"
    pieces:
      - {kind: rod, from: [0, 0, -18.4], to: [0, 0, 22], radius: 0.5, collide: 0}
      - {kind: rod, from: [0, 0, -18.4], to: [0, 0, -15.6], radius: 1.0, collide: 0}   # D's boss
      - {kind: rod, from: [0, 0, 20.8], to: [0, 0, 22], radius: 1.4, collide: 0}   # E's boss
      - {kind: rod, from: [1.2, 0, 22.79], to: [11, 0, 22.79], radius: 0.3, collide: 0, color: "#5a3a2a"}   # index bar on E
  - id: sAH                # the short sleeve: A below, H above
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#e4d9bf"
    pieces:
      - {kind: rod, from: [0, 0, 10.6], to: [0, 0, 19.5], radius: 0.85, collide: 0}
      - {kind: rod, from: [0, 0, 10.6], to: [0, 0, 12.1], radius: 1.1, collide: 0}   # A's boss
      - {kind: rod, from: [1.4, 0, 20.29], to: [11, 0, 20.29], radius: 0.3, collide: 0, color: "#2f3f5a"}   # index bar on H
  - id: wC                 # C on its horizontal axle in the standard a
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#d9cdb2"
    pieces:
      - {kind: rod, from: [2.0, 0, 0], to: [9.5, 0, 0], radius: 0.7, collide: 0, color: "#8f8a80"}
      - {kind: rod, from: [11.5, 0, 0], to: [12.6, 0, 0], radius: 0.9, collide: 0, color: "#8f8a80"}
      - {kind: rod, from: [2.6, -0.25, 0], to: [2.6, -0.25, 11.6], radius: 0.35, collide: 0, color: "#5a3a2a"}   # index spoke on C
  - id: arm                # the train-bearing arm m, n: the driver
    shape: part
    pos: [0, 0, 0]
    density: 2500
    color: "#a39d90"
    pieces:
      - {kind: rod, from: [0, 0, 22.75], to: [0, 0, 24.85], radius: 1.3, collide: 0}   # its boss on m
      - {kind: poly, points: [[0, 22.75], [22, 22.75], [22, 23.75], [0, 23.75]], y: [-0.9, 0.9], collide: 0}
      - {kind: rod, from: [22, 0, 18.2], to: [22, 0, 23.85], radius: 0.4, collide: 0, color: "#6f6a60"}   # the stud n
  - id: wFG                # F and G united, loose on the stud
    shape: part
    pos: [22, 0, 0]
    mount: arm
    density: 7800
    color: "#e4d9bf"
    pieces:
      - {kind: rod, from: [22, 0, 19.5], to: [22, 0, 22], radius: 1.4, collide: 0, color: "#cbbfa4"}
      - {kind: rod, from: [23.4, 0, 22.79], to: [30, 0, 22.79], radius: 0.3, collide: 0, color: "#3a5a2a"}
joints:
  - {id: j_arm, type: hinge, body: arm, axis: [0, 0, 1], damping: 0.01}
  - {id: j_fg, type: hinge, body: wFG, axis: [0, 0, 1], damping: 0.0005}
  - {id: j_e, type: hinge, body: sDE, axis: [0, 0, 1], damping: 0.5}
  - {id: j_h, type: hinge, body: sAH, axis: [0, 0, 1], damping: 0.5}
  - {id: j_c, type: hinge, body: wC, axis: [1, 0, 0], damping: 0.5}
spurs:
  - {id: gE, body: sDE, pos: [0, 0, 22], teeth: 61, module: 0.4, width: 1.5, backlash: 0.06, phase: 0, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gH, body: sAH, pos: [0, 0, 19.5], teeth: 51, module: 0.478261, width: 1.5, backlash: 0.06, phase: 0, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gF, body: wFG, pos: [0, 0, 22], teeth: 49, module: 0.4, width: 1.5, backlash: 0.06, phase: 0.000000, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gG, body: wFG, pos: [0, 0, 19.5], teeth: 41, module: 0.478261, width: 1.5, backlash: 0.06, phase: 0.000000, quat: [0.7071068, 0.7071068, 0, 0]}
bevels:
  - {id: gC, body: wC, pos: [0, 0, 0], teeth: 100, pitch_radius: 15, cone_angle: 1.4711277, face_width: 1.5, backlash: 0.06, phase: 0.00000, quat: [0.7071068, 0, 0, -0.7071068]}
  - {id: gA, body: sAH, pos: [0, 0, 0], teeth: 10, pitch_radius: 1.5, cone_angle: 0.0996687, face_width: 1.5, backlash: 0.06, phase: 0.31416, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gD, body: sDE, pos: [0, 0, 0], teeth: 10, pitch_radius: 1.5, cone_angle: 0.0996687, face_width: 1.5, backlash: 0.06, phase: 0.31416, quat: [0.7071068, -0.7071068, 0, 0]}
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_arm, kind: velocity, rpm: 40, kv: 100, max_torque: 40}
checks:
  # 2500 turns of the arm to one of E (and H, the other way), 25,000 to one of C
  # (the sleeves rattle inside the backlash of A, C, D, so the slow ratios get a 20 % band; the sign and the
  # three-orders-of-magnitude reduction are what they prove)
  - {type: ratio, out: j_fg, in: j_arm, expect: 1.244898, tol: 0.005, settle_s: 1.5, window_s: 8}
  - {type: ratio, out: j_e, in: j_arm, expect: 0.0004, tol: 0.00008, settle_s: 1.5, window_s: 8}
  - {type: ratio, out: j_h, in: j_arm, expect: -0.0004, tol: 0.00008, settle_s: 1.5, window_s: 8}
  - {type: penetration, max: 0.001, settle_s: 1.0}   # the near-crown C against the 10-tooth A and D
camera: {target: [0, 0, -14], position: [0, -147, 10], fov: 34}
display:
  output: j_e
  labels: {j_arm: "Arm m, n (driver)", j_fg: "F and G", j_e: "Long sleeve D, E", j_h: "Short sleeve A, H", j_c: "Wheel C"}
  expect: {default: 0.0004}
  proof: {label: "F and G out of contact", sub: "the arm runs round, but the sleeves and C make no headway"}

