# "Scenario: a hanger that fails in sequence"

# Scenario: a hanger that fails in sequence

A platform hangs from two rods. Each is rated for its own load; together they share it. Raise the load slowly. The weaker rod parts first; its share falls on the other, which was never rated for the whole load, and it parts a moment later. This is progressive collapse, the way real structures fail: not at the first break, but because the first break overloaded the rest. The cure is to design so that one failure leaves the others able to carry the load, and to see it, run the numbers.

## The chain

| Stage | Capability | Object |
|---|---|---|
| Rods that break at a force | strength (skill `ferret-physics-strength`) | `cap.joint({ type: 'rod', a, b, maxForce })` |
| A platform and a ramp of load | the physics host | a body and `applyForce` |
| What broke, when | the world's event bus | `physics:joint-break` |

## Building it

Two static anchors, a dynamic platform below them, and a rod from each anchor to the platform with its own `maxForce`:

```ts
const weak   = cap.joint({ type: 'rod', a: leftAnchor,  b: platform, maxForce: 1500 });
const strong = cap.joint({ type: 'rod', a: rightAnchor, b: platform, maxForce: 2500 });

world.events.on('physics:joint-break', (e) => order.push(e.constraint === weak ? 'weak' : 'strong'));
```

The load is a force on the platform that grows every step, here 2 kN per second:

```ts
host.kernel.applyForce(platform.get(RigidBody)!.body, [0, -ramp, 0]);
world.step();
```

## What the order says

- The rods share the load roughly equally while both are intact, so the weak one reaches its rating (1.5 kN) when the load is about 3 kN, before the strong one reaches *its* rating of 2.5 kN. The weak link goes first.
- The strong rod now carries the whole load. At 3 kN it is already past its rating, so it goes at once. The sum of the ratings (4 kN) was never available, because the weaker rod set the limit.
- The load at the first break is the number to design to. Two rods rated 2.5 kN each would have held to 5 kN.

## Designing for it

| Change | Effect |
|---|---|
| Equal ratings | both break together at the sum of the ratings; there is no warning stage |
| A third rod | the survivors each take half of the lost rod's share; the structure can lose one and hold |
| A spring in series (`stretch` link) | the energy of the first break is absorbed; the second sees a gentler load |
| Dynamic load (a drop instead of a ramp) | the peak force is larger than the weight: break at lower loads. Use `strength`'s `maxForce` against the peak, not the weight |
| `physics:joint-break` to a sound, a shout, a camera shake | the player sees the first failure and has a moment to act |

The complete run, with the numbers it must produce, is in `tests/unit/examples/physics-scenarios-progressive-collapse.test.ts`.
