cooling_project / reports /optimized_physics_baseline.md
MstJeon410's picture
Claude Opus 5.5
Upload cooling_project
b7d2b70 verified
|
Raw History Blame Contribute Delete
6.86 kB
# Stage 6: the physics baseline
**Implementation:** `tools/model.py`, a numpy reference implementation; the JAX graph is not built yet.
**Constants:** `artifacts/model/baseline_constants.json`.
**Call:**
```
predict(X, families=None) -> peak (n,), profile (n, 30), dp (n,)
```
The exam's mesh family (graded-hotspot-v1, r = 2√2) is the default.
## Components (one consistent model)
All components share the reference's own assumptions:
- laminar flow;
- plug inlet, so both the velocity and the thermal layers develop from x = 0;
- PG25 μ, ρ, κ evaluated locally from temperature; cp held at the inlet value;
- copper k = 391 W/(m·K);
- adiabatic solid ends;
- one periodic half-channel and half-fin cell;
- the reference's read-off.
No two components carry conflicting assumptions.
| Part | Formula | Fitted constants | Basis |
|---|---|---|---|
| Solid conduction | Conjugate half-cell network (`network2.py`), per axial station: 4 base layers, base-surface node, 12 fin nodes, lid, bulk; 90 axial stations; axial conduction in every solid row | 0 | the reference's geometry; converged (4→24 layers < 0.01 K, 12→32 fin nodes ≈ 0.04 K, 90→360 stations ≤ 0.04 K) |
| Fin root and fin top junction | Exact Fourier constriction resistance R_c = 4/(p c² k) Σ sin²(k_m w_c/2) coth(k_m t)/k_m³ | 0 | uniform-flux strip on the slab; replaces the layer-dependent junction |
| Convection, flux history | Duhamel superposition of the uniform-flux thermal-entrance step response | 0 | linear energy equation; the reference's q(x) varies strongly along x |
| Step response Nu(x*) | ((f_fd Nu_H1(α))ⁿ + (C Λ_w(α)^β F(x⁺) x*^(−1/3))ⁿ)^(1/n), smooth Churchill–Usagi blend | C 1.2517, n 3.970, f_fd 0.9173, β 1.3266 | Lévêque asymptote with the duct's own per-wall Lévêque factor Λ_w(α) from its velocity field (`leveque.py`); fully developed H1 limit |
| Plug-inlet shear | F = (1 + (a/(fRe √x⁺))²)^(1/6) | a 1.290 | developing wall shear, Nu ∝ τ_w^(1/3) |
| Property correction | (μ_b/μ_w)^s at the local wall temperature | s 0.1586 | Sieder–Tate type |
| Read-off | Face temperature of the bottom base layer + q·z/k_s; 30 segment means; peak = max face; die peak by Carbon's `die_peak_c` | 0 | the reference's definitions |
| Δp: developed friction | a · c_mesh(α, r) · fRe_exact(α) · ∫ 2 μ_b (μ_w/μ_b)^m u / D_h² dx | m 0.54, a 1.0006 | exact duct series; c_mesh = the solver's own discrete friction on its blockMesh cross-section; μ at the network's bulk and area-mean wall temperatures |
| Δp: developing-flow increment | b · K_shah(x⁺) · ρ_in u_in²/2, K = 4x⁺ (√((3.44/√x⁺)² + fRe²) − fRe) | b 0.8294 | Muzychka–Yovanovich plug-inlet apparent friction |
- **9 fitted constants in total:**
- The 6 thermal constants were fitted to TRAIN profiles and peaks by 2-fold CV and averaged over the folds.
- The 3 hydraulic constants were fitted to TRAIN Δp; the 10-fold CV p90 is 0.69 %.
- **Tables:**
- Λ, Λ_side and Λ_end at 21 aspects, from the duct's own velocity field.
- c_mesh at 73 aspects per mesh family.
- Both are computed from physics, not from TRAIN.
**Smooth blending, no switches.** Three places could have needed a regime switch; each is a smooth function instead:
- Fully developed versus Lévêque convection: Churchill–Usagi blend, n ≈ 4.
- Developing versus developed shear: the F factor.
- Entrance increment versus long duct: K_shah(x⁺) tends smoothly to its long-duct limit.
The location of the peak needs no switch: it follows from the predicted profile.
## Accuracy (from `formula_benchmark.md`, TRAIN out-of-fold)
| | Selected baseline | Carbon closed form |
|---|---|---|
| Die peak p90 | **0.155 °C (4.2 U)** | 3.075 °C (83 U) |
| Die peak max | 0.65 °C | 7.48 °C |
| Worst underprediction | −0.38 °C | −5.74 °C |
| Profile RMSE | 0.128 °C | 1.961 °C |
| Δp p90 | **0.69 % (0.23 U)** | 5.57 % (1.86 U) |
| Hydraulic power max error | 0.0061 W | 0.072 W |
| Verify (6, out of box) die | −0.09 … +0.19 °C | −1.34 … +1.73 °C |
| Verify (6, out of box) Δp | −1.5 … −0.2 % | −2.9 … +2.5 % |
| Near-limit false feasible / infeasible (die; hyd.) | 0 / 1; 0 / 0 | 10 / 10; 5 / 0 |
With the assumed U, in-range p90 is 4.2 U for die (gate 35 U) and 0.23 U for hydraulic (gate 1.0 U).
## Required properties
| Requirement | Result | Evidence |
|---|---|---|
| Finite outputs | 300/300 draws in the box widened by 20 % (σ down to 1.2 mm, ratio up to 3.4) | `tools/stress.py`, `artifacts/logs/stress_frozen.log` |
| Positive pressure drop | 300/300; Δp 222–81,876 Pa | same |
| Temperature laws (min profile > inlet; peak ≥ max profile) | 300/300 | same |
| Sign gates on Carbon's mean-slope criterion | 6/6 PASS: rise vs flow −0.29, load +0.66, ratio +0.32; Δp vs flow +1.25, width −2.17, depth −1.17 | same |
| Pointwise sign exceptions | rise vs ratio 69/300 (an upstream hotspot with the peak at the outlet: raising the ratio at fixed load lowers the background flux); Δp vs width 16/300 (channel-count steps) | these are the reference's own physics; Carbon's gate is the mean slope |
| Input boundaries | no clipping is needed; the formulas stay valid in the widened box (laminar, positive conductances) | same |
| Efficiency | 27 ms per row in numpy (458 rows in 12.5 s, one core group) | `stress_frozen.log` |
| Extrapolation | verify (0.01–0.08 of a span outside the box) is within +0.19 °C and −1.5 %; widened-box draws are finite and monotone | above |
## Correction made in this stage
The default hydraulic constants in `tools/model.py` held b = 0.88 from an earlier fit. The frozen values in `baseline_constants.json` are a = 1.0006 and b = 0.8294.
- All Δp numbers reported in Stages 1–2 were computed with the frozen values, so they stand.
- The default is now set to the frozen values. The stress test was rerun with them and all gates still pass.
## Not done yet
- **JAX graph: done as a feasibility prototype** (`jax_feasibility.md`).
- The port is exact to 2e-10 K.
- It is admitted under Cooling 1.8's v8 allowlist, at 17,368 B of the 32 KiB recipe budget.
- It builds through Carbon's own 1.8 trainer (1 step at learning rate 0) with predictions unchanged.
- It runs at 41 ms per design against the 2.84 s speed-gate ceiling.
- Not submitted.
- **Independent validation on fresh solves** (Stage 4).
- **The systematic residuals found in Stage 7:**
- The die-peak error follows hotspot intensity and the solid fraction: up to +0.11 °C for wide fins under intense hotspots.
- The Δp error follows the thermal state.
- The +0.09 °C raw bias on the exam-mesh rows is mostly that same population effect; at most ≈ +0.02 °C is a genuine mesh offset.
Physics fixes (P1–P3) are proposed in `residual_analysis.md`; none is applied.