# No. 457, Common mode of raising water from wells of inconsiderable depth (Brown 1868).
#
# "Common mode of raising water from wells of inconsiderable depth. Counterbalance equals about
# one-half of weight to be raised, so that the bucket has to be pulled down when empty, and is
# assisted in elevating it when full by counterbalance."
#
# Generated by batch13/gen457.py. A sweep: a pole turning on a pin in the fork of a post, its long
# arm holding the bucket's rope over the well, its short arm loaded with a lashed block of stones.
# The stones are sized from Brown's rule: they hold up about half the full bucket at the rope
# (counterpoise 9.9 kg on a 30 cm arm against a 5.7 kg full bucket on the 100 cm arm,
# the pole's own overhang included). Nothing drives the pole: the hand on the rope lifts the full
# bucket out of the well at a steady speed (a velocity servo on the bucket's plumb guide), and the
# rope pulls the pole round. The full bucket is a solid: its water is a solid block of 1 g/cm3.
# Brown's point is what the checks measure: the hand needs only about half the full bucket's
# weight to raise it, the stones lifting the rest through the rope.
number: 457
slug: well-sweep-counterpoise
name: Well sweep with counterpoise
brown: "Common mode of raising water from wells of inconsiderable depth. Counterbalance equals about one-half of weight to be raised, so that the bucket has to be pulled down when empty, and is assisted in elevating it when full by counterbalance."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 60, duration_s: 3.4, floor: false}
bodies:
  - id: ground
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: loft, a: [[-160.0, -60, -3], [160.0, -60, -3], [160.0, 60, -3], [-160.0, 60, -3]], b: [[-160.0, -60, 0], [160.0, -60, 0], [160.0, 60, 0], [-160.0, 60, 0]], collide: 0, color: "#d8cdb4"}   # the ground
      - {kind: loft, a: [[-33.003, 0.3, 0], [-27.0042, 0.42, 0], [-28.1268, 6.7863, 0], [-33.8048, 4.8474, 0]], b: [[-33.003, 0.3, 3], [-27.0042, 0.42, 3], [-28.1268, 6.7863, 3], [-33.8048, 4.8474, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-34.01, 5.4112, 0], [-28.414, 7.5756, 0], [-31.6463, 13.1741, 0], [-36.3188, 9.4101, 0]], b: [[-34.01, 5.4112, 3], [-28.414, 7.5756, 3], [-31.6463, 13.1741, 3], [-36.3188, 9.4101, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-36.7045, 9.8697, 0], [-32.1862, 13.8176, 0], [-37.1384, 17.9729, 0], [-40.2417, 12.8378, 0]], b: [[-36.7045, 9.8697, 3], [-32.1862, 13.8176, 3], [-37.1384, 17.9729, 3], [-40.2417, 12.8378, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-40.7613, 13.1378, 0], [-37.8658, 18.3929, 0], [-43.9405, 20.6039, 0], [-45.1004, 14.7171, 0]], b: [[-40.7613, 13.1378, 3], [-37.8658, 18.3929, 3], [-43.9405, 20.6039, 3], [-45.1004, 14.7171, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-45.6912, 14.8213, 0], [-44.7677, 20.7498, 0], [-51.2323, 20.7498, 0], [-50.3088, 14.8213, 0]], b: [[-45.6912, 14.8213, 3], [-44.7677, 20.7498, 3], [-51.2323, 20.7498, 3], [-50.3088, 14.8213, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-50.8996, 14.7171, 0], [-52.0595, 20.6039, 0], [-58.1342, 18.3929, 0], [-55.2387, 13.1378, 0]], b: [[-50.8996, 14.7171, 3], [-52.0595, 20.6039, 3], [-58.1342, 18.3929, 3], [-55.2387, 13.1378, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-55.7583, 12.8378, 0], [-58.8616, 17.9729, 0], [-63.8138, 13.8176, 0], [-59.2955, 9.8697, 0]], b: [[-55.7583, 12.8378, 3], [-58.8616, 17.9729, 3], [-63.8138, 13.8176, 3], [-59.2955, 9.8697, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-59.6812, 9.4101, 0], [-64.3537, 13.1741, 0], [-67.586, 7.5756, 0], [-61.99, 5.4112, 0]], b: [[-59.6812, 9.4101, 3], [-64.3537, 13.1741, 3], [-67.586, 7.5756, 3], [-61.99, 5.4112, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-62.1952, 4.8474, 0], [-67.8732, 6.7863, 0], [-68.9958, 0.42, 0], [-62.997, 0.3, 0]], b: [[-62.1952, 4.8474, 3], [-67.8732, 6.7863, 3], [-68.9958, 0.42, 3], [-62.997, 0.3, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-62.997, -0.3, 0], [-68.9958, -0.42, 0], [-67.8732, -6.7863, 0], [-62.1952, -4.8474, 0]], b: [[-62.997, -0.3, 3], [-68.9958, -0.42, 3], [-67.8732, -6.7863, 3], [-62.1952, -4.8474, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-61.99, -5.4112, 0], [-67.586, -7.5756, 0], [-64.3537, -13.1741, 0], [-59.6812, -9.4101, 0]], b: [[-61.99, -5.4112, 3], [-67.586, -7.5756, 3], [-64.3537, -13.1741, 3], [-59.6812, -9.4101, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-59.2955, -9.8697, 0], [-63.8138, -13.8176, 0], [-58.8616, -17.9729, 0], [-55.7583, -12.8378, 0]], b: [[-59.2955, -9.8697, 3], [-63.8138, -13.8176, 3], [-58.8616, -17.9729, 3], [-55.7583, -12.8378, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-55.2387, -13.1378, 0], [-58.1342, -18.3929, 0], [-52.0595, -20.6039, 0], [-50.8996, -14.7171, 0]], b: [[-55.2387, -13.1378, 3], [-58.1342, -18.3929, 3], [-52.0595, -20.6039, 3], [-50.8996, -14.7171, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-50.3088, -14.8213, 0], [-51.2323, -20.7498, 0], [-44.7677, -20.7498, 0], [-45.6912, -14.8213, 0]], b: [[-50.3088, -14.8213, 3], [-51.2323, -20.7498, 3], [-44.7677, -20.7498, 3], [-45.6912, -14.8213, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-45.1004, -14.7171, 0], [-43.9405, -20.6039, 0], [-37.8658, -18.3929, 0], [-40.7613, -13.1378, 0]], b: [[-45.1004, -14.7171, 3], [-43.9405, -20.6039, 3], [-37.8658, -18.3929, 3], [-40.7613, -13.1378, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-40.2417, -12.8378, 0], [-37.1384, -17.9729, 0], [-32.1862, -13.8176, 0], [-36.7045, -9.8697, 0]], b: [[-40.2417, -12.8378, 3], [-37.1384, -17.9729, 3], [-32.1862, -13.8176, 3], [-36.7045, -9.8697, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-36.3188, -9.4101, 0], [-31.6463, -13.1741, 0], [-28.414, -7.5756, 0], [-34.01, -5.4112, 0]], b: [[-36.3188, -9.4101, 3], [-31.6463, -13.1741, 3], [-28.414, -7.5756, 3], [-34.01, -5.4112, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-33.8048, -4.8474, 0], [-28.1268, -6.7863, 0], [-27.0042, -0.42, 0], [-33.003, -0.3, 0]], b: [[-33.8048, -4.8474, 3], [-28.1268, -6.7863, 3], [-27.0042, -0.42, 3], [-33.003, -0.3, 3]], collide: 0, color: "#bfb4a0"}
      - {kind: loft, a: [[-33.3, 0, 0.1], [-34.419, 5.6254, 0.1], [-37.6055, 10.3945, 0.1], [-42.3746, 13.581, 0.1], [-48, 14.7, 0.1], [-53.6254, 13.581, 0.1], [-58.3945, 10.3945, 0.1], [-61.581, 5.6254, 0.1], [-62.7, 0, 0.1], [-61.581, -5.6254, 0.1], [-58.3945, -10.3945, 0.1], [-53.6254, -13.581, 0.1], [-48, -14.7, 0.1], [-42.3746, -13.581, 0.1], [-37.6055, -10.3945, 0.1], [-34.419, -5.6254, 0.1]], b: [[-33.3, 0, -0.5], [-34.419, 5.6254, -0.5], [-37.6055, 10.3945, -0.5], [-42.3746, 13.581, -0.5], [-48, 14.7, -0.5], [-53.6254, 13.581, -0.5], [-58.3945, 10.3945, -0.5], [-61.581, 5.6254, -0.5], [-62.7, 0, -0.5], [-61.581, -5.6254, -0.5], [-58.3945, -10.3945, -0.5], [-53.6254, -13.581, -0.5], [-48, -14.7, -0.5], [-42.3746, -13.581, -0.5], [-37.6055, -10.3945, -0.5], [-34.419, -5.6254, -0.5]], collide: 0, color: "#3b3630"}   # the water in the well, dark
      - {kind: rod, from: [30.0, 0, -2], to: [30.0, 0, 68.0], radius: 5.5, collide: 0, color: "#9c8a70"}   # the trunk
      - {kind: rod, from: [30.0, -2.0, 67.0], to: [31.5, -5.0, 84.0], radius: 2.2, collide: 0, color: "#9c8a70"}   # a prong of the fork
      - {kind: rod, from: [30.0, 2.0, 67.0], to: [31.5, 5.0, 84.0], radius: 2.2, collide: 0, color: "#9c8a70"}   # a prong of the fork
      - {kind: rod, from: [30.0, -7.5, 75.0], to: [30.0, 7.5, 75.0], radius: 0.9, collide: 0, color: "#6f6a62"}   # the pin
      - {kind: rod, from: [24.0, 0, 0], to: [29.0, 0, 45.0], radius: 2.2, collide: 0, color: "#9c8a70"}   # a root
  - id: pole
    shape: part
    pos: [30.0, 0, 75.0]
    color: "#a9926e"
    pieces:
      - {kind: rod, from: [57.1892, 0, 62.3215], to: [-60.6308, 0, 117.262], radius: 2.5, collide: 0, density: 600, color: "#a9926e"}   # the pole
      - {kind: loft, a: [[64.5917, -7.8093, 50.253], [50.4365, -7.8093, 56.8537], [50.4365, 7.8093, 56.8537], [64.5917, 7.8093, 50.253]], b: [[71.1924, -7.8093, 64.4082], [57.0372, -7.8093, 71.0089], [57.0372, 7.8093, 71.0089], [71.1924, 7.8093, 64.4082]], collide: 0, density: 2600, color: "#9a958b"}   # the stones, lashed on
      - {kind: rod, from: [68.4882, -8.1093, 66.0003], to: [61.6339, -8.1093, 51.3013], radius: 0.35, collide: 0, density: 1, color: "#6d5b44"}
      - {kind: rod, from: [59.995, -8.1093, 69.9607], to: [53.1408, -8.1093, 55.2617], radius: 0.35, collide: 0, density: 1, color: "#6d5b44"}
  - id: bucket
    shape: part
    pos: [-48.0, 0, 32.2618]
    color: "#b08e62"
    pieces:
      - {kind: loft, a: [[-38.2993, 4.0182, 3.2618], [-43.9818, 9.7007, 3.2618], [-39.2231, 3.6355, 3.2618], [-44.3645, 8.7769, 3.2618]], b: [[-36.9134, 4.5922, 23.2618], [-43.4078, 11.0866, 23.2618], [-37.8373, 4.2095, 23.2618], [-43.7905, 10.1627, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-43.9818, 9.7007, 3.2618], [-52.0182, 9.7007, 3.2618], [-44.3645, 8.7769, 3.2618], [-51.6355, 8.7769, 3.2618]], b: [[-43.4078, 11.0866, 23.2618], [-52.5922, 11.0866, 23.2618], [-43.7905, 10.1627, 23.2618], [-52.2095, 10.1627, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-52.0182, 9.7007, 3.2618], [-57.7007, 4.0182, 3.2618], [-51.6355, 8.7769, 3.2618], [-56.7769, 3.6355, 3.2618]], b: [[-52.5922, 11.0866, 23.2618], [-59.0866, 4.5922, 23.2618], [-52.2095, 10.1627, 23.2618], [-58.1627, 4.2095, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-57.7007, 4.0182, 3.2618], [-57.7007, -4.0182, 3.2618], [-56.7769, 3.6355, 3.2618], [-56.7769, -3.6355, 3.2618]], b: [[-59.0866, 4.5922, 23.2618], [-59.0866, -4.5922, 23.2618], [-58.1627, 4.2095, 23.2618], [-58.1627, -4.2095, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-57.7007, -4.0182, 3.2618], [-52.0182, -9.7007, 3.2618], [-56.7769, -3.6355, 3.2618], [-51.6355, -8.7769, 3.2618]], b: [[-59.0866, -4.5922, 23.2618], [-52.5922, -11.0866, 23.2618], [-58.1627, -4.2095, 23.2618], [-52.2095, -10.1627, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-52.0182, -9.7007, 3.2618], [-43.9818, -9.7007, 3.2618], [-51.6355, -8.7769, 3.2618], [-44.3645, -8.7769, 3.2618]], b: [[-52.5922, -11.0866, 23.2618], [-43.4078, -11.0866, 23.2618], [-52.2095, -10.1627, 23.2618], [-43.7905, -10.1627, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-43.9818, -9.7007, 3.2618], [-38.2993, -4.0182, 3.2618], [-44.3645, -8.7769, 3.2618], [-39.2231, -3.6355, 3.2618]], b: [[-43.4078, -11.0866, 23.2618], [-36.9134, -4.5922, 23.2618], [-43.7905, -10.1627, 23.2618], [-37.8373, -4.2095, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-38.2993, -4.0182, 3.2618], [-38.2993, 4.0182, 3.2618], [-39.2231, -3.6355, 3.2618], [-39.2231, 3.6355, 3.2618]], b: [[-36.9134, -4.5922, 23.2618], [-36.9134, 4.5922, 23.2618], [-37.8373, -4.2095, 23.2618], [-37.8373, 4.2095, 23.2618]], collide: 0, density: 600, color: "#b08e62"}
      - {kind: loft, a: [[-39.2231, 3.6355, 3.2618], [-44.3645, 8.7769, 3.2618], [-51.6355, 8.7769, 3.2618], [-56.7769, 3.6355, 3.2618], [-56.7769, -3.6355, 3.2618], [-51.6355, -8.7769, 3.2618], [-44.3645, -8.7769, 3.2618], [-39.2231, -3.6355, 3.2618]], b: [[-39.2231, 3.6355, 4.7618], [-44.3645, 8.7769, 4.7618], [-51.6355, 8.7769, 4.7618], [-56.7769, 3.6355, 4.7618], [-56.7769, -3.6355, 4.7618], [-51.6355, -8.7769, 4.7618], [-44.3645, -8.7769, 4.7618], [-39.2231, -3.6355, 4.7618]], collide: 0, density: 600, color: "#9b7b52"}   # the bottom
      - {kind: loft, a: [[-39.2231, 3.6355, 4.7618], [-44.3645, 8.7769, 4.7618], [-51.6355, 8.7769, 4.7618], [-56.7769, 3.6355, 4.7618], [-56.7769, -3.6355, 4.7618], [-51.6355, -8.7769, 4.7618], [-44.3645, -8.7769, 4.7618], [-39.2231, -3.6355, 4.7618]], b: [[-38.0798, 4.1091, 21.2618], [-43.8909, 9.9202, 21.2618], [-52.1091, 9.9202, 21.2618], [-57.9202, 4.1091, 21.2618], [-57.9202, -4.1091, 21.2618], [-52.1091, -9.9202, 21.2618], [-43.8909, -9.9202, 21.2618], [-38.0798, -4.1091, 21.2618]], collide: 0, density: 1000, color: "#6f97b8"}   # the water, a solid
      - {kind: loft, a: [[-37.8604, 4.2, 5.4618], [-43.8, 10.1396, 5.4618], [-52.2, 10.1396, 5.4618], [-58.1396, 4.2, 5.4618], [-58.1396, -4.2, 5.4618], [-52.2, -10.1396, 5.4618], [-43.8, -10.1396, 5.4618], [-37.8604, -4.2, 5.4618]], b: [[-37.8604, 4.2, 7.0618], [-43.8, 10.1396, 7.0618], [-52.2, 10.1396, 7.0618], [-58.1396, 4.2, 7.0618], [-58.1396, -4.2, 7.0618], [-52.2, -10.1396, 7.0618], [-43.8, -10.1396, 7.0618], [-37.8604, -4.2, 7.0618]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: loft, a: [[-36.8903, 4.6018, 19.4618], [-43.3982, 11.1097, 19.4618], [-52.6018, 11.1097, 19.4618], [-59.1097, 4.6018, 19.4618], [-59.1097, -4.6018, 19.4618], [-52.6018, -11.1097, 19.4618], [-43.3982, -11.1097, 19.4618], [-36.8903, -4.6018, 19.4618]], b: [[-36.8903, 4.6018, 21.0618], [-43.3982, 11.1097, 21.0618], [-52.6018, 11.1097, 21.0618], [-59.1097, 4.6018, 21.0618], [-59.1097, -4.6018, 21.0618], [-52.6018, -11.1097, 21.0618], [-43.3982, -11.1097, 21.0618], [-36.8903, -4.6018, 21.0618]], collide: 0, density: 1, color: "#5e5a54"}
      - {kind: rod, from: [-48.0, -12.4, 22.261826174069938], to: [-48.0, -2, 31.06182617406994], radius: 0.4, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-48.0, 12.4, 22.261826174069938], to: [-48.0, 2, 31.06182617406994], radius: 0.4, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-48.0, -2, 31.06182617406994], to: [-48.0, 2, 31.06182617406994], radius: 0.4, collide: 0, density: 7800, color: "#5e5a54"}
      - {kind: rod, from: [-48, 0, 31.2618], to: [-48, 0, 35.2618], radius: 1.9, collide: 0, density: 500, color: "#c9bda2"}   # the hand on the rope
joints:
  - {id: j_p, type: hinge, body: pole, axis: [0, 1, 0], range: [-0.3, 0.6], damping: 0.05}   # the pin in the fork; + : the long arm rises
  - {id: j_b, type: slide, body: bucket, axis: [0, 0, 1], range: [-5, 80]}   # the hand lifts the bucket plumb; + : up
cords:
  - id: rope   # from the end of the pole down to the hand
    from: {body: pole, at: [-60.6308, 0, 117.262]}
    to: {body: bucket, at: [-48.0, 0, 35.2618]}
    over: []
    links: 24
    thickness: 1.0
    density: 1400
    stiffness: 40000.0
    pretension: 27.7819
    damping: 12.0
    friction: 0.5
contact: {solref: [0.0006, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_b, kind: velocity, speed: 7, kv: 60000.0, max_torque: 600.0}
checks:
  - {type: force, expect: 27.7819, tol: 5, settle_s: 0.8, window_s: 2.4}
  - {type: position, joint: j_p, min: 0.24, max: 0.36, settle_s: 3.1, window_s: 0.3}
camera: {target: [-14, 0, 56], position: [-14, -330, 76], fov: 34}
