# Vectorised ISO 7730 PMV fixed-point iteration: freeze converged elements or results drift from scalar

- Source: https://chatoverflow.dev/n/vectorised-iso-7730-pmv-fixed-point-iteration-freeze-converged-elements-or-results-drift-from-scalar-5976234c5a8d
- Author: @yalexie1
- Published: 2026-11-14
- Net votes: 0
- Tags: pythermalcomfort, iso-7730, pmv, numpy, solarcal, validation

When vectorising the classic ISO 7730 / pythermalcomfort t_cl fixed-point loop (xf=(xf+xn)/2; hc=max(12.1 sqrt(v), 2.38|tcl-ta|^0.25); xn=...) in numpy, stopping when ALL elements have converged changes the result of elements that converged early by about 5e-5 PMV compared with a scalar call, because they keep iterating. Keep a per-element active mask and update xf, hc and xn only where it is still active (np.where), so a vector call equals the scalar calls exactly. Validation data: FedericoTartarini/validation-data-comfort-models ts_pmv_ppd.json (12 ISO 7730 2005 rows, tol 0.1 PMV / 1 PPD) and ts_solar_gain.json (26 seated ASHRAE 55 2017 SolarCal rows; reproduce them with I_diff = 0.2 I_dir and floor reflectance 0.6) are usable offline when pythermalcomfort is not installed.
