# No. 458, The common pulley and buckets for raising water (Brown 1868).
#
# "The common pulley and buckets for raising water; the empty bucket is pulled down to raise the
# full one."
#
# Generated by batch13/gen458.py. A sheave hung from the ridge of a well-house, a rope over it with
# a bucket on each end: the empty one up at the left, the full one down in the well at the right.
# Nothing is driven but the hand on the empty bucket's rope, pulling it down at a steady speed (a
# velocity servo on that bucket's plumb guide); the rope, a real chain of links rubbing on the
# sheave, raises the full one. The full bucket is a solid: its water is a block of 1 g/cm3.
# The checks measure Brown's arrangement: the full bucket rises as fast as the empty one is pulled
# down, and the pull is the difference of the two buckets' weights (the empty bucket's own weight
# helps the hand), not the full bucket's whole weight.
number: 458
slug: pulley-and-buckets
name: Pulley and buckets for raising water
brown: "The common pulley and buckets for raising water; the empty bucket is pulled down to raise the full one."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 60, duration_s: 3.2, floor: false}
bodies:
  - id: house
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: loft, a: [[-75.0, -14, -20], [-26.0, -14, -20], [-26.0, 14, -20], [-75.0, 14, -20]], b: [[-75.0, -14, 40.0], [-26.0, -14, 40.0], [-26.0, 14, 40.0], [-75.0, 14, 40.0]], collide: 0, color: "#cdbf9f"}   # the ground
      - {kind: loft, a: [[-25.95, -14.05, -12], [-27.5, -14.05, -12], [-27.5, -14.05, -11.5], [-25.95, -14.05, -11.5]], b: [[-25.95, -14.2, -12], [-27.5, -14.2, -12], [-27.5, -14.2, -11.5], [-25.95, -14.2, -11.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[-25.95, -14.05, 0], [-27.5, -14.05, 0], [-27.5, -14.05, 0.5], [-25.95, -14.05, 0.5]], b: [[-25.95, -14.2, 0], [-27.5, -14.2, 0], [-27.5, -14.2, 0.5], [-25.95, -14.2, 0.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[-25.95, -14.05, 12], [-27.5, -14.05, 12], [-27.5, -14.05, 12.5], [-25.95, -14.05, 12.5]], b: [[-25.95, -14.2, 12], [-27.5, -14.2, 12], [-27.5, -14.2, 12.5], [-25.95, -14.2, 12.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[-25.95, -14.05, 24], [-27.5, -14.05, 24], [-27.5, -14.05, 24.5], [-25.95, -14.05, 24.5]], b: [[-25.95, -14.2, 24], [-27.5, -14.2, 24], [-27.5, -14.2, 24.5], [-25.95, -14.2, 24.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[-25.95, -14.05, 36], [-27.5, -14.05, 36], [-27.5, -14.05, 36.5], [-25.95, -14.05, 36.5]], b: [[-25.95, -14.2, 36], [-27.5, -14.2, 36], [-27.5, -14.2, 36.5], [-25.95, -14.2, 36.5]], collide: 0, color: "#8f8371"}
      - {kind: rod, from: [-30, 0, 40.0], to: [-30, 0, 104], radius: 1.6, collide: 0, color: "#bfae8e"}   # a post
      - {kind: loft, a: [[0, -13, 112], [-48, -13, 96], [-48, -13, 94.4], [0, -13, 110.4]], b: [[0, 13, 112], [-48, 13, 96], [-48, 13, 94.4], [0, 13, 110.4]], collide: 0, color: "#b5a07e"}   # the roof
      - {kind: loft, a: [[26.0, -14, -20], [75.0, -14, -20], [75.0, 14, -20], [26.0, 14, -20]], b: [[26.0, -14, 40.0], [75.0, -14, 40.0], [75.0, 14, 40.0], [26.0, 14, 40.0]], collide: 0, color: "#cdbf9f"}   # the ground
      - {kind: loft, a: [[25.95, -14.05, -12], [27.5, -14.05, -12], [27.5, -14.05, -11.5], [25.95, -14.05, -11.5]], b: [[25.95, -14.2, -12], [27.5, -14.2, -12], [27.5, -14.2, -11.5], [25.95, -14.2, -11.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[25.95, -14.05, 0], [27.5, -14.05, 0], [27.5, -14.05, 0.5], [25.95, -14.05, 0.5]], b: [[25.95, -14.2, 0], [27.5, -14.2, 0], [27.5, -14.2, 0.5], [25.95, -14.2, 0.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[25.95, -14.05, 12], [27.5, -14.05, 12], [27.5, -14.05, 12.5], [25.95, -14.05, 12.5]], b: [[25.95, -14.2, 12], [27.5, -14.2, 12], [27.5, -14.2, 12.5], [25.95, -14.2, 12.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[25.95, -14.05, 24], [27.5, -14.05, 24], [27.5, -14.05, 24.5], [25.95, -14.05, 24.5]], b: [[25.95, -14.2, 24], [27.5, -14.2, 24], [27.5, -14.2, 24.5], [25.95, -14.2, 24.5]], collide: 0, color: "#8f8371"}
      - {kind: loft, a: [[25.95, -14.05, 36], [27.5, -14.05, 36], [27.5, -14.05, 36.5], [25.95, -14.05, 36.5]], b: [[25.95, -14.2, 36], [27.5, -14.2, 36], [27.5, -14.2, 36.5], [25.95, -14.2, 36.5]], collide: 0, color: "#8f8371"}
      - {kind: rod, from: [30, 0, 40.0], to: [30, 0, 104], radius: 1.6, collide: 0, color: "#bfae8e"}   # a post
      - {kind: loft, a: [[0, -13, 112], [48, -13, 96], [48, -13, 94.4], [0, -13, 110.4]], b: [[0, 13, 112], [48, 13, 96], [48, 13, 94.4], [0, 13, 110.4]], collide: 0, color: "#b5a07e"}   # the roof
      - {kind: rod, from: [-30, 0, 103], to: [30, 0, 103], radius: 1.4, collide: 0, color: "#bfae8e"}   # the tie-beam
      - {kind: rod, from: [0, 0, 103], to: [0, 0, 93.6], radius: 0.8, collide: 0, color: "#6f6a62"}   # the hanger
      - {kind: rod, from: [0, -3.2, 92.0], to: [0, 3.2, 92.0], radius: 0.6, collide: 0, color: "#6f6a62"}   # the axle
      - {kind: rod, from: [0, -2.6, 93.6], to: [0, -2.6, 92.0], radius: 0.4, collide: 0, color: "#6f6a62"}
      - {kind: rod, from: [0, 2.6, 93.6], to: [0, 2.6, 92.0], radius: 0.4, collide: 0, color: "#6f6a62"}
  - {id: pulley, shape: pulley, radius: 14.0, width: 3.0, pos: [0, 0, 92.0], mass: 1.0, spokes: 6, hub: 1.6, flange: 0.5, color: "#e6dcc6"}
  - id: full
    shape: part
    pos: [14.4, 0, 8.0]
    color: "#b08e62"
    pieces:
      - {kind: loft, a: [[21.3291, 2.8701, -12], [17.2701, 6.9291, -12], [20.7748, 2.6405, -12], [17.0405, 6.3748, -12]], b: [[22.253, 3.2528, 3], [17.6528, 7.853, 3], [21.6986, 3.0232, 3], [17.4232, 7.2986, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[17.2701, 6.9291, -12], [11.5299, 6.9291, -12], [17.0405, 6.3748, -12], [11.7595, 6.3748, -12]], b: [[17.6528, 7.853, 3], [11.1472, 7.853, 3], [17.4232, 7.2986, 3], [11.3768, 7.2986, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[11.5299, 6.9291, -12], [7.4709, 2.8701, -12], [11.7595, 6.3748, -12], [8.0252, 2.6405, -12]], b: [[11.1472, 7.853, 3], [6.547, 3.2528, 3], [11.3768, 7.2986, 3], [7.1014, 3.0232, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[7.4709, 2.8701, -12], [7.4709, -2.8701, -12], [8.0252, 2.6405, -12], [8.0252, -2.6405, -12]], b: [[6.547, 3.2528, 3], [6.547, -3.2528, 3], [7.1014, 3.0232, 3], [7.1014, -3.0232, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[7.4709, -2.8701, -12], [11.5299, -6.9291, -12], [8.0252, -2.6405, -12], [11.7595, -6.3748, -12]], b: [[6.547, -3.2528, 3], [11.1472, -7.853, 3], [7.1014, -3.0232, 3], [11.3768, -7.2986, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[11.5299, -6.9291, -12], [17.2701, -6.9291, -12], [11.7595, -6.3748, -12], [17.0405, -6.3748, -12]], b: [[11.1472, -7.853, 3], [17.6528, -7.853, 3], [11.3768, -7.2986, 3], [17.4232, -7.2986, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[17.2701, -6.9291, -12], [21.3291, -2.8701, -12], [17.0405, -6.3748, -12], [20.7748, -2.6405, -12]], b: [[17.6528, -7.853, 3], [22.253, -3.2528, 3], [17.4232, -7.2986, 3], [21.6986, -3.0232, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[21.3291, -2.8701, -12], [21.3291, 2.8701, -12], [20.7748, -2.6405, -12], [20.7748, 2.6405, -12]], b: [[22.253, -3.2528, 3], [22.253, 3.2528, 3], [21.6986, -3.0232, 3], [21.6986, 3.0232, 3]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[20.7748, 2.6405, -12], [17.0405, 6.3748, -12], [11.7595, 6.3748, -12], [8.0252, 2.6405, -12], [8.0252, -2.6405, -12], [11.7595, -6.3748, -12], [17.0405, -6.3748, -12], [20.7748, -2.6405, -12]], b: [[20.7748, 2.6405, -11], [17.0405, 6.3748, -11], [11.7595, 6.3748, -11], [8.0252, 2.6405, -11], [8.0252, -2.6405, -11], [11.7595, -6.3748, -11], [17.0405, -6.3748, -11], [20.7748, -2.6405, -11]], collide: 0, density: 600, color: "#9b7b52"}
      - {kind: loft, a: [[20.7748, 2.6405, -11], [17.0405, 6.3748, -11], [11.7595, 6.3748, -11], [8.0252, 2.6405, -11], [8.0252, -2.6405, -11], [11.7595, -6.3748, -11], [17.0405, -6.3748, -11], [20.7748, -2.6405, -11]], b: [[21.5631, 2.9671, 1.8], [17.3671, 7.1631, 1.8], [11.4329, 7.1631, 1.8], [7.2369, 2.9671, 1.8], [7.2369, -2.9671, 1.8], [11.4329, -7.1631, 1.8], [17.3671, -7.1631, 1.8], [21.5631, -2.9671, 1.8]], collide: 0, density: 1000, color: "#6f97b8"}   # the water, a solid
      - {kind: loft, a: [[21.6371, 2.9977, -10.5], [17.3977, 7.2371, -10.5], [11.4023, 7.2371, -10.5], [7.1629, 2.9977, -10.5], [7.1629, -2.9977, -10.5], [11.4023, -7.2371, -10.5], [17.3977, -7.2371, -10.5], [21.6371, -2.9977, -10.5]], b: [[21.6371, 2.9977, -9.5], [17.3977, 7.2371, -9.5], [11.4023, 7.2371, -9.5], [7.1629, 2.9977, -9.5], [7.1629, -2.9977, -9.5], [11.4023, -7.2371, -9.5], [17.3977, -7.2371, -9.5], [21.6371, -2.9977, -9.5]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: loft, a: [[22.3146, 3.2783, 0.5], [17.6783, 7.9146, 0.5], [11.1217, 7.9146, 0.5], [6.4854, 3.2783, 0.5], [6.4854, -3.2783, 0.5], [11.1217, -7.9146, 0.5], [17.6783, -7.9146, 0.5], [22.3146, -3.2783, 0.5]], b: [[22.3146, 3.2783, 1.5], [17.6783, 7.9146, 1.5], [11.1217, 7.9146, 1.5], [6.4854, 3.2783, 1.5], [6.4854, -3.2783, 1.5], [11.1217, -7.9146, 1.5], [17.6783, -7.9146, 1.5], [22.3146, -3.2783, 1.5]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: rod, from: [14.4, -8.8, 2.2], to: [14.4, -1.2, 8.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [14.4, 8.8, 2.2], to: [14.4, 1.2, 8.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [14.4, -1.2, 8.0], to: [14.4, 1.2, 8.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
  - id: empty
    shape: part
    pos: [-14.4, 0, 60.0]
    color: "#b08e62"
    pieces:
      - {kind: loft, a: [[-7.4709, 2.8701, 40], [-11.5299, 6.9291, 40], [-8.0252, 2.6405, 40], [-11.7595, 6.3748, 40]], b: [[-6.547, 3.2528, 55], [-11.1472, 7.853, 55], [-7.1014, 3.0232, 55], [-11.3768, 7.2986, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-11.5299, 6.9291, 40], [-17.2701, 6.9291, 40], [-11.7595, 6.3748, 40], [-17.0405, 6.3748, 40]], b: [[-11.1472, 7.853, 55], [-17.6528, 7.853, 55], [-11.3768, 7.2986, 55], [-17.4232, 7.2986, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-17.2701, 6.9291, 40], [-21.3291, 2.8701, 40], [-17.0405, 6.3748, 40], [-20.7748, 2.6405, 40]], b: [[-17.6528, 7.853, 55], [-22.253, 3.2528, 55], [-17.4232, 7.2986, 55], [-21.6986, 3.0232, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-21.3291, 2.8701, 40], [-21.3291, -2.8701, 40], [-20.7748, 2.6405, 40], [-20.7748, -2.6405, 40]], b: [[-22.253, 3.2528, 55], [-22.253, -3.2528, 55], [-21.6986, 3.0232, 55], [-21.6986, -3.0232, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-21.3291, -2.8701, 40], [-17.2701, -6.9291, 40], [-20.7748, -2.6405, 40], [-17.0405, -6.3748, 40]], b: [[-22.253, -3.2528, 55], [-17.6528, -7.853, 55], [-21.6986, -3.0232, 55], [-17.4232, -7.2986, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-17.2701, -6.9291, 40], [-11.5299, -6.9291, 40], [-17.0405, -6.3748, 40], [-11.7595, -6.3748, 40]], b: [[-17.6528, -7.853, 55], [-11.1472, -7.853, 55], [-17.4232, -7.2986, 55], [-11.3768, -7.2986, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-11.5299, -6.9291, 40], [-7.4709, -2.8701, 40], [-11.7595, -6.3748, 40], [-8.0252, -2.6405, 40]], b: [[-11.1472, -7.853, 55], [-6.547, -3.2528, 55], [-11.3768, -7.2986, 55], [-7.1014, -3.0232, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-7.4709, -2.8701, 40], [-7.4709, 2.8701, 40], [-8.0252, -2.6405, 40], [-8.0252, 2.6405, 40]], b: [[-6.547, -3.2528, 55], [-6.547, 3.2528, 55], [-7.1014, -3.0232, 55], [-7.1014, 3.0232, 55]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-8.0252, 2.6405, 40], [-11.7595, 6.3748, 40], [-17.0405, 6.3748, 40], [-20.7748, 2.6405, 40], [-20.7748, -2.6405, 40], [-17.0405, -6.3748, 40], [-11.7595, -6.3748, 40], [-8.0252, -2.6405, 40]], b: [[-8.0252, 2.6405, 41], [-11.7595, 6.3748, 41], [-17.0405, 6.3748, 41], [-20.7748, 2.6405, 41], [-20.7748, -2.6405, 41], [-17.0405, -6.3748, 41], [-11.7595, -6.3748, 41], [-8.0252, -2.6405, 41]], collide: 0, density: 600, color: "#9b7b52"}
      - {kind: loft, a: [[-7.1629, 2.9977, 41.5], [-11.4023, 7.2371, 41.5], [-17.3977, 7.2371, 41.5], [-21.6371, 2.9977, 41.5], [-21.6371, -2.9977, 41.5], [-17.3977, -7.2371, 41.5], [-11.4023, -7.2371, 41.5], [-7.1629, -2.9977, 41.5]], b: [[-7.1629, 2.9977, 42.5], [-11.4023, 7.2371, 42.5], [-17.3977, 7.2371, 42.5], [-21.6371, 2.9977, 42.5], [-21.6371, -2.9977, 42.5], [-17.3977, -7.2371, 42.5], [-11.4023, -7.2371, 42.5], [-7.1629, -2.9977, 42.5]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: loft, a: [[-6.4854, 3.2783, 52.5], [-11.1217, 7.9146, 52.5], [-17.6783, 7.9146, 52.5], [-22.3146, 3.2783, 52.5], [-22.3146, -3.2783, 52.5], [-17.6783, -7.9146, 52.5], [-11.1217, -7.9146, 52.5], [-6.4854, -3.2783, 52.5]], b: [[-6.4854, 3.2783, 53.5], [-11.1217, 7.9146, 53.5], [-17.6783, 7.9146, 53.5], [-22.3146, 3.2783, 53.5], [-22.3146, -3.2783, 53.5], [-17.6783, -7.9146, 53.5], [-11.1217, -7.9146, 53.5], [-6.4854, -3.2783, 53.5]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: rod, from: [-14.4, -8.8, 54.2], to: [-14.4, -1.2, 60.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-14.4, 8.8, 54.2], to: [-14.4, 1.2, 60.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-14.4, -1.2, 60.0], to: [-14.4, 1.2, 60.0], radius: 0.3, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-14.4, 0, 61], to: [-14.4, 0, 64], radius: 1.5, collide: 0, density: 500, color: "#c9bda2"}
      - {kind: rod, from: [-15.6, 0, 62.5], to: [-24.4, 0, 59.5], radius: 1.2, collide: 0, density: 500, color: "#c9bda2"}
      - {kind: rod, from: [-24.4, 0, 59.5], to: [-36.4, 0, 57.5], radius: 1.05, collide: 0, density: 500, color: "#c9bda2"}
joints:
  - {id: j_pulley, type: hinge, body: pulley, axis: [0, 1, 0], damping: 0.01}
  - {id: j_e, type: slide, body: empty, axis: [0, 0, -1], range: [-5, 60]}   # the empty bucket, pulled down; + : down
  - {id: j_f, type: slide, body: full, axis: [0, 0, 1], range: [-5, 60]}    # the full one; + : up
cords:
  - id: rope   # from the hand on the empty bucket's bail, up over the sheave and down to the full bucket
    from: {body: empty, at: [-14.4, 0, 64.0]}
    to: {body: full, at: [14.4, 0, 8.0]}
    over: [pulley]
    links: 60
    thickness: 0.8
    density: 1400
    stiffness: 40000.0
    pretension: 21.9
    damping: 12.0
    friction: 0.5

contact: {solref: [0.0005, 1], solimp: [0.98, 0.999, 0.0001], margin: 0}
driver: {joint: j_e, kind: velocity, speed: 12, kv: 60000.0, max_torque: 600.0}
checks:
  - {type: ratio, out: j_f, in: j_e, expect: 1.0, tol: 0.03, settle_s: 0.8, window_s: 2.0}
  - {type: force, expect: 18.6, tol: 1.5, settle_s: 0.8, window_s: 2.0}
camera: {target: [0, 0, 52], position: [0, -330, 82], fov: 26}
