number: 163
slug: another-water-wheel-governor
name: Another arrangement for a water-wheel governor
brown: "Another arrangement for a water-wheel governor."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 50, duration_s: 12.0, floor: false}
bodies:
  - {id: spindle, shape: assembly, pos: [0, 0, 10.0], color: "#ded2b6"}
  - {id: loose, shape: assembly, pos: [0, 0, 13.0], color: "#e6dcc4"}
  - {id: farA, shape: assembly, pos: [40.0, 0, 10.0], color: "#ded2b6"}
  - {id: farL, shape: assembly, pos: [40.0, 0, 13.0], color: "#e6dcc4"}
  - {id: farB, shape: assembly, pos: [40.0, 0, 16.0], color: "#ded2b6"}
  - id: fork
    shape: part
    pos: [20.0, 0, 16.0]
    mass: 0.05
    friction: 0.02
    color: "#8f8a80"
    pieces:
      - {kind: rod, from: [2.0, 4.300, 17.600], to: [6.0, 4.300, 17.600], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, 4.830, 16.750], to: [6.0, 4.830, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, 3.770, 16.750], to: [6.0, 3.770, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, 4.300, 14.400], to: [6.0, 4.300, 14.400], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, 4.830, 15.250], to: [6.0, 4.830, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, 3.770, 15.250], to: [6.0, 3.770, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -4.300, 17.600], to: [6.0, -4.300, 17.600], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -3.770, 16.750], to: [6.0, -3.770, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -4.830, 16.750], to: [6.0, -4.830, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -4.300, 14.400], to: [6.0, -4.300, 14.400], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -3.770, 15.250], to: [6.0, -3.770, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [2.0, -4.830, 15.250], to: [6.0, -4.830, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 4.300, 17.600], to: [38.0, 4.300, 17.600], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 4.830, 16.750], to: [38.0, 4.830, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 3.770, 16.750], to: [38.0, 3.770, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 4.300, 14.400], to: [38.0, 4.300, 14.400], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 4.830, 15.250], to: [38.0, 4.830, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, 3.770, 15.250], to: [38.0, 3.770, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -4.300, 17.600], to: [38.0, -4.300, 17.600], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -3.770, 16.750], to: [38.0, -3.770, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -4.830, 16.750], to: [38.0, -4.830, 16.750], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -4.300, 14.400], to: [38.0, -4.300, 14.400], radius: 0.4, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -3.770, 15.250], to: [38.0, -3.770, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [34.0, -4.830, 15.250], to: [38.0, -4.830, 15.250], radius: 0.15, collide: 3, capsule: true}
      - {kind: rod, from: [4.0, 0, 19.0], to: [36.0, 0, 19.0], radius: 0.3, collide: 0}
  - id: gshaft
    shape: part
    pos: [0.0, 0, 17.5]
    mount: spindle
    color: "#e4d9bf"
    fixed: true
    pieces:
      - {kind: rod, from: [0.0, 0.0, 17.5], to: [0.0, 0.0, 66.0], radius: 0.8, collide: 0}
      - {kind: rod, from: [0.0, 0.0, 61.0], to: [0.0, 0.0, 63.4], radius: 1.6, collide: 0, color: "#8f8a80"}
      - {kind: rod, from: [-1.5, 0.0, 62.0], to: [1.5, 0.0, 62.0], radius: 0.5, collide: 0, color: "#8f8a80"}
  - id: sleeve
    shape: part
    pos: [0.0, 0, 38.3156]
    mount: gshaft
    mass: 0.3
    color: "#b8ad97"
    friction: 0.05
    pieces:
      - {kind: rod, from: [0.0, 0.0, 34.6156], to: [0.0, 0.0, 39.5156], radius: 1.3, collide: 0}
      - {kind: rod, from: [-1.5, 0.0, 38.3156], to: [1.5, 0.0, 38.3156], radius: 0.5, collide: 0, color: "#8f8a80"}
      - {kind: loft, a: [[4.5, 0.0, 34.7156], [4.3467, 1.1647, 34.7156], [3.8971, 2.25, 34.7156], [3.182, 3.182, 34.7156], [2.25, 3.8971, 34.7156], [1.1647, 4.3467, 34.7156], [0.0, 4.5, 34.7156], [-1.1647, 4.3467, 34.7156], [-2.25, 3.8971, 34.7156], [-3.182, 3.182, 34.7156], [-3.8971, 2.25, 34.7156], [-4.3467, 1.1647, 34.7156], [-4.5, 0.0, 34.7156], [-4.3467, -1.1647, 34.7156], [-3.8971, -2.25, 34.7156], [-3.182, -3.182, 34.7156], [-2.25, -3.8971, 34.7156], [-1.1647, -4.3467, 34.7156], [-0.0, -4.5, 34.7156], [1.1647, -4.3467, 34.7156], [2.25, -3.8971, 34.7156], [3.182, -3.182, 34.7156], [3.8971, -2.25, 34.7156], [4.3467, -1.1647, 34.7156]], b: [[4.5, 0.0, 35.3156], [4.3467, 1.1647, 35.3156], [3.8971, 2.25, 35.3156], [3.182, 3.182, 35.3156], [2.25, 3.8971, 35.3156], [1.1647, 4.3467, 35.3156], [0.0, 4.5, 35.3156], [-1.1647, 4.3467, 35.3156], [-2.25, 3.8971, 35.3156], [-3.182, 3.182, 35.3156], [-3.8971, 2.25, 35.3156], [-4.3467, 1.1647, 35.3156], [-4.5, 0.0, 35.3156], [-4.3467, -1.1647, 35.3156], [-3.8971, -2.25, 35.3156], [-3.182, -3.182, 35.3156], [-2.25, -3.8971, 35.3156], [-1.1647, -4.3467, 35.3156], [-0.0, -4.5, 35.3156], [1.1647, -4.3467, 35.3156], [2.25, -3.8971, 35.3156], [3.182, -3.182, 35.3156], [3.8971, -2.25, 35.3156], [4.3467, -1.1647, 35.3156]], collide: 2, color: "#8f8a80"}
      - {kind: loft, a: [[4.5, 0.0, 36.3156], [4.3467, 1.1647, 36.3156], [3.8971, 2.25, 36.3156], [3.182, 3.182, 36.3156], [2.25, 3.8971, 36.3156], [1.1647, 4.3467, 36.3156], [0.0, 4.5, 36.3156], [-1.1647, 4.3467, 36.3156], [-2.25, 3.8971, 36.3156], [-3.182, 3.182, 36.3156], [-3.8971, 2.25, 36.3156], [-4.3467, 1.1647, 36.3156], [-4.5, 0.0, 36.3156], [-4.3467, -1.1647, 36.3156], [-3.8971, -2.25, 36.3156], [-3.182, -3.182, 36.3156], [-2.25, -3.8971, 36.3156], [-1.1647, -4.3467, 36.3156], [-0.0, -4.5, 36.3156], [1.1647, -4.3467, 36.3156], [2.25, -3.8971, 36.3156], [3.182, -3.182, 36.3156], [3.8971, -2.25, 36.3156], [4.3467, -1.1647, 36.3156]], b: [[4.5, 0.0, 36.9156], [4.3467, 1.1647, 36.9156], [3.8971, 2.25, 36.9156], [3.182, 3.182, 36.9156], [2.25, 3.8971, 36.9156], [1.1647, 4.3467, 36.9156], [0.0, 4.5, 36.9156], [-1.1647, 4.3467, 36.9156], [-2.25, 3.8971, 36.9156], [-3.182, 3.182, 36.9156], [-3.8971, 2.25, 36.9156], [-4.3467, 1.1647, 36.9156], [-4.5, 0.0, 36.9156], [-4.3467, -1.1647, 36.9156], [-3.8971, -2.25, 36.9156], [-3.182, -3.182, 36.9156], [-2.25, -3.8971, 36.9156], [-1.1647, -4.3467, 36.9156], [-0.0, -4.5, 36.9156], [1.1647, -4.3467, 36.9156], [2.25, -3.8971, 36.9156], [3.182, -3.182, 36.9156], [3.8971, -2.25, 36.9156], [4.3467, -1.1647, 36.9156]], collide: 2, color: "#8f8a80"}
  - id: arm_r
    shape: part
    pos: [1.2, 0, 62.0]
    mount: gshaft
    mass: 2.4
    color: "#a89a7e"
    pieces:
      - {kind: rod, from: [1.2, 0.0, 62.0], to: [5.055, 0.0, 40.1373], radius: 0.45, collide: 0, color: "#a89a7e"}
      - {kind: rod, from: [5.055, -0.005, 40.1373], to: [5.055, 0.005, 40.1373], radius: 4.2, collide: 0, capsule: true, color: "#8f8a80"}
      - {kind: rod, from: [1.2, -1.0, 62.0], to: [1.2, 1.0, 62.0], radius: 0.7, collide: 0, color: "#8f8a80"}
  - id: link_r
    shape: part
    pos: [1.5, 0, 38.3156]
    mount: sleeve
    mass: 0.05
    color: "#a89a7e"
    pieces:
      - {kind: rod, from: [1.5, -0.9, 38.3156], to: [3.2838, -0.9, 50.1823], radius: 0.3, collide: 0, color: "#b8ad97"}
      - {kind: rod, from: [1.5, -1.2, 38.3156], to: [1.5, -0.6, 38.3156], radius: 0.5, collide: 0, color: "#8f8a80"}
  - id: arm_l
    shape: part
    pos: [-1.2, 0, 62.0]
    mount: gshaft
    mass: 2.4
    color: "#a89a7e"
    pieces:
      - {kind: rod, from: [-1.2, 0.0, 62.0], to: [-5.055, 0.0, 40.1373], radius: 0.45, collide: 0, color: "#a89a7e"}
      - {kind: rod, from: [-5.055, -0.005, 40.1373], to: [-5.055, 0.005, 40.1373], radius: 4.2, collide: 0, capsule: true, color: "#8f8a80"}
      - {kind: rod, from: [-1.2, -1.0, 62.0], to: [-1.2, 1.0, 62.0], radius: 0.7, collide: 0, color: "#8f8a80"}
  - id: link_l
    shape: part
    pos: [-1.5, 0, 38.3156]
    mount: sleeve
    mass: 0.05
    color: "#a89a7e"
    pieces:
      - {kind: rod, from: [-1.5, -0.9, 38.3156], to: [-3.2838, -0.9, 50.1823], radius: 0.3, collide: 0, color: "#b8ad97"}
      - {kind: rod, from: [-1.5, -1.2, 38.3156], to: [-1.5, -0.6, 38.3156], radius: 0.5, collide: 0, color: "#8f8a80"}
  - id: lever
    shape: part
    pos: [10.0, 0, 37.8156]
    mass: 0.15
    color: "#a89a7e"
    friction: 0.05
    pieces:
      - {kind: rod, from: [2.8, -0.8, 35.8156], to: [2.8, 0.8, 35.8156], radius: 0.4, collide: 1, capsule: true, color: "#6f6a60"}
      - {kind: rod, from: [2.8, 0.0, 35.8156], to: [10.0, 0.0, 37.8156], radius: 0.45, collide: 0}
      - {kind: rod, from: [10.0, 0.0, 37.8156], to: [20.44, 0.0, 37.8156], radius: 0.45, collide: 0}
      - {kind: rod, from: [10.0, -1.0, 37.8156], to: [10.0, 1.0, 37.8156], radius: 0.8, collide: 0, color: "#8f8a80"}
      - {kind: rod, from: [20.44, -0.7, 37.8156], to: [20.44, 0.7, 37.8156], radius: 0.45, collide: 0, color: "#8f8a80"}
  - id: hanger
    shape: part
    pos: [20.44, 0, 37.8156]
    mount: lever
    mass: 0.04
    color: "#a89a7e"
    pieces:
      - {kind: rod, from: [20.44, 0.9, 37.8156], to: [20.44, 0.9, 19.0], radius: 0.3, collide: 0, color: "#8f8a80"}
  - id: gframe
    shape: part
    pos: [0.0, 0, 0.0]
    color: "#cfc6b4"
    fixed: true
    pieces:
      - {kind: rod, from: [-14.0, 3.5, 22.0], to: [26.44, 3.5, 22.0], radius: 0.8, collide: 0}
      - {kind: rod, from: [10.0, 3.5, 22.0], to: [10.0, 3.5, 37.8156], radius: 0.6, collide: 0}
      - {kind: rod, from: [10.0, 1.0, 37.8156], to: [10.0, 3.5, 37.8156], radius: 0.6, collide: 0}
      - {kind: rod, from: [-14.0, 3.5, 4.0], to: [-14.0, 3.5, 22.0], radius: 0.8, collide: 0}
      - {kind: rod, from: [0.0, 3.5, 20.4], to: [0.0, 3.5, 22.0], radius: 1.3, collide: 0, color: "#8f8a80"}
wheels:
  - {id: g0, body: spindle, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#ded2b6"}
  - {id: g1, body: loose, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#e6dcc4"}
  - {id: g2, body: spindle, pos: [0, 0, 6.0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#ded2b6"}
  - {id: f0, body: farA, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#ded2b6"}
  - {id: f1, body: farL, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#ded2b6"}
  - {id: f2, body: farB, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 2.9800, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.2, color: "#ded2b6"}
  - {id: c_spindle_lo, body: spindle, pos: [0, 0, -1.8], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.6, width: 0.6, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.05, color: "#cfc6b4"}
  - {id: c_spindle_hi, body: spindle, pos: [0, 0, 7.8], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.6, width: 0.6, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.05, color: "#cfc6b4"}
  - {id: c_farA_lo, body: farA, pos: [0, 0, -1.8], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.6, width: 0.6, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.05, color: "#cfc6b4"}
  - {id: c_farB_hi, body: farB, pos: [0, 0, 1.8], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.6, width: 0.6, flange: 0, flat_rim: true, spokes: 0, web: true, mass: 0.05, color: "#cfc6b4"}
joints:
  - {id: j_s, type: hinge, body: spindle, axis: [0, 0, 1], damping: 0.01}
  - {id: j_loose, type: hinge, body: loose, axis: [0, 0, 1], damping: 0.0005}
  - {id: j_fA, type: hinge, body: farA, axis: [0, 0, 1], damping: 0.002, frictionloss: 0.05}
  - {id: j_fL, type: hinge, body: farL, axis: [0, 0, 1], damping: 0.0005}
  - {id: j_fB, type: hinge, body: farB, axis: [0, 0, 1], damping: 0.002, frictionloss: 0.05}
  - {id: j_fork, type: slide, body: fork, axis: [0, 0, 1], range: [-6.0, 0.5], damping: 20.0, frictionloss: 2.0}
  - {id: j_r, type: hinge, body: arm_r, axis: [0, -1, 0], damping: 0.02}
  - {id: j_l, type: hinge, body: arm_l, axis: [0, 1, 0], damping: 0.02}
  - {id: j_z, type: slide, body: sleeve, axis: [0, 0, 1], range: [0, 4.6], damping: 3.0}
  - {id: j_lr, type: hinge, body: link_r, axis: [0, 1, 0], damping: 0.0005}
  - {id: j_ll, type: hinge, body: link_l, axis: [0, 1, 0], damping: 0.0005}
  - {id: j_lev, type: hinge, body: lever, axis: [0, 1, 0], damping: 0.002}
  - {id: j_hg, type: hinge, body: hanger, axis: [0, 1, 0], damping: 0.0005}
belts:
  - id: belt
    around: [g1, f1]
    axis: z
    station: 16.0
    shift: {stiffness: 5.0, damping: 0.001}
    links: 70
    segments: 8
    thickness: 0.6
    width: 2.2
    density: 950
    stiffness: 40000.0
    damping: 2
    pretension: 4.0
    joint_armature: 0.000001
    friction: 0.3
pins:
  - {id: pin_r, a: link_r, b: arm_r, at: [3.2838, 0, 50.1823]}
  - {id: pin_l, a: link_l, b: arm_l, at: [-3.2838, 0, 50.1823]}
  - {id: pin_f, a: hanger, b: fork, at: [20.44, 0, 19.0]}
contact: {solref: [0.002, 1], solimp: [0.9, 0.95, 0.001], margin: 0}
driver: {joint: j_s, kind: velocity, rpm: 120.0, ramp: [[0, 0], [1.2, 60], [2.5, 60], [3.2, 88], [5.2, 88], [5.8, 120], [8.2, 120], [8.8, 55], [12, 55]], kv: 1.0, max_torque: 2.0}
checks:
  - {type: penetration, max: 0.003, settle_s: 0.5}
  - {type: ratio_range, out: j_fB, in: j_s, min: 0.4, max: 1.1, settle_s: 1.9, window_s: 0.6, slices: 6}
  - {type: still, joint: j_fA, max: 0.3, settle_s: 1.9, window_s: 0.6}
  - {type: still, joint: j_fB, max: 0.3, settle_s: 4.6, window_s: 0.6}
  - {type: still, joint: j_fA, max: 0.3, settle_s: 4.6, window_s: 0.6}
  - {type: position, joint: j_fork, min: -4.0, max: -1.5, settle_s: 4.6, window_s: 0.6}
  - {type: ratio, out: j_fA, in: j_s, expect: 0.82, tol: 0.15, settle_s: 7.0, window_s: 1.2}
  - {type: still, joint: j_fB, max: 0.3, settle_s: 7.0, window_s: 1.2}
  - {type: position, joint: j_fork, min: -6.1, max: -5.5, settle_s: 7.0, window_s: 1.2}
  - {type: still, joint: j_fA, max: 0.3, settle_s: 10.0, window_s: 1.9}
  - {type: position, joint: j_fork, min: -4.0, max: -1.5, settle_s: 10.0, window_s: 1.9}
camera: {target: [12.0, 0, 33.0], position: [20.0, -135.0, 53.0], fov: 35}
display:
  output: j_fA
  labels: {j_s: "Governor spindle, turned by the water-wheel (driver)", j_fB: "Upper pulley shaft: lowers the gate", j_fA: "Lower pulley shaft: raises the gate", j_fork: "Belt fork, thrown by the governor"}
