number: 356
slug: bohnenberger-machine
name: Bohnenberger's machine
brown: "Bohnenberger’s machine illustrating the same tendency of rotating bodies. This consists of three rings, A, A1, A2, placed one within the other and connected by pivots at right angles to each other. The smallest ring, A2, contains the bearings for the axis of a heavy ball, B. The ball being set in rapid rotation, its axis will continue in the same direction, no matter how the position of the rings may be altered; and the ring, A2, which supports it will resist a considerable pressure tending to displace it."
units: cm
sim:
  timestep: 0.0001
  integrator: implicit
  iterations: 50
  solver: PGS
  multiccd: false
  duration_s: 8
  floor: false
bodies:
  # the pillar and ring A, turned about the vertical by the hand
  - id: ring_a
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#8f8a80"
    pieces:
      - {kind: disc, center: [0, 0], radius: 10.6, inner: 10.0, y: [-0.4, 0.4]}
      - {kind: rod, from: [0, 0, -10.5], to: [0, 0, -17], radius: 0.8}
      - {kind: rod, from: [-6, 0, -17], to: [6, 0, -17], radius: 0.6}
      - {kind: rod, from: [0, -6, -17], to: [0, 6, -17], radius: 0.6}
  # ring A1, on pivots across A (x)
  - id: ring_a1
    shape: part
    pos: [0, 0, 0]
    mount: ring_a
    density: 7800
    color: "#b08d57"
    pieces:
      - {kind: disc, center: [0, 0], radius: 8.9, inner: 8.4, y: [-0.3, 0.3]}
      - {kind: rod, from: [-10.3, 0, 0], to: [-8.4, 0, 0], radius: 0.25, color: "#6f6a60"}
      - {kind: rod, from: [8.4, 0, 0], to: [10.3, 0, 0], radius: 0.25, color: "#6f6a60"}
  # ring A2, on pivots up and down in A1 (z), carrying the ball's bearings
  - id: ring_a2
    shape: part
    pos: [0, 0, 0]
    mount: ring_a1
    density: 7800
    color: "#c9a96a"
    pieces:
      - {kind: rod, from: [0, 6.6, 0.0], to: [0, 6.4732, 1.2876], radius: 0.3}
      - {kind: rod, from: [0, 6.4732, 1.2876], to: [0, 6.0976, 2.5257], radius: 0.3}
      - {kind: rod, from: [0, 6.0976, 2.5257], to: [0, 5.4877, 3.6668], radius: 0.3}
      - {kind: rod, from: [0, 5.4877, 3.6668], to: [0, 4.6669, 4.6669], radius: 0.3}
      - {kind: rod, from: [0, 4.6669, 4.6669], to: [0, 3.6668, 5.4877], radius: 0.3}
      - {kind: rod, from: [0, 3.6668, 5.4877], to: [0, 2.5257, 6.0976], radius: 0.3}
      - {kind: rod, from: [0, 2.5257, 6.0976], to: [0, 1.2876, 6.4732], radius: 0.3}
      - {kind: rod, from: [0, 1.2876, 6.4732], to: [0, 0.0, 6.6], radius: 0.3}
      - {kind: rod, from: [0, 0.0, 6.6], to: [0, -1.2876, 6.4732], radius: 0.3}
      - {kind: rod, from: [0, -1.2876, 6.4732], to: [0, -2.5257, 6.0976], radius: 0.3}
      - {kind: rod, from: [0, -2.5257, 6.0976], to: [0, -3.6668, 5.4877], radius: 0.3}
      - {kind: rod, from: [0, -3.6668, 5.4877], to: [0, -4.6669, 4.6669], radius: 0.3}
      - {kind: rod, from: [0, -4.6669, 4.6669], to: [0, -5.4877, 3.6668], radius: 0.3}
      - {kind: rod, from: [0, -5.4877, 3.6668], to: [0, -6.0976, 2.5257], radius: 0.3}
      - {kind: rod, from: [0, -6.0976, 2.5257], to: [0, -6.4732, 1.2876], radius: 0.3}
      - {kind: rod, from: [0, -6.4732, 1.2876], to: [0, -6.6, 0.0], radius: 0.3}
      - {kind: rod, from: [0, -6.6, 0.0], to: [0, -6.4732, -1.2876], radius: 0.3}
      - {kind: rod, from: [0, -6.4732, -1.2876], to: [0, -6.0976, -2.5257], radius: 0.3}
      - {kind: rod, from: [0, -6.0976, -2.5257], to: [0, -5.4877, -3.6668], radius: 0.3}
      - {kind: rod, from: [0, -5.4877, -3.6668], to: [0, -4.6669, -4.6669], radius: 0.3}
      - {kind: rod, from: [0, -4.6669, -4.6669], to: [0, -3.6668, -5.4877], radius: 0.3}
      - {kind: rod, from: [0, -3.6668, -5.4877], to: [0, -2.5257, -6.0976], radius: 0.3}
      - {kind: rod, from: [0, -2.5257, -6.0976], to: [0, -1.2876, -6.4732], radius: 0.3}
      - {kind: rod, from: [0, -1.2876, -6.4732], to: [0, -0.0, -6.6], radius: 0.3}
      - {kind: rod, from: [0, -0.0, -6.6], to: [0, 1.2876, -6.4732], radius: 0.3}
      - {kind: rod, from: [0, 1.2876, -6.4732], to: [0, 2.5257, -6.0976], radius: 0.3}
      - {kind: rod, from: [0, 2.5257, -6.0976], to: [0, 3.6668, -5.4877], radius: 0.3}
      - {kind: rod, from: [0, 3.6668, -5.4877], to: [0, 4.6669, -4.6669], radius: 0.3}
      - {kind: rod, from: [0, 4.6669, -4.6669], to: [0, 5.4877, -3.6668], radius: 0.3}
      - {kind: rod, from: [0, 5.4877, -3.6668], to: [0, 6.0976, -2.5257], radius: 0.3}
      - {kind: rod, from: [0, 6.0976, -2.5257], to: [0, 6.4732, -1.2876], radius: 0.3}
      - {kind: rod, from: [0, 6.4732, -1.2876], to: [0, 6.6, -0.0], radius: 0.3}
      - {kind: rod, from: [0, 0, -8.6], to: [0, 0, -6.6], radius: 0.22, color: "#6f6a60"}
      - {kind: rod, from: [0, 0, 6.6], to: [0, 0, 8.6], radius: 0.22, color: "#6f6a60"}
  # the heavy ball B on its axis (y)
  - id: ball
    shape: part
    pos: [0, 0, 0]
    mount: ring_a2
    density: 7800
    color: "#d8c9a3"
    pieces:
      - {kind: disc, center: [0, 0], radius: 2.0616, y: [-4.5, -3.5]}
      - {kind: disc, center: [0, 0], radius: 3.3541, y: [-3.5, -2.5]}
      - {kind: disc, center: [0, 0], radius: 4.0311, y: [-2.5, -1.5]}
      - {kind: disc, center: [0, 0], radius: 4.3875, y: [-1.5, -0.5]}
      - {kind: disc, center: [0, 0], radius: 4.5, y: [-0.5, 0.5]}
      - {kind: disc, center: [0, 0], radius: 4.3875, y: [0.5, 1.5]}
      - {kind: disc, center: [0, 0], radius: 4.0311, y: [1.5, 2.5]}
      - {kind: disc, center: [0, 0], radius: 3.3541, y: [2.5, 3.5]}
      - {kind: disc, center: [0, 0], radius: 2.0616, y: [3.5, 4.5]}
      - {kind: rod, from: [0, -6.8, 0], to: [0, 6.8, 0], radius: 0.25, color: "#6f6a60"}
      - {kind: rod, from: [-0.15, -4.52, -3.8], to: [-0.15, -4.52, 3.8], radius: 0.3, color: "#5a4a36"}
  - id: base
    shape: part
    pos: [0, 0, -18.4]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-8, -19.6], [8, -19.6], [8, -17.6], [-8, -17.6]], y: [-8, 8]}
joints:
  - {id: j_t, type: hinge, body: ring_a, axis: [0, 0, 1], stiffness: 0.5, damping: 0.16}   # the hand's grip, positive against the clock from above
  - {id: j_1, type: hinge, body: ring_a1, axis: [1, 0, 0], frictionloss: 0.04}
  - {id: j_2, type: hinge, body: ring_a2, axis: [0, 0, 1], frictionloss: 0.04}
  - {id: j_s, type: hinge, body: ball, axis: [0, 1, 0]}
hand:
  - {t: 1.0, springref: {j_t: 0.7854}}
  - {t: 3.5, springref: {j_t: -0.7854}}
  - {t: 6.0, springref: {j_t: 0}}
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_s, kind: velocity, rpm: 4000.0, kv: 1, max_torque: 20}
checks:
  - {type: follow, out: j_2, in: j_t, expect: -1.0, tol: 0.05, min_r2: 0.99, settle_s: 0.5, window_s: 7.4}
  - {type: position, joint: j_t, min: -0.85, max: 0.85, settle_s: 0.2, window_s: 7.7}
  - {type: position, joint: j_1, min: -0.15, max: 0.15, settle_s: 0.2, window_s: 7.7}
camera: {target: [0, 0, -15], position: [-35, -115, 12], fov: 30}
display:
  output: j_2
  labels: {j_s: "Ball B (spun)", j_t: "Stand and ring A (by hand)", j_2: "Ring A2 in A1", j_1: "Ring A1 in A"}

