nx_heat_transfer.nx source
↩ module page · 61 lines · 2729 B
1// nx_heat_transfer.nx -- FOOD-SCIENCE SUITE / HEAT-TRANSFER PHYSICS rung.
2// The transport physics behind thermal processing: conduction (Fourier),
3// and the two dimensionless numbers that decide a retort process --
4// Biot Bi = h*Lc/k : Bi < 0.1 -> the food heats uniformly (lumped);
5// Bi > 0.1 -> internal gradients, a COLD SPOT lags.
6// Fourier Fo = alpha*t/Lc^2 : dimensionless heat-penetration time.
7// These are exactly what says whether a can has a cold spot and how long
8// heat takes to reach it -- the tie between the vessel/retort work and the
9// preservation 12-D cook.
10//
11// INTEGER-EXACT. h in W/m^2.K; Lc (characteristic length) in mm; k as
12// deci-W/m.K (x10, so water 0.6 = 6); thermal diffusivity alpha in
13// centi-mm^2/s (x100, so food 0.14 = 14); results x1000 (milli).
14//
15// THE exceed: the cold-spot verdict (Biot) and penetration time (Fourier)
16// are COMPUTED, not assumed -- a retort chart cannot tell you whether your
17// pack even has a lumped or gradient thermal response.
18//
19// grounded: fourier_law_conduction + biot_number + fourier_number
20// genealogy_id: heat_transfer_physics + nishi_food_science_suite
21
22import "nx_syscalls.nx"
23
24const HT_LUMPED_BIOT_MILLI: i64 = 100 // Bi < 0.1 -> lumped-capacitance
25
26// Conduction heat FLUX (W/m^2) = k * dT / L (Fourier's law, 1-D).
27// k as deci-W/m.K, L in mm: flux = (k/10) * dT / (L/1000) = k*dT*100/L.
28func ht_conduction_flux_wm2(k_dwmk: i64, dt_c: i64, l_mm: i64) -> i64 {
29 if l_mm <= 0 { return 0 }
30 return k_dwmk * dt_c * 100 / l_mm
31}
32
33// Biot number x1000. Bi = h*Lc/k; with Lc in mm and k as deci-W/m.K:
34// Bi = h*(Lc/1000)/(k_dwmk/10) = h*Lc*10/k_dwmk; x1000 -> h*Lc*10000/k... but
35// we return Bi x1000, so milliBi = h*Lc*10/k_dwmk * 1000 / 1000 ... keep it
36// simple and exact: milliBi = h * Lc_mm * 10 / k_dwmk.
37func ht_biot_milli(h_wm2k: i64, lc_mm: i64, k_dwmk: i64) -> i64 {
38 if k_dwmk <= 0 { return 0 }
39 return h_wm2k * lc_mm * 10 / k_dwmk
40}
41
42// Lumped-capacitance valid iff Bi < 0.1 (no significant internal gradient).
43func ht_is_lumped(biot_milli: i64) -> i64 {
44 if biot_milli < HT_LUMPED_BIOT_MILLI { return 1 }
45 return 0
46}
47
48// Fourier number x1000. Fo = alpha*t/Lc^2; alpha as centi-mm^2/s, t in s,
49// Lc in mm: Fo = (alpha/100)*t/Lc^2; x1000 -> alpha*t*10/Lc^2.
50func ht_fourier_milli(alpha_cmm2s: i64, t_s: i64, lc_mm: i64) -> i64 {
51 let d: i64 = lc_mm * lc_mm
52 if d <= 0 { return 0 }
53 return alpha_cmm2s * t_s * 10 / d
54}
55
56// Heat penetration is "substantially complete" once Fo >= ~0.2 (the center
57// has felt the surface change) -- a rule-of-thumb come-up check.
58func ht_penetrated(fourier_milli: i64) -> i64 {
59 if fourier_milli >= 200 { return 1 }
60 return 0
61}