nx_preservation.nx
buildroot/runtime/nx_preservation.nx
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
imports: nx_syscalls.nx
imported by: nx_haccp.nxnx_haccp_test.nxnx_preservation_test.nx
structs
| none |
consts
| 40 | const PV_BOTULINUM_PH_MILLI: i64 = 4600 // FDA acidified-foods line |
| 41 | const PV_HURDLE_PH_MILLI: i64 = 5000 // upper pH for a hurdle-stable food |
| 42 | const PV_AW_NO_GROWTH_MILLI: i64 = 600 // below this: NO microbial growth |
| 43 | const PV_AW_NO_PATHOGEN_MILLI: i64 = 850 // below this: no pathogen (FDA non-TCS) |
| 44 | const PV_AW_HURDLE_MILLI: i64 = 910 // upper aw for a hurdle-stable food |
| 45 | const PV_AW_BOTULINUM_MILLI: i64 = 930 // C. botulinum minimum aw |
| 46 | const PV_BOT_D121_MMIN: i64 = 210 // C. botulinum D at 121.1 C = 0.21 min |
| 47 | const PV_BOT_Z_MILLI_C: i64 = 10000 // z-value = 10 C |
| 48 | const PV_12D_TARGET_MREDUX: i64 = 12000 // 12 log reductions (botulinum cook) |
| 49 | const PV_PASTEUR_TARGET_MREDUX: i64 = 5000 // 5 log (pasteurization pathogen target) |
| 50 | const PV_BOT_MIN_F0_MMIN: i64 = 2520 // 12 x 0.21 = 2.52 min minimum process |
| 54 | const PV_AW_UNSAFE: i64 = 0 // aw >= 0.85: pathogens can grow |
| 55 | const PV_AW_MOLD_ONLY: i64 = 1 // 0.60 <= aw < 0.85: no pathogen, spoilage molds |
| 56 | const PV_AW_SHELF: i64 = 2 // aw < 0.60: nothing grows |
| 58 | const PV_STABLE_ACID: i64 = 0 // pH < 4.6 (high-acid) |
| 59 | const PV_STABLE_DRY: i64 = 1 // aw < 0.60 |
| 60 | const PV_STABLE_LOW_AW: i64 = 2 // aw < 0.85 (no pathogen) |
| 61 | const PV_STABLE_HURDLE: i64 = 3 // combined pH + aw hurdle (Leistner) |
| 62 | const PV_UNSTABLE: i64 = 4 // needs refrigeration or a kill-step |
| 64 | const PV_METHOD_WATER_BATH: i64 = 0 |
| 65 | const PV_METHOD_PRESSURE_CAN: i64 = 1 |
| 67 | const PV_CAN_OK: i64 = 0 |
| 68 | const PV_CAN_REFUSED_LOW_ACID_WB: i64 = 1 // low-acid via water bath = botulism |
| 69 | const PV_CAN_REFUSED_BAD_METHOD: i64 = 2 |
functions
| 74 | func pv_pow10(k: i64) -> i64 |
| 88 | func pv_reductions_milli(hold_mmin: i64, d_mmin: i64) -> i64 |
| 94 | func pv_is_12d(hold_mmin: i64, d_mmin: i64) -> i64 |
| 100 | func pv_min_process_mmin(d_mmin: i64, target_mredux: i64) -> i64 called by 1: main |
| 107 | func pv_d_at_z_steps(d_ref_mmin: i64, k: i64) -> i64 |
| 115 | func pv_water_activity_class(aw_milli: i64) -> i64 called by 1: main |
| 123 | func pv_shelf_stable(ph_milli: i64, aw_milli: i64) -> i64 |
| 138 | func pv_single_factor_stable(ph_milli: i64, aw_milli: i64) -> i64 |
| 145 | func pv_hurdle_beats_single(ph_milli: i64, aw_milli: i64) -> i64 |
| 156 | func pv_canning_method(ph_milli: i64) -> i64 called by 1: main |
| 163 | func pv_canning_admit(ph_milli: i64, method: i64) -> i64 called by 1: main |