code wiki / (root) / nx_preservation.nx

nx_preservation.nx

buildroot/runtime/nx_preservation.nx

7616 B171 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_preservation.nx -- FOOD-SCIENCE SUITE / PRESERVATION rung. The classic food-preservation science the ferment ladder didn't yet cover: thermal death kinetics (D-value / z-value / the 12-D botulinum cook), water activity (aw), and Leistner HURDLE technology -- with a never-poison canning gate. All INTEGER-EXACT (no float, no precision cliff): decimal reduction and z-value scaling are powers of ten (exact), water-activity + pH control are threshold rules (exact). Quantities in milli-units: time -> milli-minutes (mmin) temp -> milli-Celsius (mC) aw, pH -> x1000 (aw 0.850 = 850; pH 4.600 = 4600) log-reductions -> milli-reductions (12 log = 12000) THE never-poison line (mirrors nx_ferment_safety, Global Rule 26): a LOW-ACID food (pH >= 4.6, where C. botulinum can grow) may NEVER be preserved by boiling-water-bath canning -- it MUST be pressure-canned to achieve the 12-D botulinum cook. Structural refusal, liar-killed by the gate (the #1 cause of home-canning botulism). THE measured exceed: a single-factor checker calls a food unsafe unless pH<4.6 OR aw<0.85 alone. The HURDLE model correctly finds foods that are stable because pH AND aw are BOTH moderately reduced together (Leistner) -- how shelf-stable fermented sausage, aged cheese, and many intermediate-moisture foods actually work. Grounding (cited; researcher-groundable like nx_probiome): fda_21cfr113_114_low_acid_acidified_canning (pH 4.6 line) c_botulinum_12D_D121_0.21min_z_10C (thermal death) nchfp_pressure_vs_boiling_water_canning (method rule) fda_water_activity_0.85_not_potentially_hazardous (aw pathogen floor) leistner_hurdle_technology_combined_preservation (hurdle exceed) genealogy_id: nishi_ferment_safety_r0_never_poison + food_preservation_science

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_preservation.nx nx_haccp.nx nx_haccp_test.nx nx_preservation_test.nx

imports: nx_syscalls.nx

imported by: nx_haccp.nxnx_haccp_test.nxnx_preservation_test.nx

structs

none

consts

40const PV_BOTULINUM_PH_MILLI: i64 = 4600 // FDA acidified-foods line
41const PV_HURDLE_PH_MILLI: i64 = 5000 // upper pH for a hurdle-stable food
42const PV_AW_NO_GROWTH_MILLI: i64 = 600 // below this: NO microbial growth
43const PV_AW_NO_PATHOGEN_MILLI: i64 = 850 // below this: no pathogen (FDA non-TCS)
44const PV_AW_HURDLE_MILLI: i64 = 910 // upper aw for a hurdle-stable food
45const PV_AW_BOTULINUM_MILLI: i64 = 930 // C. botulinum minimum aw
46const PV_BOT_D121_MMIN: i64 = 210 // C. botulinum D at 121.1 C = 0.21 min
47const PV_BOT_Z_MILLI_C: i64 = 10000 // z-value = 10 C
48const PV_12D_TARGET_MREDUX: i64 = 12000 // 12 log reductions (botulinum cook)
49const PV_PASTEUR_TARGET_MREDUX: i64 = 5000 // 5 log (pasteurization pathogen target)
50const PV_BOT_MIN_F0_MMIN: i64 = 2520 // 12 x 0.21 = 2.52 min minimum process
54const PV_AW_UNSAFE: i64 = 0 // aw >= 0.85: pathogens can grow
55const PV_AW_MOLD_ONLY: i64 = 1 // 0.60 <= aw < 0.85: no pathogen, spoilage molds
56const PV_AW_SHELF: i64 = 2 // aw < 0.60: nothing grows
58const PV_STABLE_ACID: i64 = 0 // pH < 4.6 (high-acid)
59const PV_STABLE_DRY: i64 = 1 // aw < 0.60
60const PV_STABLE_LOW_AW: i64 = 2 // aw < 0.85 (no pathogen)
61const PV_STABLE_HURDLE: i64 = 3 // combined pH + aw hurdle (Leistner)
62const PV_UNSTABLE: i64 = 4 // needs refrigeration or a kill-step
64const PV_METHOD_WATER_BATH: i64 = 0
65const PV_METHOD_PRESSURE_CAN: i64 = 1
67const PV_CAN_OK: i64 = 0
68const PV_CAN_REFUSED_LOW_ACID_WB: i64 = 1 // low-acid via water bath = botulism
69const PV_CAN_REFUSED_BAD_METHOD: i64 = 2

functions

74func pv_pow10(k: i64) -> i64
called by 2: pv_d_at_z_stepsmain
88func pv_reductions_milli(hold_mmin: i64, d_mmin: i64) -> i64
called by 2: pv_is_12dmain
94func pv_is_12d(hold_mmin: i64, d_mmin: i64) -> i64
100func pv_min_process_mmin(d_mmin: i64, target_mredux: i64) -> i64
called by 1: main
107func pv_d_at_z_steps(d_ref_mmin: i64, k: i64) -> i64
called by 1: main calls 1: pv_pow10
115func pv_water_activity_class(aw_milli: i64) -> i64
called by 1: main
123func pv_shelf_stable(ph_milli: i64, aw_milli: i64) -> i64
138func pv_single_factor_stable(ph_milli: i64, aw_milli: i64) -> i64
145func pv_hurdle_beats_single(ph_milli: i64, aw_milli: i64) -> i64
156func pv_canning_method(ph_milli: i64) -> i64
called by 1: main
163func pv_canning_admit(ph_milli: i64, method: i64) -> i64
called by 1: main