code wiki / (root) / nx_vessel_design.nx

nx_vessel_design.nx

buildroot/runtime/nx_vessel_design.nx

2717 B60 linesdepth 6pulls 9 transitivereach 4 importersview sourcekind librarytopic vessel
docsdependenciesstructsconstsfunctions

about

nx_vessel_design.nx -- H3 of the HARDWARE-IN-THE-LOOP ladder: DESIGN CERTIFICATION. Feed in a candidate hardware spec (vessel thermal mass, heater watts, insulation, thermal-cutoff setpoint) and a target recipe, and it runs the full verification battery -- sizing, heat-up time, closed-loop stability, fault containment -- returning PASS or a specific FAIL reason. This is the model-based-systems-engineering sign-off a fighter programme does before committing to the build. Composes the whole HIL stack: H0 sizing, H1 control loop, H2 fault injection, and the R4 recipe for the target setpoint. genealogy_id: mbse_design_verification + nishi_hil_h0_h1_h2

dependencies 6 imports · 4 importers

nx_syscalls.nx nx_ferment_safety.nx nx_ferment_thermal.nx nx_vessel_thermal.nx nx_vessel_io.nx nx_vessel_faults.nx nx_vessel_design.nx nx_vessel_design_test.nx nx_vessel_geometry_test.nx nx_vessel_twin.nx nx_vessel_twin_test.nx

imports: nx_syscalls.nxnx_ferment_safety.nxnx_ferment_thermal.nxnx_vessel_thermal.nxnx_vessel_io.nxnx_vessel_faults.nx

imported by: nx_vessel_design_test.nxnx_vessel_geometry_test.nxnx_vessel_twin.nxnx_vessel_twin_test.nx

structs

none

consts

20const NX_MAGIC_2000: i64 = 2000
22const NX_DV_PASS: i64 = 0
23const NX_DV_FAIL_UNDERSIZED: i64 = 1 // heater can't reach the setpoint
24const NX_DV_FAIL_CUTOFF_TOO_LOW: i64 = 2 // fuse would trip during normal hold
25const NX_DV_FAIL_TOO_SLOW: i64 = 3 // can't reach setpoint within budget
26const NX_DV_FAIL_NO_CONTAINMENT: i64 = 4 // fuse fails to bound a stuck heater

functions

30func nx_vessel_design_verify(env: *NxFermentSafetyEnvelope, twin: *NxVesselThermal,