# No. 46 (Brown 1868): "Fusee chain and spring-box, being the prime mover in some watches, particularly of English make. The fusee to the right is to compensate for the loss of force of the spring as it uncoils itself. The chain is on the small diameter of the fusee when the watch is wound up, as the spring has then the greatest force."
#
# Model (cm, gravity on, shafts upright as Brown draws them, seen from a little in front and above): the spring-box (barrel, 8 cm across) on the left and the fusee on the right,
# a cone 6.8 cm across at its foot and 3 cm at its top, cut with a helical groove (a colliding rib between the turns). A chain 3 mm thick is made fast near the
# fusee's large end, lies 3 turns up its groove and leaves it at the top (the small diameter: the watch wound up), and runs across to the barrel, where its other end is made fast.
# The one driven joint is the barrel, turned by its mainspring: 0.4 N m fully wound, less 0.015 N m for each radian it uncoils (driver torque and the barrel's spring rate). It winds
# the chain onto itself and draws it off the fusee, which turns the train (a viscous load on the fusee, 0.1 N m s). As the spring weakens the chain leaves the fusee lower down,
# on an ever larger diameter, so the fusee's pull on the train, and its speed against the load, stay nearly even while the spring's force falls by half.
# Generator: opencode-runs/batch16/gen046.py.
number: 46
slug: fusee-chain-spring-box
name: Fusee chain and spring-box
brown: "Fusee chain and spring-box, being the prime mover in some watches, particularly of English make. The fusee to the right is to compensate for the loss of force of the spring as it uncoils itself. The chain is on the small diameter of the fusee when the watch is wound up, as the spring has then the greatest force."
units: cm
sim: {timestep: 0.0001, integrator: implicitfast, iterations: 60, duration_s: 10.0, floor: false}
bodies:
  - {id: barrel, shape: assembly, pos: [-6.5, 0, 0], color: "#c9b48a"}
  - {id: fusee, shape: assembly, pos: [6.0, 0, 0], color: "#d4c39a"}
  - id: frame
    shape: part
    pos: [0, 0, 0]
    fixed: true
    color: "#cdc0a4"
    pieces:
      - {kind: poly, points: [[-13, -6.2], [12.5, -6.2], [12.5, -5.6], [-13, -5.6]], y: [-5, 5], collide: 0}   # the lower plate
joints:
  - {id: j_b, type: hinge, body: barrel, axis: [0, 0, 1], damping: 0.0005, stiffness: 0.015, springref: 0}   # the spring-box, the one driven joint; - : uncoiling, winding the chain on
  - {id: j_f, type: hinge, body: fusee, axis: [0, 0, 1], damping: 0.1}   # the fusee and the train it drives; - : the chain drawn off
wheels:
  - {id: box, body: barrel, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 4.0, width: 3.4, flange: 0.35, spokes: 0, web: true, mass: 0.15, color: "#c9b48a"}
  - {id: cone, body: fusee, pos: [0, 0, 0], quat: [0.70710678, 0.70710678, 0, 0], radius: 3.4, width: 3.6, profile: [[-1.8, 3.4], [1.8, 1.5]], flange: 0.0, spokes: 0, web: true, mass: 0.08, color: "#d4c39a"}
shafts:
  - {id: arbor_b, body: barrel, from: [0, 0, -5.6], to: [0, 0, 4.5], radius: 0.35}
  - {id: arbor_f, body: fusee, from: [0, 0, -5.6], to: [0, 0, 4.5], radius: 0.35}
cords:
  - id: chain
    from: {body: barrel, at: [-5.0806, 3.8997, 0], wound: true}
    to: {body: fusee, at: [8.1758, -2.593, -1.45], wound: true}
    over: [box, cone]
    senses: [1, 1]
    wraps: [{wheel: cone, turns: 3, advance: -2.9000, station: 1.4500, groove: {radius: 0.2, color: "#a8946a"}}]
    links: 120
    segments: 10
    root_damping: 0.0001
    joint_armature: 0.000001
    thickness: 0.3
    density: 7800
    stiffness: 30000.0
    pretension: 10.0
    damping: 2.0
    friction: 0.5
    color: "#6f6a60"
contact: {solref: [0.001, 1], solimp: [0.9, 0.95, 0.001], margin: 0}
driver: {joint: j_b, kind: torque, torque: -0.4, max_torque: 0.8}
checks:
  - {type: ratio_range, out: j_b, in: j_f, min: 0.4, max: 0.9, min_swing: 0.1, settle_s: 0.5, window_s: 9.0, slices: 5}
  - {type: turning, joint: j_f, direction: -1, min_mean: 1.5, slow: 0.7, min_fraction: 0.95, settle_s: 1.0, window_s: 8.5}   # the fusee runs on at a nearly even speed as the spring weakens
  - {type: penetration, max: 0.001, settle_s: 0.5}
camera: {target: [0, 0, 0], position: [0, -38, 16], fov: 34}
display:
  output: j_f
  labels: {j_b: "Spring-box (mainspring, driver)", j_f: "Fusee"}

