number: 342
slug: atmospheric-beam-pumping-engine
name: The atmospheric beam pumping engine
brown: "Old-fashioned single-acting beam pumping engine on the atmospheric principle, with chain connection between piston-rod and a segment at end of beam. The cylinder is open at top. Very low pressure steam is admitted below piston, and the weight of pump-rod, etc., at the other end of beam, helps to raise piston. Steam is then condensed by injection, and a vacuum thus produced below piston, which is then forced down by atmospheric pressure thereby drawing up pump-rod."
units: cm
sim: {timestep: 0.0002, integrator: implicitfast, iterations: 100, solver: CG, multiccd: true, duration_s: 8, floor: false}
bodies:
  # the framing: the beam's pillar, the cylinder (open at top) and the gland that guides the piston-rod
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    density: 7800
    color: "#9a9284"
    pieces:
      - {kind: poly, points: [[-44.5300, -45.7026], [52.0000, -45.7026], [52.0000, -44.5026], [-44.5300, -44.5026]], y: [-6.0, 4.4], collide: 0}
      - {kind: poly, points: [[-2.0000, -44.5026], [2.0000, -44.5026], [2.0000, -1.0000], [-2.0000, -1.0000]], y: [2.0, 3.6], collide: 0}
      - {kind: disc, center: [0, 0], radius: 2.2, y: [2.0, 3.6], collide: 0}
      - {kind: rod, from: [0, 0.8, 0], to: [0, 3.6, 0], radius: 0.8, collide: 0, color: "#6f6a60"}
      - {kind: poly, points: [[-37.5300, -44.5026], [-23.5300, -44.5026], [-23.5300, -30.5026], [-37.5300, -30.5026]], y: [-4.6, 3.0], collide: 0, color: "#8a8274"}
      - {kind: poly, points: [[-38.5300, -30.5026], [-22.5300, -30.5026], [-22.5300, -29.5026], [-38.5300, -29.5026]], y: [-4.8, 3.2], collide: 0, color: "#7d776c"}
  # the beam, rocked on O (the driven joint): the arch-head on the near end, its face a circle about O; the
  # pump-rod's end on the far end
  - id: Bm
    shape: part
    pos: [0, 0, 0]
    mount: frame
    density: 7800
    color: "#b0a690"
    pieces:
      - {kind: band, center: [0, 0], r: [27.0000, 30.0000], a: [2.4086, 3.9794], y: [-1.4, 1.4], slices: 72, collide: 1}
      - {kind: poly, points: [[0, -2.6], [44, -1.6], [44, 1.6], [0, 2.6], [-6, 2.6], [-6, -2.6]], y: [-0.7, 0.7], collide: 0}
      - {kind: rod, from: [0.0000, 0.0, 0.0000], to: [-21.6000, 0.0, 15.0000], radius: 1.0, collide: 0}
      - {kind: rod, from: [0.0000, 0.0, 0.0000], to: [-29.1000, 0.0, -7.2000], radius: 1.0, collide: 0}
      - {kind: rod, from: [0.0000, 0.0, 0.0000], to: [-24.0000, 0.0, -16.5000], radius: 1.0, collide: 0}
      - {kind: disc, center: [0, 0], radius: 3.4, y: [-0.9, 0.9], collide: 0}
      - {kind: disc, center: [-25.0087, 17.5113], radius: 0.9, y: [-1.6, 1.6], collide: 0, color: "#6f6a60"}
      - {kind: disc, center: [44, 0], radius: 5.2, y: [-1.6, 1.6], collide: 0, color: "#7d776c"}   # the pump-rod's weight

  - id: L1
    shape: part
    pos: [-25.0087, 0, 17.5113]
    mount: Bm
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-25.0087, -0.75, 17.5113], to: [-26.1388, -0.75, 15.7748], radius: 0.28, collide: 0}
      - {kind: rod, from: [-25.0087, 0.75, 17.5113], to: [-26.1388, 0.75, 15.7748], radius: 0.28, collide: 0}
      - {kind: disc, center: [-26.1388, 15.7748], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L2
    shape: part
    pos: [-26.1388, 0, 15.7748]
    mount: L1
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-26.1388, -0.75, 15.7748], to: [-27.1485, -0.75, 13.9657], radius: 0.28, collide: 0}
      - {kind: rod, from: [-26.1388, 0.75, 15.7748], to: [-27.1485, 0.75, 13.9657], radius: 0.28, collide: 0}
      - {kind: disc, center: [-27.1485, 13.9657], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L3
    shape: part
    pos: [-27.1485, 0, 13.9657]
    mount: L2
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-27.1485, -0.75, 13.9657], to: [-28.0331, -0.75, 12.0923], radius: 0.28, collide: 0}
      - {kind: rod, from: [-27.1485, 0.75, 13.9657], to: [-28.0331, 0.75, 12.0923], radius: 0.28, collide: 0}
      - {kind: disc, center: [-28.0331, 12.0923], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L4
    shape: part
    pos: [-28.0331, 0, 12.0923]
    mount: L3
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-28.0331, -0.75, 12.0923], to: [-28.7887, -0.75, 10.1632], radius: 0.28, collide: 0}
      - {kind: rod, from: [-28.0331, 0.75, 12.0923], to: [-28.7887, 0.75, 10.1632], radius: 0.28, collide: 0}
      - {kind: disc, center: [-28.7887, 10.1632], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L5
    shape: part
    pos: [-28.7887, 0, 10.1632]
    mount: L4
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-28.7887, -0.75, 10.1632], to: [-29.4117, -0.75, 8.1873], radius: 0.28, collide: 0}
      - {kind: rod, from: [-28.7887, 0.75, 10.1632], to: [-29.4117, 0.75, 8.1873], radius: 0.28, collide: 0}
      - {kind: disc, center: [-29.4117, 8.1873], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L6
    shape: part
    pos: [-29.4117, 0, 8.1873]
    mount: L5
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-29.4117, -0.75, 8.1873], to: [-29.8993, -0.75, 6.1737], radius: 0.28, collide: 0}
      - {kind: rod, from: [-29.4117, 0.75, 8.1873], to: [-29.8993, 0.75, 6.1737], radius: 0.28, collide: 0}
      - {kind: disc, center: [-29.8993, 6.1737], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L7
    shape: part
    pos: [-29.8993, 0, 6.1737]
    mount: L6
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-29.8993, -0.75, 6.1737], to: [-30.2491, -0.75, 4.1317], radius: 0.28, collide: 0}
      - {kind: rod, from: [-29.8993, 0.75, 6.1737], to: [-30.2491, 0.75, 4.1317], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.2491, 4.1317], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L8
    shape: part
    pos: [-30.2491, 0, 4.1317]
    mount: L7
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.2491, -0.75, 4.1317], to: [-30.4597, -0.75, 2.0706], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.2491, 0.75, 4.1317], to: [-30.4597, 0.75, 2.0706], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.4597, 2.0706], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L9
    shape: part
    pos: [-30.4597, 0, 2.0706]
    mount: L8
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.4597, -0.75, 2.0706], to: [-30.5300, -0.75, 0.0000], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.4597, 0.75, 2.0706], to: [-30.5300, 0.75, 0.0000], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, 0.0000], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L10
    shape: part
    pos: [-30.5300, 0, 0.0000]
    mount: L9
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, 0.0000], to: [-30.5300, -0.75, -2.0718], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, 0.0000], to: [-30.5300, 0.75, -2.0718], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -2.0718], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L11
    shape: part
    pos: [-30.5300, 0, -2.0718]
    mount: L10
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -2.0718], to: [-30.5300, -0.75, -4.1436], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -2.0718], to: [-30.5300, 0.75, -4.1436], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -4.1436], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L12
    shape: part
    pos: [-30.5300, 0, -4.1436]
    mount: L11
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -4.1436], to: [-30.5300, -0.75, -6.2154], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -4.1436], to: [-30.5300, 0.75, -6.2154], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -6.2154], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L13
    shape: part
    pos: [-30.5300, 0, -6.2154]
    mount: L12
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -6.2154], to: [-30.5300, -0.75, -8.2872], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -6.2154], to: [-30.5300, 0.75, -8.2872], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -8.2872], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L14
    shape: part
    pos: [-30.5300, 0, -8.2872]
    mount: L13
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -8.2872], to: [-30.5300, -0.75, -10.3590], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -8.2872], to: [-30.5300, 0.75, -10.3590], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -10.3590], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L15
    shape: part
    pos: [-30.5300, 0, -10.3590]
    mount: L14
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -10.3590], to: [-30.5300, -0.75, -12.4308], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -10.3590], to: [-30.5300, 0.75, -12.4308], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -12.4308], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  - id: L16
    shape: part
    pos: [-30.5300, 0, -12.4308]
    mount: L15
    density: 7800
    color: "#7a7468"
    pieces:
      - {kind: rod, from: [-30.5300, -0.75, -12.4308], to: [-30.5300, -0.75, -14.5026], radius: 0.28, collide: 0}
      - {kind: rod, from: [-30.5300, 0.75, -12.4308], to: [-30.5300, 0.75, -14.5026], radius: 0.28, collide: 0}
      - {kind: disc, center: [-30.5300, -14.5026], radius: 0.5, y: [-1.0, 1.0], collide: 2, color: "#5f5a50"}
  # the piston-rod's cross-head, on an upright slide, hung on the chain's last pin
  - id: P
    shape: part
    pos: [-30.5300, 0, -14.5026]
    mount: frame
    density: 7800
    color: "#b8ad96"
    pieces:
      - {kind: band, center: [-30.5300, -14.5026], r: [0.52, 1.2], a: [0, 6.2832], y: [-0.5, 0.5], slices: 36, collide: 1}
      - {kind: poly, points: [[-31.9300, -16.9026], [-29.1300, -16.9026], [-29.1300, -15.7026], [-31.9300, -15.7026]], y: [-1.4, 1.4], collide: 0}
      - {kind: rod, from: [-30.5300, 0, -15.9026], to: [-30.5300, 0, -32.5026], radius: 0.6, collide: 0, color: "#8f8a80"}
      - {kind: disc, center: [-30.5300, -32.5026], radius: 5.6, y: [-1.0, 1.0], collide: 0, color: "#8f8a80"}
joints:
  - {id: j_O, type: hinge, body: Bm, axis: [0, -1, 0], damping: 0.001}
  - {id: j_L1, type: hinge, body: L1, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L2, type: hinge, body: L2, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L3, type: hinge, body: L3, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L4, type: hinge, body: L4, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L5, type: hinge, body: L5, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L6, type: hinge, body: L6, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L7, type: hinge, body: L7, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L8, type: hinge, body: L8, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L9, type: hinge, body: L9, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L10, type: hinge, body: L10, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L11, type: hinge, body: L11, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L12, type: hinge, body: L12, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L13, type: hinge, body: L13, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L14, type: hinge, body: L14, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L15, type: hinge, body: L15, axis: [0, -1, 0], damping: 0.002}
  - {id: j_L16, type: hinge, body: L16, axis: [0, -1, 0], damping: 0.002}
  - {id: j_z, type: slide, body: P, axis: [0, 0, 1], damping: 0.2, range: [-9, 9]}
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_O, kind: velocity, rpm: 0, swing: {amplitude: 0.15, hz: 0.25}, kv: 2000, max_torque: 100}
checks:
  # the beam, rocked on O, wraps the chain on to its arch and lets it off again; the chain leaves the arch at its
  # level point, so the piston-rod rises and falls by the arch's radius (to the chain's line) for each radian ...
  - {type: follow, out: j_z, in: j_O, expect: -0.3053, tol: 0.006, min_r2: 0.999, settle_s: 0.5, window_s: 7.0}
  - {type: amplitude, joint: j_z, min: 0.043, max: 0.050, settle_s: 0.5, window_s: 7.0}
  # ... the first and last links on the arch staying on it, the rest of the chain hanging straight
  - {type: penetration, max: 0.0003, settle_s: 0.2}
camera: {target: [8, 0, -32], position: [8, -270, -24], fov: 30}
display:
  output: j_z
  labels: {j_O: "Beam (driver)", j_z: Piston-rod}

