number: 506
slug: epicyclic-train-neither-fixed
name: An epicyclic train in which neither the first nor last wheel is fixed
brown: "Another epicyclic train in which neither the first nor last wheel is fixed.  m, n, is a shaft to which is firmly secured the train-bearing arm, k, l, which carries the two wheels, d, e, secured together, but rotating upon the arm itself. The wheels, b and c, are united and turn together, freely upon the shaft, m, n; the wheels, f and g, are also secured together, but turn together freely on the shaft, m, n. The wheels, c, d, e and f, constitute an epicyclic train of which c is the first and __f the last wheel. A shaft, A, is employed as a driver, and has firmly secured to it two wheels, a and h, the first of which gears with the wheel, b, and thus communicates motion to the first wheel, c, of the epicyclic train, and the wheel, h, drives the wheel, g, which thus gives motion to the last wheel, f. Motion communicated in this way to the two ends of the train produces an aggregate motion of the arm, k, l, and shaft, m, n."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 80
  solver: PGS          # as Nos. 495, 503: bevel meshes
  multiccd: true
  duration_s: 8
  floor: false
bodies:
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-17, -13.4], [13, -13.4], [13, -12.2], [-17, -12.2]], y: [-5, 5], collide: 0}   # the bed
      - {kind: poly, points: [[-16.5, -12.2], [-14.5, -12.2], [-14.5, 14.5], [-16.5, 14.5]], y: [-2, 2], collide: 0}   # the standard
      - {kind: poly, points: [[-16.5, 12.6], [1.6, 12.6], [1.6, 14.5], [-16.5, 14.5]], y: [-2, 2], collide: 0}   # the arm over to n
      - {kind: rod, from: [-14.5, 0, 0], to: [-12.9, 0, 0], radius: 1.5, collide: 0}   # A's bearing
      - {kind: poly, points: [[-2, -12.2], [2, -12.2], [2, -10.4], [-2, -10.4]], y: [-2, 2], collide: 0}   # the footstep m
  - id: shaftA
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [-19, 0, 0], to: [-8.2, 0, 0], radius: 0.7, collide: 0}
      - {kind: rod, from: [-19, 0, 0], to: [-19, 0, -4.5], radius: 0.55, collide: 0}   # the crank
      - {kind: rod, from: [-19, 0, -4.5], to: [-21.5, 0, -4.5], radius: 0.65, collide: 0, color: "#6f6a60"}   # its handle
      - {kind: rod, from: [-12.6, 0, 0], to: [-9.9, 0, 0], radius: 2.0, collide: 0, color: "#a39d90"}   # the boss of a and h
  - id: mn
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [0, 0, -10.4], to: [0, 0, 12.6], radius: 0.6, collide: 0}   # the shaft m, n
      - {kind: rod, from: [0, 0, 2.2], to: [0, 0, 3.8], radius: 1.1, collide: 0, color: "#a39d90"}   # the boss k
      - {kind: rod, from: [0, 0, 3], to: [7.4, 0, 3], radius: 0.45, collide: 0, color: "#a39d90"}   # the arm k, l (the stud)
      - {kind: rod, from: [7.4, 0, 3], to: [8.0, 0, 3], radius: 0.8, collide: 0, color: "#a39d90"}   # the nut at l
  - id: wb
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#cbbfa4"
    pieces:
      - {kind: rod, from: [0, 0, -6.6], to: [0, 0, -1.5], radius: 1.6, collide: 0}   # b's hub, carrying c above it
  - id: wg
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#cbbfa4"
    pieces:
      - {kind: rod, from: [0, 0, 6.0], to: [0, 0, 9.6], radius: 1.4, collide: 0}   # g's hub, carrying f below it
  - id: wde
    shape: part
    pos: [0, 0, 3]
    mount: mn
    density: 7800
    color: "#d8ceba"
    pieces:
      - {kind: rod, from: [3.9, 0, 3], to: [6.1, 0, 3], radius: 1.1, collide: 0}   # d and e united
joints:
  - {id: j_A, type: hinge, body: shaftA, axis: [1, 0, 0], damping: 0.01}   # the driving shaft A
  - {id: j_b, type: hinge, body: wb, axis: [0, 0, 1], damping: 0.002}
  - {id: j_g, type: hinge, body: wg, axis: [0, 0, 1], damping: 0.002}
  - {id: j_m, type: hinge, body: mn, axis: [0, 0, 1], damping: 0.2}   # the arm k, l and shaft m, n; its load
  - {id: j_de, type: hinge, body: wde, axis: [1, 0, 0], damping: 0.001}
bevels:
  - {id: ga, body: shaftA, pos: [0, 0, 0], teeth: 24, pitch_radius: 6, cone_angle: 0.5404195, face_width: 2, backlash: 0.08, phase: 0.00000, quat: [0.7071068, 0, 0, 0.7071068]}
  - {id: gh, body: shaftA, pos: [0, 0, 0], teeth: 36, pitch_radius: 9, cone_angle: 0.6435011, face_width: 1.5, backlash: 0.08, phase: 0.00000, quat: [0.7071068, 0, 0, 0.7071068]}
  - {id: gb, body: wb, pos: [0, 0, 0], teeth: 40, pitch_radius: 10, cone_angle: 1.0303768, face_width: 2, backlash: 0.08, phase: 0.07854, quat: [0.7071068, -0.7071068, 0, 0]}
  - {id: gg, body: wg, pos: [0, 0, 0], teeth: 48, pitch_radius: 12, cone_angle: 0.9272952, face_width: 1.5, backlash: 0.08, phase: 0.06545, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gc, body: wb, pos: [0, 0, 3], teeth: 24, pitch_radius: 6, cone_angle: 0.9272952, face_width: 1.5, backlash: 0.08, phase: 0.00000, quat: [0.7071068, -0.7071068, 0, 0]}
  - {id: gf, body: wg, pos: [0, 0, 3], teeth: 16, pitch_radius: 4, cone_angle: 0.9272952, face_width: 1, backlash: 0.08, phase: 0.19635, quat: [0.7071068, 0.7071068, 0, 0]}
  - {id: gd, body: wde, pos: [0, 0, 0], teeth: 18, pitch_radius: 4.5, cone_angle: 0.6435011, face_width: 1.5, backlash: 0.08, phase: 0.00000, quat: [0.7071068, 0, 0, -0.7071068]}
  - {id: ge, body: wde, pos: [0, 0, 0], teeth: 12, pitch_radius: 3, cone_angle: 0.6435011, face_width: 1, backlash: 0.08, phase: 0.00000, quat: [0.7071068, 0, 0, -0.7071068]}
contact: {solref: [0.0008, 1], solimp: [0.95, 0.99, 0.001], margin: 0}
driver: {joint: j_A, kind: velocity, rpm: 30, kv: 2, max_torque: 5}
checks:
  # b at -6/10 of A, g at +9/12 (opposite ways); the arm and m, n at their mean, 0.075 of A
  - {type: ratio, out: j_b, in: j_A, expect: -0.6, tol: 0.012, settle_s: 1.5, window_s: 6}
  - {type: ratio, out: j_g, in: j_A, expect: 0.75, tol: 0.015, settle_s: 1.5, window_s: 6}
  - {type: ratio, out: j_m, in: j_A, expect: 0.075, tol: 0.003, settle_s: 1.5, window_s: 6}
  - {type: penetration, max: 0.001, settle_s: 1.5}
camera: {target: [-3, 0, -10], position: [-3, -95, -3], fov: 32}
display:
  output: j_m
  labels: {j_A: "Shaft A (driver)", j_b: "b and c", j_g: "g and f", j_m: "Arm k, l and shaft m, n", j_de: "d and e"}
  expect: {default: 0.075}
  proof: {label: "d and e out of contact", sub: "b and g turn opposite ways, but nothing carries the arm round"}

