import type { PlateResult, ProblemSpec } from "@plate-dyn/core"; import { LinePlot, useSharedAxis } from "@plate-dyn/components"; /** The contact: the force, the hammer and the plate under it, and the numbers. */ export function ContactPlots({ result, spec }: { result: PlateResult; spec: ProblemSpec }) { const c = result.contact; const axis = useSharedAxis(); const coupled = c.hammer_v.length > 0; const velocities = coupled ? [ { x: c.t, y: c.hammer_v, label: "hammer" }, { x: c.t, y: c.plate_v, label: "plate under it", color: "#d1495b" }, ] : [{ x: c.t, y: c.plate_v, label: "plate under the hammer", color: "#d1495b" }]; return (
| Model | {c.model} |
| Contact time | {(c.tc * 1e6).toPrecision(4)} µs (Hertz estimate on a rigid target{" "} {(c.hertz_duration * 1e6).toPrecision(4)} µs) |
| Peak force | {c.peak_force.toPrecision(4)} N (rigid target {c.hertz_peak_force.toPrecision(4)} N) |
| Impulse | {(c.impulse * 1e3).toPrecision(4)} mN s (rigid target{" "} {(c.hertz_impulse * 1e3).toPrecision(4)} mN s; the hammer arrived with{" "} {(spec.hammer.mass * spec.hammer.speed * 1e3).toPrecision(3)} mN s) |
| At separation | the hammer still moves into the plate at {c.hammer_exit_v.toPrecision(3)} m/s, the plate under it at {c.plate_exit_v.toPrecision(3)} m/s; effective restitution{" "} {c.effective_restitution.toPrecision(3)} against the nominal{" "} {spec.hammer.restitution} |
| At separation | the plate under the hammer moves at {c.plate_exit_v.toPrecision(3)} m/s; the hammer is not part of this model, its impulse being prescribed by the nominal restitution{" "} {spec.hammer.restitution} |