number: 331
slug: slotted-cross-head-pillar-guides
name: A slotted cross-head between pillar guides
brown: "An engine with crank motion like that represented in 93 and 279 of this table, the crank-wrist journal working in a slotted cross-head, A. This cross-head works between the pillar guides, D, D, of the engine framing."
units: cm
sim: {timestep: 0.0002, integrator: implicitfast, iterations: 100, solver: CG, multiccd: true, duration_s: 8, floor: false}
bodies:
  # the engine framing: the pillar guides D, D, the crank-shaft's bearing behind
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    density: 7800
    friction: 0.1
    color: "#9a9284"
    pieces:
      - {kind: poly, points: [[-10.4200, -10.0000], [10.4200, -10.0000], [10.4200, -9.0000], [-10.4200, -9.0000]], y: [-1.6, 5.0], collide: 0}
      - {kind: poly, points: [[-9.0200, 9.0000], [9.0200, 9.0000], [9.0200, 10.0000], [-9.0200, 10.0000]], y: [-1.6, 1.6], collide: 0}
      - {kind: poly, points: [[-9.0200, -9.0000], [-8.0200, -9.0000], [-8.0200, 9.0000], [-9.0200, 9.0000]], y: [-0.6, 0.6], collide: 1}
      - {kind: poly, points: [[8.0200, -9.0000], [9.0200, -9.0000], [9.0200, 9.0000], [8.0200, 9.0000]], y: [-0.6, 0.6], collide: 1}
      - {kind: poly, points: [[-9.0200, -9.0000], [-8.0200, -9.0000], [-8.0200, 9.0000], [-9.0200, 9.0000]], y: [0.6, 1.6], collide: 0}
      - {kind: poly, points: [[8.0200, -9.0000], [9.0200, -9.0000], [9.0200, 9.0000], [8.0200, 9.0000]], y: [0.6, 1.6], collide: 0}
      - {kind: poly, points: [[-9.0200, -9.0000], [-8.0200, -9.0000], [-8.0200, 9.0000], [-9.0200, 9.0000]], y: [-1.6, -0.6], collide: 0}
      - {kind: poly, points: [[8.0200, -9.0000], [9.0200, -9.0000], [9.0200, 9.0000], [8.0200, 9.0000]], y: [-1.6, -0.6], collide: 0}
      - {kind: poly, points: [[-1.0000, -9.0000], [1.0000, -9.0000], [1.0000, 0.0000], [-1.0000, 0.0000]], y: [4.4, 5.0], collide: 0}
      - {kind: disc, center: [0, 0], radius: 1.1, y: [4.4, 5.0], collide: 0}
      - {kind: poly, points: [[-1.4000, 10.0000], [1.4000, 10.0000], [1.4000, 11.5000], [-1.4000, 11.5000]], y: [-1.0, 1.0], collide: 0, color: "#7d776c"}
  # the crank, its fly-wheel behind; its wrist journal works in A's slot
  - id: K
    shape: part
    pos: [0, 0, 0]
    density: 7800
    color: "#a39d90"
    pieces:
      - {kind: rod, from: [0, 1.0, 0], to: [0, 4.4, 0], radius: 0.6, collide: 0, color: "#8f8a80"}
      - {kind: poly, points: [[-1.0, -1.0], [4.0, -0.8], [4.0, 0.8], [-1.0, 1.0]], y: [1.0, 1.6], collide: 0}
      - {kind: disc, center: [4.0, 0], radius: 0.6, y: [-0.9, 1.6], collide: 2, color: "#6f6a60"}
      - {kind: disc, center: [0, 0], radius: 7.5, inner: 6.3, y: [2.2, 3.6], collide: 0, color: "#7d776c"}
      - {kind: rod, from: [-6.5, 2.9, 0], to: [6.5, 2.9, 0], radius: 0.4, collide: 0, color: "#7d776c"}
      - {kind: rod, from: [0, 2.9, -6.5], to: [0, 2.9, 6.5], radius: 0.4, collide: 0, color: "#7d776c"}
  # the slotted cross-head A on the piston-rod, with a shoe at each end between the pillars; free to move
  # across, up and down and to turn: only the wrist and the pillars hold it
  - {id: Ax, shape: part, pos: [0, 0, 0], mount: frame, mass: 0.01, color: "#8f8a80", pieces: [{kind: disc, center: [0, 0], radius: 0.1, y: [-1.5, -1.45], collide: 0}]}
  - {id: Az, shape: part, pos: [0, 0, 0], mount: Ax, mass: 0.01, color: "#8f8a80", pieces: [{kind: disc, center: [0, 0], radius: 0.1, y: [-1.5, -1.45], collide: 0}]}
  - id: A
    shape: part
    pos: [0, 0, 0]
    mount: Az
    density: 7800
    friction: 0.1
    color: "#b8ad96"
    pieces:
      - {kind: poly, points: [[-5.5000, 0.6100], [5.5000, 0.6100], [5.5000, 1.5000], [-5.5000, 1.5000]], y: [-0.6, 0.6], collide: 1}
      - {kind: poly, points: [[-5.5000, -1.5000], [5.5000, -1.5000], [5.5000, -0.6100], [-5.5000, -0.6100]], y: [-0.6, 0.6], collide: 1}
      - {kind: poly, points: [[-6.3000, -1.5000], [-5.5000, -1.5000], [-5.5000, 1.5000], [-6.3000, 1.5000]], y: [-0.6, 0.6], collide: 0}
      - {kind: poly, points: [[5.5000, -1.5000], [6.3000, -1.5000], [6.3000, 1.5000], [5.5000, 1.5000]], y: [-0.6, 0.6], collide: 0}
      - {kind: poly, points: [[-8.0000, -2.2000], [-6.3000, -2.2000], [-6.3000, 2.2000], [-8.0000, 2.2000]], y: [-0.6, 0.6], collide: 2, color: "#a39a88"}
      - {kind: poly, points: [[6.3000, -2.2000], [8.0000, -2.2000], [8.0000, 2.2000], [6.3000, 2.2000]], y: [-0.6, 0.6], collide: 2, color: "#a39a88"}
      - {kind: rod, from: [0, 0, 1.5], to: [0, 0, 18], radius: 0.45, collide: 0, color: "#8f8a80"}
joints:
  - {id: j_K, type: hinge, body: K, axis: [0, -1, 0], damping: 0.0005}
  - {id: j_x, type: slide, body: Ax, axis: [1, 0, 0], damping: 0.05, range: [-1, 1]}
  - {id: j_z, type: slide, body: Az, axis: [0, 0, 1], damping: 0.05, range: [-4.8000, 4.8000]}
  - {id: j_rot, type: hinge, body: A, axis: [0, -1, 0], damping: 0.001}
contact: {solref: [0.001, 1], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_K, kind: velocity, rpm: 30, kv: 0.5, max_torque: 5}
checks:
  - {type: turning, joint: j_K, direction: 1, min_mean: 2.8, min_fraction: 0.95, settle_s: 0.5, window_s: 7.0}
  # the wrist, working in the slot, throws cross-head A up and down twice the crank's 4 cm radius ...
  - {type: amplitude, joint: j_z, min: 0.0395, max: 0.0405, settle_s: 0.5, window_s: 7.0}
  # ... and the pillars keep it on its line, though the wrist pushes it sideways in the slot: it moves
  # across and rocks by no more than the shoes' clearance allows
  - {type: position, joint: j_x, min: -0.03, max: 0.03, settle_s: 0.5, window_s: 7.0}
  - {type: position, joint: j_rot, min: -0.012, max: 0.012, settle_s: 0.5, window_s: 7.0}
  - {type: penetration, max: 0.0003, settle_s: 0.2}
camera: {target: [0, 0, 1], position: [-62, -155, 15], fov: 30}
display:
  output: j_z
  labels: {j_K: Crank and fly-wheel (driver), j_x: Cross-head across, j_z: Cross-head A and piston-rod, j_rot: Turn of cross-head}

