number: 335
slug: watt-parallel-motion-stationary-beam-engine
name: A parallel motion for stationary beam engines
brown: "A parallel motion commonly used for stationary beam engines."
units: cm
sim: {timestep: 0.0002, integrator: implicitfast, iterations: 100, solver: CG, multiccd: true, duration_s: 8, floor: false}
bodies:
  # the framing: the beam's centre O on its column, the radius rod's centre G, and the gland
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    density: 7800
    color: "#9a9284"
    pieces:
      - {kind: poly, points: [[-46.5752, -28.2000], [8.0000, -28.2000], [8.0000, -27.0000], [-46.5752, -27.0000]], y: [-5.0, 3.6], collide: 0}
      - {kind: poly, points: [[-1.6000, -27.0000], [1.6000, -27.0000], [1.6000, 0.0000], [-1.6000, 0.0000]], y: [2.0, 3.2], collide: 0}
      - {kind: rod, from: [0, -1.0, 0], to: [0, 3.2, 0], radius: 1.0, collide: 0, color: "#6f6a60"}
      - {kind: poly, points: [[-43.3752, -27.0000], [-41.7752, -27.0000], [-41.7752, -9.5000], [-43.3752, -9.5000]], y: [-3.8, -3.2], collide: 0}
      - {kind: disc, center: [-42.5752, -9.5000], radius: 1.0, y: [-3.8, -3.2], collide: 0}
      - {kind: poly, points: [[-34.3000, -27.0000], [-32.9000, -27.0000], [-32.9000, -21.0000], [-34.3000, -21.0000]], y: [-4.6, -3.0], collide: 0}
      - {kind: poly, points: [[-34.3000, -21.0000], [-28.8000, -21.0000], [-28.8000, -19.6000], [-34.3000, -19.6000]], y: [-4.6, -3.0], collide: 0}
      - {kind: poly, points: [[-29.9000, -19.6000], [-26.7000, -19.6000], [-26.7000, -17.0000], [-29.9000, -17.0000]], y: [-5.0, -2.6], collide: 0, color: "#7d776c"}
  # the beam, rocked on O (the driven joint): its end pin E and the pin D nearer the centre
  - id: beam
    shape: part
    pos: [0, 0, 0]
    mount: frame
    density: 7800
    color: "#b0a690"
    pieces:
      - {kind: poly, points: [[-29.5000, -1.0], [0, -2.6], [6, -2.4], [6, 2.4], [0, 2.6], [-29.5000, 1.4]], y: [-0.6, 0.6], collide: 0}
      - {kind: disc, center: [0, 0], radius: 4.6, y: [-0.9, 0.9], collide: 0}
      - {kind: disc, center: [0, 0], radius: 1.2, y: [-1.1, 1.1], collide: 0, color: "#6f6a60"}
      - {kind: disc, center: [-28.3000, 0], radius: 1.4, y: [-0.8, 0.8], collide: 0}
      - {kind: rod, from: [-28.3000, -1.6, 0], to: [-28.3000, 0.6, 0], radius: 0.4, collide: 0, color: "#6f6a60"}
      - {kind: rod, from: [-17.0000, -1.6, 0], to: [-17.0000, 0.6, 0], radius: 0.4, collide: 0, color: "#6f6a60"}
  # the main link, from E down to the piston-rod's pin P
  - id: ML
    shape: part
    pos: [-28.3000, 0, 0]
    mount: beam
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: rod, from: [-28.3000, -1.25, 0.0000], to: [-28.3000, -1.25, -9.5000], radius: 0.35, collide: 0}
      - {kind: disc, center: [-28.3000, 0.0000], radius: 0.75, y: [-1.6, -0.9], collide: 0}
      - {kind: disc, center: [-28.3000, -9.5000], radius: 0.4, y: [-4.6, -0.9], collide: 2, color: "#6f6a60"}
  # the back link, from D down to Q
  - id: BL
    shape: part
    pos: [-17.0000, 0, 0]
    mount: beam
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: rod, from: [-17.0000, -1.25, 0.0000], to: [-17.0000, -1.25, -9.5000], radius: 0.35, collide: 0}
      - {kind: disc, center: [-17.0000, 0.0000], radius: 0.75, y: [-1.6, -0.9], collide: 0}
      - {kind: disc, center: [-17.0000, -9.5000], radius: 0.4, y: [-3.8, -0.9], collide: 2, color: "#6f6a60"}
  # the parallel bar P Q, on P; its other eye a bearing on Q
  - id: Pb
    shape: part
    pos: [-28.3000, 0, -9.5000]
    mount: ML
    density: 7800
    color: "#a39a88"
    pieces:
      - {kind: rod, from: [-28.3000, -2.1, -9.5000], to: [-17.0000, -2.1, -9.5000], radius: 0.35, collide: 0}
      - {kind: disc, center: [-28.3000, -9.5000], radius: 0.75, y: [-2.4, -1.8], collide: 0}
      - {kind: band, center: [-17.0000, -9.5000], r: [0.42, 0.95], a: [0, 6.2832], y: [-2.4, -1.8], slices: 36, collide: 1}
  # the radius rod G Q, on its fixed centre G; its eye a bearing on Q
  - id: Rr
    shape: part
    pos: [-42.5752, 0, -9.5000]
    mount: frame
    density: 7800
    color: "#a39a88"
    pieces:
      - {kind: rod, from: [-42.5752, -2.9, -9.5000], to: [-17.0000, -2.9, -9.5000], radius: 0.3, collide: 0}
      - {kind: disc, center: [-42.5752, -9.5000], radius: 0.75, y: [-3.2, -2.6], collide: 0}
      - {kind: band, center: [-17.0000, -9.5000], r: [0.42, 0.95], a: [0, 6.2832], y: [-3.2, -2.6], slices: 36, collide: 1}
  # the cross-head and the piston-rod: free to move across and up and down; only the main link's pin places it
  - {id: Px, shape: part, pos: [-28.3000, 0, -9.5000], mount: frame, mass: 0.01, color: "#8f8a80", pieces: [{kind: disc, center: [-28.3000, -18], radius: 0.1, y: [-3.9, -3.8], collide: 0}]}
  - id: P
    shape: part
    pos: [-28.3000, 0, -9.5000]
    mount: Px
    density: 7800
    color: "#b8ad96"
    pieces:
      - {kind: band, center: [-28.3000, -9.5000], r: [0.42, 0.95], a: [0, 6.2832], y: [-4.3, -3.5], slices: 36, collide: 1}
      - {kind: rod, from: [-28.3000, -3.9, -10.4500], to: [-28.3000, -3.9, -25.5000], radius: 0.45, collide: 0, color: "#8f8a80"}
joints:
  - {id: j_O, type: hinge, body: beam, axis: [0, -1, 0], damping: 0.001}
  - {id: j_M, type: hinge, body: ML, axis: [0, -1, 0], damping: 0.001}
  - {id: j_B, type: hinge, body: BL, axis: [0, -1, 0], damping: 0.001}
  - {id: j_Pb, type: hinge, body: Pb, axis: [0, -1, 0], damping: 0.001}
  - {id: j_G, type: hinge, body: Rr, axis: [0, -1, 0], damping: 0.001}
  - {id: j_x, type: slide, body: Px, axis: [1, 0, 0], damping: 0.2, range: [-1, 1]}
  - {id: j_z, type: slide, body: P, axis: [0, 0, 1], damping: 0.2, range: [-7, 7]}
contact: {solref: [0.002, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_O, kind: velocity, rpm: 0, swing: {amplitude: 0.2, hz: 0.25}, kv: 2000, max_torque: 100}
checks:
  # the beam, rocked on O, carries the main link's pin P, and the piston-rod, up and down in step with it ...
  - {type: follow, out: j_z, in: j_O, expect: -0.2815, tol: 0.006, min_r2: 0.999, settle_s: 0.5, window_s: 7.0}
  - {type: amplitude, joint: j_z, min: 0.054, max: 0.059, settle_s: 0.5, window_s: 7.0}
  # ... while the radius rod swings on G against the beam (OD / GQ = 0.66 of its angle), holding Q's middle
  # point to a line, which the parallelogram copies, enlarged, at P: P strays across by under a millimetre
  - {type: follow, out: j_G, in: j_O, expect: -0.663, tol: 0.015, min_r2: 0.999, settle_s: 0.5, window_s: 7.0}
  - {type: position, joint: j_x, min: -0.1, max: 0.1, settle_s: 0.5, window_s: 7.0}
  - {type: penetration, max: 0.0003, settle_s: 0.2}
camera: {target: [-18, 0, -15], position: [-18, -190, -7], fov: 30}
display:
  output: j_z
  labels: {j_O: "Beam, rocked on O (driver)", j_x: Cross-head P across, j_z: Cross-head P and piston-rod, j_G: Radius rod G Q, j_M: Main link E P}

