# No. 427 (Brown 1868): "Another rotary engine, in which the shaft, B, works in fixed bearings eccentric to the cylinder. The pistons, A, A,
# are fitted to slide in and out from grooves in the hub, C, which is concentric with the shaft, but they are always radial to the cylinder,
# being kept so by rings (shown dotted) fitting to hubs on the cylinder-heads. The pistons slide through rolling packings, a, a, in the hub, C."
# Model (cm, Brown's section, no gravity; only the back half of the cut cylinder is drawn). The cylinder (7 cm bore) has its centre O
# 1.6 cm below the shaft B; the hub C (10.72 cm across) is concentric with B and just clears the bore at the top, between the ports.
# Each piston A is fast on its own ring, turning about O on the cylinder-head's hub, so it is always radial to the cylinder and its edge always
# just clears the bore; it slides through a rolling packing a that turns in the hub 4.5 cm from B (pinned there). The steam's pressure on the
# pistons is the one input: in at the right-hand port, out at the left, it pushes clockwise on whichever piston has live steam behind it
# and the exhaust ahead (the leading one of the two between the ports; when it reaches the exhaust port the other takes over), in
# proportion to the face it shows between hub and bore. Each push is a torque about O on that piston's ring, let in and shut off by the
# shaft's own turn (timed on j_B through the packings' geometry); the shaft is free and works against a load (0.0391 N m s).
# Generator: opencode-runs/batch13/gen427.py.
number: 427
slug: rotary-engine-radial-pistons
name: Rotary engine with radial pistons
brown: "Another rotary engine, in which the shaft, B, works in fixed bearings eccentric to the cylinder. The pistons, A, A, are fitted to slide in and out from grooves in the hub, C, which is concentric with the shaft, but they are always radial to the cylinder, being kept so by rings (shown dotted) fitting to hubs on the cylinder-heads. The pistons slide through rolling packings, a, a, in the hub, C."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  duration_s: 10
  floor: false
  gravity: 0
bodies:
  - id: hub
    shape: part
    pos: [0, 0, 11.1]
    density: 7800
    color: "#b8ad97"
    pieces:
      - {kind: disc, center: [0, 11.1], radius: 5.36, y: [0.4, 2.0]}   # the hub C
      - {kind: disc, center: [0, 11.1], radius: 0.75, y: [0.3, 2.8], color: "#6f6a60"}   # the shaft B
      - {kind: disc, center: [-3.6862, 13.6811], radius: 0.75, inner: 0.6, y: [-0.3, 0.4], color: "#6f6a60"}   # the packing's seat in the hub
      - {kind: disc, center: [3.6862, 8.5189], radius: 0.75, inner: 0.6, y: [-0.3, 0.4], color: "#6f6a60"}   # the packing's seat in the hub
  - id: ring_1
    shape: part
    pos: [0, 0, 9.5]
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: disc, center: [0, 9.5], radius: 2.4, inner: 2.15, y: [-0.75, -0.55], color: "#8f8a80"}   # the ring on the cylinder-head's hub (dotted in Brown's figure)
      - {kind: poly, points: [[-1.6888, 10.8107], [-4.8962, 14.4487], [-4.2961, 14.9778], [-1.0887, 11.3398]], y: [-0.35, 0.35], color: "#6f6a60"}   # the piston A, always radial to the cylinder
      - {kind: poly, points: [[-1.5388, 10.943], [-1.8033, 11.243], [-1.5033, 11.5075], [-1.2387, 11.2075]], y: [-0.75, 0.0]}   # its foot on the ring
  - id: packing_1
    shape: part
    pos: [-3.6862, 0, 13.6811]
    mount: ring_1
    density: 7800
    color: "#7d776c"
    pieces:
      - {kind: disc, center: [-3.6862, 13.6811], radius: 0.55, y: [-0.3, 0.3]}   # the rolling packing a, on the piston
  - id: ring_2
    shape: part
    pos: [0, 0, 9.5]
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: disc, center: [0, 9.5], radius: 2.4, inner: 2.15, y: [-0.55, -0.35], color: "#8f8a80"}   # the ring on the cylinder-head's hub (dotted in Brown's figure)
      - {kind: poly, points: [[2.1322, 9.3464], [6.8191, 8.099], [6.6133, 7.3259], [1.9265, 8.5733]], y: [-0.35, 0.35], color: "#6f6a60"}   # the piston A, always radial to the cylinder
      - {kind: poly, points: [[2.0808, 9.1532], [2.4673, 9.0503], [2.3645, 8.6637], [1.9779, 8.7666]], y: [-0.55, 0.0]}   # its foot on the ring
  - id: packing_2
    shape: part
    pos: [3.6862, 0, 8.5189]
    mount: ring_2
    density: 7800
    color: "#7d776c"
    pieces:
      - {kind: disc, center: [3.6862, 8.5189], radius: 0.55, y: [-0.3, 0.3]}   # the rolling packing a, on the piston
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cfc6b4"
    pieces:
      - {kind: poly, points: [[4.0082, 15.2388], [4.2945, 15.6488], [3.3111, 16.2295], [3.0904, 15.7809]], y: [0, 2.4]}
      - {kind: poly, points: [[3.0904, 15.7809], [3.3111, 16.2295], [2.251, 16.6542], [2.101, 16.1773]], y: [0, 2.4]}
      - {kind: poly, points: [[2.101, 16.1773], [2.251, 16.6542], [1.1387, 16.9131], [1.0628, 16.4188]], y: [0, 2.4]}
      - {kind: poly, points: [[1.0628, 16.4188], [1.1387, 16.9131], [0, 17], [0, 16.5]], y: [0, 2.4]}
      - {kind: poly, points: [[0, 16.5], [0, 17], [-1.1387, 16.9131], [-1.0628, 16.4188]], y: [0, 2.4]}
      - {kind: poly, points: [[-1.0628, 16.4188], [-1.1387, 16.9131], [-2.251, 16.6542], [-2.101, 16.1773]], y: [0, 2.4]}
      - {kind: poly, points: [[-2.101, 16.1773], [-2.251, 16.6542], [-3.3111, 16.2295], [-3.0904, 15.7809]], y: [0, 2.4]}
      - {kind: poly, points: [[-3.0904, 15.7809], [-3.3111, 16.2295], [-4.2945, 15.6488], [-4.0082, 15.2388]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.1388, 14.2531], [-5.5059, 14.5926], [-6.2239, 13.6848], [-5.809, 13.4058]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.809, 13.4058], [-6.2239, 13.6848], [-6.7937, 12.6773], [-6.3408, 12.4655]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.3408, 12.4655], [-6.7937, 12.6773], [-7.2017, 11.5941], [-6.7216, 11.4545]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.7216, 11.4545], [-7.2017, 11.5941], [-7.4382, 10.4611], [-6.9423, 10.397]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.9423, 10.397], [-7.4382, 10.4611], [-7.4975, 9.3052], [-6.9976, 9.3181]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.9976, 9.3181], [-7.4975, 9.3052], [-7.3782, 8.1539], [-6.8863, 8.2436]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.8863, 8.2436], [-7.3782, 8.1539], [-7.0832, 7.0346], [-6.611, 7.199]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.611, 7.199], [-7.0832, 7.0346], [-6.6195, 5.9741], [-6.1782, 6.2092]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.1782, 6.2092], [-6.6195, 5.9741], [-5.9982, 4.9976], [-5.5983, 5.2977]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.5983, 5.2977], [-5.9982, 4.9976], [-5.234, 4.1283], [-4.885, 4.4864]], y: [0, 2.4]}
      - {kind: poly, points: [[-4.885, 4.4864], [-5.234, 4.1283], [-4.3451, 3.3869], [-4.0554, 3.7944]], y: [0, 2.4]}
      - {kind: poly, points: [[-4.0554, 3.7944], [-4.3451, 3.3869], [-3.3527, 2.7911], [-3.1292, 3.2384]], y: [0, 2.4]}
      - {kind: poly, points: [[-3.1292, 3.2384], [-3.3527, 2.7911], [-2.2805, 2.3551], [-2.1285, 2.8315]], y: [0, 2.4]}
      - {kind: poly, points: [[-2.1285, 2.8315], [-2.2805, 2.3551], [-1.154, 2.0893], [-1.0771, 2.5834]], y: [0, 2.4]}
      - {kind: poly, points: [[-1.0771, 2.5834], [-1.154, 2.0893], [-0, 2], [-0, 2.5]], y: [0, 2.4]}
      - {kind: poly, points: [[-0, 2.5], [-0, 2], [1.154, 2.0893], [1.0771, 2.5834]], y: [0, 2.4]}
      - {kind: poly, points: [[1.0771, 2.5834], [1.154, 2.0893], [2.2805, 2.3551], [2.1285, 2.8315]], y: [0, 2.4]}
      - {kind: poly, points: [[2.1285, 2.8315], [2.2805, 2.3551], [3.3527, 2.7911], [3.1292, 3.2384]], y: [0, 2.4]}
      - {kind: poly, points: [[3.1292, 3.2384], [3.3527, 2.7911], [4.3451, 3.3869], [4.0554, 3.7944]], y: [0, 2.4]}
      - {kind: poly, points: [[4.0554, 3.7944], [4.3451, 3.3869], [5.234, 4.1283], [4.885, 4.4864]], y: [0, 2.4]}
      - {kind: poly, points: [[4.885, 4.4864], [5.234, 4.1283], [5.9982, 4.9976], [5.5983, 5.2977]], y: [0, 2.4]}
      - {kind: poly, points: [[5.5983, 5.2977], [5.9982, 4.9976], [6.6195, 5.9741], [6.1782, 6.2092]], y: [0, 2.4]}
      - {kind: poly, points: [[6.1782, 6.2092], [6.6195, 5.9741], [7.0832, 7.0346], [6.611, 7.199]], y: [0, 2.4]}
      - {kind: poly, points: [[6.611, 7.199], [7.0832, 7.0346], [7.3782, 8.1539], [6.8863, 8.2436]], y: [0, 2.4]}
      - {kind: poly, points: [[6.8863, 8.2436], [7.3782, 8.1539], [7.4975, 9.3052], [6.9976, 9.3181]], y: [0, 2.4]}
      - {kind: poly, points: [[6.9976, 9.3181], [7.4975, 9.3052], [7.4382, 10.4611], [6.9423, 10.397]], y: [0, 2.4]}
      - {kind: poly, points: [[6.9423, 10.397], [7.4382, 10.4611], [7.2017, 11.5941], [6.7216, 11.4545]], y: [0, 2.4]}
      - {kind: poly, points: [[6.7216, 11.4545], [7.2017, 11.5941], [6.7937, 12.6773], [6.3408, 12.4655]], y: [0, 2.4]}
      - {kind: poly, points: [[6.3408, 12.4655], [6.7937, 12.6773], [6.2239, 13.6848], [5.809, 13.4058]], y: [0, 2.4]}
      - {kind: poly, points: [[5.809, 13.4058], [6.2239, 13.6848], [5.5059, 14.5926], [5.1388, 14.2531]], y: [0, 2.4]}
      - {kind: poly, points: [[4.4513, 2.3764], [4.7428, 1.91], [5.1884, 2.2073], [4.8695, 2.6555]], y: [0, 2.4]}
      - {kind: poly, points: [[4.8695, 2.6555], [5.1884, 2.2073], [5.6154, 2.5308], [5.2703, 2.9591]], y: [0, 2.4]}
      - {kind: poly, points: [[5.2703, 2.9591], [5.6154, 2.5308], [6.0223, 2.8793], [5.6522, 3.2861]], y: [0, 2.4]}
      - {kind: poly, points: [[5.6522, 3.2861], [6.0223, 2.8793], [6.4076, 3.2514], [6.0139, 3.6354]], y: [0, 2.4]}
      - {kind: poly, points: [[6.0139, 3.6354], [6.4076, 3.2514], [6.77, 3.646], [6.354, 4.0057]], y: [0, 2.4]}
      - {kind: poly, points: [[6.354, 4.0057], [6.77, 3.646], [7.1081, 4.0615], [6.6713, 4.3957]], y: [0, 2.4]}
      - {kind: poly, points: [[6.6713, 4.3957], [7.1081, 4.0615], [7.4208, 4.4965], [6.9647, 4.804]], y: [0, 2.4]}
      - {kind: poly, points: [[6.9647, 4.804], [7.4208, 4.4965], [7.7068, 4.9495], [7.2332, 5.2291]], y: [0, 2.4]}
      - {kind: poly, points: [[7.2332, 5.2291], [7.7068, 4.9495], [7.9653, 5.4187], [7.4758, 5.6695]], y: [0, 2.4]}
      - {kind: poly, points: [[7.4758, 5.6695], [7.9653, 5.4187], [8.1952, 5.9026], [7.6916, 6.1237]], y: [0, 2.4]}
      - {kind: poly, points: [[7.6916, 6.1237], [8.1952, 5.9026], [8.3957, 6.3993], [7.8798, 6.5899]], y: [0, 2.4]}
      - {kind: poly, points: [[7.8798, 6.5899], [8.3957, 6.3993], [8.5662, 6.9072], [8.0398, 7.0665]], y: [0, 2.4]}
      - {kind: poly, points: [[8.0398, 7.0665], [8.5662, 6.9072], [8.706, 7.4244], [8.171, 7.5519]], y: [0, 2.4]}
      - {kind: poly, points: [[8.171, 7.5519], [8.706, 7.4244], [8.8146, 7.949], [8.2729, 8.0443]], y: [0, 2.4]}
      - {kind: poly, points: [[8.2729, 8.0443], [8.8146, 7.949], [8.8916, 8.4791], [8.3452, 8.5418]], y: [0, 2.4]}
      - {kind: poly, points: [[8.3452, 8.5418], [8.8916, 8.4791], [8.9367, 9.0129], [8.3876, 9.0429]], y: [0, 2.4]}
      - {kind: poly, points: [[8.3876, 9.0429], [8.9367, 9.0129], [8.9499, 9.5485], [8.3999, 9.5455]], y: [0, 2.4]}
      - {kind: poly, points: [[8.3999, 9.5455], [8.9499, 9.5485], [8.9309, 10.0838], [8.3821, 10.048]], y: [0, 2.4]}
      - {kind: poly, points: [[8.3821, 10.048], [8.9309, 10.0838], [8.88, 10.6171], [8.3343, 10.5485]], y: [0, 2.4]}
      - {kind: poly, points: [[8.3343, 10.5485], [8.88, 10.6171], [8.7973, 11.1464], [8.2566, 11.0452]], y: [0, 2.4]}
      - {kind: poly, points: [[8.2566, 11.0452], [8.7973, 11.1464], [8.683, 11.6698], [8.1494, 11.5365]], y: [0, 2.4]}
      - {kind: poly, points: [[8.1494, 11.5365], [8.683, 11.6698], [8.5376, 12.1854], [8.013, 12.0204]], y: [0, 2.4]}
      - {kind: poly, points: [[8.013, 12.0204], [8.5376, 12.1854], [8.3617, 12.6914], [7.8478, 12.4953]], y: [0, 2.4]}
      - {kind: poly, points: [[7.8478, 12.4953], [8.3617, 12.6914], [8.1557, 13.186], [7.6546, 12.9594]], y: [0, 2.4]}
      - {kind: poly, points: [[7.6546, 12.9594], [8.1557, 13.186], [7.9206, 13.6673], [7.4339, 13.4112]], y: [0, 2.4]}
      - {kind: poly, points: [[7.4339, 13.4112], [7.9206, 13.6673], [7.6571, 14.1337], [7.1865, 13.849]], y: [0, 2.4]}
      - {kind: poly, points: [[7.1865, 13.849], [7.6571, 14.1337], [7.3661, 14.5835], [6.9135, 14.2712]], y: [0, 2.4]}
      - {kind: poly, points: [[6.9135, 14.2712], [7.3661, 14.5835], [7.0488, 15.0152], [6.6156, 14.6762]], y: [0, 2.4]}
      - {kind: poly, points: [[6.6156, 14.6762], [7.0488, 15.0152], [6.7062, 15.427], [6.2941, 15.0628]], y: [0, 2.4]}
      - {kind: poly, points: [[6.2941, 15.0628], [6.7062, 15.427], [6.3396, 15.8176], [5.95, 15.4294]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.95, 15.4294], [-6.3396, 15.8176], [-6.7062, 15.427], [-6.2941, 15.0628]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.2941, 15.0628], [-6.7062, 15.427], [-7.0488, 15.0152], [-6.6156, 14.6762]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.6156, 14.6762], [-7.0488, 15.0152], [-7.3661, 14.5835], [-6.9135, 14.2712]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.9135, 14.2712], [-7.3661, 14.5835], [-7.6571, 14.1337], [-7.1865, 13.849]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.1865, 13.849], [-7.6571, 14.1337], [-7.9206, 13.6673], [-7.4339, 13.4112]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.4339, 13.4112], [-7.9206, 13.6673], [-8.1557, 13.186], [-7.6546, 12.9594]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.6546, 12.9594], [-8.1557, 13.186], [-8.3617, 12.6914], [-7.8478, 12.4953]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.8478, 12.4953], [-8.3617, 12.6914], [-8.5376, 12.1854], [-8.013, 12.0204]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.013, 12.0204], [-8.5376, 12.1854], [-8.683, 11.6698], [-8.1494, 11.5365]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.1494, 11.5365], [-8.683, 11.6698], [-8.7973, 11.1464], [-8.2566, 11.0452]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.2566, 11.0452], [-8.7973, 11.1464], [-8.88, 10.6171], [-8.3343, 10.5485]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.3343, 10.5485], [-8.88, 10.6171], [-8.9309, 10.0838], [-8.3821, 10.048]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.3821, 10.048], [-8.9309, 10.0838], [-8.9499, 9.5485], [-8.3999, 9.5455]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.3999, 9.5455], [-8.9499, 9.5485], [-8.9367, 9.0129], [-8.3876, 9.0429]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.3876, 9.0429], [-8.9367, 9.0129], [-8.8916, 8.4791], [-8.3452, 8.5418]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.3452, 8.5418], [-8.8916, 8.4791], [-8.8146, 7.949], [-8.2729, 8.0443]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.2729, 8.0443], [-8.8146, 7.949], [-8.706, 7.4244], [-8.171, 7.5519]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.171, 7.5519], [-8.706, 7.4244], [-8.5662, 6.9072], [-8.0398, 7.0665]], y: [0, 2.4]}
      - {kind: poly, points: [[-8.0398, 7.0665], [-8.5662, 6.9072], [-8.3957, 6.3993], [-7.8798, 6.5899]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.8798, 6.5899], [-8.3957, 6.3993], [-8.1952, 5.9026], [-7.6916, 6.1237]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.6916, 6.1237], [-8.1952, 5.9026], [-7.9653, 5.4187], [-7.4758, 5.6695]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.4758, 5.6695], [-7.9653, 5.4187], [-7.7068, 4.9495], [-7.2332, 5.2291]], y: [0, 2.4]}
      - {kind: poly, points: [[-7.2332, 5.2291], [-7.7068, 4.9495], [-7.4208, 4.4965], [-6.9647, 4.804]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.9647, 4.804], [-7.4208, 4.4965], [-7.1081, 4.0615], [-6.6713, 4.3957]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.6713, 4.3957], [-7.1081, 4.0615], [-6.77, 3.646], [-6.354, 4.0057]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.354, 4.0057], [-6.77, 3.646], [-6.4076, 3.2514], [-6.0139, 3.6354]], y: [0, 2.4]}
      - {kind: poly, points: [[-6.0139, 3.6354], [-6.4076, 3.2514], [-6.0223, 2.8793], [-5.6522, 3.2861]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.6522, 3.2861], [-6.0223, 2.8793], [-5.6154, 2.5308], [-5.2703, 2.9591]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.2703, 2.9591], [-5.6154, 2.5308], [-5.1884, 2.2073], [-4.8695, 2.6555]], y: [0, 2.4]}
      - {kind: poly, points: [[-4.8695, 2.6555], [-5.1884, 2.2073], [-4.7428, 1.91], [-4.4513, 2.3764]], y: [0, 2.4]}
      - {kind: poly, points: [[3.35, 15.3462], [3.85, 15.3462], [3.85, 21.5], [3.35, 21.5]], y: [0, 2.4]}
      - {kind: poly, points: [[5.35, 14.0141], [5.9, 14.0141], [5.9, 21.5], [5.35, 21.5]], y: [0, 2.4]}
      - {kind: poly, points: [[-3.85, 15.3462], [-3.35, 15.3462], [-3.35, 21.5], [-3.85, 21.5]], y: [0, 2.4]}
      - {kind: poly, points: [[-5.9, 14.0141], [-5.35, 14.0141], [-5.35, 21.5], [-5.9, 21.5]], y: [0, 2.4]}
      - {kind: disc, center: [0, 9.5], radius: 8.95, y: [2.4, 2.9], color: "#bdb4a2"}   # the cylinder's back
      - {kind: poly, points: [[-5.35, 13.5], [-3.85, 13.5], [-3.85, 21.5], [-5.35, 21.5]], y: [2.4, 2.6], color: "#bdb4a2"}
      - {kind: poly, points: [[3.85, 13.5], [5.35, 13.5], [5.35, 21.5], [3.85, 21.5]], y: [2.4, 2.6], color: "#bdb4a2"}
      - {kind: poly, points: [[-10.5, -0.8], [10.5, -0.8], [10.5, 0.2], [-10.5, 0.2]], y: [-1.5, 3.5], color: "#bdb4a2"}   # the bed
      - {kind: poly, points: [[-6.5, 0.2], [6.5, 0.2], [4, 0.9], [-4, 0.9]], y: [0, 2.9], color: "#bdb4a2"}
joints:
  - {id: j_B, type: hinge, body: hub, axis: [0, 1, 0], damping: 0.0391}   # the shaft B and hub C; + : clockwise as drawn (Brown's arrows)
  - {id: j_r1, type: hinge, body: ring_1, axis: [0, 1, 0], damping: 0.00002}   # ring and piston 1 about the cylinder's centre; + : clockwise as drawn
  - {id: j_s1, type: slide, body: packing_1, axis: [-0.6613, 0, 0.7501], range: [-2.924, 0.826], damping: 0.00002}   # the packing 1 along its piston, between its ends; + : outwards
  - {id: j_r2, type: hinge, body: ring_2, axis: [0, 1, 0], damping: 0.00002}   # ring and piston 2 about the cylinder's centre; + : clockwise as drawn
  - {id: j_s2, type: slide, body: packing_2, axis: [0.9664, 0, -0.2572], range: [-1.1645, 2.5855], damping: 0.00002}   # the packing 2 along its piston, between its ends; + : outwards
pins:
  - {id: pk_1, a: packing_1, b: hub, at: [-3.6862, 0, 13.6811]}   # the packing 1 turns in the hub
  - {id: pk_2, a: packing_2, b: hub, at: [3.6862, 0, 8.5189]}   # the packing 2 turns in the hub
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver:
  joint: j_B
  kind: feet
  max_torque: 1.0
  feet:
    force: 0.3
    timed: {joint: j_B, gain: 1, offset: 0}   # the shaft's turn (clockwise); the windows and the face shown follow from the packings' geometry (gen427.py)
    ports:   # the steam on piston 1 and piston 2, each a clockwise push on its ring about O
      - {joint: j_r1, sign: 1, open: [172.70, 352.70], profile: [0.4818, -0.2923, -0.4176]}
      - {joint: j_r2, sign: 1, open: [352.70, 532.70], profile: [0.4818, 0.2923, 0.4176]}
checks:
  - {type: monotonic, joint: j_B, direction: 1, max_back: 0.05, settle_s: 0.0, window_s: 9.5}
  - {type: turning, joint: j_B, direction: 1, min_mean: 3.5, min_fraction: 0.9, settle_s: 3.0, window_s: 6.5}
  - {type: monotonic, joint: j_r1, direction: 1, max_back: 0.05, settle_s: 0.0, window_s: 9.5}   # each piston goes round the cylinder with the hub
  - {type: amplitude, joint: j_s1, min: 0.0152, max: 0.0165, sustain: 0.95, settle_s: 3.0, window_s: 6.5}   # in and out through the packing by the eccentricity
  - {type: amplitude, joint: j_s2, min: 0.0152, max: 0.0165, sustain: 0.95, settle_s: 3.0, window_s: 6.5}
  - {type: penetration, max: 0.002}
camera: {target: [0, 0, 9.0], position: [0, -95, 9.0], fov: 22}
display:
  output: j_B
  labels: {j_B: "Shaft B and hub C", j_r1: "Piston A (ring)", j_r2: "Piston A (ring)", j_s1: "Packing a", j_s2: "Packing a"}
  proof: {label: "Packings out of the hub", sub: "the steam turns the pistons on their rings but the shaft stands"}
