# No. 477 (Brown 1868): "Steam trap for shutting in steam, but providing for the escape of water from steam coils and radiators (Hoard &
# Wiggin's patent). It consists of a box, connected at A with the end of the coil or the waste-pipe, having an outlet at B, and furnished with
# a hollow valve, D, the bottom of which is composed of a flexible diaphragm. Valve is filled with liquid, and hermetically sealed, and its
# diaphragm rests upon a bridge over the outlet-pipe. The presence of steam in the outer box so heats the water in valve that the diaphragm
# expands and raises valve up to the seat, a, a. Water of condensation accumulating reduces the temperature of valve; and as the liquid in
# valve contracts, diaphragm allows valve to descend and let water off."
# Model (cm, gravity on, seen from in front, cut away in half section). The drive is the heat: a steam cock on the coil's end above A, swung
# open and shut by hand (+-0.8 rad at 1/8 Hz, the only drive), lets the steam reach the trap; open, its heat goes into the valve, up to
# 160 W. The valve's sealed liquid is lumped as a gas capsule (70 cm^3, openspec add-vessel-heat): C dT/dt = Q - H (T - 293 K),
# C 2 J/K, H 2 W/K (the condensate and the box carrying its heat off), its pressure m R T / V following T. That pressure on the
# diaphragm (21.24 cm^2, a piston on the valve's slide) lifts the valve against its weight and the diaphragm's stiffness (1550 N/m) to
# the seat a, a (0.4 cm up), which shuts the coil's water off from the box (the opening a table on the valve's lift). With the steam
# shut off the valve cools, its pressure falls, it drops back onto the bridge and the water runs through the box and out of B.
# The water is lumped vessels: the coil's end a source at 2 kPa, the box an open chamber, B a drain.
# Generator: opencode-runs/heat/gen477.py.
number: 477
slug: steam-trap
name: Steam trap (Hoard & Wiggin's patent)
brown: "Steam trap for shutting in steam, but providing for the escape of water from steam coils and radiators (Hoard & Wiggin’s patent). It consists of a box, connected at A with the end of the coil or the waste-pipe, having an outlet at B, and furnished with a hollow valve, D, the bottom of which is composed of a flexible diaphragm. Valve is filled with liquid, and hermetically sealed, and its diaphragm rests upon a bridge over the outlet-pipe. The presence of steam in the outer box so heats the water in valve that the diaphragm expands and raises valve up to the seat, a, a. Water of condensation accumulating reduces the temperature of valve; and as the liquid in valve contracts, diaphragm allows valve to descend and let water off."
units: cm
sim:
  timestep: 0.0005
  integrator: implicitfast
  iterations: 60
  duration_s: 16
  floor: false
bodies:
  - id: cock
    shape: part
    pos: [-1.2, 0, 19]
    mass: 0.2
    color: "#a8884a"
    pieces:
      - {kind: rod, from: [-1.2, -1, 19], to: [-1.2, 0, 19], radius: 0.9, collide: 0}
      - {kind: rod, from: [-1.2, -0.8, 19], to: [-8.2, -0.8, 19], radius: 0.4, capsule: true, collide: 0}
  - id: valve
    shape: part
    pos: [0, 0, 4]
    mass: 0.2
    color: "#9a8f7c"
    pieces:
      - {kind: loft, a: [[2.2, 0, 5], [2.0325, 0.8419, 5], [2.4021, 0.995, 5], [2.6, 0, 5]], b: [[2.2, 0, 1.4], [2.0325, 0.8419, 1.4], [2.4021, 0.995, 1.4], [2.6, 0, 1.4]], collide: 0}
      - {kind: loft, a: [[2.0325, 0.8419, 5], [1.5556, 1.5556, 5], [1.8385, 1.8385, 5], [2.4021, 0.995, 5]], b: [[2.0325, 0.8419, 1.4], [1.5556, 1.5556, 1.4], [1.8385, 1.8385, 1.4], [2.4021, 0.995, 1.4]], collide: 0}
      - {kind: loft, a: [[1.5556, 1.5556, 5], [0.8419, 2.0325, 5], [0.995, 2.4021, 5], [1.8385, 1.8385, 5]], b: [[1.5556, 1.5556, 1.4], [0.8419, 2.0325, 1.4], [0.995, 2.4021, 1.4], [1.8385, 1.8385, 1.4]], collide: 0}
      - {kind: loft, a: [[0.8419, 2.0325, 5], [0, 2.2, 5], [0, 2.6, 5], [0.995, 2.4021, 5]], b: [[0.8419, 2.0325, 1.4], [0, 2.2, 1.4], [0, 2.6, 1.4], [0.995, 2.4021, 1.4]], collide: 0}
      - {kind: loft, a: [[0, 2.2, 5], [-0.8419, 2.0325, 5], [-0.995, 2.4021, 5], [0, 2.6, 5]], b: [[0, 2.2, 1.4], [-0.8419, 2.0325, 1.4], [-0.995, 2.4021, 1.4], [0, 2.6, 1.4]], collide: 0}
      - {kind: loft, a: [[-0.8419, 2.0325, 5], [-1.5556, 1.5556, 5], [-1.8385, 1.8385, 5], [-0.995, 2.4021, 5]], b: [[-0.8419, 2.0325, 1.4], [-1.5556, 1.5556, 1.4], [-1.8385, 1.8385, 1.4], [-0.995, 2.4021, 1.4]], collide: 0}
      - {kind: loft, a: [[-1.5556, 1.5556, 5], [-2.0325, 0.8419, 5], [-2.4021, 0.995, 5], [-1.8385, 1.8385, 5]], b: [[-1.5556, 1.5556, 1.4], [-2.0325, 0.8419, 1.4], [-2.4021, 0.995, 1.4], [-1.8385, 1.8385, 1.4]], collide: 0}
      - {kind: loft, a: [[-2.0325, 0.8419, 5], [-2.2, 0, 5], [-2.6, 0, 5], [-2.4021, 0.995, 5]], b: [[-2.0325, 0.8419, 1.4], [-2.2, 0, 1.4], [-2.6, 0, 1.4], [-2.4021, 0.995, 1.4]], collide: 0}
      - {kind: loft, a: [[0.9, 0, 6.3], [0.8315, 0.3444, 6.3], [1.201, 0.4975, 6.3], [1.3, 0, 6.3]], b: [[2.2, 0, 5], [2.0325, 0.8419, 5], [2.4021, 0.995, 5], [2.6, 0, 5]], collide: 0}
      - {kind: loft, a: [[0.8315, 0.3444, 6.3], [0.6364, 0.6364, 6.3], [0.9192, 0.9192, 6.3], [1.201, 0.4975, 6.3]], b: [[2.0325, 0.8419, 5], [1.5556, 1.5556, 5], [1.8385, 1.8385, 5], [2.4021, 0.995, 5]], collide: 0}
      - {kind: loft, a: [[0.6364, 0.6364, 6.3], [0.3444, 0.8315, 6.3], [0.4975, 1.201, 6.3], [0.9192, 0.9192, 6.3]], b: [[1.5556, 1.5556, 5], [0.8419, 2.0325, 5], [0.995, 2.4021, 5], [1.8385, 1.8385, 5]], collide: 0}
      - {kind: loft, a: [[0.3444, 0.8315, 6.3], [0, 0.9, 6.3], [0, 1.3, 6.3], [0.4975, 1.201, 6.3]], b: [[0.8419, 2.0325, 5], [0, 2.2, 5], [0, 2.6, 5], [0.995, 2.4021, 5]], collide: 0}
      - {kind: loft, a: [[0, 0.9, 6.3], [-0.3444, 0.8315, 6.3], [-0.4975, 1.201, 6.3], [0, 1.3, 6.3]], b: [[0, 2.2, 5], [-0.8419, 2.0325, 5], [-0.995, 2.4021, 5], [0, 2.6, 5]], collide: 0}
      - {kind: loft, a: [[-0.3444, 0.8315, 6.3], [-0.6364, 0.6364, 6.3], [-0.9192, 0.9192, 6.3], [-0.4975, 1.201, 6.3]], b: [[-0.8419, 2.0325, 5], [-1.5556, 1.5556, 5], [-1.8385, 1.8385, 5], [-0.995, 2.4021, 5]], collide: 0}
      - {kind: loft, a: [[-0.6364, 0.6364, 6.3], [-0.8315, 0.3444, 6.3], [-1.201, 0.4975, 6.3], [-0.9192, 0.9192, 6.3]], b: [[-1.5556, 1.5556, 5], [-2.0325, 0.8419, 5], [-2.4021, 0.995, 5], [-1.8385, 1.8385, 5]], collide: 0}
      - {kind: loft, a: [[-0.8315, 0.3444, 6.3], [-0.9, 0, 6.3], [-1.3, 0, 6.3], [-1.201, 0.4975, 6.3]], b: [[-2.0325, 0.8419, 5], [-2.2, 0, 5], [-2.6, 0, 5], [-2.4021, 0.995, 5]], collide: 0}
      - {kind: loft, a: [[1.2, 0, 7.6], [1.1087, 0.4592, 7.6], [1.4782, 0.6123, 7.6], [1.6, 0, 7.6]], b: [[0.9, 0, 6.3], [0.8315, 0.3444, 6.3], [1.201, 0.4975, 6.3], [1.3, 0, 6.3]], collide: 0}
      - {kind: loft, a: [[1.1087, 0.4592, 7.6], [0.8485, 0.8485, 7.6], [1.1314, 1.1314, 7.6], [1.4782, 0.6123, 7.6]], b: [[0.8315, 0.3444, 6.3], [0.6364, 0.6364, 6.3], [0.9192, 0.9192, 6.3], [1.201, 0.4975, 6.3]], collide: 0}
      - {kind: loft, a: [[0.8485, 0.8485, 7.6], [0.4592, 1.1087, 7.6], [0.6123, 1.4782, 7.6], [1.1314, 1.1314, 7.6]], b: [[0.6364, 0.6364, 6.3], [0.3444, 0.8315, 6.3], [0.4975, 1.201, 6.3], [0.9192, 0.9192, 6.3]], collide: 0}
      - {kind: loft, a: [[0.4592, 1.1087, 7.6], [0, 1.2, 7.6], [0, 1.6, 7.6], [0.6123, 1.4782, 7.6]], b: [[0.3444, 0.8315, 6.3], [0, 0.9, 6.3], [0, 1.3, 6.3], [0.4975, 1.201, 6.3]], collide: 0}
      - {kind: loft, a: [[0, 1.2, 7.6], [-0.4592, 1.1087, 7.6], [-0.6123, 1.4782, 7.6], [0, 1.6, 7.6]], b: [[0, 0.9, 6.3], [-0.3444, 0.8315, 6.3], [-0.4975, 1.201, 6.3], [0, 1.3, 6.3]], collide: 0}
      - {kind: loft, a: [[-0.4592, 1.1087, 7.6], [-0.8485, 0.8485, 7.6], [-1.1314, 1.1314, 7.6], [-0.6123, 1.4782, 7.6]], b: [[-0.3444, 0.8315, 6.3], [-0.6364, 0.6364, 6.3], [-0.9192, 0.9192, 6.3], [-0.4975, 1.201, 6.3]], collide: 0}
      - {kind: loft, a: [[-0.8485, 0.8485, 7.6], [-1.1087, 0.4592, 7.6], [-1.4782, 0.6123, 7.6], [-1.1314, 1.1314, 7.6]], b: [[-0.6364, 0.6364, 6.3], [-0.8315, 0.3444, 6.3], [-1.201, 0.4975, 6.3], [-0.9192, 0.9192, 6.3]], collide: 0}
      - {kind: loft, a: [[-1.1087, 0.4592, 7.6], [-1.2, 0, 7.6], [-1.6, 0, 7.6], [-1.4782, 0.6123, 7.6]], b: [[-0.8315, 0.3444, 6.3], [-0.9, 0, 6.3], [-1.3, 0, 6.3], [-1.201, 0.4975, 6.3]], collide: 0}
      - {kind: rod, from: [0, 0, 7.6], to: [0, 0, 15], radius: 0.5, collide: 0}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#c9bfa9"
    pieces:
      - {kind: loft, a: [[6, 0, 8], [5.5433, 2.2961, 8], [6.0052, 2.4874, 8], [6.5, 0, 8]], b: [[6, 0, 0], [5.5433, 2.2961, 0], [6.0052, 2.4874, 0], [6.5, 0, 0]], collide: 0}
      - {kind: loft, a: [[5.5433, 2.2961, 8], [4.2426, 4.2426, 8], [4.5962, 4.5962, 8], [6.0052, 2.4874, 8]], b: [[5.5433, 2.2961, 0], [4.2426, 4.2426, 0], [4.5962, 4.5962, 0], [6.0052, 2.4874, 0]], collide: 0}
      - {kind: loft, a: [[4.2426, 4.2426, 8], [2.2961, 5.5433, 8], [2.4874, 6.0052, 8], [4.5962, 4.5962, 8]], b: [[4.2426, 4.2426, 0], [2.2961, 5.5433, 0], [2.4874, 6.0052, 0], [4.5962, 4.5962, 0]], collide: 0}
      - {kind: loft, a: [[2.2961, 5.5433, 8], [0, 6, 8], [0, 6.5, 8], [2.4874, 6.0052, 8]], b: [[2.2961, 5.5433, 0], [0, 6, 0], [0, 6.5, 0], [2.4874, 6.0052, 0]], collide: 0}
      - {kind: loft, a: [[0, 6, 8], [-2.2961, 5.5433, 8], [-2.4874, 6.0052, 8], [0, 6.5, 8]], b: [[0, 6, 0], [-2.2961, 5.5433, 0], [-2.4874, 6.0052, 0], [0, 6.5, 0]], collide: 0}
      - {kind: loft, a: [[-2.2961, 5.5433, 8], [-4.2426, 4.2426, 8], [-4.5962, 4.5962, 8], [-2.4874, 6.0052, 8]], b: [[-2.2961, 5.5433, 0], [-4.2426, 4.2426, 0], [-4.5962, 4.5962, 0], [-2.4874, 6.0052, 0]], collide: 0}
      - {kind: loft, a: [[-4.2426, 4.2426, 8], [-5.5433, 2.2961, 8], [-6.0052, 2.4874, 8], [-4.5962, 4.5962, 8]], b: [[-4.2426, 4.2426, 0], [-5.5433, 2.2961, 0], [-6.0052, 2.4874, 0], [-4.5962, 4.5962, 0]], collide: 0}
      - {kind: loft, a: [[-5.5433, 2.2961, 8], [-6, 0, 8], [-6.5, 0, 8], [-6.0052, 2.4874, 8]], b: [[-5.5433, 2.2961, 0], [-6, 0, 0], [-6.5, 0, 0], [-6.0052, 2.4874, 0]], collide: 0}
      - {kind: loft, a: [[1.2, 0, 0], [1.1087, 0.4592, 0], [6.0052, 2.4874, 0], [6.5, 0, 0]], b: [[1.2, 0, -0.6], [1.1087, 0.4592, -0.6], [1.5706, 0.6506, -0.6], [1.7, 0, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[1.1087, 0.4592, 0], [0.8485, 0.8485, 0], [4.5962, 4.5962, 0], [6.0052, 2.4874, 0]], b: [[1.1087, 0.4592, -0.6], [0.8485, 0.8485, -0.6], [1.2021, 1.2021, -0.6], [1.5706, 0.6506, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0.8485, 0.8485, 0], [0.4592, 1.1087, 0], [2.4874, 6.0052, 0], [4.5962, 4.5962, 0]], b: [[0.8485, 0.8485, -0.6], [0.4592, 1.1087, -0.6], [0.6506, 1.5706, -0.6], [1.2021, 1.2021, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0.4592, 1.1087, 0], [0, 1.2, 0], [0, 6.5, 0], [2.4874, 6.0052, 0]], b: [[0.4592, 1.1087, -0.6], [0, 1.2, -0.6], [0, 1.7, -0.6], [0.6506, 1.5706, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0, 1.2, 0], [-0.4592, 1.1087, 0], [-2.4874, 6.0052, 0], [0, 6.5, 0]], b: [[0, 1.2, -0.6], [-0.4592, 1.1087, -0.6], [-0.6506, 1.5706, -0.6], [0, 1.7, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-0.4592, 1.1087, 0], [-0.8485, 0.8485, 0], [-4.5962, 4.5962, 0], [-2.4874, 6.0052, 0]], b: [[-0.4592, 1.1087, -0.6], [-0.8485, 0.8485, -0.6], [-1.2021, 1.2021, -0.6], [-0.6506, 1.5706, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-0.8485, 0.8485, 0], [-1.1087, 0.4592, 0], [-6.0052, 2.4874, 0], [-4.5962, 4.5962, 0]], b: [[-0.8485, 0.8485, -0.6], [-1.1087, 0.4592, -0.6], [-1.5706, 0.6506, -0.6], [-1.2021, 1.2021, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-1.1087, 0.4592, 0], [-1.2, 0, 0], [-6.5, 0, 0], [-6.0052, 2.4874, 0]], b: [[-1.1087, 0.4592, -0.6], [-1.2, 0, -0.6], [-1.7, 0, -0.6], [-1.5706, 0.6506, -0.6]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[1.4, 0, 9.2], [1.2934, 0.5358, 9.2], [6.6519, 2.7553, 9.2], [7.2, 0, 9.2]], b: [[1.4, 0, 8], [1.2934, 0.5358, 8], [6.6519, 2.7553, 8], [7.2, 0, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[1.2934, 0.5358, 9.2], [0.9899, 0.9899, 9.2], [5.0912, 5.0912, 9.2], [6.6519, 2.7553, 9.2]], b: [[1.2934, 0.5358, 8], [0.9899, 0.9899, 8], [5.0912, 5.0912, 8], [6.6519, 2.7553, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0.9899, 0.9899, 9.2], [0.5358, 1.2934, 9.2], [2.7553, 6.6519, 9.2], [5.0912, 5.0912, 9.2]], b: [[0.9899, 0.9899, 8], [0.5358, 1.2934, 8], [2.7553, 6.6519, 8], [5.0912, 5.0912, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0.5358, 1.2934, 9.2], [0, 1.4, 9.2], [0, 7.2, 9.2], [2.7553, 6.6519, 9.2]], b: [[0.5358, 1.2934, 8], [0, 1.4, 8], [0, 7.2, 8], [2.7553, 6.6519, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[0, 1.4, 9.2], [-0.5358, 1.2934, 9.2], [-2.7553, 6.6519, 9.2], [0, 7.2, 9.2]], b: [[0, 1.4, 8], [-0.5358, 1.2934, 8], [-2.7553, 6.6519, 8], [0, 7.2, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-0.5358, 1.2934, 9.2], [-0.9899, 0.9899, 9.2], [-5.0912, 5.0912, 9.2], [-2.7553, 6.6519, 9.2]], b: [[-0.5358, 1.2934, 8], [-0.9899, 0.9899, 8], [-5.0912, 5.0912, 8], [-2.7553, 6.6519, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-0.9899, 0.9899, 9.2], [-1.2934, 0.5358, 9.2], [-6.6519, 2.7553, 9.2], [-5.0912, 5.0912, 9.2]], b: [[-0.9899, 0.9899, 8], [-1.2934, 0.5358, 8], [-6.6519, 2.7553, 8], [-5.0912, 5.0912, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[-1.2934, 0.5358, 9.2], [-1.4, 0, 9.2], [-7.2, 0, 9.2], [-6.6519, 2.7553, 9.2]], b: [[-1.2934, 0.5358, 8], [-1.4, 0, 8], [-7.2, 0, 8], [-6.6519, 2.7553, 8]], collide: 0, color: "#7a6f5e"}
      - {kind: loft, a: [[1, 0, 21], [0.9239, 0.3827, 21], [1.3858, 0.574, 21], [1.5, 0, 21]], b: [[1, 0, 9.2], [0.9239, 0.3827, 9.2], [1.3858, 0.574, 9.2], [1.5, 0, 9.2]], collide: 0}
      - {kind: loft, a: [[0.9239, 0.3827, 21], [0.7071, 0.7071, 21], [1.0607, 1.0607, 21], [1.3858, 0.574, 21]], b: [[0.9239, 0.3827, 9.2], [0.7071, 0.7071, 9.2], [1.0607, 1.0607, 9.2], [1.3858, 0.574, 9.2]], collide: 0}
      - {kind: loft, a: [[0.7071, 0.7071, 21], [0.3827, 0.9239, 21], [0.574, 1.3858, 21], [1.0607, 1.0607, 21]], b: [[0.7071, 0.7071, 9.2], [0.3827, 0.9239, 9.2], [0.574, 1.3858, 9.2], [1.0607, 1.0607, 9.2]], collide: 0}
      - {kind: loft, a: [[0.3827, 0.9239, 21], [0, 1, 21], [0, 1.5, 21], [0.574, 1.3858, 21]], b: [[0.3827, 0.9239, 9.2], [0, 1, 9.2], [0, 1.5, 9.2], [0.574, 1.3858, 9.2]], collide: 0}
      - {kind: loft, a: [[0, 1, 21], [-0.3827, 0.9239, 21], [-0.574, 1.3858, 21], [0, 1.5, 21]], b: [[0, 1, 9.2], [-0.3827, 0.9239, 9.2], [-0.574, 1.3858, 9.2], [0, 1.5, 9.2]], collide: 0}
      - {kind: loft, a: [[-0.3827, 0.9239, 21], [-0.7071, 0.7071, 21], [-1.0607, 1.0607, 21], [-0.574, 1.3858, 21]], b: [[-0.3827, 0.9239, 9.2], [-0.7071, 0.7071, 9.2], [-1.0607, 1.0607, 9.2], [-0.574, 1.3858, 9.2]], collide: 0}
      - {kind: loft, a: [[-0.7071, 0.7071, 21], [-0.9239, 0.3827, 21], [-1.3858, 0.574, 21], [-1.0607, 1.0607, 21]], b: [[-0.7071, 0.7071, 9.2], [-0.9239, 0.3827, 9.2], [-1.3858, 0.574, 9.2], [-1.0607, 1.0607, 9.2]], collide: 0}
      - {kind: loft, a: [[-0.9239, 0.3827, 21], [-1, 0, 21], [-1.5, 0, 21], [-1.3858, 0.574, 21]], b: [[-0.9239, 0.3827, 9.2], [-1, 0, 9.2], [-1.5, 0, 9.2], [-1.3858, 0.574, 9.2]], collide: 0}
      - {kind: loft, a: [[1.2, 0, -0.6], [1.1087, 0.4592, -0.6], [1.5706, 0.6506, -0.6], [1.7, 0, -0.6]], b: [[1.2, 0, -7], [1.1087, 0.4592, -7], [1.5706, 0.6506, -7], [1.7, 0, -7]], collide: 0}
      - {kind: loft, a: [[1.1087, 0.4592, -0.6], [0.8485, 0.8485, -0.6], [1.2021, 1.2021, -0.6], [1.5706, 0.6506, -0.6]], b: [[1.1087, 0.4592, -7], [0.8485, 0.8485, -7], [1.2021, 1.2021, -7], [1.5706, 0.6506, -7]], collide: 0}
      - {kind: loft, a: [[0.8485, 0.8485, -0.6], [0.4592, 1.1087, -0.6], [0.6506, 1.5706, -0.6], [1.2021, 1.2021, -0.6]], b: [[0.8485, 0.8485, -7], [0.4592, 1.1087, -7], [0.6506, 1.5706, -7], [1.2021, 1.2021, -7]], collide: 0}
      - {kind: loft, a: [[0.4592, 1.1087, -0.6], [0, 1.2, -0.6], [0, 1.7, -0.6], [0.6506, 1.5706, -0.6]], b: [[0.4592, 1.1087, -7], [0, 1.2, -7], [0, 1.7, -7], [0.6506, 1.5706, -7]], collide: 0}
      - {kind: loft, a: [[0, 1.2, -0.6], [-0.4592, 1.1087, -0.6], [-0.6506, 1.5706, -0.6], [0, 1.7, -0.6]], b: [[0, 1.2, -7], [-0.4592, 1.1087, -7], [-0.6506, 1.5706, -7], [0, 1.7, -7]], collide: 0}
      - {kind: loft, a: [[-0.4592, 1.1087, -0.6], [-0.8485, 0.8485, -0.6], [-1.2021, 1.2021, -0.6], [-0.6506, 1.5706, -0.6]], b: [[-0.4592, 1.1087, -7], [-0.8485, 0.8485, -7], [-1.2021, 1.2021, -7], [-0.6506, 1.5706, -7]], collide: 0}
      - {kind: loft, a: [[-0.8485, 0.8485, -0.6], [-1.1087, 0.4592, -0.6], [-1.5706, 0.6506, -0.6], [-1.2021, 1.2021, -0.6]], b: [[-0.8485, 0.8485, -7], [-1.1087, 0.4592, -7], [-1.5706, 0.6506, -7], [-1.2021, 1.2021, -7]], collide: 0}
      - {kind: loft, a: [[-1.1087, 0.4592, -0.6], [-1.2, 0, -0.6], [-1.7, 0, -0.6], [-1.5706, 0.6506, -0.6]], b: [[-1.1087, 0.4592, -7], [-1.2, 0, -7], [-1.7, 0, -7], [-1.5706, 0.6506, -7]], collide: 0}
      - {kind: loft, a: [[-1.8, 0, 1.2], [1.8, 0, 1.2], [1.8, 1, 1.2], [-1.8, 1, 1.2]], b: [[-1.8, 0, 0.8], [1.8, 0, 0.8], [1.8, 1, 0.8], [-1.8, 1, 0.8]], collide: 0, color: "#8b7d66"}
      - {kind: loft, a: [[-1.8, 0, 0.8], [-1.4, 0, 0.8], [-1.4, 1, 0.8], [-1.8, 1, 0.8]], b: [[-1.8, 0, 0], [-1.4, 0, 0], [-1.4, 1, 0], [-1.8, 1, 0]], collide: 0, color: "#8b7d66"}
      - {kind: loft, a: [[1.4, 0, 0.8], [1.8, 0, 0.8], [1.8, 1, 0.8], [1.4, 1, 0.8]], b: [[1.4, 0, 0], [1.8, 0, 0], [1.8, 1, 0], [1.4, 1, 0]], collide: 0, color: "#8b7d66"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [2.4021, 0.995, 1.4], [2.6, 0, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [2.4021, 0.995, 1.2], [2.6, 0, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [1.8385, 1.8385, 1.4], [2.4021, 0.995, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [1.8385, 1.8385, 1.2], [2.4021, 0.995, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [0.995, 2.4021, 1.4], [1.8385, 1.8385, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [0.995, 2.4021, 1.2], [1.8385, 1.8385, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [0, 2.6, 1.4], [0.995, 2.4021, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [0, 2.6, 1.2], [0.995, 2.4021, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [-0.995, 2.4021, 1.4], [0, 2.6, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [-0.995, 2.4021, 1.2], [0, 2.6, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [-1.8385, 1.8385, 1.4], [-0.995, 2.4021, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [-1.8385, 1.8385, 1.2], [-0.995, 2.4021, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [-2.4021, 0.995, 1.4], [-1.8385, 1.8385, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [-2.4021, 0.995, 1.2], [-1.8385, 1.8385, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: loft, a: [[0, 0, 1.4], [0, 0, 1.4], [-2.6, 0, 1.4], [-2.4021, 0.995, 1.4]], b: [[0, 0, 1.2], [0, 0, 1.2], [-2.6, 0, 1.2], [-2.4021, 0.995, 1.2]], collide: 0, color: "#4f4a42"}
      - {kind: rod, from: [-1.2, 0, 19], to: [-1.2, 2.4, 19], radius: 1.05, collide: 0, color: "#4f4a42"}
joints:
  - {id: j_k, type: hinge, body: cock, axis: [0, 1, 0], damping: 0.01}   # the steam cock (the drive): open at +0.15..+0.6 rad
  - {id: j_v, type: slide, body: valve, axis: [0, 0, 1], range: [0, 0.4], stiffness: 1550, damping: 4}   # the valve: on the bridge at 0, on its seat at 0.4
vessels:
  substeps: 8
  nodes:
    - {id: coil, kind: source, p: 2000}   # the coil's end: its water of condensation
    - {id: box, kind: chamber, open: true, fixed: 0, sections: [[0, 91.8602]], volume: 734.8814, water: 0,
       draw: {sections: [[[-6, 0], [-2.6, 0], [-2.6, 8], [-6, 8]], [[2.6, 0], [6, 0], [6, 8], [2.6, 8]]], y: [0, 6.0]}}
    - {id: cap, kind: gas, volume: 70, p: 0, RT: 84100, heat: {C: 2, H: 2, T: 293, joint: j_k, q: [0.15, 0.6], Q: [0, 160]},
       draw: {sections: [[[-2.2, 1.4], [2.2, 1.4], [2.2, 5], [0.9, 6.3], [-0.9, 6.3], [-2.2, 5]]], y: [0, 2.2], face: {body: valve, z: 6.3, side: below}, pref: 20000}}   # the sealed valve
    - {id: out, kind: source, p: 0}
  links:
    - {id: seat, from: coil, to: box, area: 2.0, cd: 0.62, z: 8, open: {joint: j_v, q: [0, 0.36, 0.4], frac: [1, 0.1, 0]},
       draw: {from: [0, 0.9, 8.6], via: [[1.4, 0.9, 7.8]], to: [3.2, 0.9, 7.2], width: 0.8, flow: 0.25, fall: {dir: [0.3, 0, -1], floor: 0}}}   # the coil's water past the seat a, a
    - {id: drain, from: box, to: out, area: 5.0, cd: 0.62, z: 0,
       draw: {from: [0, 0.6, 0], to: [0, 0.6, -7], width: 1.6, flow: 0.25}}   # out of B
  pistons:
    - {node: cap, joint: j_v, area: 21.2372, sign: 1}   # the diaphragm: the capsule grows as the valve rises off it
driver: {joint: j_k, kind: velocity, rpm: 0, swing: {amplitude: 0.8, hz: 0.125}, kv: 5, max_torque: 2}
checks:
  - {type: amplitude, joint: j_k, min: 0.6, max: 1.0, settle_s: 0.5, window_s: 15}
camera: {target: [0, 0, 1], position: [0, -156, 3], fov: 20}
display:
  output: j_v
  labels: {j_k: "Steam cock (driver)", j_v: "Valve D"}
