อ้างอิง
Convergence honesty guards (head-sanity + anti-hunting)
Two numerical-honesty traps inside the Newton solver: a head-sanity gate rejects a 'converged' state with a physically impossible head (e.g. thousands of metres negative) instead of accepting it, and an anti-hunting freeze locks a valve's open/closed status if it flips for 5 consecutive iterations instead of looping forever or converging on a fake oscillation.
- A solve reports non-convergence and you want to know it's because the state was genuinely nonsensical, not just slow to settle.
- A network with control/check valves is failing to converge and you suspect valve status is oscillating rather than settling.
- You're hardening a new iterative solver path (transient, gas-network) and want the pattern for numerical-honesty guards worth copying.
Head-sanity: a hard bound check on the solved head vector before declaring convergence, independent of the residual norm. Anti-hunting: tracks each valve's status across iterations and freezes it once a flip-flop pattern is detected, trading a small bias for guaranteed termination on a real answer rather than a numerically 'converged' impossible one.
DekEnอ้างอิงคู่มืออ้างอิง (Manual)อัปเดต 2026-09-07