nx_stress_test.nx
buildroot/runtime/nx_stress_test.nx
about
nx_stress_test.nx -- stress = force/area + per-material yield
classification against hand-computed reference cases.
All Q14 throughout (force in Q14 N, area in Q14 m²). σ_Pa = F_q14 / A_q14
since Q14 cancels in the ratio.
Closed-form invariants:
(a) Zero force on unit area: σ = 0 Pa.
(b) 100 N on 1 m² = 100 Pa.
F_q14 = 100 * 16384, A_q14 = 16384 → σ = 100*16384/16384 = 100 Pa.
(c) 100 N on 0.001 m² = 100000 Pa = 100 kPa.
(d) Zero area returns NULL (defensive).
(e) PLA yield = 50 MPa = 50000000 Pa.
(f) PEEK yield = 95 MPa, ultimate = 100 MPa.
(g) 25 MPa on PLA -> SAFE (< 50/2 = 25 MPa).
Actually 25 == yield/2 boundary; classifier uses `>=` so this
is exactly WORKING. Let me use 24 MPa for SAFE.
(h) 30 MPa on PLA -> WORKING (>= 25, < 50).
(i) 50 MPa on PLA -> YIELDED.
(j) 70 MPa on PLA -> FRACTURED (>= 65 ultimate).
(k) Unknown material class (99) -> UNKNOWN_MAT verdict.
(l) MPa conversion: 50000000 Pa -> 50 MPa.
expect_exit: 0
license_tier: ORIGINAL
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_material_profile.nxnx_stress.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 32 | const Q14: i64 = 16384 |
functions
| 34 | func main() -> i64 |