<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SmartQHSE</title>
    <description>The latest articles on DEV Community by SmartQHSE (@smartqhse).</description>
    <link>https://dev.to/smartqhse</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3900229%2F3b8d7322-c793-4219-a931-84e4647eac78.png</url>
      <title>DEV Community: SmartQHSE</title>
      <link>https://dev.to/smartqhse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/smartqhse"/>
    <language>en</language>
    <item>
      <title>Building a heat stress calculator that actually follows ACGIH TLVs</title>
      <dc:creator>SmartQHSE</dc:creator>
      <pubDate>Mon, 27 Apr 2026 10:31:36 +0000</pubDate>
      <link>https://dev.to/smartqhse/building-a-heat-stress-calculator-that-actually-follows-acgih-tlvs-49gf</link>
      <guid>https://dev.to/smartqhse/building-a-heat-stress-calculator-that-actually-follows-acgih-tlvs-49gf</guid>
      <description>&lt;p&gt;When we built the WBGT heat stress calculator for &lt;code&gt;@smartqhse/hse-calculators&lt;/code&gt;, the first thing we learned is that most heat stress calculators on the internet are wrong. Not cosmetically wrong. Structurally wrong.&lt;/p&gt;

&lt;p&gt;Here's what they typically do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Wrong: uses temperature instead of WBGT&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;temp&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;38&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;danger&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's what ACGIH's TLV actually requires: a Wet Bulb Globe Temperature (WBGT) value, compared against a four-axis lookup table with dimensions of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Metabolic rate&lt;/strong&gt; — sedentary, light, moderate, heavy, very heavy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Acclimatisation status&lt;/strong&gt; — acclimatised vs unacclimatised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;WBGT value&lt;/strong&gt; — the output of the three-sensor reading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Work/rest ratio&lt;/strong&gt; — continuous work, 75/25, 50/50, 25/75&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The output isn't a binary safe/danger. It's a work-rest ratio recommendation that determines how much of each hour a worker can perform the given metabolic task.&lt;/p&gt;

&lt;h2&gt;
  
  
  How WBGT is calculated
&lt;/h2&gt;

&lt;p&gt;WBGT requires three measurements:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Twb&lt;/strong&gt; — natural wet bulb temperature (humidity)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tg&lt;/strong&gt; — black globe temperature (radiant heat)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tdb&lt;/strong&gt; — dry bulb temperature (air temperature)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Outdoor formula:&lt;/strong&gt; WBGT = 0.7 × Twb + 0.2 × Tg + 0.1 × Tdb&lt;br&gt;
&lt;strong&gt;Indoor formula:&lt;/strong&gt; WBGT = 0.7 × Twb + 0.3 × Tg&lt;/p&gt;

&lt;p&gt;The weighting of 0.7 on the wet bulb isn't arbitrary — it reflects that evaporative cooling (sweat) accounts for ~70% of the human body's heat dissipation capacity. When humidity is high, evaporative cooling fails, and WBGT rises even without temperature change.&lt;/p&gt;

&lt;h2&gt;
  
  
  The metabolic rate lookup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;METABOLIC_RATES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;sedentary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;65&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Sitting, light arm work&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;light&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;130&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Standing, moderate arm/hand work&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;moderate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Walking, carrying moderate loads&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;heavy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;260&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Digging, climbing, carrying heavy loads&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;veryHeavy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;400&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Shoveling wet sand, running with load&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The ACGIH TLV table maps (metabolic rate × acclimatisation status → WBGT ceiling per work/rest pattern). When the field WBGT exceeds the ceiling for the worker's task, you step down to the next work/rest ratio.&lt;/p&gt;

&lt;h2&gt;
  
  
  The full calculator function
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wbgtHeatStress&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@smartqhse/hse-calculators&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;wbgtHeatStress&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;tdb&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;          &lt;span class="c1"&gt;// dry bulb °C&lt;/span&gt;
  &lt;span class="na"&gt;tw&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// wet bulb °C&lt;/span&gt;
  &lt;span class="na"&gt;tg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;55&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;// globe temperature °C (sun-exposed steel surface)&lt;/span&gt;
  &lt;span class="na"&gt;workload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;heavy&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;acclimatised&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;outdoor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// result:&lt;/span&gt;
&lt;span class="c1"&gt;// {&lt;/span&gt;
&lt;span class="c1"&gt;//   wbgt: 33.6,&lt;/span&gt;
&lt;span class="c1"&gt;//   tlvCeiling: 28.0,          // ACGIH TLV for acclimatised/heavy&lt;/span&gt;
&lt;span class="c1"&gt;//   exceedance: 5.6,           // °C above TLV&lt;/span&gt;
&lt;span class="c1"&gt;//   recommendedWorkRest: '0/60', // complete cessation for this hour&lt;/span&gt;
&lt;span class="c1"&gt;//   risk: 'extreme',&lt;/span&gt;
&lt;span class="c1"&gt;//   acgihReference: 'ACGIH TLV-TWA 2024 Table 1',&lt;/span&gt;
&lt;span class="c1"&gt;// }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;tg: 55&lt;/code&gt; input is the realistic black globe temperature for steel decking in Dubai in July — not 42°C ambient. That 13°C difference is why site-measured WBGT consistently runs higher than "feels like" temperature apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  The edge cases that tripped us up
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Indoor vs outdoor formula.&lt;/strong&gt; Most implementations use the outdoor formula for everything. Indoor environments (e.g., a partially enclosed industrial building with a metal roof) don't have solar load, so the formula drops the 0.1 × Tdb term and redistributes to globe temperature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Acclimatisation flag.&lt;/strong&gt; The ACGIH table has separate columns for acclimatised and unacclimatised workers. For a new hire in their first week, the TLV ceiling is 3-5°C lower. Failing to account for this correctly overstates safe exposure time for the highest-risk population.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Very heavy metabolic rate.&lt;/strong&gt; Most tooling stops at "heavy." ACGIH's TLV table includes "very heavy" (shovelling wet sand, running with a load). For that category, ceiling values are lower still and complete cessation is required above ~26°C WBGT.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @smartqhse/hse-calculators
&lt;span class="c"&gt;# or&lt;/span&gt;
pip &lt;span class="nb"&gt;install &lt;/span&gt;smartqhse-hse-calculators
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Source: &lt;a href="https://github.com/SmartQHSE/hse-calculators" rel="noopener noreferrer"&gt;https://github.com/SmartQHSE/hse-calculators&lt;/a&gt;&lt;br&gt;
Embeddable widget: &lt;a href="https://tools.smartqhse.com/wbgt-calculator" rel="noopener noreferrer"&gt;https://tools.smartqhse.com/wbgt-calculator&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any corrections on the TLV table mapping — especially if you're an industrial hygienist who uses this daily — open an issue. The calculation is only as good as the lookup table.&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>opensource</category>
      <category>tooling</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
