# No. 456 (Brown 1868): "Cary's rotary pump. Within the fixed cylinder there is placed a revolving drum, B, attached to an axle, A.
# Heart-shaped cam, a, surrounding axle, is also fixed. Revolution of drum causes sliding-pistons, c, c, to move in and out in obedience
# to form of cam. Water enters and is removed from the chamber through ports, L and M; ... each piston is, in succession, forced back to
# its seat when opposite E, and at same time other piston is forced fully against inner side of chamber, thus driving before it water
# already there into exit-pipe, H, and drawing after it through suction-pipe, F, the stream of supply."
# Model (cm, gravity on, Brown's view from in front, cut in section). The drum B on its axle A is turned clockwise at 20 rpm (the
# only drive). The pistons c, c are the two ends of one bar that slides across the drum; its loop goes round the fixed cam a, and two
# rollers in the loop (colliding) bear on the cam from either side. The cam is r = 1.9 + 0.9 sin(angle) about the axle, of constant
# breadth, so the bar is held both ways: a piston stands out 0.9 (1 + sin) of the angle it is at, fully (1.8) at the top and flush
# with the drum at E, and the chamber's outer side follows that path. The water is lumped vessels (src/fluid/vessels.c): `lo` is F
# and the chamber behind the piston that is out, `hi` the chamber ahead of it, M, and H up over its gooseneck, both full. The drum is a
# displacer between them: a turn carries 90.9849 cm^3 (the chamber's depth times the mean, along the piston's way from L
# to M, of what it sweeps a radian), and the two pressures push back on it. The spout pours into the air, falling; a small leak (the
# pistons' and E's fit) runs back.
# Generator: opencode-runs/water/gen456.py.
number: 456
slug: carys-rotary-pump
name: Cary's rotary pump
brown: "Cary's rotary pump. Within the fixed cylinder there is placed a revolving drum, B, attached to an axle, A. Heart-shaped cam, a, surrounding axle, is also fixed. Revolution of drum causes sliding-pistons, c, c, to move in and out in obedience to form of cam. Water enters and is removed from the chamber through ports, L and M; ... each piston is, in succession, forced back to its seat when opposite E, and at same time other piston is forced fully against inner side of chamber, thus driving before it water already there into exit-pipe, H, and drawing after it through suction-pipe, F, the stream of supply."
units: cm
sim:
  timestep: 0.0001
  integrator: implicitfast
  iterations: 60
  duration_s: 12
  floor: false
bodies:
  - id: drum
    shape: part
    pos: [0, 0, 12]
    mass: 0.3
    color: "#5f5a52"
    pieces:
      - {kind: band, center: [0, 12], r: [4.6, 5], a: [0, 6.2832], y: [-0.4, 2.7], slices: 40, collide: 0, color: "#5f5a52"}
  - id: bar
    shape: part
    mount: drum
    pos: [0, 0, 12.9]
    mass: 0.05
    color: "#5f5a52"
    pieces:
      - {kind: loft, a: [[-0.4, -0.3, 17.9], [0.4, -0.3, 17.9], [0.4, -0.3, 16.15], [-0.4, -0.3, 16.15]], b: [[-0.4, -0.7, 17.9], [0.4, -0.7, 17.9], [0.4, -0.7, 16.15], [-0.4, -0.7, 16.15]], collide: 0, color: "#5f5a52"}
      - {kind: loft, a: [[-0.4, -0.3, 9.65], [0.4, -0.3, 9.65], [0.4, -0.3, 7.9], [-0.4, -0.3, 7.9]], b: [[-0.4, -0.7, 9.65], [0.4, -0.7, 9.65], [0.4, -0.7, 7.9], [-0.4, -0.7, 7.9]], collide: 0, color: "#5f5a52"}
      - {kind: disc, center: [0, 12.9], radius: 3.65, inner: 3.35, y: [-0.7, -0.3], collide: 0, color: "#5f5a52"}
      - {kind: loft, a: [[-0.4, 2.6, 18.8], [0.4, 2.6, 18.8], [0.4, 2.6, 17.9], [-0.4, 2.6, 17.9]], b: [[-0.4, -0.7, 18.8], [0.4, -0.7, 18.8], [0.4, -0.7, 17.9], [-0.4, -0.7, 17.9]], collide: 0, color: "#c8781e"}
      - {kind: loft, a: [[-0.4, 2.6, 7.9], [0.4, 2.6, 7.9], [0.4, 2.6, 7], [-0.4, 2.6, 7]], b: [[-0.4, -0.7, 7.9], [0.4, -0.7, 7.9], [0.4, -0.7, 7], [-0.4, -0.7, 7]], collide: 0, color: "#c8781e"}
      - {kind: loft, a: [[-0.25, -0.3, 16.25], [0.25, -0.3, 16.25], [0.25, -0.3, 15.11], [-0.25, -0.3, 15.11]], b: [[-0.25, -0.7, 16.25], [0.25, -0.7, 16.25], [0.25, -0.7, 15.11], [-0.25, -0.7, 15.11]], collide: 0, color: "#5f5a52"}
      - {kind: rod, from: [0, -0.6, 15.11], to: [0, 2.8, 15.11], radius: 0.3, collide: 2, capsule: true, color: "#3d3a35"}
      - {kind: loft, a: [[-0.25, -0.3, 10.69], [0.25, -0.3, 10.69], [0.25, -0.3, 9.55], [-0.25, -0.3, 9.55]], b: [[-0.25, -0.7, 10.69], [0.25, -0.7, 10.69], [0.25, -0.7, 9.55], [-0.25, -0.7, 9.55]], collide: 0, color: "#5f5a52"}
      - {kind: rod, from: [0, -0.6, 10.69], to: [0, 2.8, 10.69], radius: 0.3, collide: 2, capsule: true, color: "#3d3a35"}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#d6cdb8"
    pieces:
      - {kind: loft, a: [[0, 3, 6.94], [0.5294, 3, 6.9628], [0.6026, 3, 6.2667], [0, 3, 6.24]], b: [[0, -0.6, 6.94], [0.5294, -0.6, 6.9628], [0.6026, -0.6, 6.2667], [0, -0.6, 6.24]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[0.5294, 3, 6.9628], [1.0561, 3, 7.0313], [1.2017, 3, 6.3466], [0.6026, 3, 6.2667]], b: [[0.5294, -0.6, 6.9628], [1.0561, -0.6, 7.0313], [1.2017, -0.6, 6.3466], [0.6026, -0.6, 6.2667]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[1.0561, 3, 7.0313], [1.5772, 3, 7.1458], [1.7935, 3, 6.48], [1.2017, 3, 6.3466]], b: [[1.0561, -0.6, 7.0313], [1.5772, -0.6, 7.1458], [1.7935, -0.6, 6.48], [1.2017, -0.6, 6.3466]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.0752, 3, 7.7673], [3.5405, 3, 8.0679], [4.0089, 3, 7.5477], [3.4867, 3, 7.201]], b: [[3.0752, -0.6, 7.7673], [3.5405, -0.6, 8.0679], [4.0089, -0.6, 7.5477], [3.4867, -0.6, 7.201]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.5405, 3, 8.0679], [3.9816, 3, 8.4149], [4.5018, 3, 7.9466], [4.0089, 3, 7.5477]], b: [[3.5405, -0.6, 8.0679], [3.9816, -0.6, 8.4149], [4.5018, -0.6, 7.9466], [4.0089, -0.6, 7.5477]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.9816, 3, 8.4149], [4.3938, 3, 8.8077], [4.9601, 3, 8.3963], [4.5018, 3, 7.9466]], b: [[3.9816, -0.6, 8.4149], [4.3938, -0.6, 8.8077], [4.9601, -0.6, 8.3963], [4.5018, -0.6, 7.9466]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[4.3938, 3, 8.8077], [4.7718, 3, 9.245], [5.378, 3, 8.895], [4.9601, 3, 8.3963]], b: [[4.3938, -0.6, 8.8077], [4.7718, -0.6, 9.245], [5.378, -0.6, 8.895], [4.9601, -0.6, 8.3963]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[4.7718, 3, 9.245], [5.1103, 3, 9.7247], [5.7498, 3, 9.44], [5.378, 3, 8.895]], b: [[4.7718, -0.6, 9.245], [5.1103, -0.6, 9.7247], [5.7498, -0.6, 9.44], [5.378, -0.6, 8.895]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.1103, 3, 9.7247], [5.4038, 3, 10.2442], [6.0695, 3, 10.0279], [5.7498, 3, 9.44]], b: [[5.1103, -0.6, 9.7247], [5.4038, -0.6, 10.2442], [6.0695, -0.6, 10.0279], [5.7498, -0.6, 9.44]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.4038, 3, 10.2442], [5.6467, 3, 10.7998], [6.3314, 3, 10.6542], [6.0695, 3, 10.0279]], b: [[5.4038, -0.6, 10.2442], [5.6467, -0.6, 10.7998], [6.3314, -0.6, 10.6542], [6.0695, -0.6, 10.0279]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.6467, 3, 10.7998], [5.8338, 3, 11.3868], [6.53, 3, 11.3137], [6.3314, 3, 10.6542]], b: [[5.6467, -0.6, 10.7998], [5.8338, -0.6, 11.3868], [6.53, -0.6, 11.3137], [6.3314, -0.6, 10.6542]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.8338, 3, 11.3868], [5.96, 3, 12], [6.66, 3, 12], [6.53, 3, 11.3137]], b: [[5.8338, -0.6, 11.3868], [5.96, -0.6, 12], [6.66, -0.6, 12], [6.53, -0.6, 11.3137]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.96, 3, 12], [6.0209, 3, 12.6328], [6.7171, 3, 12.706], [6.66, 3, 12]], b: [[5.96, -0.6, 12], [6.0209, -0.6, 12.6328], [6.7171, -0.6, 12.706], [6.66, -0.6, 12]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[6.0209, 3, 12.6328], [6.0128, 3, 13.2781], [6.6975, 3, 13.4236], [6.7171, 3, 12.706]], b: [[6.0209, -0.6, 12.6328], [6.0128, -0.6, 13.2781], [6.6975, -0.6, 13.4236], [6.7171, -0.6, 12.706]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[6.0128, 3, 13.2781], [5.9328, 3, 13.9277], [6.5985, 3, 14.144], [6.6975, 3, 13.4236]], b: [[6.0128, -0.6, 13.2781], [5.9328, -0.6, 13.9277], [6.5985, -0.6, 14.144], [6.6975, -0.6, 13.4236]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.9328, 3, 13.9277], [5.7791, 3, 14.573], [6.4186, 3, 14.8578], [6.5985, 3, 14.144]], b: [[5.9328, -0.6, 13.9277], [5.7791, -0.6, 14.573], [6.4186, -0.6, 14.8578], [6.5985, -0.6, 14.144]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.7791, 3, 14.573], [5.5512, 3, 15.205], [6.1574, 3, 15.555], [6.4186, 3, 14.8578]], b: [[5.7791, -0.6, 14.573], [5.5512, -0.6, 15.205], [6.1574, -0.6, 15.555], [6.4186, -0.6, 14.8578]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.5512, 3, 15.205], [5.2497, 3, 15.8141], [5.816, 3, 16.2256], [6.1574, 3, 15.555]], b: [[5.5512, -0.6, 15.205], [5.2497, -0.6, 15.8141], [5.816, -0.6, 16.2256], [6.1574, -0.6, 15.555]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[5.2497, 3, 15.8141], [4.8767, 3, 16.391], [5.3969, 3, 16.8594], [5.816, 3, 16.2256]], b: [[5.2497, -0.6, 15.8141], [4.8767, -0.6, 16.391], [5.3969, -0.6, 16.8594], [5.816, -0.6, 16.2256]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[4.8767, 3, 16.391], [4.4356, 3, 16.9262], [4.9039, 3, 17.4464], [5.3969, 3, 16.8594]], b: [[4.8767, -0.6, 16.391], [4.4356, -0.6, 16.9262], [4.9039, -0.6, 17.4464], [5.3969, -0.6, 16.8594]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[4.4356, 3, 16.9262], [3.9312, 3, 17.4108], [4.3426, 3, 17.9771], [4.9039, 3, 17.4464]], b: [[4.4356, -0.6, 16.9262], [3.9312, -0.6, 17.4108], [4.3426, -0.6, 17.9771], [4.9039, -0.6, 17.4464]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.9312, 3, 17.4108], [3.3697, 3, 17.8365], [3.7197, 3, 18.4427], [4.3426, 3, 17.9771]], b: [[3.9312, -0.6, 17.4108], [3.3697, -0.6, 17.8365], [3.7197, -0.6, 18.4427], [4.3426, -0.6, 17.9771]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.3697, 3, 17.8365], [2.7586, 3, 18.1958], [3.0433, 3, 18.8353], [3.7197, 3, 18.4427]], b: [[3.3697, -0.6, 17.8365], [2.7586, -0.6, 18.1958], [3.0433, -0.6, 18.8353], [3.7197, -0.6, 18.4427]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[2.7586, 3, 18.1958], [2.1062, 3, 18.4824], [2.3226, 3, 19.1481], [3.0433, 3, 18.8353]], b: [[2.7586, -0.6, 18.1958], [2.1062, -0.6, 18.4824], [2.3226, -0.6, 19.1481], [3.0433, -0.6, 18.8353]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[2.1062, 3, 18.4824], [1.4222, 3, 18.6909], [1.5677, 3, 19.3756], [2.3226, 3, 19.1481]], b: [[2.1062, -0.6, 18.4824], [1.4222, -0.6, 18.6909], [1.5677, -0.6, 19.3756], [2.3226, -0.6, 19.1481]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[1.4222, 3, 18.6909], [0.7165, 3, 18.8175], [0.7897, 3, 19.5137], [1.5677, 3, 19.3756]], b: [[1.4222, -0.6, 18.6909], [0.7165, -0.6, 18.8175], [0.7897, -0.6, 19.5137], [1.5677, -0.6, 19.3756]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[0.7165, 3, 18.8175], [0, 3, 18.86], [0, 3, 19.56], [0.7897, 3, 19.5137]], b: [[0.7165, -0.6, 18.8175], [0, -0.6, 18.86], [0, -0.6, 19.56], [0.7897, -0.6, 19.5137]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[0, 3, 18.86], [-0.7165, 3, 18.8175], [-0.7897, 3, 19.5137], [0, 3, 19.56]], b: [[0, -0.6, 18.86], [-0.7165, -0.6, 18.8175], [-0.7897, -0.6, 19.5137], [0, -0.6, 19.56]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-0.7165, 3, 18.8175], [-1.4222, 3, 18.6909], [-1.5677, 3, 19.3756], [-0.7897, 3, 19.5137]], b: [[-0.7165, -0.6, 18.8175], [-1.4222, -0.6, 18.6909], [-1.5677, -0.6, 19.3756], [-0.7897, -0.6, 19.5137]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-1.4222, 3, 18.6909], [-2.1062, 3, 18.4824], [-2.3226, 3, 19.1481], [-1.5677, 3, 19.3756]], b: [[-1.4222, -0.6, 18.6909], [-2.1062, -0.6, 18.4824], [-2.3226, -0.6, 19.1481], [-1.5677, -0.6, 19.3756]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-2.1062, 3, 18.4824], [-2.7586, 3, 18.1958], [-3.0433, 3, 18.8353], [-2.3226, 3, 19.1481]], b: [[-2.1062, -0.6, 18.4824], [-2.7586, -0.6, 18.1958], [-3.0433, -0.6, 18.8353], [-2.3226, -0.6, 19.1481]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-2.7586, 3, 18.1958], [-3.3697, 3, 17.8365], [-3.7197, 3, 18.4427], [-3.0433, 3, 18.8353]], b: [[-2.7586, -0.6, 18.1958], [-3.3697, -0.6, 17.8365], [-3.7197, -0.6, 18.4427], [-3.0433, -0.6, 18.8353]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-3.3697, 3, 17.8365], [-3.9312, 3, 17.4108], [-4.3426, 3, 17.9771], [-3.7197, 3, 18.4427]], b: [[-3.3697, -0.6, 17.8365], [-3.9312, -0.6, 17.4108], [-4.3426, -0.6, 17.9771], [-3.7197, -0.6, 18.4427]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-3.9312, 3, 17.4108], [-4.4356, 3, 16.9262], [-4.9039, 3, 17.4464], [-4.3426, 3, 17.9771]], b: [[-3.9312, -0.6, 17.4108], [-4.4356, -0.6, 16.9262], [-4.9039, -0.6, 17.4464], [-4.3426, -0.6, 17.9771]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-4.4356, 3, 16.9262], [-4.8767, 3, 16.391], [-5.3969, 3, 16.8594], [-4.9039, 3, 17.4464]], b: [[-4.4356, -0.6, 16.9262], [-4.8767, -0.6, 16.391], [-5.3969, -0.6, 16.8594], [-4.9039, -0.6, 17.4464]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-4.8767, 3, 16.391], [-5.2497, 3, 15.8141], [-5.816, 3, 16.2256], [-5.3969, 3, 16.8594]], b: [[-4.8767, -0.6, 16.391], [-5.2497, -0.6, 15.8141], [-5.816, -0.6, 16.2256], [-5.3969, -0.6, 16.8594]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.2497, 3, 15.8141], [-5.5512, 3, 15.205], [-6.1574, 3, 15.555], [-5.816, 3, 16.2256]], b: [[-5.2497, -0.6, 15.8141], [-5.5512, -0.6, 15.205], [-6.1574, -0.6, 15.555], [-5.816, -0.6, 16.2256]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.5512, 3, 15.205], [-5.7791, 3, 14.573], [-6.4186, 3, 14.8578], [-6.1574, 3, 15.555]], b: [[-5.5512, -0.6, 15.205], [-5.7791, -0.6, 14.573], [-6.4186, -0.6, 14.8578], [-6.1574, -0.6, 15.555]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.7791, 3, 14.573], [-5.9328, 3, 13.9277], [-6.5985, 3, 14.144], [-6.4186, 3, 14.8578]], b: [[-5.7791, -0.6, 14.573], [-5.9328, -0.6, 13.9277], [-6.5985, -0.6, 14.144], [-6.4186, -0.6, 14.8578]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.9328, 3, 13.9277], [-6.0128, 3, 13.2781], [-6.6975, 3, 13.4236], [-6.5985, 3, 14.144]], b: [[-5.9328, -0.6, 13.9277], [-6.0128, -0.6, 13.2781], [-6.6975, -0.6, 13.4236], [-6.5985, -0.6, 14.144]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-6.0128, 3, 13.2781], [-6.0209, 3, 12.6328], [-6.7171, 3, 12.706], [-6.6975, 3, 13.4236]], b: [[-6.0128, -0.6, 13.2781], [-6.0209, -0.6, 12.6328], [-6.7171, -0.6, 12.706], [-6.6975, -0.6, 13.4236]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-6.0209, 3, 12.6328], [-5.96, 3, 12], [-6.66, 3, 12], [-6.7171, 3, 12.706]], b: [[-6.0209, -0.6, 12.6328], [-5.96, -0.6, 12], [-6.66, -0.6, 12], [-6.7171, -0.6, 12.706]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.96, 3, 12], [-5.8338, 3, 11.3868], [-6.53, 3, 11.3137], [-6.66, 3, 12]], b: [[-5.96, -0.6, 12], [-5.8338, -0.6, 11.3868], [-6.53, -0.6, 11.3137], [-6.66, -0.6, 12]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.8338, 3, 11.3868], [-5.6467, 3, 10.7998], [-6.3314, 3, 10.6542], [-6.53, 3, 11.3137]], b: [[-5.8338, -0.6, 11.3868], [-5.6467, -0.6, 10.7998], [-6.3314, -0.6, 10.6542], [-6.53, -0.6, 11.3137]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.6467, 3, 10.7998], [-5.4038, 3, 10.2442], [-6.0695, 3, 10.0279], [-6.3314, 3, 10.6542]], b: [[-5.6467, -0.6, 10.7998], [-5.4038, -0.6, 10.2442], [-6.0695, -0.6, 10.0279], [-6.3314, -0.6, 10.6542]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.4038, 3, 10.2442], [-5.1103, 3, 9.7247], [-5.7498, 3, 9.44], [-6.0695, 3, 10.0279]], b: [[-5.4038, -0.6, 10.2442], [-5.1103, -0.6, 9.7247], [-5.7498, -0.6, 9.44], [-6.0695, -0.6, 10.0279]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-5.1103, 3, 9.7247], [-4.7718, 3, 9.245], [-5.378, 3, 8.895], [-5.7498, 3, 9.44]], b: [[-5.1103, -0.6, 9.7247], [-4.7718, -0.6, 9.245], [-5.378, -0.6, 8.895], [-5.7498, -0.6, 9.44]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-4.7718, 3, 9.245], [-4.3938, 3, 8.8077], [-4.9601, 3, 8.3963], [-5.378, 3, 8.895]], b: [[-4.7718, -0.6, 9.245], [-4.3938, -0.6, 8.8077], [-4.9601, -0.6, 8.3963], [-5.378, -0.6, 8.895]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-4.3938, 3, 8.8077], [-3.9816, 3, 8.4149], [-4.5018, 3, 7.9466], [-4.9601, 3, 8.3963]], b: [[-4.3938, -0.6, 8.8077], [-3.9816, -0.6, 8.4149], [-4.5018, -0.6, 7.9466], [-4.9601, -0.6, 8.3963]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-3.9816, 3, 8.4149], [-3.5405, 3, 8.0679], [-4.0089, 3, 7.5477], [-4.5018, 3, 7.9466]], b: [[-3.9816, -0.6, 8.4149], [-3.5405, -0.6, 8.0679], [-4.0089, -0.6, 7.5477], [-4.5018, -0.6, 7.9466]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-3.5405, 3, 8.0679], [-3.0752, 3, 7.7673], [-3.4867, 3, 7.201], [-4.0089, 3, 7.5477]], b: [[-3.5405, -0.6, 8.0679], [-3.0752, -0.6, 7.7673], [-3.4867, -0.6, 7.201], [-4.0089, -0.6, 7.5477]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-1.5772, 3, 7.1458], [-1.0561, 3, 7.0313], [-1.2017, 3, 6.3466], [-1.7935, 3, 6.48]], b: [[-1.5772, -0.6, 7.1458], [-1.0561, -0.6, 7.0313], [-1.2017, -0.6, 6.3466], [-1.7935, -0.6, 6.48]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-1.0561, 3, 7.0313], [-0.5294, 3, 6.9628], [-0.6026, 3, 6.2667], [-1.2017, 3, 6.3466]], b: [[-1.0561, -0.6, 7.0313], [-0.5294, -0.6, 6.9628], [-0.6026, -0.6, 6.2667], [-1.2017, -0.6, 6.3466]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-0.5294, 3, 6.9628], [-0, 3, 6.94], [-0, 3, 6.24], [-0.6026, 3, 6.2667]], b: [[-0.5294, -0.6, 6.9628], [-0, -0.6, 6.94], [-0, -0.6, 6.24], [-0.6026, -0.6, 6.2667]], collide: 0, color: "#b9ae98"}
      - {kind: disc, center: [0, 12.9], radius: 7.7, inner: 0, y: [2.6, 3], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-1.7492, 3, 7.1942], [1.7492, 3, 7.1942], [1.7492, 3, 4.3], [-1.7492, 3, 4.3]], b: [[-1.7492, -0.6, 7.1942], [1.7492, -0.6, 7.1942], [1.7492, -0.6, 4.3], [-1.7492, -0.6, 4.3]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-0.35, 3, 6.96], [0.35, 3, 6.96], [0.35, 3, 6.69], [-0.35, 3, 6.69]], b: [[-0.35, -0.7, 6.96], [0.35, -0.7, 6.96], [0.35, -0.7, 6.69], [-0.35, -0.7, 6.69]], collide: 0, color: "#2a2723"}
      - {kind: loft, a: [[-3.9327, 3, 7.7623], [-3.2327, 3, 7.7623], [-3.2327, 3, 1], [-3.9327, 3, 1]], b: [[-3.9327, -0.6, 7.7623], [-3.2327, -0.6, 7.7623], [-3.2327, -0.6, 1], [-3.9327, -0.6, 1]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-1.7492, 3, 4.3], [-1.0492, 3, 4.3], [-1.0492, 3, 1], [-1.7492, 3, 1]], b: [[-1.7492, -0.6, 4.3], [-1.0492, -0.6, 4.3], [-1.0492, -0.6, 1], [-1.7492, -0.6, 1]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[-3.2327, 3, 7.1942], [-1.7492, 3, 7.1942], [-1.7492, 3, 1], [-3.2327, 3, 1]], b: [[-3.2327, 2.6, 7.1942], [-1.7492, 2.6, 7.1942], [-1.7492, 2.6, 1], [-3.2327, 2.6, 1]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[1.7492, 3, 5], [9.7, 3, 5], [9.7, 3, 4.3], [1.7492, 3, 4.3]], b: [[1.7492, -0.6, 5], [9.7, -0.6, 5], [9.7, -0.6, 4.3], [1.7492, -0.6, 4.3]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[3.6637, 3, 7.3107], [6.9, 3, 7.3], [6.9, 3, 6.6], [3.6637, 3, 6.6]], b: [[3.6637, -0.6, 7.3107], [6.9, -0.6, 7.3], [6.9, -0.6, 6.6], [3.6637, -0.6, 6.6]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[6.9, 3, 19], [7.6, 3, 19], [7.6, 3, 6.6], [6.9, 3, 6.6]], b: [[6.9, -0.6, 19], [7.6, -0.6, 19], [7.6, -0.6, 6.6], [6.9, -0.6, 6.6]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[9, 3, 18.3], [9.7, 3, 18.3], [9.7, 3, 4.3], [9, 3, 4.3]], b: [[9, -0.6, 18.3], [9.7, -0.6, 18.3], [9.7, -0.6, 4.3], [9, -0.6, 4.3]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[6.9, 3, 21.1], [12.3, 3, 21.1], [12.3, 3, 20.4], [6.9, 3, 20.4]], b: [[6.9, -0.6, 21.1], [12.3, -0.6, 21.1], [12.3, -0.6, 20.4], [6.9, -0.6, 20.4]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[9, 3, 19], [10.2, 3, 19], [10.2, 3, 18.3], [9, 3, 18.3]], b: [[9, -0.6, 19], [10.2, -0.6, 19], [10.2, -0.6, 18.3], [9, -0.6, 18.3]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[9.5, 3, 18.3], [10.2, 3, 18.3], [10.2, 3, 17], [9.5, 3, 17]], b: [[9.5, -0.6, 18.3], [10.2, -0.6, 18.3], [10.2, -0.6, 17], [9.5, -0.6, 17]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[11.6, 3, 20.4], [12.3, 3, 20.4], [12.3, 3, 17], [11.6, 3, 17]], b: [[11.6, -0.6, 20.4], [12.3, -0.6, 20.4], [12.3, -0.6, 17], [11.6, -0.6, 17]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[1.7492, 3, 7.3], [9, 3, 7.3], [9, 3, 5], [1.7492, 3, 5]], b: [[1.7492, 2.6, 7.3], [9, 2.6, 7.3], [9, 2.6, 5], [1.7492, 2.6, 5]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[7.6, 3, 20.4], [11.6, 3, 20.4], [11.6, 3, 6.6], [7.6, 3, 6.6]], b: [[7.6, 2.6, 20.4], [11.6, 2.6, 20.4], [11.6, 2.6, 6.6], [7.6, 2.6, 6.6]], collide: 0, color: "#b9ae98"}
      - {kind: loft, a: [[1.9, 2.9, 12], [2.0002, 2.9, 12.2633], [2.0603, 2.9, 12.552], [2.0736, 2.9, 12.8589], [2.0352, 2.9, 13.175], [1.942, 2.9, 13.4902], [1.7935, 2.9, 13.7935], [1.5913, 2.9, 14.0738], [1.3397, 2.9, 14.3204], [1.0453, 2.9, 14.5236], [0.7168, 2.9, 14.675], [0.3645, 2.9, 14.7684], [0, 2.9, 14.8], [-0.3645, 2.9, 14.7684], [-0.7168, 2.9, 14.675], [-1.0453, 2.9, 14.5236], [-1.3397, 2.9, 14.3204], [-1.5913, 2.9, 14.0738], [-1.7935, 2.9, 13.7935], [-1.942, 2.9, 13.4902], [-2.0352, 2.9, 13.175], [-2.0736, 2.9, 12.8589], [-2.0603, 2.9, 12.552], [-2.0002, 2.9, 12.2633], [-1.9, 2.9, 12], [-1.7673, 2.9, 11.7673], [-1.6103, 2.9, 11.5685], [-1.4372, 2.9, 11.4047], [-1.2557, 2.9, 11.275], [-1.0727, 2.9, 11.1769], [-0.8935, 2.9, 11.1065], [-0.722, 2.9, 11.0591], [-0.5603, 2.9, 11.0296], [-0.4089, 2.9, 11.0128], [-0.2668, 2.9, 11.0045], [-0.1315, 2.9, 11.0009], [-0, 2.9, 11], [0.1315, 2.9, 11.0009], [0.2668, 2.9, 11.0045], [0.4089, 2.9, 11.0128], [0.5603, 2.9, 11.0296], [0.722, 2.9, 11.0591], [0.8935, 2.9, 11.1065], [1.0727, 2.9, 11.1769], [1.2557, 2.9, 11.275], [1.4372, 2.9, 11.4047], [1.6103, 2.9, 11.5685], [1.7673, 2.9, 11.7673]], b: [[1.9, -0.5, 12], [2.0002, -0.5, 12.2633], [2.0603, -0.5, 12.552], [2.0736, -0.5, 12.8589], [2.0352, -0.5, 13.175], [1.942, -0.5, 13.4902], [1.7935, -0.5, 13.7935], [1.5913, -0.5, 14.0738], [1.3397, -0.5, 14.3204], [1.0453, -0.5, 14.5236], [0.7168, -0.5, 14.675], [0.3645, -0.5, 14.7684], [0, -0.5, 14.8], [-0.3645, -0.5, 14.7684], [-0.7168, -0.5, 14.675], [-1.0453, -0.5, 14.5236], [-1.3397, -0.5, 14.3204], [-1.5913, -0.5, 14.0738], [-1.7935, -0.5, 13.7935], [-1.942, -0.5, 13.4902], [-2.0352, -0.5, 13.175], [-2.0736, -0.5, 12.8589], [-2.0603, -0.5, 12.552], [-2.0002, -0.5, 12.2633], [-1.9, -0.5, 12], [-1.7673, -0.5, 11.7673], [-1.6103, -0.5, 11.5685], [-1.4372, -0.5, 11.4047], [-1.2557, -0.5, 11.275], [-1.0727, -0.5, 11.1769], [-0.8935, -0.5, 11.1065], [-0.722, -0.5, 11.0591], [-0.5603, -0.5, 11.0296], [-0.4089, -0.5, 11.0128], [-0.2668, -0.5, 11.0045], [-0.1315, -0.5, 11.0009], [-0, -0.5, 11], [0.1315, -0.5, 11.0009], [0.2668, -0.5, 11.0045], [0.4089, -0.5, 11.0128], [0.5603, -0.5, 11.0296], [0.722, -0.5, 11.0591], [0.8935, -0.5, 11.1065], [1.0727, -0.5, 11.1769], [1.2557, -0.5, 11.275], [1.4372, -0.5, 11.4047], [1.6103, -0.5, 11.5685], [1.7673, -0.5, 11.7673]], collide: 1, color: "#4a443c"}
      - {kind: rod, from: [0, -0.8, 12], to: [0, 3, 12], radius: 0.45, collide: 0, color: "#5f5a52"}
      - {kind: loft, a: [[-8.6, 6.6, -0.5], [1.2, 6.6, -0.5], [1.2, 6.6, -1.1], [-8.6, 6.6, -1.1]], b: [[-8.6, 0, -0.5], [1.2, 0, -0.5], [1.2, 0, -1.1], [-8.6, 0, -1.1]], collide: 0, color: "#9c9282"}
      - {kind: loft, a: [[-8.6, 6.6, 3.6], [1.2, 6.6, 3.6], [1.2, 6.6, -0.5], [-8.6, 6.6, -0.5]], b: [[-8.6, 6, 3.6], [1.2, 6, 3.6], [1.2, 6, -0.5], [-8.6, 6, -0.5]], collide: 0, color: "#9c9282"}
      - {kind: loft, a: [[-8.6, 6, 3.6], [-8, 6, 3.6], [-8, 6, -0.5], [-8.6, 6, -0.5]], b: [[-8.6, 0, 3.6], [-8, 0, 3.6], [-8, 0, -0.5], [-8.6, 0, -0.5]], collide: 0, color: "#9c9282"}
      - {kind: loft, a: [[0.6, 6, 3.6], [1.2, 6, 3.6], [1.2, 6, -0.5], [0.6, 6, -0.5]], b: [[0.6, 0, 3.6], [1.2, 0, 3.6], [1.2, 0, -0.5], [0.6, 0, -0.5]], collide: 0, color: "#9c9282"}
      - {kind: loft, a: [[-16, 8, 3.6], [-8.6, 8, 3.6], [-8.6, 8, 2.4], [-16, 8, 2.4]], b: [[-16, 0, 3.6], [-8.6, 0, 3.6], [-8.6, 0, 2.4], [-16, 0, 2.4]], collide: 0, color: "#8b7d66"}
      - {kind: loft, a: [[1.2, 8, 3.6], [18, 8, 3.6], [18, 8, 2.4], [1.2, 8, 2.4]], b: [[1.2, 0, 3.6], [18, 0, 3.6], [18, 0, 2.4], [1.2, 0, 2.4]], collide: 0, color: "#8b7d66"}
joints:
  - {id: j_d, type: hinge, body: drum, axis: [0, 1, 0], damping: 0.002}   # the drum on its axle A; + turns it clockwise as seen (up the left side)
  - {id: j_b, type: slide, body: bar, axis: [0, 0, 1], range: [-2.1, 0.3], damping: 0.002}   # the bar across the drum; 0: the upper piston fully out
vessels:
  substeps: 4
  nodes:
    - {id: ground, kind: source, p: 284.49}
    - {id: well, kind: tank, area: 51.6, z: -0.5, level: 2.9,
       draw: {section: [[-8, -0.5], [0.6, -0.5], [0.6, 3.6], [-8, 3.6]], y: [0.05, 6]}}
    - {id: lo, kind: chamber, fixed: 1, sections: [[1, 3.5605], [7.1942, 3.9847]], volume: 68.7336, water: 68.7336, K: 2e+06,
       draw: {sections: [[[-4.8301, 9.2393], [-4.4036, 8.7464], [-3.9344, 8.3096], [-3.4297, 7.9307], [-2.8961, 7.6106], [-2.3398, 7.3494], [-1.7663, 7.1472], [-1.7484, 7.1962], [-4.4383, 9.4633]], [[-6.0706, 13.1251], [-6.0562, 12.4014], [-5.9565, 11.6965], [-5.777, 11.0203], [-5.5246, 10.381], [-5.2064, 9.7856], [-4.8301, 9.2393], [-4.4383, 9.4633], [-5.0265, 12.9316]], [[-6.0706, 13.1251], [-5.0265, 12.9316], [-3.2345, 15.9588], [-4.2435, 17.1938], [-4.7699, 16.613], [-5.2127, 15.9758], [-5.5663, 15.2952], [-5.8275, 14.5844], [-5.9953, 13.8568]], [[-4.2435, 17.1938], [-3.2345, 15.9588], [0.0892, 17.1113], [0.1206, 18.9088], [-0.6869, 18.8713], [-1.4813, 18.7278], [-2.2476, 18.4817], [-2.9719, 18.1385], [-3.641, 17.706]], [[-3.2327, 1], [-1.7492, 1], [-1.7492, 7.2942], [-3.2327, 7.2942]]], y: [0, 2.4]}}   # F and the chamber behind the piston
    - {id: hi, kind: chamber, fixed: 5, sections: [[5, 10.4799]], volume: 161.39, water: 161.39, K: 2e+06,
       draw: {sections: [[[0.0879, 17.0356], [2.9781, 16.0616], [3.9829, 17.432], [3.4316, 17.8549], [2.8319, 18.2141], [2.1918, 18.5035], [1.5201, 18.718], [0.8264, 18.8539], [0.1206, 18.9088]], [[2.9781, 16.0616], [4.7762, 13.5981], [5.9702, 13.9976], [5.8126, 14.6337], [5.5833, 15.2561], [5.2831, 15.856], [4.9138, 16.4244], [4.4789, 16.9526], [3.9829, 17.432]], [[4.7762, 13.5981], [4.8227, 10.5485], [5.5066, 10.3427], [5.7353, 10.8981], [5.909, 11.483], [6.023, 12.092], [6.0734, 12.7188], [6.0566, 13.3566], [5.9702, 13.9976]], [[3.1007, 8.0312], [3.2635, 7.8229], [3.7158, 8.1353], [4.1432, 8.4925], [4.541, 8.8936], [4.9043, 9.3372], [5.2279, 9.8212], [5.5066, 10.3427], [4.8227, 10.5485]], [[1.7492, 5], [9, 5], [9, 6.6], [3.2327, 7.8623], [1.7492, 7.1942]], [[7.6, 5], [9, 5], [9, 20.4], [7.6, 20.4]], [[7.6, 19], [11.6, 19], [11.6, 20.4], [7.6, 20.4]], [[10.2, 17], [11.6, 17], [11.6, 20.4], [10.2, 20.4]]], y: [0, 2.4]}}   # the chamber ahead of it, M, and H
    - {id: air, kind: source, p: 0}
  links:
    - {id: spring, from: ground, to: well, area: 30, cd: 0.62, z: -0.5}
    - {id: suck, from: well, to: lo, area: 3.5605, cd: 0.8, z: 1.2, length: 6.1942,
       draw: {from: [-2.4909, 0.6, 1.3], to: [-5.9088, 0.6, 10.9581], via: [[-2.4909, 0.6, 7.8623], [-4.5197, 0.6, 8.2076]], width: 1.1835, flow: 0.03}}   # up F and in at L
    - {id: leak, from: hi, to: lo, area: 0.02, cd: 0.62, z: 8, zTo: 8}   # past the pistons' and E's fit
    - {id: deliver, from: hi, to: air, area: 1.68, cd: 0.9, z: 17, zTo: 17, length: 18.8,
       draw: {from: [4.6746, 0.6, 5.8], to: [10.9, 0.6, 17], via: [[8.3, 0.6, 5.8], [8.3, 0.6, 19.7], [10.9, 0.6, 19.7]], width: 1.1, flow: 0.03,
         fall: {dir: [0, 0, -1], floor: 3.6}}}   # out by M, up H and over, and out of the spout
  displacers:
    - {id: drum, joint: j_d, from: lo, to: hi, volume: 90.9849, z: 12}   # a turn of the drum carries this before the piston that is out
driver: {joint: j_d, kind: velocity, rpm: 20, kv: 20, max_torque: 5}
checks:
  - {type: turning, joint: j_d, direction: 1, min_mean: 1.885, min_fraction: 0.95, settle_s: 1.0, window_s: 10.5}
  - {type: amplitude, joint: j_b, min: 0.0081, max: 0.0099, settle_s: 1.0, window_s: 10.5}
  - {type: penetration, max: 0.003}
camera: {target: [2, 0, 5.8], position: [2, -200, 8.8], fov: 10}
display:
  output: j_b
  labels: {j_d: "Drum B (driver)", j_b: "Pistons c, c"}
