From 6734422673b832e2ca4d52afae77c5f4283d6e42 Mon Sep 17 00:00:00 2001 From: fraxle Date: Mon, 1 Jun 2026 14:47:17 +0100 Subject: [PATCH] 2.1.1 Physics update --- assets/js/physics.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/js/physics.js b/assets/js/physics.js index 8a01f69..363efc6 100644 --- a/assets/js/physics.js +++ b/assets/js/physics.js @@ -630,7 +630,12 @@ export function calcTmrt(Ta, dirRad, diffRad, globalRad, solElev) { // ------------------------------------------------------------------- export function utciApprox(Ta, Tmrt, va10, ehPa) { const va = Math.max(0.5, Math.min(17, va10)); - const D_Tmrt = Tmrt - Ta; + // Clamp Tmrt-Ta to the polynomial's validated domain. The UTCI fit is only + // valid for a mean-radiant offset of -30..+70 -C; on hot urban/concrete + // profiles the modelled Tmrt can exceed Ta by more than +70-, where the + // polynomial extrapolates and loses accuracy. Clamping keeps the felt + // temperature inside the range the coefficients were derived for. + const D_Tmrt = Math.max(-30, Math.min(70, Tmrt - Ta)); const Pa = ehPa / 10; const T = Ta, V = va, D = D_Tmrt, P = Pa; const T2=T*T, T3=T2*T, T4=T3*T, T5=T4*T, T6=T5*T;