Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

Solving the Implicit Colebrook‑White Equation in TypeScript via Newton‑Raphson Iterations

Описание и применение

Решение неявного уравнения Колбека‑Уайта в TypeScript с помощью метода Ньютона‑Рафсона обеспечивает точные расчёты коэффициента трения в трубопроводах без приближений, выполняясь менее чем за 0.02 мс.

Задача

Explicit friction‑factor approximations introduce systematic errors up to 3.5 % in turbulent pipe flow calculations, while the exact Colebrook‑White equation is implicit and non‑linear.

Результат

The implementation achieves deterministic, sub‑millisecond performance, eliminating approximation errors and enabling accurate client‑side friction‑loss calculations.

Рабочий процесс

  • Define FluidFlowParams (Re, roughness, diameter, optional maxIterations, tolerance).
  • If Re ≤ 2000, return Hagen‑Poiseuille laminar solution.
  • Compute relative roughness and initial estimate using Haaland explicit formula.
  • Iteratively apply Newton‑Raphson: compute F(x) and its derivative, update x, check convergence or safeguard against non‑positive log arguments.
  • After convergence, recover f = 1/x² and clamp to physical bounds.
  • Return f.

Доказательства

The Newton‑Raphson iterative update step is: x(n+1) = x(n) – (F(x(n))/F'(x(n)))

Источник

The solver executes in under 0.02 ms in modern browser engines.

Источник

  • Дата записи: 2026-09-07T18:52:45.511Z