number: 353
slug: tilt-hammer-first-order-helve
name: A tilt or trip hammer with a helve of the first order
brown: "A modification of the tilt or trip hammer, illustrated by 72. In this the hammer helve is a lever of the first order. In 72 it is a lever of the third order."
units: cm
sim:
  timestep: 0.0002
  integrator: implicitfast
  iterations: 100
  solver: PGS
  multiccd: false
  duration_s: 12
  floor: false
bodies:
  # the wiper wheel, turning against the clock: its wipers come down on the helve's tail
  - id: wheel_b
    shape: part
    pos: [0, 0, 0]
    friction: 0.1
    color: "#e8dec6"
    pieces:
      - {kind: disc, center: [0, 0], radius: 2.6, y: [-1.2, 1.2]}
      - {kind: rod, from: [-1.7321, 0, -1.0], to: [-6.2354, 0, -3.6], radius: 0.6, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [1.0, 0, -1.7321], to: [3.6, 0, -6.2354], radius: 0.6, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [1.7321, 0, 1.0], to: [6.2354, 0, 3.6], radius: 0.6, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: rod, from: [-1.0, 0, 1.7321], to: [-3.6, 0, 6.2354], radius: 0.6, capsule: true, collide: 1, color: "#6b5a44"}
      - {kind: disc, center: [0, 0], radius: 1.0, y: [1.2, 4.0], color: "#8f8a80"}
      - {kind: disc, center: [0, 0], radius: 0.7, y: [-1.8, -1.2], color: "#8f8a80"}
  # the hammer: head A, helve, and the tail beyond the centre
  - id: hammer
    shape: part
    pos: [-20.0, 0, -6.0]
    friction: 0.1
    color: "#d9cdb2"
    pieces:
      - {kind: rod, from: [-35.0, 0, -6.0], to: [1.6, 0, -6.0], radius: 0.6, capsule: true, collide: 2}
      - {kind: poly, points: [[-22.2, -7.8], [-17.8, -7.8], [-17.8, -4.2], [-22.2, -4.2]], y: [-1.0, 1.0], color: "#b8ac92"}
      - {kind: disc, center: [-20.0, -6.0], radius: 1.0, y: [-1.3, 1.3], color: "#8f8a80"}
      - {kind: poly, points: [[-37.4, -9.4], [-32.6, -9.4], [-32.2, -4.4], [-37.8, -3.4000000000000004]], y: [-1.8, 1.8], collide: 2, color: "#6b5a44"}
  - id: anvil
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#8f8a80"
    pieces:
      - {kind: poly, points: [[-39.0, -15.4], [-31.0, -15.4], [-31.0, -9.402], [-39.0, -9.402]], y: [-2.4, 2.4], collide: 1}
      - {kind: poly, points: [[-41.0, -17.4], [-29.0, -17.4], [-30.200000000000003, -15.4], [-39.8, -15.4]], y: [-3.2, 3.2]}
      - {kind: poly, points: [[-21.2, -17.4], [-18.8, -17.4], [-19.2, -6.0], [-20.8, -6.0]], y: [2.0, 3.0]}
      - {kind: poly, points: [[-1.6, -17.4], [1.6, -17.4], [1.0, 0], [-1.0, 0]], y: [4.0, 5.0]}
      - {kind: poly, points: [[-43.4, -18.4], [8, -18.4], [8, -17.4], [-43.4, -17.4]], y: [-4, 6], color: "#b9b09c"}
  - id: frame
    shape: frame
    color: "#8f8a80"
    rods:
      - {from: [-20.0, 1.3, -6.0], to: [-20.0, 2.0, -6.0], radius: 0.6}
      - {from: [0, 4.0, 0], to: [0, 4.4, 0], radius: 1.0}
joints:
  - {id: j_b, type: hinge, body: wheel_b, axis: [0, -1, 0], damping: 0.02}   # positive: against the clock, as drawn
  - {id: j_a, type: hinge, body: hammer, axis: [0, 1, 0], damping: 0.002, range: [-0.03, 0.35]}   # positive: the tail down, the head up
contact: {solref: [0.002, 1.0], solimp: [0.95, 0.99, 0.0005], margin: 0}
driver: {joint: j_b, kind: velocity, rpm: 12, kv: 10, max_torque: 40}
checks:
  # B turns a quarter between blows: from just before one rise of A to just after the eighth
  - {type: advance, joint: j_b, beat: j_a, expect: 0.7854, tol: 0.01, settle_s: 1.4, window_s: 9.2}
  # the head is raised no higher than the wipers press the tail (0.1226 rad) ...
  - {type: position, joint: j_a, min: -0.01, max: 0.1326, settle_s: 0.5, window_s: 11.0}
  # ... each lift nearly that, and the hammer falls back on the anvil
  - {type: clicks, joint: j_a, lift: 0.098, min: 8, settle_s: 1.4, window_s: 9.2}
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [-15, 0, -11], position: [-15, -125, -5], fov: 30}
display:
  output: j_a
  labels: {j_b: "Wiper wheel (driver)", j_a: "Hammer A on its helve"}

