wbgt-calculator
v0.1.0
Published
WBGT (NTP 1189 / UNE-EN ISO 7243:2017): WBGT, WBGTeff, WBGTref y utilidades.
Maintainers
Readme
wbgt-calculator
- Español: ver abajo “ES”.
- English: see below “EN”.
ES
Paquete npm para calcular el índice WBGT (Wet Bulb Globe Temperature) y utilidades asociadas, siguiendo la metodología descrita en la NTP 1189 (INSST, 2023) basada en la UNE-EN ISO 7243:2017.
Incluye:
- WBGT (interior/sin carga solar y exterior con carga solar)
- CAV (ajuste por vestimenta) y WBGTeff
- WBGTref (aclimatado / no aclimatado) en función de (M) (W)
- Promedios ponderados en el tiempo (con restricción (\le 60) min, como indica la NTP)
Instalación
npm i wbgt-calculatorUso rápido
import {
clothingAdjustmentCavC,
isHeatStressRisk,
wbgtC,
wbgtEffC,
wbgtRefC,
} from "wbgt-calculator";
// Interior (o exterior sin carga solar): WBGT = 0.7*thn + 0.3*tg
const wbgt = wbgtC({
environment: "indoors_or_no_solar_load",
thnC: 23,
tgC: 40,
});
// Ajuste por vestimenta (CAV, °C-WBGT)
const cav = clothingAdjustmentCavC("coverall_tyvek_polyolefin_single_layer", { hood: true }); // 2 + 1
const wbgtEff = wbgtEffC(wbgt, cav);
// Límite de referencia en función de metabolismo y aclimatación
const wbgtRef = wbgtRefC(180, "acclimatized");
const riesgo = isHeatStressRisk(wbgtEff, wbgtRef);
console.log({ wbgt, wbgtEff, wbgtRef, riesgo });Exterior con carga solar
import { wbgtC } from "wbgt-calculator";
// Exterior con carga solar: WBGT = 0.7*thn + 0.2*tg + 0.1*ta
const wbgt = wbgtC({
environment: "outdoors_with_solar_load",
thnC: 24,
tgC: 45,
taC: 32,
});Diferentes periodos (promedio ponderado)
Si en una “hora representativa” hay periodos con diferentes condiciones o actividad, puedes promediar WBGT y (M) en el tiempo.
import { timeWeightedAverage } from "wbgt-calculator";
const avg = timeWeightedAverage([
{ durationMinutes: 20, wbgtC: 28, metabolicRateW: 180 },
{ durationMinutes: 40, wbgtC: 30, metabolicRateW: 300 },
]);
console.log(avg.wbgtC, avg.metabolicRateW, avg.totalMinutes);API
wbgtC({ thnC, tgC, taC?, environment }): devuelve WBGT en °C.clothingAdjustmentCavC(preset, { hood? }): devuelve CAV en °C-WBGT según Tabla de la NTP.wbgtEffC(wbgt, cav): devuelve WBGTeff en °C.wbgtRefC(M, acclimatization): devuelve WBGTref en °C (M en W, válido 115..520).timeWeightedAverage(periods): promedio ponderado (minutos) de WBGT y M (exige total ≤ 60).isHeatStressRisk(wbgtEff, wbgtRef):truesi WBGTeff > WBGTref.
Referencias
- INSST (2023), NTP 1189: Evaluación del riesgo de estrés térmico: Índice WBGT.
- UNE-EN ISO 7243:2017, Ergonomía del ambiente térmico. Evaluación del estrés al calor utilizando el índice WBGT.
EN
npm package to compute the WBGT index (Wet Bulb Globe Temperature) and related utilities, following the methodology described in NTP 1189 (INSST, 2023) based on UNE-EN ISO 7243:2017.
Includes:
- WBGT (indoors/no solar load and outdoors with solar load)
- CAV (clothing adjustment) and WBGTeff
- WBGTref (acclimatized / not acclimatized) as a function of (M) (W)
- Time-weighted averages (with a (\le 60) min constraint, as stated in the NTP)
Installation
npm i wbgt-calculatorQuick start
import {
clothingAdjustmentCavC,
isHeatStressRisk,
wbgtC,
wbgtEffC,
wbgtRefC,
} from "wbgt-calculator";
// Indoors (or outdoors without solar load): WBGT = 0.7*thn + 0.3*tg
const wbgt = wbgtC({
environment: "indoors_or_no_solar_load",
thnC: 23,
tgC: 40,
});
// Clothing adjustment (CAV, °C-WBGT)
const cav = clothingAdjustmentCavC("coverall_tyvek_polyolefin_single_layer", { hood: true }); // 2 + 1
const wbgtEff = wbgtEffC(wbgt, cav);
// Reference limit based on metabolic rate and acclimatization
const wbgtRef = wbgtRefC(180, "acclimatized");
const risk = isHeatStressRisk(wbgtEff, wbgtRef);
console.log({ wbgt, wbgtEff, wbgtRef, risk });Outdoors with solar load
import { wbgtC } from "wbgt-calculator";
// Outdoors with solar load: WBGT = 0.7*thn + 0.2*tg + 0.1*ta
const wbgt = wbgtC({
environment: "outdoors_with_solar_load",
thnC: 24,
tgC: 45,
taC: 32,
});Multiple periods (time-weighted average)
If your “representative hour” includes periods with different conditions or activity, you can time-weight WBGT and (M).
import { timeWeightedAverage } from "wbgt-calculator";
const avg = timeWeightedAverage([
{ durationMinutes: 20, wbgtC: 28, metabolicRateW: 180 },
{ durationMinutes: 40, wbgtC: 30, metabolicRateW: 300 },
]);
console.log(avg.wbgtC, avg.metabolicRateW, avg.totalMinutes);API
wbgtC({ thnC, tgC, taC?, environment }): returns WBGT in °C.clothingAdjustmentCavC(preset, { hood? }): returns CAV in °C-WBGT (per the NTP table).wbgtEffC(wbgt, cav): returns WBGTeff in °C.wbgtRefC(M, acclimatization): returns WBGTref in °C (M in W, valid 115..520).timeWeightedAverage(periods): time-weighted average (minutes) of WBGT and M (requires total ≤ 60).isHeatStressRisk(wbgtEff, wbgtRef):trueif WBGTeff > WBGTref.
References
- INSST (2023), NTP 1189: Estimation of heat stress: WBGT index.
- UNE-EN ISO 7243:2017, Ergonomics of the thermal environment — Assessment of heat stress using the WBGT index.
