number: 502
slug: epicyclic-train
name: An epicyclic train
brown: "An “epicyclic train.” Any train of gearing the axes of the wheels of which revolve around a common center is properly known by this name. The wheel at one end of such a train, if not those at both ends, is always concentric with the revolving frame. C is the frame or train-bearing arm. The center wheel, A, concentric with this frame, gears with a pinion, F, to the same axle with which is secured a wheel, E, that gears with a wheel, B."
units: cm
sim: {timestep: 0.0002, integrator: implicitfast, iterations: 100, solver: PGS, duration_s: 8, floor: false}
bodies:
  # the stud D, standing out of a plate behind: A is fixed on it
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: rod, from: [0, -3.3, 0], to: [0, 6.2, 0], radius: 0.7, color: "#8f8a80"}
      - {kind: disc, center: [0, 0], radius: 2.0, y: [1.5, 3.5], color: "#b7ae9c"}
      - {kind: disc, center: [0, 0], radius: 3.0, y: [5.0, 6.2]}
  # the arm C, turning on the stud: bosses at D, F and B
  - id: arm
    shape: part
    pos: [0, 0, 0]
    density: 2500
    color: "#a39d90"
    pieces:
      - {kind: poly, points: [[-0.6, 0], [0.6, 0], [0.6, 20], [-0.6, 20]], y: [-2.7, -1.9]}
      - {kind: disc, center: [0, 0], radius: 1.3, inner: 0.7, y: [-2.8, -1.8]}
      - {kind: disc, center: [0, 10], radius: 1.3, inner: 0.5, y: [-2.8, -1.8]}
      - {kind: disc, center: [0, 20], radius: 1.3, inner: 0.5, y: [-2.8, -1.8]}
  # the axle at F: the pinion F behind, the wheel E in front, one piece
  - id: axleF
    shape: part
    pos: [0, 0, 10]
    mount: arm
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [0, -2.3, 10], to: [0, 3.5, 10], radius: 0.5}
  - id: wheelB
    shape: part
    pos: [0, 0, 20]
    mount: arm
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [0, -2.3, 20], to: [0, 1, 20], radius: 0.5}
joints:
  - {id: j_c, type: hinge, body: arm, axis: [0, -1, 0], damping: 0.01}      # the arm C: the driver
  - {id: j_f, type: hinge, body: axleF, axis: [0, -1, 0], damping: 0.002}
  - {id: j_b, type: hinge, body: wheelB, axis: [0, -1, 0], damping: 0.02}   # B's load
spurs:
  - {id: gA, body: frame, pos: [0, 2.5, 0], teeth: 24, module: 0.5, width: 2, backlash: 0.04, phase: 0, color: "#d9cdb2"}
  - {id: gF, body: axleF, pos: [0, 2.5, 0], teeth: 16, module: 0.5, width: 2, backlash: 0.04, phase: 0.19635, color: "#cbbfa4"}
  - {id: gE, body: axleF, pos: [0, 0, 0], teeth: 24, module: 0.5, width: 2, backlash: 0.04, phase: 0, color: "#e4d9bf"}
  - {id: gB, body: wheelB, pos: [0, 0, 0], teeth: 16, module: 0.5, width: 2, backlash: 0.04, phase: 0.19635, color: "#e4d9bf"}
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_c, kind: velocity, rpm: 6, kv: 100, max_torque: 40}
checks:
  # A fixed: the axle F turns 1 + zA/zF = 2.5 times the arm, B 1 - (zA/zF)(zE/zB) = -1.25 times it
  - {type: ratio, out: j_f, in: j_c, expect: 1.5, tol: 0.03, settle_s: 1.5, window_s: 5}
  - {type: ratio, out: j_b, in: j_c, expect: -2.25, tol: 0.045, settle_s: 1.5, window_s: 5}
  - {type: penetration, max: 0.0005, settle_s: 1.5}
camera: {target: [0, 0, -4], position: [0, -130, -4], fov: 34}
display:
  output: j_b
  labels: {j_c: "Arm C (driver)", j_f: "Pinion F and wheel E", j_b: "Wheel B"}
  expect: {default: -1.25}
  proof: {label: "A's teeth out of contact", sub: "the arm carries the train round, but nothing turns F, E or B on their pins"}

