Physics update
This commit is contained in:
fraxle
2026-06-01 14:47:17 +01:00
parent ad889d938b
commit 6734422673
+6 -1
View File
@@ -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;