HVACLogic Builds Fast TypeScript Solver for Colebrook-White Pipe Friction Equation
Engineers at HVACLogic developed a pure TypeScript solver for the Colebrook-White equation, which governs turbulent fluid friction in pipes and ventilation ducts. The equation is implicit — meaning it cannot be rearranged algebraically — so common workarounds like the Swamee-Jain or Haaland approximations are used, though these can introduce errors of up to 3.5%. To achieve exact results, the team applied Newton-Raphson iteration on a transformed variable, converting the problem into a standard root-finding task with a guaranteed convergence criterion of less than 1e-7. The solver runs entirely client-side in the browser with no external dependencies, completing each calculation in under 0.02 milliseconds. The implementation also handles laminar flow separately using the analytical Hagen-Poiseuille formula, making it suitable for a wide range of real-world engineering scenarios.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in