# No. 469 (Brown 1868): French invention for obtaining rotary motion from the different temperatures of the water in two cisterns.
# Model (cm, seen from in front, the cisterns' front walls off). The cold cistern (left) holds an inclined Archimedean screw, the warm
# one (right) a bucket wheel; the wheel's axle is geared to the screw by a lay shaft and two pairs of mitre bevels (tooth contact only).
# The hand starts the screw backwards (the driver, the only input): turned so, its threads carry pockets of the cold cistern's air
# DOWN (a gas displacer, add-vessel-displacers / add-gas-displacers: volume VS a turn, at the cold air's density) into the bell at its
# foot, and the pipe (`pipe`, a lumped gas vessel) leads it over the top and down into the warm cistern, under the wheel. The pipe and
# bell lie in the warm water, so their air is at the warm water's temperature (R T at TW; the lumped vessels carry no heat with the
# flow, so the air takes the pipe's temperature as it enters). The wheel's buckets catch it at the bottom and carry it up through the
# water to the surface (a second displacer, pipe -> atmosphere, volume VW a turn): the pipe's pressure pushes the screw back and the
# wheel round by volume / 2 pi times it, so the wheel gains (VW - VS) p / 2 pi a radian over what the screw costs. Mass balance fixes
# the pipe's pressure: p_abs = p_atm (VS / VW) (TW / TC); VW / VS is chosen so that it equals the water's head over the wheel's lowest
# bucket (21 cm, the pressure the air must have to get under the wheel; the head itself is not a vessel here). It is then a
# hot-air engine: the air pumped down cold and let up warm gives more than it took, and the hand turning the screw is helped; with the
# water all at one temperature (TW = TC) the pipe sits below the head and it gives nothing back. Limits (lumped): the water in the
# cisterns is still and drawn to its level; the air pockets in the threads and buckets are not drawn, only the pipe's air by its
# pressure; nothing keeps the warm water warm (Brown: 'no means of maintaining the difference of temperature is given').
# Generator: opencode-runs/heat/gen469.py.
number: 469
slug: french-invention-rotary-motion-warm-cold-water
name: Rotary motion from warm and cold water
brown: "French invention for obtaining rotary motion from the different temperatures of two bodies of water. Two cisterns are arranged side by side, one for cold and the other for warm water. A wheel in the warm cistern is geared to an Archimedean screw in the cold one. The screw being turned backwards, forces air down a pipe and under the wheel, whose buckets, filled with air, rise; and the air's expansion by the warmth is said to keep the machine in motion."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 80
  duration_s: 16
  solver: PGS
  multiccd: true
  floor: false
bodies:
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#b5aa94"
    pieces:
      - {kind: poly, points: [[-41, -1.5], [41, -1.5], [41, 0], [-41, 0]], y: [-10, 12], collide: 0, color: "#a08a66"}
      - {kind: poly, points: [[-41, 0], [-39, 0], [-39, 34], [-41, 34]], y: [-10, 12], collide: 0, color: "#a08a66"}
      - {kind: poly, points: [[39, 0], [41, 0], [41, 34], [39, 34]], y: [-10, 12], collide: 0, color: "#a08a66"}
      - {kind: poly, points: [[-1, 0], [1, 0], [1, 34], [-1, 34]], y: [-10, 12], collide: 0, color: "#a08a66"}
      - {kind: poly, points: [[-39, 0], [39, 0], [39, 34], [-39, 34]], y: [11, 12], collide: 0, color: "#b5aa94"}
      - {kind: rod, from: [-23.3657, 0.0, 6.747], to: [-23.3657, 0, 0], radius: 0.7, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [18.0, 10, 18.0], to: [18.0, 10, 0], radius: 0.7, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [2.4437, 0, 35.5563], to: [2.4437, 0, 37], radius: 0.5, collide: 0, color: "#6d675c"}
  - id: screw
    shape: part
    pos: [2.4437, 0.0, 33.5563]
    mass: 3.0
    pieces:
      - {kind: rod, from: [-1.0919, 0.0, 30.0208], to: [-21.598, 0.0, 9.5147], radius: 2.6, collide: 0, color: "#8c7a5a"}
      - {kind: rod, from: [0.7466, 0.0, 31.8593], to: [-23.3657, 0.0, 7.747], radius: 0.55, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [-1.0919, 2.75, 30.0208], to: [-1.9848, 2.5842, 30.458], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-1.9848, 2.5842, 30.458], to: [-2.7975, 2.1066, 30.8151], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.7975, 2.1066, 30.8151], to: [-3.4594, 1.375, 31.0213], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.4594, 1.375, 31.0213], to: [-3.9183, 0.4775, 31.0244], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.9183, 0.4775, 31.0244], to: [-4.1461, -0.4775, 30.7966], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-4.1461, -0.4775, 30.7966], to: [-4.143, -1.375, 30.3378], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-4.143, -1.375, 30.3378], to: [-3.9367, -2.1066, 29.6758], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.9367, -2.1066, 29.6758], to: [-3.5797, -2.5842, 28.8631], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.5797, -2.5842, 28.8631], to: [-3.1425, -2.75, 27.9702], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.1425, -2.75, 27.9702], to: [-2.7053, -2.5842, 27.0773], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.7053, -2.5842, 27.0773], to: [-2.3483, -2.1066, 26.2646], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.3483, -2.1066, 26.2646], to: [-2.142, -1.375, 25.6026], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.142, -1.375, 25.6026], to: [-2.1389, -0.4775, 25.1438], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.1389, -0.4775, 25.1438], to: [-2.3667, 0.4775, 24.916], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.3667, 0.4775, 24.916], to: [-2.8255, 1.375, 24.9191], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-2.8255, 1.375, 24.9191], to: [-3.4875, 2.1066, 25.1254], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-3.4875, 2.1066, 25.1254], to: [-4.3002, 2.5842, 25.4824], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-4.3002, 2.5842, 25.4824], to: [-5.1931, 2.75, 25.9196], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-5.1931, 2.75, 25.9196], to: [-6.086, 2.5842, 26.3568], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.086, 2.5842, 26.3568], to: [-6.8987, 2.1066, 26.7138], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.8987, 2.1066, 26.7138], to: [-7.5607, 1.375, 26.9201], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-7.5607, 1.375, 26.9201], to: [-8.0195, 0.4775, 26.9232], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-8.0195, 0.4775, 26.9232], to: [-8.2473, -0.4775, 26.6954], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-8.2473, -0.4775, 26.6954], to: [-8.2442, -1.375, 26.2365], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-8.2442, -1.375, 26.2365], to: [-8.0379, -2.1066, 25.5746], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-8.0379, -2.1066, 25.5746], to: [-7.6809, -2.5842, 24.7619], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-7.6809, -2.5842, 24.7619], to: [-7.2437, -2.75, 23.869], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-7.2437, -2.75, 23.869], to: [-6.8065, -2.5842, 22.9761], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.8065, -2.5842, 22.9761], to: [-6.4495, -2.1066, 22.1634], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.4495, -2.1066, 22.1634], to: [-6.2432, -1.375, 21.5014], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.2432, -1.375, 21.5014], to: [-6.2401, -0.4775, 21.0426], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.2401, -0.4775, 21.0426], to: [-6.4679, 0.4775, 20.8148], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.4679, 0.4775, 20.8148], to: [-6.9268, 1.375, 20.8179], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-6.9268, 1.375, 20.8179], to: [-7.5887, 2.1066, 21.0241], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-7.5887, 2.1066, 21.0241], to: [-8.4014, 2.5842, 21.3811], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-8.4014, 2.5842, 21.3811], to: [-9.2943, 2.75, 21.8184], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-9.2943, 2.75, 21.8184], to: [-10.1872, 2.5842, 22.2556], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.1872, 2.5842, 22.2556], to: [-10.9999, 2.1066, 22.6126], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.9999, 2.1066, 22.6126], to: [-11.6619, 1.375, 22.8189], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-11.6619, 1.375, 22.8189], to: [-12.1207, 0.4775, 22.822], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-12.1207, 0.4775, 22.822], to: [-12.3486, -0.4775, 22.5942], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-12.3486, -0.4775, 22.5942], to: [-12.3454, -1.375, 22.1353], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-12.3454, -1.375, 22.1353], to: [-12.1392, -2.1066, 21.4734], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-12.1392, -2.1066, 21.4734], to: [-11.7822, -2.5842, 20.6607], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-11.7822, -2.5842, 20.6607], to: [-11.3449, -2.75, 19.7678], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-11.3449, -2.75, 19.7678], to: [-10.9077, -2.5842, 18.8748], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.9077, -2.5842, 18.8748], to: [-10.5507, -2.1066, 18.0621], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.5507, -2.1066, 18.0621], to: [-10.3444, -1.375, 17.4002], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.3444, -1.375, 17.4002], to: [-10.3413, -0.4775, 16.9414], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.3413, -0.4775, 16.9414], to: [-10.5692, 0.4775, 16.7135], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-10.5692, 0.4775, 16.7135], to: [-11.028, 1.375, 16.7167], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-11.028, 1.375, 16.7167], to: [-11.6899, 2.1066, 16.9229], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-11.6899, 2.1066, 16.9229], to: [-12.5026, 2.5842, 17.2799], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-12.5026, 2.5842, 17.2799], to: [-13.3955, 2.75, 17.7172], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-13.3955, 2.75, 17.7172], to: [-14.2885, 2.5842, 18.1544], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-14.2885, 2.5842, 18.1544], to: [-15.1012, 2.1066, 18.5114], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.1012, 2.1066, 18.5114], to: [-15.7631, 1.375, 18.7176], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.7631, 1.375, 18.7176], to: [-16.2219, 0.4775, 18.7208], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-16.2219, 0.4775, 18.7208], to: [-16.4498, -0.4775, 18.4929], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-16.4498, -0.4775, 18.4929], to: [-16.4466, -1.375, 18.0341], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-16.4466, -1.375, 18.0341], to: [-16.2404, -2.1066, 17.3722], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-16.2404, -2.1066, 17.3722], to: [-15.8834, -2.5842, 16.5595], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.8834, -2.5842, 16.5595], to: [-15.4462, -2.75, 15.6665], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.4462, -2.75, 15.6665], to: [-15.0089, -2.5842, 14.7736], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.0089, -2.5842, 14.7736], to: [-14.6519, -2.1066, 13.9609], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-14.6519, -2.1066, 13.9609], to: [-14.4457, -1.375, 13.299], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-14.4457, -1.375, 13.299], to: [-14.4425, -0.4775, 12.8402], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-14.4425, -0.4775, 12.8402], to: [-14.6704, 0.4775, 12.6123], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-14.6704, 0.4775, 12.6123], to: [-15.1292, 1.375, 12.6155], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.1292, 1.375, 12.6155], to: [-15.7911, 2.1066, 12.8217], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-15.7911, 2.1066, 12.8217], to: [-16.6038, 2.5842, 13.1787], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-16.6038, 2.5842, 13.1787], to: [-17.4968, 2.75, 13.6159], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-17.4968, 2.75, 13.6159], to: [-18.3897, 2.5842, 14.0532], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-18.3897, 2.5842, 14.0532], to: [-19.2024, 2.1066, 14.4102], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.2024, 2.1066, 14.4102], to: [-19.8643, 1.375, 14.6164], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.8643, 1.375, 14.6164], to: [-20.3231, 0.4775, 14.6196], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-20.3231, 0.4775, 14.6196], to: [-20.551, -0.4775, 14.3917], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-20.551, -0.4775, 14.3917], to: [-20.5479, -1.375, 13.9329], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-20.5479, -1.375, 13.9329], to: [-20.3416, -2.1066, 13.2709], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-20.3416, -2.1066, 13.2709], to: [-19.9846, -2.5842, 12.4582], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.9846, -2.5842, 12.4582], to: [-19.5474, -2.75, 11.5653], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.5474, -2.75, 11.5653], to: [-19.1101, -2.5842, 10.6724], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.1101, -2.5842, 10.6724], to: [-18.7531, -2.1066, 9.8597], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-18.7531, -2.1066, 9.8597], to: [-18.5469, -1.375, 9.1978], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-18.5469, -1.375, 9.1978], to: [-18.5438, -0.4775, 8.7389], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-18.5438, -0.4775, 8.7389], to: [-18.7716, 0.4775, 8.5111], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-18.7716, 0.4775, 8.5111], to: [-19.2304, 1.375, 8.5142], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.2304, 1.375, 8.5142], to: [-19.8924, 2.1066, 8.7205], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-19.8924, 2.1066, 8.7205], to: [-20.7051, 2.5842, 9.0775], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [-20.7051, 2.5842, 9.0775], to: [-21.598, 2.75, 9.5147], radius: 0.32, collide: 0, color: "#4f4436"}
      - {kind: rod, from: [3.1508, 0.0, 34.2635], to: [5.9792, 0.0, 37.0919], radius: 0.5, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [5.9792, 0.0, 37.0919], to: [2.4437, 0.0, 40.6274], radius: 0.45, collide: 0, color: "#6d675c"}
      - {kind: rod, from: [2.4437, 0.0, 40.6274], to: [4.565, 0.0, 42.7487], radius: 0.6, collide: 0, color: "#c9bda2"}
  - id: lay
    shape: part
    pos: [2.4437, 0.0, 33.5563]
    mass: 0.6
    pieces:
      - {kind: rod, from: [3.9993, 0.0, 32.0007], to: [16.4444, 0.0, 19.5556], radius: 0.55, collide: 0, color: "#6d675c"}
  - id: wheel
    shape: part
    pos: [18.0, 0.0, 18.0]
    mass: 2.0
    pieces:
      - {kind: disc, center: [18.0, 18.0], radius: 9.0, inner: 0, y: [7.4, 7.9], collide: 0, color: "#8c7a5a"}
      - {kind: disc, center: [18.0, 18.0], radius: 9.0, inner: 8.6, y: [2.2, 7.4], collide: 0, color: "#7a6a4e"}
      - {kind: disc, center: [18.0, 18.0], radius: 4.6, inner: 4.2, y: [2.2, 7.4], collide: 0, color: "#7a6a4e"}
      - {kind: poly, points: [[22.5887, 17.6783], [26.5947, 17.6991], [26.5947, 18.3009], [22.5887, 18.3217]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[23.0, 18.0], [22.8795, 19.0911], [22.4891, 19.0039], [22.6, 18.0]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[22.3626, 19.4588], [26.0557, 21.011], [25.8253, 21.5671], [22.1163, 20.0533]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[22.6194, 19.9134], [22.0905, 20.8754], [21.7633, 20.6454], [22.2498, 19.7603]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[21.4722, 21.0172], [24.2902, 23.8646], [23.8646, 24.2902], [21.0172, 21.4722]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[21.5355, 21.5355], [20.6788, 22.2219], [20.4645, 21.8841], [21.2527, 21.2527]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[20.0533, 22.1163], [21.5671, 25.8253], [21.011, 26.0557], [19.4588, 22.3626]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[19.9134, 22.6194], [18.8592, 22.9256], [18.7905, 22.5316], [19.7603, 22.2498]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[18.3217, 22.5887], [18.3009, 26.5947], [17.6991, 26.5947], [17.6783, 22.5887]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[18.0, 23.0], [16.9089, 22.8795], [16.9961, 22.4891], [18.0, 22.6]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[16.5412, 22.3626], [14.989, 26.0557], [14.4329, 25.8253], [15.9467, 22.1163]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[16.0866, 22.6194], [15.1246, 22.0905], [15.3546, 21.7633], [16.2397, 22.2498]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[14.9828, 21.4722], [12.1354, 24.2902], [11.7098, 23.8646], [14.5278, 21.0172]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[14.4645, 21.5355], [13.7781, 20.6788], [14.1159, 20.4645], [14.7473, 21.2527]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.8837, 20.0533], [10.1747, 21.5671], [9.9443, 21.011], [13.6374, 19.4588]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.3806, 19.9134], [13.0744, 18.8592], [13.4684, 18.7905], [13.7502, 19.7603]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.4113, 18.3217], [9.4053, 18.3009], [9.4053, 17.6991], [13.4113, 17.6783]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.0, 18.0], [13.1205, 16.9089], [13.5109, 16.9961], [13.4, 18.0]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.6374, 16.5412], [9.9443, 14.989], [10.1747, 14.4329], [13.8837, 15.9467]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[13.3806, 16.0866], [13.9095, 15.1246], [14.2367, 15.3546], [13.7502, 16.2397]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[14.5278, 14.9828], [11.7098, 12.1354], [12.1354, 11.7098], [14.9828, 14.5278]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[14.4645, 14.4645], [15.3212, 13.7781], [15.5355, 14.1159], [14.7473, 14.7473]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[15.9467, 13.8837], [14.4329, 10.1747], [14.989, 9.9443], [16.5412, 13.6374]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[16.0866, 13.3806], [17.1408, 13.0744], [17.2095, 13.4684], [16.2397, 13.7502]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[17.6783, 13.4113], [17.6991, 9.4053], [18.3009, 9.4053], [18.3217, 13.4113]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[18.0, 13.0], [19.0911, 13.1205], [19.0039, 13.5109], [18.0, 13.4]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[19.4588, 13.6374], [21.011, 9.9443], [21.5671, 10.1747], [20.0533, 13.8837]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[19.9134, 13.3806], [20.8754, 13.9095], [20.6454, 14.2367], [19.7603, 13.7502]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[21.0172, 14.5278], [23.8646, 11.7098], [24.2902, 12.1354], [21.4722, 14.9828]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[21.5355, 14.4645], [22.2219, 15.3212], [21.8841, 15.5355], [21.2527, 14.7473]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[22.1163, 15.9467], [25.8253, 14.4329], [26.0557, 14.989], [22.3626, 16.5412]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: poly, points: [[22.6194, 16.0866], [22.9256, 17.1408], [22.5316, 17.2095], [22.2498, 16.2397]], y: [2.2, 7.4], collide: 0, color: "#6a5a40"}
      - {kind: rod, from: [18.0, -4.3, 18.0], to: [18.0, 10.5, 18.0], radius: 0.6, collide: 0, color: "#6d675c"}
joints:
  - {id: j_s, type: hinge, body: screw, axis: [0.7071, 0.0, 0.7071], damping: 0.003}   # + : backwards, carrying the air down
  - {id: j_l, type: hinge, body: lay, axis: [-0.7071, 0.0, 0.7071], damping: 0.003}
  - {id: j_w, type: hinge, body: wheel, axis: [0, -1, 0], damping: 0.003}   # + : the way the air carries the buckets up
bevels:
  - {id: gS, body: screw, pos: [0, 0, 0], teeth: 20, pitch_radius: 4, cone_angle: 0.7853982, face_width: 1.6, backlash: 0.05, phase: 0.0, quat: [0.7071, -0.5, 0.0, 0.5], color: "#b9a77f"}
  - {id: gL1, body: lay, pos: [0, 0, 0], teeth: 20, pitch_radius: 4, cone_angle: 0.7853982, face_width: 1.6, backlash: 0.05, phase: 0.0, quat: [0.7071, -0.5, 0.0, -0.5], color: "#b9a77f"}
  - {id: gL2, body: lay, pos: [15.5563, 0, -15.5563], teeth: 20, pitch_radius: 4, cone_angle: 0.7853982, face_width: 1.6, backlash: 0.05, phase: 0.0, quat: [0.7071, 0.5, -0.0, 0.5], color: "#b9a77f"}
  - {id: gW, body: wheel, pos: [0, 0, 0], teeth: 20, pitch_radius: 4, cone_angle: 0.7853982, face_width: 1.6, backlash: 0.05, phase: 0.0, quat: [0, 1, 0, 0], color: "#b9a77f"}
contact: {solref: [0.0008, 1], solimp: [0.95, 0.99, 0.001], margin: 0}
vessels:
  substeps: 8
  nodes:
    - {id: air, kind: source, p: 0, gas: true, RT: 81221}   # the open air, at the cold water's temperature (TC 283 K)
    - {id: over, kind: gas, volume: 60000, p: 0, RT: 81221}   # the air over the cold cistern, open to it (the screw draws from here)
    - {id: pipe, kind: gas, volume: 800, p: 0, RT: 89831,
       draw: {sections: [[[-27.3657, 5.747], [-19.3657, 5.747], [-19.3657, 12.247], [-27.3657, 12.247]], [[-26.8657, 10.547], [-35.5, 10.547], [-35.5, 11.947], [-26.8657, 11.947]], [[-36.2, 11.247], [-36.2, 44.0], [-34.8, 44.0], [-34.8, 11.247]], [[-35.5, 44.7], [35.5, 44.7], [35.5, 43.3], [-35.5, 43.3]], [[36.2, 44.0], [36.2, 3.5], [34.8, 3.5], [34.8, 44.0]], [[35.5, 2.8], [18.0, 2.8], [18.0, 4.2], [35.5, 4.2]], [[17.3, 3.5], [17.3, 9.3], [18.7, 9.3], [18.7, 3.5]]], y: [-0.7, 0.7], pref: 2500}}   # the bell and the pipe, in the warm water (TW 313 K)
    - {id: cold, kind: tank, area: 57, z: 0, level: 30, draw: {section: [[-39, 0], [-1, 0], [-1, 34], [-39, 34]], y: [9.5, 11]}}
    - {id: warm, kind: tank, area: 57, z: 0, level: 30, draw: {section: [[1, 0], [39, 0], [39, 34], [1, 34]], y: [9.5, 11]}}
  links:
    - {id: open, from: air, to: over, area: 40, cd: 0.62}
  displacers:
    - {id: thread, joint: j_s, from: over, to: pipe, volume: 1500}   # the screw, turned backwards, carries the air down a turn's pockets at a time
    - {id: buckets, joint: j_w, from: pipe, to: air, volume: 1626}   # the wheel's buckets carry it up and let it out at the surface
driver: {joint: j_s, kind: velocity, rpm: 20, kv: 0.5, max_torque: 3}   # the hand at the screw's crank
checks:
  - {type: turning, joint: j_w, direction: 1, min_mean: 1.0, min_fraction: 0.9, settle_s: 2.0, window_s: 10}
camera: {target: [0, 0, 16], position: [0, -330, 26], fov: 20}
display:
  output: j_w
  labels: {j_s: "Screw (turned backwards by hand)", j_w: "Wheel in the warm water"}
