nx_vessel_twin.nx
buildroot/runtime/nx_vessel_twin.nx
about
nx_vessel_twin.nx -- CAPSTONE of the HARDWARE-IN-THE-LOOP ladder: the
full DIGITAL TWIN sign-off. Given a candidate device (thermal mass,
heater, insulation, thermal-cutoff) and a target recipe, it certifies
the COMPLETE system end-to-end in software:
1. HARDWARE (H3 = H0 sizing + H1 control + H2 faults): the device can
reach, hold, and fail safe.
2. PROCESS (R3 kinetics): at the recipe's hold temperature the ferment
actually acidifies to a safe pH within the never-poison window.
3. SAFETY (H2): a stuck heater is contained by the independent fuse.
Only if all three pass is the (device, recipe) pair CERTIFIED for build.
This is the model-based "iron-bird + flight-sim" certification a fighter
programme completes before the first metal is cut -- here for a fermenter
so the hardware is the LAST, de-risked step.
genealogy_id: nishi_hil_h3 + nishi_ferment_kinetics_r3 + nishi_ferment_recipes_r4
dependencies 8 imports · 2 importers
imports: nx_syscalls.nxnx_ferment_safety.nxnx_ferment_kinetics.nxnx_ferment_recipes.nxnx_vessel_thermal.nxnx_vessel_io.nxnx_vessel_faults.nxnx_vessel_design.nx
imported by: nx_vessel_geometry_test.nxnx_vessel_twin_test.nx
structs
| none |
consts
| 27 | const NX_MAGIC_2000: i64 = 2000 |
| 29 | const NX_TWIN_CERTIFIED: i64 = 0 |
| 30 | const NX_TWIN_FAIL_DESIGN: i64 = 1 // hardware design rejected (H3) |
| 31 | const NX_TWIN_FAIL_WONT_FERMENT:i64 = 2 // won't acidify in the window (R3) |
| 32 | const NX_TWIN_FAIL_UNSAFE_FAULT:i64 = 3 // not contained under a fault (H2) |
functions
| 34 | func nx_vessel_twin_certify(env: *NxFermentSafetyEnvelope, twin: *NxVesselThermal, |