D02 - FROZEN R07 FREE-STRIKER DEVICE-DEMAND POSTPROCESSING

This program reads the completed R07 simulation. It performs zero new
trajectory integrations. It is an uncalibrated reference-beam sizing aid;
it does not rate an actuator or predict fracture.

Requirements: Python3.10+ and NumPy1.26+. Matplotlib is needed only for the
separate optional plot script. No SciPy, GPU, hardware connection or network.

Run from this directory. Every --output path must be NEW; existing outputs
are refused so a previous result cannot silently be replaced.

  python -m unittest test_device_demand -v
  python device_demand.py study --r07-root ../efficiency --output results

After an existing study, choose a fresh directory, for example:

  python device_demand.py study --r07-root ../efficiency --output rerun-001

The study requires the frozen R07 parent/row/trace files and ancestor sources
and inputs. The R04+R05+R06+R07 public core overlays supply the sources and
summary records; download the18 separately published R07 NPZ traces too.
Their paths are efficiency/results/iteration07/traces/. The study verifies
the recorded parent, row, trace, sidecar, source and inherited input hashes.
The declared plan hash is checked before the study starts.

For a reusable individual R07-format trace:

  python device_demand.py trace --row ../efficiency/results/iteration07/I7_I4-00_m7_fine_linear_reference_adaptive.json --trace ../efficiency/results/iteration07/traces/I7_I4-00_m7_fine_linear_reference_adaptive.npz --output single-trace-001

An optional --profiles-json path supplies a JSON list of hypothetical
{id,force_cap_n,launch_stroke_m} profiles for a new exploratory calculation.
It does not alter the frozen four-profile D02 study.

For an ideal launch-work calculation only:

  python device_demand.py launch --mass-kg 0.01 --speed 1 --force-cap 0.5 --stroke 0.01 --output launch-001

These arguments are SI quantities: kg,m/s,N,m. They are hypothetical NET
mechanical limits, not a voltage/current recipe or manufacturer ratings.

WHAT IS COMPUTED

All144 R07 row inputs supply288 striker assignments, recorded sampled contact
loads, source work and signed endpoint speeds. Only18 rows have saved full
traces, giving36 source motion histories. The remaining126 trajectories are
not reconstructed or invented. Four hypothetical force/stroke profiles are
evaluated for all288 source assignments:1152 algebraic screens. These are
not1152 physical tests or dynamics integrations.

Each assigned striker has total moving mass/source count. Launch energy is
0.5*m*v^2 and launch impulse is m*v. Under an ideal positive force cap F,
minimum stroke is E/F and minimum time is m*v/F. Force-cap times available
stroke at least E is a necessary ideal work screen only. For a hypothetical
constant-force rest-to-speed launch over the full stroke s, F=E/s,t=2s/v and
peak mechanical power is F*v. Passing does not establish hardware capability.
All launch calculations occur conceptually BEFORE t=0; R07 begins with
already-moving free strikers and has no active launch force during contact.

R07 contact force is K*d^p+C*d^p*max(v_striker-v_beam,0),d=max(x_striker-x_beam,0).
It is repulsive and acts oppositely on striker/specimen. The contact impulse
on the specimen is m*(v_initial-v_final), since the frozen striker has no
other forces. This identity does not apply unchanged to an attached actuator,
armature, spring or guide force. A real assembly's attached moving mass cannot
be silently substituted for the modeled released10g striker.

Every saved step is used for motion extrema and composite-trapezoid impulse
and work diagnostics. The force peak and contact event times are sampled,
not certified continuous-time maxima. First/last contact uses F>1e-9N.
Beam work separates positive and negative contributions. Striker work is
minus integral(F*v_striker dt). Relative work is integral(F*(v_striker-v_beam)dt)
and equals the change in contact storage plus contact loss. These are
mechanical accounting quantities, not electrical or fracture work.

Frozen checks: impulse absolute error <=max(1e-9N*s,0.001*max(abs(momentum),
abs(quadrature))); each work absolute error/initial main-event energy<=0.001.
The common main-event denominator prevents a nearly cancelled signed work
from producing a misleading percentage. Failed diagnostics remain visible.

CAD INTERPRETATION

Absolute x is the model's contact-normal coordinate, positive toward the
specimen. The first striker begins at x=0; the second starts at its negative
own-speed gap. For CAD z=-x, positive model motion points downward.

The reported relative position subtracts each striker's own initial x.
Motion span includes free flight, contact and rebound in only0<=t<=0.17s.
It is distinct from contact indentation, local beam deflection and a separate
launcher acceleration stroke. A nonzero endpoint velocity means continued
motion beyond the saved window. No catcher/end stop/reset exists in this
model, so the observed span is NOT sufficient required rail or catch clearance.
Sampled extrema also cannot certify inter-step extrema or a physical margin.

Both modeled contacts are at the same0.9L beam coordinate. Separate physical
ports, lateral offsets and an actual carriage are unvalidated3D design
hypotheses. Interface force is not automatically an actuator, mount, fastener
or housing rating. No actuator size, electrical drive, duty cycle, thermal
capacity, cycle throughput, optimal design or fracture capability follows.

OUTPUTS AND PROVENANCE

D02_summary.json contains all144 rows,1152 source/profile screens,18 trace
reports with36 histories, observed trace-subset extremes and before/after
source/input hashes. traces/<run_id>.json retains each detailed calculation.
MANIFEST.json hashes generated artifacts and excludes itself. Paths stored
in evidence are relative. Actual trace files and earlier releases are read
only; outputs never modify the parent evidence.

The four profiles and diagnostics are internally specified before D02
postprocessing, using an already examined R07 model. This is not formal
external preregistration or an independent physical validation.
