# No. 482 (Brown 1868): "Gas regulator (Powers’s patent) for equalizing the supply of gas to all the burners of a building or apartment, notwithstanding variations in the pressure on the main, or variations produced by turnin..."
# Model (cm, gravity on, seen from in front, the case cut away in half section). Gas from the main (600 Pa gauge) comes up the
# inlet E under the valve D (5.6 cm), a lumped gas vessel `inlet`; it passes D's notches b into the case (`case`, a gas vessel
# with the space under the cup H, 14 cm), and leaves at F for the burners through a cock, which a hand turns on and off
# (swung +-0.7 rad at 0.125 Hz, the only drive). D and H hang from the two ends of the lever d (9 and 9 cm from its
# pivot); both dip into still quicksilver in their channels. The case's gas presses up inside H (a piston of H's area on the lever),
# the main's presses up inside D and the case's down on its top (two pistons of D's area); H's and D's weights and the weight on
# H's crown hold against them. When the burners are shut the case's pressure rises, lifts H and sinks D so its notches go
# deeper into the quicksilver and pass less gas; opened, the case's pressure falls and D rises. The notches' opening is D's
# height over the quicksilver (the link opens with the lever's angle, shut at -0.09 rad, full at +0.09). The quicksilver is
# not drawn: the model has only water's colour and density for a liquid, and these seals do not move. Generator: opencode-runs/water/gen482.py.
number: 482
slug: gas-regulator-powers
name: Gas regulator (Powers's patent)
brown: "Gas regulator (Powers’s patent) for equalizing the supply of gas to all the burners of a building or apartment, notwithstanding variations in the pressure on the main, or variations produced by turning gas on or off, to or from any number of the burners. The regulator-valve, D, of which a separate outside view is given, is arranged over inlet-pipe, E, and connected by a lever, d, with an inverted cup, H, the lower edges of which, as well as those of valve, dip into channels containing quicksilver. There is no escape of gas around the cup, H, but there are notches, b, in the valve to permit the gas to pass over the surface of the quicksilver. As the pressure of gas increases, it acts upon the inner surface of cup, H, which is larger than valve, and the cup is thereby raised, causing a depression of the valve into the quicksilver, and contracting the opening notches, b, and diminishing the quantity of gas passing through. As the pressure diminishes, an opposite result is produced. The outlet to burners is at F."
units: cm
sim:
  timestep: 0.0005
  integrator: implicitfast
  iterations: 60
  duration_s: 18
  floor: false
bodies:
  - id: lever
    shape: part
    pos: [0, 0, 19]
    mass: 0.5
    color: "#a8884a"
    pieces:
      - {kind: rod, from: [-9, 0, 19], to: [9, 0, 19], radius: 0.5, capsule: true, collide: 0}
      - {kind: rod, from: [-9, 0, 19], to: [-9, 0, 17.5], radius: 0.35, collide: 0}
      - {kind: rod, from: [9, 0, 19], to: [9, 0, 33], radius: 0.35, collide: 0}
      - {kind: loft, a: [[-6.2, 0, 17.2], [-6.4131, 1.0715, 17.2], [-6.1822, 1.1672, 17.2], [-5.95, 0, 17.2]], b: [[-6.2, 0, 13.5], [-6.4131, 1.0715, 13.5], [-6.1822, 1.1672, 13.5], [-5.95, 0, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-6.4131, 1.0715, 17.2], [-7.0201, 1.9799, 17.2], [-6.8433, 2.1567, 17.2], [-6.1822, 1.1672, 17.2]], b: [[-6.4131, 1.0715, 13.5], [-7.0201, 1.9799, 13.5], [-6.8433, 2.1567, 13.5], [-6.1822, 1.1672, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-7.0201, 1.9799, 17.2], [-7.9285, 2.5869, 17.2], [-7.8328, 2.8178, 17.2], [-6.8433, 2.1567, 17.2]], b: [[-7.0201, 1.9799, 13.5], [-7.9285, 2.5869, 13.5], [-7.8328, 2.8178, 13.5], [-6.8433, 2.1567, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-7.9285, 2.5869, 17.2], [-9, 2.8, 17.2], [-9, 3.05, 17.2], [-7.8328, 2.8178, 17.2]], b: [[-7.9285, 2.5869, 13.5], [-9, 2.8, 13.5], [-9, 3.05, 13.5], [-7.8328, 2.8178, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-9, 2.8, 17.2], [-10.0715, 2.5869, 17.2], [-10.1672, 2.8178, 17.2], [-9, 3.05, 17.2]], b: [[-9, 2.8, 13.5], [-10.0715, 2.5869, 13.5], [-10.1672, 2.8178, 13.5], [-9, 3.05, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-10.0715, 2.5869, 17.2], [-10.9799, 1.9799, 17.2], [-11.1567, 2.1567, 17.2], [-10.1672, 2.8178, 17.2]], b: [[-10.0715, 2.5869, 13.5], [-10.9799, 1.9799, 13.5], [-11.1567, 2.1567, 13.5], [-10.1672, 2.8178, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-10.9799, 1.9799, 17.2], [-11.5869, 1.0715, 17.2], [-11.8178, 1.1672, 17.2], [-11.1567, 2.1567, 17.2]], b: [[-10.9799, 1.9799, 13.5], [-11.5869, 1.0715, 13.5], [-11.8178, 1.1672, 13.5], [-11.1567, 2.1567, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-11.5869, 1.0715, 17.2], [-11.8, 0, 17.2], [-12.05, 0, 17.2], [-11.8178, 1.1672, 17.2]], b: [[-11.5869, 1.0715, 13.5], [-11.8, 0, 13.5], [-12.05, 0, 13.5], [-11.8178, 1.1672, 13.5]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-5.95, 0, 17.5], [-6.1822, 1.1672, 17.5], [-6.8433, 2.1567, 17.5], [-7.8328, 2.8178, 17.5], [-9, 3.05, 17.5], [-10.1672, 2.8178, 17.5], [-11.1567, 2.1567, 17.5], [-11.8178, 1.1672, 17.5], [-12.05, 0, 17.5], [-11.8178, -1.1672, 17.5], [-11.1567, -2.1567, 17.5], [-10.1672, -2.8178, 17.5], [-9, -3.05, 17.5], [-7.8328, -2.8178, 17.5], [-6.8433, -2.1567, 17.5], [-6.1822, -1.1672, 17.5]], b: [[-5.95, 0, 17.2], [-6.1822, 1.1672, 17.2], [-6.8433, 2.1567, 17.2], [-7.8328, 2.8178, 17.2], [-9, 3.05, 17.2], [-10.1672, 2.8178, 17.2], [-11.1567, 2.1567, 17.2], [-11.8178, 1.1672, 17.2], [-12.05, 0, 17.2], [-11.8178, -1.1672, 17.2], [-11.1567, -2.1567, 17.2], [-10.1672, -2.8178, 17.2], [-9, -3.05, 17.2], [-7.8328, -2.8178, 17.2], [-6.8433, -2.1567, 17.2], [-6.1822, -1.1672, 17.2]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[-6.6631, 0.8215, 15.1], [-6.1631, 0.8215, 15.1], [-6.1631, 1.3215, 15.1], [-6.6631, 1.3215, 15.1]], b: [[-6.6631, 0.8215, 13.5], [-6.1631, 0.8215, 13.5], [-6.1631, 1.3215, 13.5], [-6.6631, 1.3215, 13.5]], collide: 0, color: "#2b2926"}
      - {kind: loft, a: [[-8.1785, 2.3369, 15.1], [-7.6785, 2.3369, 15.1], [-7.6785, 2.8369, 15.1], [-8.1785, 2.8369, 15.1]], b: [[-8.1785, 2.3369, 13.5], [-7.6785, 2.3369, 13.5], [-7.6785, 2.8369, 13.5], [-8.1785, 2.8369, 13.5]], collide: 0, color: "#2b2926"}
      - {kind: loft, a: [[-10.3215, 2.3369, 15.1], [-9.8215, 2.3369, 15.1], [-9.8215, 2.8369, 15.1], [-10.3215, 2.8369, 15.1]], b: [[-10.3215, 2.3369, 13.5], [-9.8215, 2.3369, 13.5], [-9.8215, 2.8369, 13.5], [-10.3215, 2.8369, 13.5]], collide: 0, color: "#2b2926"}
      - {kind: loft, a: [[-11.8369, 0.8215, 15.1], [-11.3369, 0.8215, 15.1], [-11.3369, 1.3215, 15.1], [-11.8369, 1.3215, 15.1]], b: [[-11.8369, 0.8215, 13.5], [-11.3369, 0.8215, 13.5], [-11.3369, 1.3215, 13.5], [-11.8369, 1.3215, 13.5]], collide: 0, color: "#2b2926"}
      - {kind: loft, a: [[16, 0, 32.7], [15.7615, 1.8117, 32.7], [16.0513, 1.8894, 32.7], [16.3, 0, 32.7]], b: [[16, 0, 26], [15.7615, 1.8117, 26], [16.0513, 1.8894, 26], [16.3, 0, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[15.7615, 1.8117, 32.7], [15.0622, 3.5, 32.7], [15.322, 3.65, 32.7], [16.0513, 1.8894, 32.7]], b: [[15.7615, 1.8117, 26], [15.0622, 3.5, 26], [15.322, 3.65, 26], [16.0513, 1.8894, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[15.0622, 3.5, 32.7], [13.9497, 4.9497, 32.7], [14.1619, 5.1619, 32.7], [15.322, 3.65, 32.7]], b: [[15.0622, 3.5, 26], [13.9497, 4.9497, 26], [14.1619, 5.1619, 26], [15.322, 3.65, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[13.9497, 4.9497, 32.7], [12.5, 6.0622, 32.7], [12.65, 6.322, 32.7], [14.1619, 5.1619, 32.7]], b: [[13.9497, 4.9497, 26], [12.5, 6.0622, 26], [12.65, 6.322, 26], [14.1619, 5.1619, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[12.5, 6.0622, 32.7], [10.8117, 6.7615, 32.7], [10.8894, 7.0513, 32.7], [12.65, 6.322, 32.7]], b: [[12.5, 6.0622, 26], [10.8117, 6.7615, 26], [10.8894, 7.0513, 26], [12.65, 6.322, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[10.8117, 6.7615, 32.7], [9, 7, 32.7], [9, 7.3, 32.7], [10.8894, 7.0513, 32.7]], b: [[10.8117, 6.7615, 26], [9, 7, 26], [9, 7.3, 26], [10.8894, 7.0513, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[9, 7, 32.7], [7.1883, 6.7615, 32.7], [7.1106, 7.0513, 32.7], [9, 7.3, 32.7]], b: [[9, 7, 26], [7.1883, 6.7615, 26], [7.1106, 7.0513, 26], [9, 7.3, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[7.1883, 6.7615, 32.7], [5.5, 6.0622, 32.7], [5.35, 6.322, 32.7], [7.1106, 7.0513, 32.7]], b: [[7.1883, 6.7615, 26], [5.5, 6.0622, 26], [5.35, 6.322, 26], [7.1106, 7.0513, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[5.5, 6.0622, 32.7], [4.0503, 4.9497, 32.7], [3.8381, 5.1619, 32.7], [5.35, 6.322, 32.7]], b: [[5.5, 6.0622, 26], [4.0503, 4.9497, 26], [3.8381, 5.1619, 26], [5.35, 6.322, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[4.0503, 4.9497, 32.7], [2.9378, 3.5, 32.7], [2.678, 3.65, 32.7], [3.8381, 5.1619, 32.7]], b: [[4.0503, 4.9497, 26], [2.9378, 3.5, 26], [2.678, 3.65, 26], [3.8381, 5.1619, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[2.9378, 3.5, 32.7], [2.2385, 1.8117, 32.7], [1.9487, 1.8894, 32.7], [2.678, 3.65, 32.7]], b: [[2.9378, 3.5, 26], [2.2385, 1.8117, 26], [1.9487, 1.8894, 26], [2.678, 3.65, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[2.2385, 1.8117, 32.7], [2, 0, 32.7], [1.7, 0, 32.7], [1.9487, 1.8894, 32.7]], b: [[2.2385, 1.8117, 26], [2, 0, 26], [1.7, 0, 26], [1.9487, 1.8894, 26]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[16.3, 0, 33], [15.9427, 2.2558, 33], [14.9058, 4.2908, 33], [13.2908, 5.9058, 33], [11.2558, 6.9427, 33], [9, 7.3, 33], [6.7442, 6.9427, 33], [4.7092, 5.9058, 33], [3.0942, 4.2908, 33], [2.0573, 2.2558, 33], [1.7, 0, 33], [2.0573, -2.2558, 33], [3.0942, -4.2908, 33], [4.7092, -5.9058, 33], [6.7442, -6.9427, 33], [9, -7.3, 33], [11.2558, -6.9427, 33], [13.2908, -5.9058, 33], [14.9058, -4.2908, 33], [15.9427, -2.2558, 33]], b: [[16.3, 0, 32.7], [15.9427, 2.2558, 32.7], [14.9058, 4.2908, 32.7], [13.2908, 5.9058, 32.7], [11.2558, 6.9427, 32.7], [9, 7.3, 32.7], [6.7442, 6.9427, 32.7], [4.7092, 5.9058, 32.7], [3.0942, 4.2908, 32.7], [2.0573, 2.2558, 32.7], [1.7, 0, 32.7], [2.0573, -2.2558, 32.7], [3.0942, -4.2908, 32.7], [4.7092, -5.9058, 32.7], [6.7442, -6.9427, 32.7], [9, -7.3, 32.7], [11.2558, -6.9427, 32.7], [13.2908, -5.9058, 32.7], [14.9058, -4.2908, 32.7], [15.9427, -2.2558, 32.7]], collide: 0, color: "#a8884a"}
      - {kind: loft, a: [[12, 0, 34.5], [11.7716, 1.1481, 34.5], [11.1213, 2.1213, 34.5], [10.1481, 2.7716, 34.5], [9, 3, 34.5], [7.8519, 2.7716, 34.5], [6.8787, 2.1213, 34.5], [6.2284, 1.1481, 34.5], [6, 0, 34.5], [6.2284, -1.1481, 34.5], [6.8787, -2.1213, 34.5], [7.8519, -2.7716, 34.5], [9, -3, 34.5], [10.1481, -2.7716, 34.5], [11.1213, -2.1213, 34.5], [11.7716, -1.1481, 34.5]], b: [[12, 0, 33], [11.7716, 1.1481, 33], [11.1213, 2.1213, 33], [10.1481, 2.7716, 33], [9, 3, 33], [7.8519, 2.7716, 33], [6.8787, 2.1213, 33], [6.2284, 1.1481, 33], [6, 0, 33], [6.2284, -1.1481, 33], [6.8787, -2.1213, 33], [7.8519, -2.7716, 33], [9, -3, 33], [10.1481, -2.7716, 33], [11.1213, -2.1213, 33], [11.7716, -1.1481, 33]], collide: 0, color: "#6d675c"}
  - id: cock
    shape: part
    pos: [30, 0, 8]
    mass: 0.3
    color: "#6d675c"
    pieces:
      - {kind: rod, from: [30, -0.4, 8], to: [30, 1.4, 8], radius: 0.8, collide: 0}
      - {kind: rod, from: [30, -0.2, 8], to: [30, -0.2, 16], radius: 0.45, capsule: true, collide: 0}
      - {kind: loft, a: [[29.2, -0.8, 17.5], [30.8, -0.8, 17.5], [30.8, 0.4, 17.5], [29.2, 0.4, 17.5]], b: [[29.2, -0.8, 15.5], [30.8, -0.8, 15.5], [30.8, 0.4, 15.5], [29.2, 0.4, 15.5]], collide: 0, color: "#6d675c"}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#d6cdb8"
    pieces:
      - {kind: loft, a: [[-40, -10, 0], [40, -10, 0], [40, 22, 0], [-40, 22, 0]], b: [[-40, -10, -1.5], [40, -10, -1.5], [40, 22, -1.5], [-40, 22, -1.5]], collide: 0, color: "#8b7d66"}
      - {kind: loft, a: [[-16, 0, 3.3], [-12, 0, 3.3], [-12, 10, 3.3], [-16, 10, 3.3]], b: [[-16, 0, 0], [-12, 0, 0], [-12, 10, 0], [-16, 10, 0]], collide: 0, color: "#6d675c"}
      - {kind: loft, a: [[12, 0, 3.3], [16, 0, 3.3], [16, 10, 3.3], [12, 10, 3.3]], b: [[12, 0, 0], [16, 0, 0], [16, 10, 0], [12, 10, 0]], collide: 0, color: "#6d675c"}
      - {kind: loft, a: [[-18.7, 0, 4], [18.7, 0, 4], [18.7, 10.7, 4], [-18.7, 10.7, 4]], b: [[-18.7, 0, 3.3], [18.7, 0, 3.3], [18.7, 10.7, 3.3], [-18.7, 10.7, 3.3]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-18.7, 0, 24], [-18, 0, 24], [-18, 10.7, 24], [-18.7, 10.7, 24]], b: [[-18.7, 0, 4], [-18, 0, 4], [-18, 10.7, 4], [-18.7, 10.7, 4]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[18, 0, 24], [18.7, 0, 24], [18.7, 10.7, 24], [18, 10.7, 24]], b: [[18, 0, 4], [18.7, 0, 4], [18.7, 10.7, 4], [18, 10.7, 4]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-18.7, 10, 24], [18.7, 10, 24], [18.7, 10.7, 24], [-18.7, 10.7, 24]], b: [[-18.7, 10, 4], [18.7, 10, 4], [18.7, 10.7, 4], [-18.7, 10.7, 4]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-18.7, 0, 24.7], [-0.2, 0, 24.7], [-0.2, 10.7, 24.7], [-18.7, 10.7, 24.7]], b: [[-18.7, 0, 24], [-0.2, 0, 24], [-0.2, 10.7, 24], [-18.7, 10.7, 24]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[18.2, 0, 24.7], [18.7, 0, 24.7], [18.7, 10.7, 24.7], [18.2, 10.7, 24.7]], b: [[18.2, 0, 24], [18.7, 0, 24], [18.7, 10.7, 24], [18.2, 10.7, 24]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-0.2, 0, 24.7], [3.2, 0, 24.7], [3.2, 9.2, 24.7], [-0.2, 9.2, 24.7]], b: [[-0.2, 0, 24], [3.2, 0, 24], [3.2, 9.2, 24], [-0.2, 9.2, 24]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[14.8, 0, 24.7], [18.2, 0, 24.7], [18.2, 9.2, 24.7], [14.8, 9.2, 24.7]], b: [[14.8, 0, 24], [18.2, 0, 24], [18.2, 9.2, 24], [14.8, 9.2, 24]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[17.4, 0, 29.6], [16.9889, 2.5957, 29.6], [17.7497, 2.843, 29.6], [18.2, 0, 29.6]], b: [[17.4, 0, 24.7], [16.9889, 2.5957, 24.7], [17.7497, 2.843, 24.7], [18.2, 0, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[16.9889, 2.5957, 29.6], [15.7957, 4.9374, 29.6], [16.443, 5.4076, 29.6], [17.7497, 2.843, 29.6]], b: [[16.9889, 2.5957, 24.7], [15.7957, 4.9374, 24.7], [16.443, 5.4076, 24.7], [17.7497, 2.843, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[15.7957, 4.9374, 29.6], [13.9374, 6.7957, 29.6], [14.4076, 7.443, 29.6], [16.443, 5.4076, 29.6]], b: [[15.7957, 4.9374, 24.7], [13.9374, 6.7957, 24.7], [14.4076, 7.443, 24.7], [16.443, 5.4076, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[13.9374, 6.7957, 29.6], [11.5957, 7.9889, 29.6], [11.843, 8.7497, 29.6], [14.4076, 7.443, 29.6]], b: [[13.9374, 6.7957, 24.7], [11.5957, 7.9889, 24.7], [11.843, 8.7497, 24.7], [14.4076, 7.443, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[11.5957, 7.9889, 29.6], [9, 8.4, 29.6], [9, 9.2, 29.6], [11.843, 8.7497, 29.6]], b: [[11.5957, 7.9889, 24.7], [9, 8.4, 24.7], [9, 9.2, 24.7], [11.843, 8.7497, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[9, 8.4, 29.6], [6.4043, 7.9889, 29.6], [6.157, 8.7497, 29.6], [9, 9.2, 29.6]], b: [[9, 8.4, 24.7], [6.4043, 7.9889, 24.7], [6.157, 8.7497, 24.7], [9, 9.2, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[6.4043, 7.9889, 29.6], [4.0626, 6.7957, 29.6], [3.5924, 7.443, 29.6], [6.157, 8.7497, 29.6]], b: [[6.4043, 7.9889, 24.7], [4.0626, 6.7957, 24.7], [3.5924, 7.443, 24.7], [6.157, 8.7497, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[4.0626, 6.7957, 29.6], [2.2043, 4.9374, 29.6], [1.557, 5.4076, 29.6], [3.5924, 7.443, 29.6]], b: [[4.0626, 6.7957, 24.7], [2.2043, 4.9374, 24.7], [1.557, 5.4076, 24.7], [3.5924, 7.443, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[2.2043, 4.9374, 29.6], [1.0111, 2.5957, 29.6], [0.2503, 2.843, 29.6], [1.557, 5.4076, 29.6]], b: [[2.2043, 4.9374, 24.7], [1.0111, 2.5957, 24.7], [0.2503, 2.843, 24.7], [1.557, 5.4076, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[1.0111, 2.5957, 29.6], [0.6, 0, 29.6], [-0.2, 0, 29.6], [0.2503, 2.843, 29.6]], b: [[1.0111, 2.5957, 24.7], [0.6, 0, 24.7], [-0.2, 0, 24.7], [0.2503, 2.843, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[14.8, 0, 28], [14.5161, 1.7923, 28], [15.0868, 1.9777, 28], [15.4, 0, 28]], b: [[14.8, 0, 24.7], [14.5161, 1.7923, 24.7], [15.0868, 1.9777, 24.7], [15.4, 0, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[14.5161, 1.7923, 28], [13.6923, 3.4092, 28], [14.1777, 3.7618, 28], [15.0868, 1.9777, 28]], b: [[14.5161, 1.7923, 24.7], [13.6923, 3.4092, 24.7], [14.1777, 3.7618, 24.7], [15.0868, 1.9777, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[13.6923, 3.4092, 28], [12.4092, 4.6923, 28], [12.7618, 5.1777, 28], [14.1777, 3.7618, 28]], b: [[13.6923, 3.4092, 24.7], [12.4092, 4.6923, 24.7], [12.7618, 5.1777, 24.7], [14.1777, 3.7618, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[12.4092, 4.6923, 28], [10.7923, 5.5161, 28], [10.9777, 6.0868, 28], [12.7618, 5.1777, 28]], b: [[12.4092, 4.6923, 24.7], [10.7923, 5.5161, 24.7], [10.9777, 6.0868, 24.7], [12.7618, 5.1777, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[10.7923, 5.5161, 28], [9, 5.8, 28], [9, 6.4, 28], [10.9777, 6.0868, 28]], b: [[10.7923, 5.5161, 24.7], [9, 5.8, 24.7], [9, 6.4, 24.7], [10.9777, 6.0868, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[9, 5.8, 28], [7.2077, 5.5161, 28], [7.0223, 6.0868, 28], [9, 6.4, 28]], b: [[9, 5.8, 24.7], [7.2077, 5.5161, 24.7], [7.0223, 6.0868, 24.7], [9, 6.4, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[7.2077, 5.5161, 28], [5.5908, 4.6923, 28], [5.2382, 5.1777, 28], [7.0223, 6.0868, 28]], b: [[7.2077, 5.5161, 24.7], [5.5908, 4.6923, 24.7], [5.2382, 5.1777, 24.7], [7.0223, 6.0868, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[5.5908, 4.6923, 28], [4.3077, 3.4092, 28], [3.8223, 3.7618, 28], [5.2382, 5.1777, 28]], b: [[5.5908, 4.6923, 24.7], [4.3077, 3.4092, 24.7], [3.8223, 3.7618, 24.7], [5.2382, 5.1777, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[4.3077, 3.4092, 28], [3.4839, 1.7923, 28], [2.9132, 1.9777, 28], [3.8223, 3.7618, 28]], b: [[4.3077, 3.4092, 24.7], [3.4839, 1.7923, 24.7], [2.9132, 1.9777, 24.7], [3.8223, 3.7618, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[3.4839, 1.7923, 28], [3.2, 0, 28], [2.6, 0, 28], [2.9132, 1.9777, 28]], b: [[3.4839, 1.7923, 24.7], [3.2, 0, 24.7], [2.6, 0, 24.7], [2.9132, 1.9777, 24.7]], collide: 0, color: "#7d7a72"}
      - {kind: rod, from: [-40, 2, 2], to: [-9, 2, 2], radius: 1, collide: 0, color: "#5f5a52"}
      - {kind: rod, from: [-9, 0, 2], to: [-9, 0, 15.9], radius: 1, collide: 0, color: "#5f5a52"}
      - {kind: loft, a: [[-5.5, 0, 16.3], [-5.7664, 1.3394, 16.3], [-5.3045, 1.5307, 16.3], [-5, 0, 16.3]], b: [[-5.5, 0, 12.1], [-5.7664, 1.3394, 12.1], [-5.3045, 1.5307, 12.1], [-5, 0, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-5.7664, 1.3394, 16.3], [-6.5251, 2.4749, 16.3], [-6.1716, 2.8284, 16.3], [-5.3045, 1.5307, 16.3]], b: [[-5.7664, 1.3394, 12.1], [-6.5251, 2.4749, 12.1], [-6.1716, 2.8284, 12.1], [-5.3045, 1.5307, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-6.5251, 2.4749, 16.3], [-7.6606, 3.2336, 16.3], [-7.4693, 3.6955, 16.3], [-6.1716, 2.8284, 16.3]], b: [[-6.5251, 2.4749, 12.1], [-7.6606, 3.2336, 12.1], [-7.4693, 3.6955, 12.1], [-6.1716, 2.8284, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-7.6606, 3.2336, 16.3], [-9, 3.5, 16.3], [-9, 4, 16.3], [-7.4693, 3.6955, 16.3]], b: [[-7.6606, 3.2336, 12.1], [-9, 3.5, 12.1], [-9, 4, 12.1], [-7.4693, 3.6955, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9, 3.5, 16.3], [-10.3394, 3.2336, 16.3], [-10.5307, 3.6955, 16.3], [-9, 4, 16.3]], b: [[-9, 3.5, 12.1], [-10.3394, 3.2336, 12.1], [-10.5307, 3.6955, 12.1], [-9, 4, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-10.3394, 3.2336, 16.3], [-11.4749, 2.4749, 16.3], [-11.8284, 2.8284, 16.3], [-10.5307, 3.6955, 16.3]], b: [[-10.3394, 3.2336, 12.1], [-11.4749, 2.4749, 12.1], [-11.8284, 2.8284, 12.1], [-10.5307, 3.6955, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-11.4749, 2.4749, 16.3], [-12.2336, 1.3394, 16.3], [-12.6955, 1.5307, 16.3], [-11.8284, 2.8284, 16.3]], b: [[-11.4749, 2.4749, 12.1], [-12.2336, 1.3394, 12.1], [-12.6955, 1.5307, 12.1], [-11.8284, 2.8284, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-12.2336, 1.3394, 16.3], [-12.5, 0, 16.3], [-13, 0, 16.3], [-12.6955, 1.5307, 16.3]], b: [[-12.2336, 1.3394, 12.1], [-12.5, 0, 12.1], [-13, 0, 12.1], [-12.6955, 1.5307, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-8, 0, 12.6], [-8.0761, 0.3827, 12.6], [-6.9675, 0.8419, 12.6], [-6.8, 0, 12.6]], b: [[-8, 0, 12.1], [-8.0761, 0.3827, 12.1], [-6.9675, 0.8419, 12.1], [-6.8, 0, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-8.0761, 0.3827, 12.6], [-8.2929, 0.7071, 12.6], [-7.4444, 1.5556, 12.6], [-6.9675, 0.8419, 12.6]], b: [[-8.0761, 0.3827, 12.1], [-8.2929, 0.7071, 12.1], [-7.4444, 1.5556, 12.1], [-6.9675, 0.8419, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-8.2929, 0.7071, 12.6], [-8.6173, 0.9239, 12.6], [-8.1581, 2.0325, 12.6], [-7.4444, 1.5556, 12.6]], b: [[-8.2929, 0.7071, 12.1], [-8.6173, 0.9239, 12.1], [-8.1581, 2.0325, 12.1], [-7.4444, 1.5556, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-8.6173, 0.9239, 12.6], [-9, 1, 12.6], [-9, 2.2, 12.6], [-8.1581, 2.0325, 12.6]], b: [[-8.6173, 0.9239, 12.1], [-9, 1, 12.1], [-9, 2.2, 12.1], [-8.1581, 2.0325, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9, 1, 12.6], [-9.3827, 0.9239, 12.6], [-9.8419, 2.0325, 12.6], [-9, 2.2, 12.6]], b: [[-9, 1, 12.1], [-9.3827, 0.9239, 12.1], [-9.8419, 2.0325, 12.1], [-9, 2.2, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9.3827, 0.9239, 12.6], [-9.7071, 0.7071, 12.6], [-10.5556, 1.5556, 12.6], [-9.8419, 2.0325, 12.6]], b: [[-9.3827, 0.9239, 12.1], [-9.7071, 0.7071, 12.1], [-10.5556, 1.5556, 12.1], [-9.8419, 2.0325, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9.7071, 0.7071, 12.6], [-9.9239, 0.3827, 12.6], [-11.0325, 0.8419, 12.6], [-10.5556, 1.5556, 12.6]], b: [[-9.7071, 0.7071, 12.1], [-9.9239, 0.3827, 12.1], [-11.0325, 0.8419, 12.1], [-10.5556, 1.5556, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9.9239, 0.3827, 12.6], [-10, 0, 12.6], [-11.2, 0, 12.6], [-11.0325, 0.8419, 12.6]], b: [[-9.9239, 0.3827, 12.1], [-10, 0, 12.1], [-11.2, 0, 12.1], [-11.0325, 0.8419, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-6.8, 0, 12.6], [-6.9675, 0.8419, 12.6], [-5.7664, 1.3394, 12.6], [-5.5, 0, 12.6]], b: [[-6.8, 0, 12.1], [-6.9675, 0.8419, 12.1], [-5.7664, 1.3394, 12.1], [-5.5, 0, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-6.9675, 0.8419, 12.6], [-7.4444, 1.5556, 12.6], [-6.5251, 2.4749, 12.6], [-5.7664, 1.3394, 12.6]], b: [[-6.9675, 0.8419, 12.1], [-7.4444, 1.5556, 12.1], [-6.5251, 2.4749, 12.1], [-5.7664, 1.3394, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-7.4444, 1.5556, 12.6], [-8.1581, 2.0325, 12.6], [-7.6606, 3.2336, 12.6], [-6.5251, 2.4749, 12.6]], b: [[-7.4444, 1.5556, 12.1], [-8.1581, 2.0325, 12.1], [-7.6606, 3.2336, 12.1], [-6.5251, 2.4749, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-8.1581, 2.0325, 12.6], [-9, 2.2, 12.6], [-9, 3.5, 12.6], [-7.6606, 3.2336, 12.6]], b: [[-8.1581, 2.0325, 12.1], [-9, 2.2, 12.1], [-9, 3.5, 12.1], [-7.6606, 3.2336, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9, 2.2, 12.6], [-9.8419, 2.0325, 12.6], [-10.3394, 3.2336, 12.6], [-9, 3.5, 12.6]], b: [[-9, 2.2, 12.1], [-9.8419, 2.0325, 12.1], [-10.3394, 3.2336, 12.1], [-9, 3.5, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-9.8419, 2.0325, 12.6], [-10.5556, 1.5556, 12.6], [-11.4749, 2.4749, 12.6], [-10.3394, 3.2336, 12.6]], b: [[-9.8419, 2.0325, 12.1], [-10.5556, 1.5556, 12.1], [-11.4749, 2.4749, 12.1], [-10.3394, 3.2336, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-10.5556, 1.5556, 12.6], [-11.0325, 0.8419, 12.6], [-12.2336, 1.3394, 12.6], [-11.4749, 2.4749, 12.6]], b: [[-10.5556, 1.5556, 12.1], [-11.0325, 0.8419, 12.1], [-12.2336, 1.3394, 12.1], [-11.4749, 2.4749, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-11.0325, 0.8419, 12.6], [-11.2, 0, 12.6], [-12.5, 0, 12.6], [-12.2336, 1.3394, 12.6]], b: [[-11.0325, 0.8419, 12.1], [-11.2, 0, 12.1], [-12.5, 0, 12.1], [-12.2336, 1.3394, 12.1]], collide: 0, color: "#7d7a72"}
      - {kind: loft, a: [[-0.8, 4, 19.6], [0.8, 4, 19.6], [0.8, 6, 19.6], [-0.8, 6, 19.6]], b: [[-0.8, 4, 4], [0.8, 4, 4], [0.8, 6, 4], [-0.8, 6, 4]], collide: 0, color: "#6d675c"}
      - {kind: rod, from: [0, 0.6, 19], to: [0, 6, 19], radius: 0.4, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [18, 3, 8], to: [40, 3, 8], radius: 1, collide: 0, color: "#5f5a52"}
      - {kind: loft, a: [[28.4, 1.4, 9.9], [31.6, 1.4, 9.9], [31.6, 4.6, 9.9], [28.4, 4.6, 9.9]], b: [[28.4, 1.4, 6.1], [31.6, 1.4, 6.1], [31.6, 4.6, 6.1], [28.4, 4.6, 6.1]], collide: 0, color: "#6d675c"}
joints:
  - {id: j_d, type: hinge, body: lever, axis: [0, 1, 0], range: [-0.126, 0.126], damping: 0.05}   # + : D's end up, H's down
  - {id: j_k, type: hinge, body: cock, axis: [0, 1, 0], damping: 0.01}   # the burners' cock (the drive)
vessels:
  substeps: 8
  nodes:
    - {id: main, kind: source, p: 600, gas: true, RT: 84100}
    - {id: burners, kind: source, p: 0, gas: true, RT: 84100}
    - {id: inlet, kind: gas, volume: 150, p: 600, RT: 84100,
       draw: {sections: [[[-9.9, 2.0], [-8.1, 2.0], [-8.1, 15.9], [-9.9, 15.9]], [[-11.7, 14.7], [-6.3, 14.7], [-6.3, 17.1], [-11.7, 17.1]]], y: [0.1, 0.9], pref: 800}}   # the gas in E and under D
    - {id: case, kind: gas, volume: 15477.6, p: 0, RT: 84100,
       draw: {sections: [[[-17.9, 4.1], [17.9, 4.1], [17.9, 23.9], [-17.9, 23.9]], [[2.1, 24], [15.9, 24], [15.9, 32.6], [2.1, 32.6]]], y: [9, 9.9], pref: 800}}   # the case's gas and the gas under H
  links:
    - {id: supply, from: main, to: inlet, area: 3, cd: 0.62}   # the main and the pipe E
    - {id: notches, from: inlet, to: case, area: 2.2, cd: 0.62, open: {joint: j_d, q: [-0.09, 0.09], frac: [0, 1]}}
    - {id: outlet, from: case, to: burners, area: 1.2, cd: 0.62, open: {joint: j_k, q: [0.3, 0.8], frac: [0.15, 1]}}
  pistons:
    - {node: case, joint: j_d, area: 153.938, arm: 9, sign: -1}   # the case's gas under H lifts H (turns the lever -)
    - {node: inlet, joint: j_d, area: 24.6301, arm: 9, sign: 1}   # the main's gas under D lifts D (+)
    - {node: case, joint: j_d, area: 24.6301, arm: 9, sign: -1}   # the case's gas on D's top presses it down (-)
driver: {joint: j_k, kind: velocity, rpm: 0, swing: {amplitude: 0.7, hz: 0.125}, kv: 300, max_torque: 20}
checks:
  - {type: amplitude, joint: j_d, min: 0.005, max: 0.2, settle_s: 2, window_s: 16}
camera: {target: [0, 0, 1], position: [0, -260, 9], fov: 18.5}
display:
  output: j_d
  labels: {j_d: "Lever d (valve D, cup H)", j_k: "Burners' cock (driver)"}
