0.1.5
docs | |
---|---|
build | |
tests | |
page deployment | |
snyk security | |
license | |
npm version |
Package to calculate thermophysiological, thermal comfort, thermal stress indices, in JavaScript.
Please cite us if you use this package: Tartarini, F., Schiavon, S., 2020. pythermalcomfort: A Python package for thermal comfort research. SoftwareX 12, 100578. https://doi.org/10.1016/j.softx.2020.100578
npm install jsthermalcomfort
If you want to use jsthermalcomfort package without installing it on your local machine, you can import with:
https://cdn.jsdelivr.net/gh/FedericoTartarini/jsthermalcomfort/lib/esm/
Example:
import { models, utilities, pschymetrics } from "https://cdn.jsdelivr.net/gh/FedericoTartarini/jsthermalcomfort/lib/esm/index.js"
You can also import it in the website directly, and caution that you need to mark the script as module:
<script type="module">
import { models, utilities, pschymetrics } from "https://cdn.jsdelivr.net/gh/FedericoTartarini/jsthermalcomfort/lib/esm/index.js"
</script>
We developed a few examples files on how to use some of the functions.
Here is a list of examples running in the browser:
Calculates the Heat Index (HI). It combines air temperature and relative humidity to determine an apparent temperature. The HI equation [12] is derived by multiple regression analysis in temperature and relative humidity from the first version of Steadman’s (1979) apparent temperature (AT) [13].
(number)
Relative humidity, [%].
(Object?
= {round:true,units:"SI"}
)
(Optional) Other parameters.
Name | Description |
---|---|
options.round boolean
(default true )
|
If True rounds output value, if False it does not round it. |
options.units (
(default "SI" )
|
Select the SI (International System of Units) or the IP (Imperial Units) system. |
number
:
Heat Index, default in [°C] in [°F] if
units
= 'IP'.
const hi = heat_index(25, 50); // returns 25.9
Calculates the Predicted Heat Strain (PHS) index based in compliace with the ISO 7933:2004 Standard [8]. The ISO 7933 provides a method for the analytical evaluation and interpretation of the thermal stress experienced by a subject in a hot environment. It describes a method for predicting the sweat rate and the internal core temperature that the human body will develop in response to the working conditions.
The PHS model can be used to predict the: heat by respiratory convection, heat flow by respiratory evaporation, steady state mean skin temperature, instantaneous value of skin temperature, heat accumulation associated with the metabolic rate, maximum evaporative heat flow at the skin surface, predicted sweat rate, predicted evaporative heat flow, and rectal temperature.
1
| 2
| 3
), wme: number, kwargs: PhsKwargs?): PhsReturnType(number)
dry bulb air temperature, default in [°C]
(number)
mean radiant temperature, default in [°C]
(number)
air speed, default in [m/s]
(number)
relative humidity, [%]
(number)
metabolic rate, [W/(m2)]
(number)
clothing insulation, [clo]
((1
| 2
| 3
))
a numeric value presenting posture of person [sitting=1, standing=2, crouching=3]
(number
= 0
)
external work, [W/(m2)] default 0
(PhsKwargs?
= {}
)
additional arguments
PhsReturnType
:
object with results of phs
Type: Object
(number?)
: static moisture permeability index, [dimensionless]
(number?)
: fraction of the body surface covered by the reflective clothing, [dimensionless]
((0
| 1
)?)
: 1 if workers can drink freely, 0 otherwise
(number?)
: body weight, [kg]
(number?)
: height, [m]
(number?)
: walking speed, [m/s]
(number?)
: angle between walking direction and wind direction [degrees]
(number?)
: 100 if acclimatized subject, 0 otherwise
(number?)
: duration of the work sequence, [minutes]
(number?)
: emissivity of the reflective clothing, [dimensionless]
(number?)
: mean skin temperature when worker starts working, [°C]
(number?)
: mean core temperature when worker starts working, [°C]
(number?)
: mean rectal temperature when worker starts working, [°C]
(number?)
: mean core temperature as a function of met when worker starts working, [°C]
(number?)
: sweat rate
(boolean?)
: round the result of the PHS model
Type: Object
(number)
: rectal temperature, [°C]
(number)
: skin temperature, [°C]
(number)
: core temperature, [°C]
(number)
: core temperature as a function of the metabolic rate, [°C]
(number)
: fraction of the body mass at the skin temperature
(number)
: maximum allowable exposure time for water loss, mean subject, [minutes]
(number)
: maximum allowable exposure time for water loss, 95% of the working population, [minutes]
(number)
: maximum allowable exposure time for heat storage, [minutes]
(number)
: maximum water loss in watts, [W]
(number)
: maximum water loss, [g]
import { phs } from "jsthermalcomfort";
const results = phs(40, 40, 33.85, 0.3, 150, 0.5, 2);
console.log(results); // {t_re: 37.5, d_lim_loss_50: 440, d_lim_loss_95: 298, d_lim_t_re: 480, water_loss: 6166.0}
Calculates the humidex (short for "humidity index"). It has been developed by the Canadian Meteorological service. It was introduced in 1965 and then it was revised by Masterson and Richardson (1979) [14]. It aims to describe how hot, humid weather is felt by the average person. The Humidex differs from the heat index in being related to the dew point rather than relative humidity [15].
HumidexResult
:
the result given the provided temperature and
relative humidity.
Type: object
const result = humidex(25, 50);
console.log(result); // -> { humidex: 28.2, discomfort: "Little or no discomfort" }
Calculates the Normal Effective Temperature (NET). Missenard (1933) devised a formula for calculating effective temperature. The index establishes a link between the same condition of the organism's thermoregulatory capability (warm and cold perception) and the surrounding environment's temperature and humidity. The index is calculated as a function of three meteorological factors: air temperature, relative humidity of air, and wind speed. This index allows to calculate the effective temperature felt by a person. Missenard original equation was then used to calculate the Normal Effective Temperature (NET), by considering normal atmospheric pressure and a normal human body temperature (37°C). The NET is still in use in Germany, where medical check-ups for subjects working in the heat are decided on by prevailing levels of ET, depending on metabolic rates. The NET is also constantly monitored by the Hong Kong Observatory [16]. In central Europe the following thresholds are in use: <1°C = very cold; 1–9 = cold; 9–17 = cool; 17–21 = fresh; 21–23 = comfortable; 23–27 = warm; >27°C = hot [1].
(number)
dry bulb air temperature, [°C]
(number)
relative humidity, [%]
(number)
wind speed [m/s] at 1.2 m above the ground
number
:
Normal Effective Temperature, [°C]
const result = net(37, 100, 0.1);
console.log(result); // -> 37
Calculates the Wet Bulb Globe Temperature (WBGT) index calculated in
compliance with the ISO 7243 [11]. The WBGT is a heat stress index that
measures the thermal environment to which a person is exposed. In most
situations, this index is simple to calculate. It should be used as a
screening tool to determine whether heat stress is present. The PHS model
allows a more accurate estimation of stress. PHS can be calculated using
the function jsthermalcomfort.models.phs
.
The WBGT determines the impact of heat on a person throughout the course of a working day (up to 8 h). It does not apply to very brief heat exposures. It pertains to the evaluation of male and female people who are fit for work in both indoor and outdoor occupational environments, as well as other sorts of surroundings [11].
The WBGT is defined as a function of only twb and tg if the person is not exposed to direct radiant heat from the sun. When a person is exposed to direct radiant heat, tdb must also be specified.
(number)
natural (no forced air flow) wet bulb temperature, [°C]
(number)
globe temperature, [°C]
(object?)
configuration options for the function.
Name | Description |
---|---|
options.round boolean
(default true )
|
If true rounds output value. If false it does not round it. |
options.tdb number
(default undefined )
|
Dry bulb air temperature, [°C]. This value is needed as input if the person is exposed to direct solar radiation. |
options.with_solar_load boolean
(default false )
|
If the globe sensor is
exposed to direct solar radiation. If this is set to true without also
setting
options.tdb
then an error will be thrown.
|
number
:
Wet Bulb Globe Temperature Index, [°C]
const result = wbgt(25, 32);
console.log(result); // -> 27.1
const result = wbgt(25, 32, { tdb: 20, with_solar_radiation: true });
console.log(result); // -> 25.9
Calculates the Discomfort Index (DI). The index is essentially an effective temperature based on air temperature and humidity. The discomfort index is usuallly divided in 6 dicomfort categories and it only applies to warm environments. [24]
DiscomfortIndexReturnType
:
object with results of DI
Type: Object
const DI = discomfort_index(25, 50); // returns { di: 22.1, discomfort_condition: 'Less than 50% feels discomfort' }
Calculates the Discomfort Index (DI). The index is essentially an effective temperature based on air temperature and humidity. The discomfort index is usuallly divided in 6 dicomfort categories and it only applies to warm environments. [24]
DiscomfortIndexArrayReturnType
:
object with results of DI
Two-node model of human temperature regulation Gagge et al. (1986).
[10] This model can be used to calculate a variety of indices, including:
"standing"
| "sitting"
), max_skin_blood_flow: number, kwargs: TwoNodesKwargs?): TwoNodesReturnType(number)
Mean radiant temperature, default in [°C]
(number)
Air speed, default in [m/s]
(number)
Relative humidity, [%].
(number)
Metabolic rate, [W/(m2)]
(number)
Clothing insulation, [clo]
(number
= 0
)
External work, [W/(m2)] default 0
(number
= 1.8258
)
Body surface area, default value 1.8258 [m2] in [ft2] if units = ‘IP’
(number
= 101325
)
Atmospheric pressure, default value 101325 [Pa] in [atm] if units = ‘IP’
(("standing"
| "sitting"
)
= "standing"
)
Select either “sitting” or “standing”
(number
= 90
)
Maximum blood flow from the core to the skin, [kg/h/m2] default 90
(TwoNodesKwargs?
= {}
)
TwoNodesReturnType
:
object with results of two_nodes
Type: Object
(boolean?)
: round the result of two nodes model
(boolean?)
: select if SET is used to calculate Cooling Effect
(number?)
: maximum rate at which regulatory sweat is generated, [kg/h/m2]
(number?)
: – maximum skin wettedness (w) adimensional. Ranges from 0 and 1
Type: Object
(number)
: – Total rate of evaporative heat loss from skin, [W/m2]. Equal to e_rsw + e_diff
(number)
: – Rate of evaporative heat loss from sweat evaporation, [W/m2]
(number)
: – Maximum rate of evaporative heat loss from skin, [W/m2]
(number)
: – Sensible heat loss from skin, [W/m2]
(number)
: – Total rate of heat loss from skin, [W/m2]. Equal to q_sensible + e_skin
(number)
: – Total rate of heat loss through respiration, [W/m2]
(number)
: – Core temperature, [°C]
(number)
: – Skin temperature, [°C]
(number)
: – Skin blood flow, [kg/h/m2]
(number)
: – Rate at which regulatory sweat is generated, [kg/h/m2]
(number)
: – Skin wettedness, adimensional. Ranges from 0 and 1.
(number)
: – Skin wettedness (w) practical upper limit, adimensional. Ranges from 0 and 1.
(number)
: – Standard Effective Temperature (SET)
(number)
: – New Effective Temperature (ET)
(number)
: – PMV Gagge
(number)
: – PMV SET
(number)
: – Thermal discomfort
(number)
: – Predicted Thermal Sensation
const results = two_nodes(25, 25, 0.3, 50, 1.2, 0.5);
console.log(results); // {
e_skin: 16.2,
e_rsw: 7,
e_max: 159.9,
q_sensible: 47.6,
q_skin: 63.8,
q_res: 5.2,
t_core: 36.9,
t_skin: 33.7,
m_bl: 12.9,
m_rsw: 10.3,
w: 0.1,
w_max: 0.6,
set: 23.6,
et: 25,
pmv_gagge: 0.1,
pmv_set: -0,
disc: 0.1,
t_sens: 0.1
}
Two nodes model of human temperature regulation Gagge et al. when the input parameters are arrays.
[10] This model can be used to calculate a variety of indices, including:
"standing"
| "sitting"
), maxSkinBloodFlowArray: Array<number>, kwargs: TwoNodesKwargs?): TwoNodesArrayReturnType(("standing"
| "sitting"
))
Select either “sitting” or “standing”
(TwoNodesKwargs?
= {}
)
TwoNodesArrayReturnType
:
object with results of two_nodes_array
Type: Object
(Array<number>)
: – Array of total rate of evaporative heat loss from skin, [W/m2]. Equal to e_rsw + e_diff
(Array<number>)
: – Array of total rate of heat loss from skin, [W/m2]. Equal to q_sensible + e_skin
const results = two_nodes_array([25,30], [25,35], [0.3,0.5], [50,60], [1.2,1.5], [0.5, 0.3], [0,0], [1.8258,1.8258], [101325,101325], ["standing","standing"], [90,90])
console.log(results); // {
e_skin: [ 16.2, 60.4 ],
e_rsw: [ 7, 51.9 ],
e_max: [ 159.9, 193.8 ],
q_sensible: [ 47.6, 21.1 ],
q_skin: [ 63.8, 81.5 ],
q_res: [ 5.2, 5 ],
t_core: [ 36.9, 37 ],
t_skin: [ 33.7, 35.1 ],
m_bl: [ 12.9, 31.6 ],
m_rsw: [ 10.3, 76.3 ],
w: [ 0.1, 0.3 ],
w_max: [ 0.6, 0.6 ],
set: [ 23.6, 29.3 ],
et: [ 25, 32.5 ],
pmv_gagge: [ 0.1, 1.6 ],
pmv_set: [ -0, 1.1 ],
disc: [ 0.1, 1.9 ],
t_sens: [ 0.1, 1.4 ]
}
Calculates the Standard Effective Temperature (SET). The SET is the temperature of a hypothetical isothermal environment at 50% (rh), <0.1 m/s (20 fpm) average air speed (v), and tr = tdb, in which the total heat loss from the skin of an imaginary occupant wearing clothing, standardized for the activity concerned is the same as that from a person in the actual environment with actual clothing and activity level [10].
"standing"
| "sitting"
), units: ("SI"
| "IP"
), limit_inputs: boolean, kwargs: SetTmpKwargs?): number(number)
Mean radiant temperature, default in [°C]
(number)
Air speed, default in [m/s]
(number)
Relative humidity, [%].
(number)
Metabolic rate, [W/(m2)]
(number)
Clothing insulation, [clo]
(number
= 0
)
External work, [W/(m2)] default 0
(number?)
Body surface area, default value 1.8258 [m2] in [ft2] if units = ‘IP’
(number?)
Atmospheric pressure, default value 101325 [Pa] in [atm] if units = ‘IP’
(("standing"
| "sitting"
)
= "standing"
)
Select either “sitting” or “standing”
(("SI"
| "IP"
)
= "SI"
)
Select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the following limits the function returns nan. If False returns values regardless of the input values.
(SetTmpKwargs?
= {}
)
number
:
SET – Standard effective temperature in array, [°C]
Type: Object
const set = set_tmp(25, 25, 0.1, 50, 1.2, 0.5); // returns 24.3
Calculates the SET when the input parameters are arrays. The SET is the temperature of a hypothetical isothermal environment at 50% (rh), <0.1 m/s (20 fpm) average air speed (v), and tr = tdb, in which the total heat loss from the skin of an imaginary occupant wearing clothing, standardized for the activity concerned is the same as that from a person in the actual environment with actual clothing and activity level [10].
"standing"
| "sitting"
), units: ("SI"
| "IP"
), limit_inputs: boolean, kwargs: SetTmpKwargs?): Array<number>(("standing"
| "sitting"
))
Select either “sitting” or “standing”
(("SI"
| "IP"
)
= "SI"
)
Select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the following limits the function returns nan. If False returns values regardless of the input values.
(SetTmpKwargs?
= {}
)
Array<number>
:
SET Array – Standard effective temperature in array, [°C]
const set = set_tmp_array([25, 25], [25, 25], [0.1, 0.1], [50, 50], [1.2, 1.2], [0.5, 0.5]); // returns [24.3, 24.3]
Calculates the Wind Chill Index (WCI) in accordance with the ASHRAE 2017 Handbook Fundamentals - Chapter 9 [18].
The wind chill index (WCI) is an empirical index based on cooling measurements taken on a cylindrical flask partially filled with water in Antarctica (Siple and Passel 1945). For a surface temperature of 33°C, the index describes the rate of heat loss from the cylinder via radiation and convection as a function of ambient temperature and wind velocity.
This formulation has been met with some valid criticism. WCI is unlikely to be an accurate measure of heat loss from exposed flesh, which differs from plastic in terms of curvature, roughness, and radiation exchange qualities, and is always below 33°C in a cold environment. Furthermore, the equation’s values peak at 90 km/h and then decline as velocity increases. Nonetheless, this score reliably represents the combined effects of temperature and wind on subjective discomfort for velocities below 80 km/h [18].
{wci: number}
:
wind chill index, [W/m2]
Determines the adaptive thermal comfort based on EN 16798-1 2019 [3]
Note: You can use this function to calculate if your conditions are within the EN adaptive thermal comfort region. Calculations with comply with the EN 16798-1 2019 [3].
"IP"
| "SI"
), limit_inputs: boolean): AdaptiveEnResult(number)
running mean temperature, default in [°C] in [°C] in [°F] if
units
= 'IP'
The running mean temperature can be calculated using the function
running_mean_outdoor_temperature
(number)
air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: Indoor operative temperature correction is applicable for buildings equipped with fans or personal systems providing building occupants with personal control over air speed at occupant level. For operative temperatures above 25°C the comfort zone upper limit can be increased by 1.2 °C (0.6 < v < 0.9 m/s), 1.8 °C (0.9 < v < 1.2 m/s), 2.2 °C (v > 1.2 m/s)
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns pmv and ppd values even if input values are
outside the applicability limits of the model.
AdaptiveEnResult
:
result set
Type: object
(number)
: Comfort temperature at that specific running mean temperature, default in [°C] or in [°F]
(boolean)
: If the indoor conditions comply with comfort category I
(boolean)
: If the indoor conditions comply with comfort category II
(boolean)
: If the indoor conditions comply with comfort category III
(number)
: Upper acceptable comfort temperature for category I, default in [°C] or in [°F]
(number)
: Upper acceptable comfort temperature for category II, default in [°C] or in [°F]
(number)
: Upper acceptable comfort temperature for category III, default in [°C] or in [°F]
(number)
: Lower acceptable comfort temperature for category I, default in [°C] or in [°F]
(number)
: Lower acceptable comfort temperature for category II, default in [°C] or in [°F]
(number)
: Lower acceptable comfort temperature for category III, default in [°C] or in [°F]
const results = adaptive_en(25, 25, 20, 0.1);
console.log(results); // {tmp_cmf: 25.4, acceptability_cat_i: true, acceptability_cat_ii: true, ... }
console.log(results.acceptability_cat_i); // true
// The conditions you entered are considered to comply with Category I
// for users who wants to use the IP system
const results = adaptive_en(77, 77, 68, 0.3, 'IP');
console.log(results); // {tmp_cmf: 77.7, acceptability_cat_i: true, acceptability_cat_ii: true, ... }
const results = adaptive_en(25, 25, 9, 0.1);
console.log(results); // {tmp_cmf: NaN, acceptability_cat_i: true, acceptability_cat_ii: true, ... }
// The adaptive thermal comfort model can only be used
// if the running mean temperature is between 10 °C and 30 °C
Determines the adaptive thermal comfort based on EN 16798-1 2019 [3]
Note: You can use this function to calculate if your conditions are within the EN adaptive thermal comfort region. Calculations with comply with the EN 16798-1 2019 [3].
"IP"
| "SI"
), limit_inputs: boolean): AdaptiveEnArrayResult(Array<number>)
running mean temperature, default in [°C] in [°C] in [°F] if
units
= 'IP'
The running mean temperature can be calculated using the function
running_mean_outdoor_temperature
(Array<number>)
air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: Indoor operative temperature correction is applicable for buildings equipped with fans or personal systems providing building occupants with personal control over air speed at occupant level. For operative temperatures above 25°C the comfort zone upper limit can be increased by 1.2 °C (0.6 < v < 0.9 m/s), 1.8 °C (0.9 < v < 1.2 m/s), 2.2 °C (v> 1.2 m/s)
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns pmv and ppd values even if input values are
outside the applicability limits of the model.
AdaptiveEnArrayResult
:
result set
Type: object
(Array<number>)
: Comfort temperature at that specific running mean temperature, default in [°C] or in [°F]
(Array<number>)
: Upper acceptable comfort temperature for category I, default in [°C] or in [°F]
(Array<number>)
: Upper acceptable comfort temperature for category II, default in [°C] or in [°F]
(Array<number>)
: Upper acceptable comfort temperature for category III, default in [°C] or in [°F]
(Array<number>)
: Lower acceptable comfort temperature for category I, default in [°C] or in [°F]
const results = adaptive_en([25,25], [25,25], [20,9], [0.1,0.1]);
console.log(results); // {tmp_cmf: [25.4, NaN], acceptability_cat_i: [true, true], acceptability_cat_ii: [true, true], ... }
console.log(results.acceptability_cat_i); // [true, true]
// The conditions you entered are considered to comply with Category I
// The adaptive thermal comfort model can only be used
// if the running mean temperature is between 10 °C and 30 °C
Calculates the Apparent Temperature (AT). The AT is defined as the temperature at the reference humidity level producing the same amount of discomfort as that experienced under the current ambient temperature, humidity, and solar radiation [17]. In other words, the AT is an adjustment to the dry bulb temperature based on the relative humidity value. Absolute humidity with a dew point of 14°C is chosen as a reference.
[16]. It includes the chilling effect of the wind at lower temperatures.
Two formulas for AT are in use by the Australian Bureau of Meteorology: one includes solar radiation and the other one does not ({@link http://www.bom.gov.au/info/thermal_stress/}, 29 Sep 2021). Please specify q if you want to estimate AT with solar load.
(number)
dry bulb air temperature, [°C]
(number)
relative humidity, [%]
(number)
wind speed 10m above ground level, [m/s]
number
:
apparent temperature, [°C]
const result = at(25, 30, 0.1);
console.log(result); // 24.1
Returns Predicted Mean Vote ( PMV ) and Predicted Percentage of Dissatisfied ( PPD ) calculated in accordance with main thermal comfort Standards. The PMV is an index that predicts the mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm, warm, and hot. [1]
While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures, and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the Note below.
Notes:
You can use this function to calculate the PMV and PPD in accordance with either the ASHRAE 55 2020 Standard [1] or the ISO 7730 Standard [2].
This is a version that supports scalar arguments.
"ISO"
| "ASHRAE"
), kwargs: Pmv_ppdKwargs): Pmv_ppdReturns(number)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air
speed measured by the air speed sensor. The relative air speed is the sum of the
average air speed measured by the sensor plus the activity-generated air speed
(Vag). Where Vag is the activity-generated air speed caused by motion of
individual body parts. vr can be calculated using the function v_relative
which is in .utilities.js.
(number)
relative humidity, [%]
(number)
metabolic rate
(number)
clothing insulation
Note: The activity as well as the air speed modify the insulation characteristics
of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects
for the effect of the body movement for met equal or higher than 1.2 met using
the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
can be calculated using the function clo_dynamic
which is in .utilities.js.
(number
= 0
)
external work
(("ISO"
| "ASHRAE"
)
= "ISO"
)
comfort standard used for calculation
· If "ISO", then the ISO Equation is used
· If "ASHRAE", then the ASHRAE Equation is used
Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone boundaries are adjusted based on the SET model. This change was introduced by the Addendum_C to Standard 55-2020
(Pmv_ppdKwargs
= {}
)
additional arguments
Pmv_ppdReturns
:
Result of pmv and ppd
Type: Object
(("SI"
| "IP"
))
: select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean)
: Default is True. By default, if the inputs are outside the standard applicability
limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
the applicability limits of the model.
The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40, 0 < vr [m/s] < 2, 1 < met [met] < 4, and 0 < clo [clo] < 1.5. The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40, 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
(boolean)
: This only applies if standard = "ASHRAE".
Default is True. By default, it is assumed that the occupant has control over the airspeed. In this case, the ASHRAE 55 Standard does not impose any airspeed limits. On the other hand, if the occupant has no control over the airspeed, the ASHRAE 55 imposes an upper limit for v which varies as a function of the operative temperature, for more information please consult the Standard.
Type: Object
const tdb = 25;
const tr = 25;
const rh = 50;
const v = 0.1;
const met = 1.4;
const clo = 0.5;
// Calculate relative air speed
const v_r = v_relative(v, met);
// Calculate dynamic clothing
const clo_d = clo_dynamic(clo, met);
const results = pmv_ppd(tdb, tr, v_r, rh, met, clo_d);
console.log(results); // Output: { pmv: 0.06, ppd: 5.1 }
console.log(results.pmv); // Output: -0.06
Returns Predicted Mean Vote ( PMV ) and Predicted Percentage of Dissatisfied ( PPD ) calculated in accordance with main thermal comfort Standards. The PMV is an index that predicts the mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm, warm, and hot. [1]
While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures, and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the Note below.
Notes:
You can use this function to calculate the PMV and PPD in accordance with either the ASHRAE 55 2020 Standard [1] or the ISO 7730 Standard [2].
This is a version that supports arrays.
"ISO"
| "ASHRAE"
), kwargs: Pmv_ppdKwargs): Pmv_ppd_arrayReturns(Array<number>)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air
speed measured by the air speed sensor. The relative air speed is the sum of the
average air speed measured by the sensor plus the activity-generated air speed
(Vag). Where Vag is the activity-generated air speed caused by motion of
individual body parts. vr can be calculated using the function v_relative_array
which is in .utilities.js.
(Array<number>)
clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics
of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects
for the effect of the body movement for met equal or higher than 1.2 met using
the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
can be calculated using the function clo_dynamic_array
which is in .utilities.js.
(("ISO"
| "ASHRAE"
)
= "ISO"
)
comfort standard used for calculation
· If "ISO", then the ISO Equation is used
· If "ASHRAE", then the ASHRAE Equation is used
Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone boundaries are adjusted based on the SET model. This change was introduced by the Addendum_C to Standard 55-2020
(Pmv_ppdKwargs
= {}
)
additional arguments
Pmv_ppd_arrayReturns
:
Result of pmv and ppd
const tdb = [22, 25];
const tr = [25, 25];
const rh = [50, 50];
const v = [0.1, 0.1];
const met = [1.4, 1.4];
const clo = [0.5, 0.5];
// Calculate relative air speed
const v_r = v_relative_array(v, met);
// Calculate dynamic clothing
const clo_d = clo_dynamic_array(clo, met);
const arrayResults = pmv_ppd_array(tdb, tr, v_r, rh, met, clo_d);
console.log(arrayResults); // Output: { pmv: [-0.47, 0.06], ppd: [9.6, 5.1] }
console.log(results.pmv); // Output: [-0.47, 0.06]
Determines the adaptive thermal comfort based on ASHRAE 55. The adaptive model relates indoor design temperatures or acceptable temperature ranges to outdoor meteorological or climatological parameters. The adaptive model can only be used in occupant-controlled naturally conditioned spaces that meet all the following criteria:
"SI"
| "IP"
), limit_inputs: boolean): AdaptiveAshraeResult(number)
running mean temperature, default in [°C] in [°C] in [°F] if
units
= 'IP'
The running mean temperature can be calculated using the function
running_mean_outdoor_temperature
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns pmv and ppd values even if input values are
outside the applicability limits of the model.
AdaptiveAshraeResult
:
set containing results for the model
The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40, 0 < vr [m/s] < 2, 10 < t running mean [°C] < 33.5
You can use this function to calculate if your conditions are within the adaptive thermal comfort region
.
Calculations with comply with the ASHRAE 55 2020 Standard [1].
Type: object
(number)
: Comfort temperature a that specific running mean temperature, default in [°C] or in [°F]
(number)
: Lower acceptable comfort temperature for 80% occupants, default in [°C] or in [°F]
(number)
: Upper acceptable comfort temperature for 80% occupants, default in [°C] or in [°F]
(number)
: Lower acceptable comfort temperature for 90% occupants, default in [°C] or in [°F]
(number)
: Upper acceptable comfort temperature for 90% occupants, default in [°C] or in [°F]
(boolean)
: Acceptability for 80% occupants
(boolean)
: Acceptability for 90% occupants
import { adaptive_ashrae } from "jsthermalcomfort/models";
const results = adaptive_ashrae(25, 25, 20, 0.1);
console.log(results);
// {tmp_cmf: 24.0, tmp_cmf_80_low: 20.5, tmp_cmf_80_up: 27.5,
// tmp_cmf_90_low: 21.5, tmp_cmf_90_up: 26.5, acceptability_80: true,
// acceptability_90: true}
console.log(results.acceptability_80);
// true
import { adaptive_ashrae } from "jsthermalcomfort/models";
// For users who want to use the IP system
const results = adaptive_ashrae(77, 77, 68, 0.3, 'IP');
console.log(results);
// {tmp_cmf: 75.2, tmp_cmf_80_low: 68.9, tmp_cmf_80_up: 81.5,
// tmp_cmf_90_low: 70.7, tmp_cmf_90_up: 79.7, acceptability_80: true,
// acceptability_90: true}
import { adaptive_ashrae } from "jsthermalcomfort/models";
const results = adaptive_ashrae(25, 25, 9, 0.1);
console.log(results);
// {tmp_cmf: NaN, tmp_cmf_80_low: NaN, ...}
// The adaptive thermal comfort model can only be used
// if the running mean temperature is higher than 10°C
Determines the adaptive thermal comfort based on ASHRAE 55. The adaptive model relates indoor design temperatures or acceptable temperature ranges to outdoor meteorological or climatological parameters. The adaptive model can only be used in occupant-controlled naturally conditioned spaces that meet all the following criteria:
"SI"
| "IP"
), limit_inputs: boolean): AdaptiveAshraeArrayResult(Array<number>)
running mean temperature, default in [°C] in [°C] in [°F] if
units
= 'IP'
The running mean temperature can be calculated using the function
running_mean_outdoor_temperature
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= true
)
By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns pmv and ppd values even if input values are
outside the applicability limits of the model.
AdaptiveAshraeArrayResult
:
set containing results for the model
The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40, 0 < vr [m/s] < 2, 10 < t running mean [°C] < 33.5
You can use this function to calculate if your conditions are within the adaptive thermal comfort region
.
Calculations with comply with the ASHRAE 55 2020 Standard [1].
Type: object
(Array<number>)
: Comfort temperature a that specific running mean temperature, default in [°C] or in [°F]
(Array<number>)
: Lower acceptable comfort temperature for 80% occupants, default in [°C] or in [°F]
(Array<number>)
: Upper acceptable comfort temperature for 80% occupants, default in [°C] or in [°F]
(Array<number>)
: Lower acceptable comfort temperature for 90% occupants, default in [°C] or in [°F]
import { adaptive_ashrae_array } from "jsthermalcomfort/models";
const results = adaptive_ashrae_array([25], [25], [20], [0.1]);
console.log(results);
// {tmp_cmf: [24.0], tmp_cmf_80_low: [20.5], tmp_cmf_80_up: [27.5],
// tmp_cmf_90_low: [21.5], tmp_cmf_90_up: [26.5], acceptability_80: [true],
// acceptability_90: [true]}
console.log(results.acceptability_80);
// [true]
import { adaptive_ashrae_array } from "jsthermalcomfort/models";
// For users who want to use the IP system
const results = adaptive_ashrae_array([77], [77], [68], [0.3], 'IP');
console.log(results);
// {tmp_cmf: [75.2], tmp_cmf_80_low: [68.9], tmp_cmf_80_up: [81.5],
// tmp_cmf_90_low: [70.7], tmp_cmf_90_up: [79.7], acceptability_80: [true],
// acceptability_90: [true]}
import { adaptive_ashrae_array } from "jsthermalcomfort/models";
const results = adaptive_ashrae_array([25], [25], [9], [0.1]);
console.log(results);
// {tmp_cmf: [NaN], tmp_cmf_80_low: [NaN], ...}
// The adaptive thermal comfort model can only be used
// if the running mean temperature is higher than 10°C
Calculates the solar gain to the human body using the Effective Radiant Field ( ERF) [1]. The ERF is a measure of the net energy flux to or from the human body. ERF is expressed in W over human body surface area [w/m2].
In addition, it calculates the delta mean radiant temperature. Which is the amount by which the mean radiant temperature of the space should be increased if no solar radiation is present.
More information on the calculation procedure can be found in Appendix C of [1].
"standing"
| "supine"
| "seated"
), floor_reflectance: number): SolarGainReturnType(number)
Solar altitude, degrees from horizontal [deg]. Ranges between 0 and 90.
(number)
Solar horizontal angle relative to the front of the person (SHARP) [deg].
Ranges between 0 and 180 and is symmetrical on either side. Zero (0) degrees
represents direct-beam radiation from the front, 90 degrees represents
direct-beam radiation from the side, and 180 degrees rep- resent direct-beam
radiation from the back. SHARP is the angle between the sun and the person
only. Orientation relative to compass or to room is not included in SHARP.
(number)
Total solar transmittance, ranges from 0 to 1. The total solar
transmittance of window systems, including glazing unit, blinds, and other
façade treatments, shall be determined using one of the following methods:
(number
= 0.7
)
The average short-wave absorptivity of the occupant. It will range widely,
depending on the color of the occupant’s skin as well as the color and
amount of clothing covering the body.
A value of 0.7 shall be used unless more specific information about the clothing or skin color of the occupants is available. Note: Short-wave absorptivity typically ranges from 0.57 to 0.84, depending on skin and clothing color. More information is available in Blum (1945).
(("standing"
| "supine"
| "seated"
)
= "seated"
)
Default 'seated' list of available options 'standing', 'supine' or 'seated'
(number
= 0.7
)
Floor refectance. It is assumed to be constant and equal to 0.6.
SolarGainReturnType
:
Type: object
import {solar_gain} from "jsthermalcomfort/models";
const results = solar_gain(0, 120, 800, 0.5, 0.7, "seated");
console.log(results); // {erf: 42.9, delta_mrt: 10.3}
Returns the value of the Cooling Effect ( CE ) calculated in compliance with the ASHRAE 55 2020 Standard [1]. The CE of the elevated air speed is the value that, when subtracted equally from both the average air temperature and the mean radiant temperature, the same SET under still air as in the first SET calculation under elevated air speed. The cooling effect is calculated only for air speed higher than 0.1 m/s.
"SI"
| "IP"
)): number(number)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air
speed measured by the air speed sensor. The relative air speed is the sum of the
average air speed measured by the sensor plus the activity-generated air speed
(Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts.
vr can be calculated using the function v_relative
which is in .utilities.js.
(number)
relative humidity, [%]
(number)
metabolic rate, [met]
(number)
clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics
of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that
the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects
for the effect of the body movement for met equal or higher than 1.2 met using
the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo,
can be calculated using the function clo_dynamic
which is in .utilities.js.
(number
= 0
)
external work
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
number
:
ce - Cooling Effect, default in [°C] in [°F] if
units
= 'IP'
const CE = cooling_effect(25, 25, 0.3, 50, 1.2, 0.5);
console.log(CE); // Output: 1.64
// For users who want to use the IP system
const CE_IP = cooling_effect(77, 77, 1.64, 50, 1, 0.6, "IP");
console.log(CE_IP); // Output: 3.74
Return the PMV value calculated with the Adaptive Thermal Heat Balance Framework [27]. The adaptive thermal heat balance (ATHB) framework introduced a method to account for the three adaptive principals, namely physiological, behavioral, and psychological adaptation, individually within existing heat balance models. The objective is a predictive model of thermal sensation applicable during the design stage or in international standards without knowing characteristics of future occupants.
This is a version that supports scalar arguments.
(number)
dry bulb air temperature, in [°C]
(number)
mean radiant temperature, in [°C]
(number)
relative air speed, in [m/s]
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function jsthermalcomfort.utilities.v_relative.
(number)
relative humidity, [%]
(number)
metabolic rate, [met]
(number)
running mean temperature, in [°C]
The running mean temperature can be calculated using the function jsthermalcomfort.utilities.running_mean_outdoor_temperature.
number
:
athb_pmv - Predicted Mean Vote calculated with the Adaptive Thermal Heat Balance framework
const tdb = 25;
const tr = 25;
const vr = 0.1;
const rh = 50;
const met = 1.1;
const t_running_mean = 20;
const athb_result = athb(tdb, tr, vr, rh, met, t_running_mean);
console.log(athb_result); // Output: 0.2
Return the PMV value calculated with the Adaptive Thermal Heat Balance Framework [27]. The adaptive thermal heat balance (ATHB) framework introduced a method to account for the three adaptive principals, namely physiological, behavioral, and psychological adaptation, individually within existing heat balance models. The objective is a predictive model of thermal sensation applicable during the design stage or in international standards without knowing characteristics of future occupants.
This is a version that supports arrays.
(Array<number>)
relative air speed, in [m/s]
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function jsthermalcomfort.utilities.v_relative.
Array<number>
:
athb_pmv - Predicted Mean Vote calculated with the Adaptive Thermal Heat Balance framework
const tdb = [25, 27];
const tr = [25, 25];
const vr = [0.1, 0.1];
const rh = [50, 50];
const met = [1.1, 1.1];
const t_running_mean = [20, 20];
const athb_array_result = athb_array(tdb, tr, vr, rh, met, t_running_mean);
console.log(athb_array_result); // Output: [0.2, 0.209]
Returns Predicted Mean Vote ( PMV ) calculated in accordance with main thermal comfort Standards.
The PMV is an index that predicts the mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm, warm, and hot. [1]
While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures, and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the Note below.
Notes:
You can use this function to calculate the PMV [1] [2]
This is a version that supports scalar arguments.
"ISO"
| "ASHRAE"
), kwargs: PmvKwargs): number(number)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function 'v_relative' in utilities.
(number)
relative humidity, [%]
(number)
metabolic rate
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function 'clo_dynamic' in utilities.
(number)
clothing insulation
(number
= 0
)
external work
(("ISO"
| "ASHRAE"
)
= "ISO"
)
comfort standard used for calculation
· If "ISO", then the ISO Equation is used
· If "ASHRAE", then the ASHRAE Equation is used
Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone boundaries are adjusted based on the SET model. This change was introduced by the Addendum_C to Standard 55-2020
(PmvKwargs
= {}
)
additional arguments
number
:
pmv - Predicted Mean Vote
Type: Object
(("SI"
| "IP"
))
: select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean)
: Default is True. By default, if the inputs are outside the standard applicability
limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
the applicability limits of the model.
The ASHRAE 55 2020 limits are 10 < tdb [°C] < 40, 10 < tr [°C] < 40, 0 < vr [m/s] < 2, 1 < met [met] < 4, and 0 < clo [clo] < 1.5. The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40, 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
(boolean)
: This only applies if standard = "ASHRAE".
Default is True. By default, it is assumed that the occupant has control over the airspeed. In this case, the ASHRAE 55 Standard does not impose any airspeed limits. On the other hand, if the occupant has no control over the airspeed, the ASHRAE 55 imposes an upper limit for v which varies as a function of the operative temperature, for more information please consult the Standard.
const tdb = 25;
const tr = 25;
const rh = 50;
const v = 0.1;
const met = 1.4;
const clo = 0.5;
// calculate relative air speed
const v_r = v_relative(v, met);
// calculate dynamic clothing
const clo_d = clo_dynamic(clo, met);
const results = pmv(tdb, tr, v_r, rh, met, clo_d);
console.log(results); // 0.06
Returns Predicted Mean Vote ( PMV ) calculated in accordance with main thermal comfort Standards.
The PMV is an index that predicts the mean value of the thermal sensation votes (self-reported perceptions) of a large group of people on a sensation scale expressed from –3 to +3 corresponding to the categories: cold, cool, slightly cool, neutral, slightly warm, warm, and hot. [1]
While the PMV equation is the same for both the ISO and ASHRAE standards, in the ASHRAE 55 PMV equation, the SET is used to calculate the cooling effect first, this is then subtracted from both the air and mean radiant temperatures, and the differences are used as input to the PMV model, while the airspeed is set to 0.1m/s. Please read more in the Note below.
Notes:
You can use this function to calculate the PMV [1] [2]
This is a version that supports arrays.
"ISO"
| "ASHRAE"
), kwargs: PmvKwargs): Array<number>(Array<number>)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function 'v_relative_array' in utilities.
(Array<number>)
clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function 'clo_dynamic_array' in utilities.
(("ISO"
| "ASHRAE"
)
= "ISO"
)
comfort standard used for calculation
· If "ISO", then the ISO Equation is used
· If "ASHRAE", then the ASHRAE Equation is used
Note: While the PMV equation is the same for both the ISO and ASHRAE standards, the ASHRAE Standard Use of the PMV model is limited to air speeds below 0.10m/s (20 fpm). When air speeds exceed 0.10 m/s (20 fpm), the comfort zone boundaries are adjusted based on the SET model. This change was introduced by the Addendum_C to Standard 55-2020
(PmvKwargs
= {}
)
additional arguments
Array<number>
:
pmv - Predicted Mean Vote
const tdb = [22, 25];
const tr = [25, 25];
const rh = [50, 50];
const v = [0.1, 0.1];
const met = [1.4, 1.4];
const clo = [0.5, 0.5];
// calculate relative air speed
const v_r = v_relative_array(v, met);
// calculate dynamic clothing
const clo_d = clo_dynamic_array(clo, met);
const results = pmv_array(tdb, tr, v_r, rh, met, clo_d);
console.log(results); // [-0.47, 0.06]
Returns Adaptive Predicted Mean Vote (aPMV) [25]. This index was developed by Yao, R. et al. (2009). The model takes into account factors such as culture, climate, social, psychological and behavioral adaptations, which have an impact on the senses used to detect thermal comfort. This model uses an adaptive coefficient (λ) representing the adaptive factors that affect the sense of thermal comfort.
This is a version that supports scalar arguments.
(number)
Relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function v_relative in utilities.js.
(number)
Relative humidity, [%]
(number)
Metabolic rate, [met]
(number)
Clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function clo_dynamic in utilities.js.
(number)
Adaptive coefficient
(number
= 0
)
External work
(A_pmvKwargs
= {}
)
additional arguments
number
:
pmv - Predicted Mean Vote
Type: Object
(("SI"
| "IP"
))
: select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean)
: Default is True. By default, if the inputs are outside the standard applicability
limits the function returns NaN. If false, returns pmv and ppd values even if input values are outside
the applicability limits of the model.
The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40, 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
const tdb = 24,
const tr = 30,
const vr = 0.22,
const rh = 50,
const met = 1.4,
const clo = 0.5,
const a_coefficient = 0.293,
const wme = undefined,
const result = a_pmv(tdb, tr, vr, rh, met, clo, a_coefficient, wme);
console.log(result) //output 0.48
Returns Adaptive Predicted Mean Vote (aPMV) [25]. This index was developed by Yao, R. et al. (2009). The model takes into account factors such as culture, climate, social, psychological and behavioral adaptations, which have an impact on the senses used to detect thermal comfort. This model uses an adaptive coefficient (λ) representing the adaptive factors that affect the sense of thermal comfort.
This is a version that supports arrays.
(Array<number>)
Relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function v_relative_array in utilities.js.
(Array<number>)
Clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function clo_dynamic_array in utilities.js.
(A_pmvKwargs
= {}
)
additional arguments
Array<number>
:
pmv - Predicted Mean Vote
const tdb = [24, 30],
const tr = [30, 30],
const vr = [0.22, 0.22],
const rh = [50, 50],
const met = [1.4, 1.4],
const clo = [0.5, 0.5],
const a_coefficient = [0.293, 0.293],
const wme = undefined,
const result = a_pmv_array(tdb, tr, vr, rh, met, clo, a_coefficient, wme);
console.log(result) //output [0.48, 1.09]
Calculates the percentage of thermally dissatisfied people with the ankle draft (0.1 m) above floor level [23]. This equation is only applicable for vr < 0.2 m/s (40 fps).
"IP"
| "SI"
)): AnkleDraftRet(number)
dry bulb air temperature, default in [°C] in [°F] if
units
= 'IP'
Note: The air temperature is the average value over two heights: 0.6 m (24 in.) and 1.1 m (43 in.) for seated occupants and 1.1 m (43 in.) and 1.7 m (67 in.) for standing occupants.
(number)
relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function v_relative in utilities.js.
(number)
relative humidity, [%]
(number)
metabolic rate, [met]
(number)
clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function clo_dynamic in utilities.js.
(number)
air speed at the 0.1 m (4 in.) above the floor, default in [m/s] in [fps] if
units
= 'IP'
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
AnkleDraftRet
:
Returns {"PPD_ad": ppd_val, "Acceptability": acceptability}
Type: Object
results = ankle_draft(25, 25, 0.2, 50, 1.2, 0.5, 0.3, "SI")
console.log(results) // expected result is {PPD_ad: 18.5, Acceptability: true}
Returns Adjusted Predicted Mean Votes with Expectancy Factor (ePMV). This index was developed by Fanger, P. O. et al. (2002). In non-air-conditioned buildings in warm climates, occupants may sense the warmth as being less severe than the PMV predicts. The main reason is low expectations, but a metabolic rate that is estimated too high can also contribute to explaining the difference. An extension of the PMV model that includes an expectancy factor is introduced for use in non-air-conditioned buildings in warm climates [26].
This is a version that supports scalar arguments.
(number)
Relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function v_relative in utilities.js.
(number)
Relative humidity, [%]
(number)
Metabolic rate, [met]
(number)
Clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function clo_dynamic in utilities.js.
(number)
expectancy factor
(number
= 0
)
External work
(E_pmvKwargs?
= {}
)
additional arguments
number
:
pmv - Predicted Mean Vote
Type: Object
(("SI"
| "IP"
))
: select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean)
: Default is True. By default, if the inputs are outside the standard
applicability limits the function returns NaN. If false, returns pmv and ppd values even if input values
are outside the applicability limits of the model.
The ISO 7730 2005 limits are 10 < tdb [°C] < 30, 10 < tr [°C] < 40, 0 < vr [m/s] < 1, 0.8 < met [met] < 4, 0 < clo [clo] < 2, and -2 < PMV < 2.
const tdb = 28;
const tr = 28;
const v = 0.1;
const met = 1.4;
const clo = 0.5;
// Calculate relative air speed
const v_r = v_relative(v, met);
// Calculate dynamic clothing
const clo_d = clo_dynamic(clo, met);
const e_coefficient = 0.6;
const result = e_pmv(tdb, tr, v_r, rh, met, clo_d, e_coefficient);
console.log(result) // output 0.51
Returns Adjusted Predicted Mean Votes with Expectancy Factor (ePMV). This index was developed by Fanger, P. O. et al. (2002). In non-air-conditioned buildings in warm climates, occupants may sense the warmth as being less severe than the PMV predicts. The main reason is low expectations, but a metabolic rate that is estimated too high can also contribute to explaining the difference. An extension of the PMV model that includes an expectancy factor is introduced for use in non-air-conditioned buildings in warm climates [26].
This is a version that supports arrays.
(Array<number>)
Relative air speed, default in [m/s] in [fps] if
units
= 'IP'
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function v_relative_array in utilities.js.
(Array<number>)
Clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function clo_dynamic_array in utilities.js.
(E_pmvKwargs?
= {}
)
additional arguments
Array<number>
:
pmv - Predicted Mean Vote
const tdb = [24, 30];
const tr = [30, 30];
const v = [0.22, 0.22];
const met = [1.4, 1.4];
const clo = [0.5, 0.5];
// Calculate relative air speed
const v_r = v_relative_array(v, met);
// Calculate dynamic clothing
const clo_d = clo_dynamic_array(clo, met);
const e_coefficient = [0.6, 0.6];
const result = e_pmv_array(tdb, tr, v_r, rh, met, clo_d, e_coefficient);
console.log(result) // output [0.29, 0.91]
Calculates the percentage of thermally dissatisfied people with a vertical temperature gradient between feet and head [1] . This equation is only applicable for vr < 0.2 m/s (40 fps).
"SI"
| "IP"
)): VerTmpGradReturnType(number)
dry bulb air temperature, default in [°C] in [°F] if "units" = 'IP'.
Note: The air temperature is the average value over two heights: 0.6 m (24 in.) and 1.1 m (43 in.) for seated occupants and 1.1 m (43 in.) and 1.7 m (67 in.) for standing occupants.
(number)
mean radiant temperature, default in [°C] in [°F] if "units" = 'IP'.
(number)
relative air speed, default in [m/s] in [fps] if "units" = "IP"
Note: vr is the relative air speed caused by body movement and not the air speed measured by the air speed sensor. The relative air speed is the sum of the average air speed measured by the sensor plus the activity-generated air speed (Vag). Where Vag is the activity-generated air speed caused by motion of individual body parts. vr can be calculated using the function pythermalcomfort.utilities.v_relative().
(number)
relative humidity, [%].
(number)
metabolic rate, [met]
(number)
clothing insulation, [clo]
Note: The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met) The dynamic clothing insulation, clo, can be calculated using the function pythermalcomfort.utilities.clo_dynamic().
(number)
vertical temperature gradient between the feet and the head, default in [°C/m] in [°F/ft] if units = ‘IP’
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
VerTmpGradReturnType
:
Object with results of the PPD with vertical temprature gradient.
Type: Object
const result = vertical_tmp_grad_ppd(25, 25, 0.1, 50, 1.2, 0.5, 7); // returns {'PPD_vg': 12.6, 'Acceptability': false}
It helps you to estimate if the conditions you have selected would cause heat strain. This occurs when either the following variables reaches its maximum value:
"standing"
| "sitting"
), units: ("SI"
| "IP"
), max_skin_blood_flow: number, kwargs: HeatwaveKwargs?): HeatwaveReturnType(number)
dry bulb air temperature, default in [°C] in [°F] if units = ‘IP’
(number)
mean radiant temperature, default in [°C] in [°F] if units = ‘IP’
(number)
air speed, default in [m/s] in [fps] if units = ‘IP’
(number)
relative humidity, [%]
(number)
metabolic rate, [met]
(number)
clothing insulation, [clo]
(number
= 0
)
external work, [met] default 0
(number?)
body surface area, default value 1.8258 [m2] in [ft2] if units = ‘IP’
The body surface area can be calculated using the function pythermalcomfort.utilities.body_surface_area().
(number?)
atmospheric pressure, default value 101325 [Pa] in [atm] if units = ‘IP’
(("standing"
| "sitting"
)
= "standing"
)
select either “sitting” or “standing”
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(number
= 80
)
maximum blood flow from the core to the skin
(HeatwaveKwargs?
= {}
)
HeatwaveReturnType
:
object with results of use fans during heatwave
Type: Object
(number?)
: max sweating, [mL/h/m2] default 500
(boolean?)
: if True rounds output value, if False it does not round it, default True
(boolean?)
: – By default, if the inputs are outsude the following limits the function returns nan. If
False returns values regardless of the input values, default True
The applicability limits are 20 < tdb [°C] < 50, 20 < tr [°C] < 50, 0.1 < v [m/s] < 4.5, 0.7 < met [met] < 2, and 0 < clo [clo] < 1.
Type: Object
(number)
: – Total rate of evaporative heat loss from skin, [W/m2]. Equal to e_rsw + e_diff
(number)
: – Rate of evaporative heat loss from sweat evaporation, [W/m2]
(number)
: – Rate of evaporative heat loss from moisture diffused through the skin [W/m2]
(number)
: – Maximum rate of evaporative heat loss from skin, [W/m2]
(number)
: – Sensible heat loss from skin, [W/m2]
(number)
: – Total rate of heat loss from skin, [W/m2]. Equal to q_sensible + e_skin
(number)
: – Total rate of heat loss through respiration, [W/m2]
(number)
: – Core temperature, [°C]
(number)
: – Skin temperature, [°C]
(number)
: – Skin blood flow, [kg/h/m2]
(number)
: – Rate at which regulatory sweat is generated, [kg/h/m2]
(number)
: – Skin wettedness, adimensional. Ranges from 0 and 1
(number)
: – Skin wettedness (w) practical upper limit, adimensional. Ranges from 0 and 1
((boolean | undefined))
: – True if the model predict that the person may be experiencing heat strain, undefined if the result of two nodes model is not a number
((boolean | undefined))
: – True if heat strain is caused by skin blood flow (m_bl) reaching its maximum value, undefined if the result of two nodes model is not a number
const results = use_fans_heatwaves(25, 25, 0.1, 50, 1.2, 0.5);
console.log(results); //
{
e_skin: 18.1,
e_rsw: 10.0,
e_max: 145.0,
q_sensible: 45.7,
q_skin: 63.8,
q_res: 5.2,
t_core: 36.9,
t_skin: 33.8,
m_bl: 13.6,
m_rsw: 14.6,
w: 0.1,
w_max: 0.7,
heat_strain_blood_flow: 0.0,
heat_strain_w: 0.0,
heat_strain_sweating: 0.0,
heat_strain: 0.0
}
Representative clothing insulation Icl as a function of outdoor air temperature at 06:00 a.m [4].
Note: The ASHRAE 55 2020 states that it is acceptable to determine the clothing insulation Icl using this equation in mechanically conditioned buildings [1].
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units)
or the IP (Imperial Units) system.
number
:
Representative clothing insulation Icl, [clo]
Representative clothing insulation Icl as a function of outdoor air temperature at 06:00 a.m [4].
Note: The ASHRAE 55 2020 states that it is acceptable to determine the clothing insulation Icl using this equation in mechanically conditioned buildings [1].
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units)
or the IP (Imperial Units) system.
Array<number>
:
Representative clothing insulation Icl, [clo]
Determines the Universal Thermal Climate Index (UTCI). The UTCI is the equivalent temperature for the environment derived from a reference environment. It is defined as the air temperature of the reference environment which produces the same strain index value in comparison with the reference individual's response to the real environment. It is regarded as one of the most comprehensive indices for calculating heat stress in outdoor spaces. The parameters that are taken into account for calculating UTCI involve dry bulb temperature, mean radiation temperature, the pressure of water vapor or relative humidity, and wind speed (at the elevation of 10 m above the ground). [7]
"SI"
| "IP"
), return_stress_category: boolean, limit_inputs: boolean)(number)
relative humidity, [%]
(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= false
)
default False if True returns the UTCI categorized in terms of thermal stress.
(boolean
= true
)
default True. By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns UTCI values even if input values are
outside the applicability limits of the model. The valid input ranges are
-50 < tdb [°C] < 50, tdb - 70 < tr [°C] < tdb + 30, and for 0.5 < v [m/s] < 17.0.
console.log(utci(25, 25, 1.0, 50)) // will print 24.6
console.log(utci(77, 77, 3.28, 50, 'ip')) // will print 76.4
console.log(utci(25, 25, 1.0, 50, 'si', true))
// will print {utci: 24.6, stress_category: "no thermal stress"}
Determines the Universal Thermal Climate Index (UTCI) (Supports array type). The UTCI is the equivalent temperature for the environment derived from a reference environment. It is defined as the air temperature of the reference environment which produces the same strain index value in comparison with the reference individual's response to the real environment. It is regarded as one of the most comprehensive indices for calculating heat stress in outdoor spaces. The parameters that are taken into account for calculating UTCI involve dry bulb temperature, mean radiation temperature, the pressure of water vapor or relative humidity, and wind speed (at the elevation of 10 m above the ground). [7]
"SI"
| "IP"
), return_stress_category: boolean, limit_inputs: boolean)(("SI"
| "IP"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
(boolean
= false
)
default False, if True returns the UTCI categorized in terms of thermal stress.
(boolean
= true
)
default True. By default, if the inputs are outsude the standard applicability limits the
function returns nan. If False returns UTCI values even if input values are
outside the applicability limits of the model. The valid input ranges are
-50 < tdb [°C] < 50, tdb - 70 < tr [°C] < tdb + 30, and for 0.5 < v [m/s] < 17.0.
console.log(utci_array([25, 25], [27, 25], [1, 1], [50, 50])) // will print [25.2, 24.6]
console.log(utci_array([25, 25], [27, 25], [1, 1], [50, 50], "si", true))
// will print {
// utci: [25.2, 24.6],
// stress_category: ["no thermal stress", "no thermal stress"],
// }
The steady physiological equivalent temperature (PET) is calculated using the Munich Energy-balance Model for Individuals (MEMI), which simulates the human body's thermal circumstances in a medically realistic manner. PET is defined as the air temperature at which, in a typical indoor setting the heat budget of the human body is balanced with the same core and skin temperature as under the complex outdoor conditions to be assessed [20].
The following assumptions are made for the indoor reference climate: tdb = tr, v = 0.1 m/s, water vapour pressure = 12 hPa, clo = 0.9 clo, and met = 1.37 met + basic metabolism.
PET allows a layperson to compare the total effects of complex thermal circumstances outside with his or her own personal experience indoors in this way. This function solves the heat balances without accounting for heat storage in the human body.
The PET was originally proposed by Hoppe [20]. In 2018, Walther and Goestchel [21] proposed a correction of the original model, purging the errors in the PET calculation routine, and implementing a state-of-the-art vapour diffusion model. Walther and Goestchel (2018) model is therefore used to calculate the PET.
1
| 2
| 3
), age: number, sex: (1
| 2
), weight: number, height: number, wme: number): number(number)
dry bulb air temperature, [°C]
(number)
mean radiant temperature, [°C]
(number)
air speed, [m/s]
(number)
relative humidity, [%]
(number)
metabolic rate, [met]
(number)
clothing insulation, [clo]
(number
= 1013.25
)
atmospheric pressure, default value 1013.25 [hPa]
((1
| 2
| 3
)
= 1
)
position of the individual (1=sitting, 2=standing, 3=standing, forced convection)
(number
= 23
)
age in years
((1
| 2
)
= 1
)
male (1) or female (2).
(number
= 75
)
body mass, [kg]
(number
= 1.8
)
height, [m]
(number
= 0
)
external work, [W/(m2)]
number
:
Steady-state PET under the given ambient conditions
const result = pet_steady(20, 20, 50, 0.15, 1.37, 0.5);
console.log(result); // 18.85
JOS-3 model simulates human thermal physiology including skin temperature, core temperature, sweating rate, etc. for the whole body and 17 local body parts.
This model was developed at Shin-ichi Tanabe Laboratory, Waseda University and was derived from 65 Multi-Node model (https://doi.org/10.1016/S0378-7788(02)00014-2) and JOS-2 model (https://doi.org/10.1016/j.buildenv.2013.04.013).
To use this model, create an instance of the JOS3 class with optional body parameters such as body height, weight, age, sex, etc.
Environmental conditions such as air temperature, mean radiant temperature, air velocity, etc. can be set using the setter methods. (ex. X.tdb, X.tr X.v) If you want to set the different conditions in each body part, set them as a 17 lengths of list, dictionary, or numpy array format.
List or numpy array format input must be 17 lengths and means the order of "head", "neck", "chest", "back", "pelvis", "left_shoulder", "left_arm", "left_hand", "right_shoulder", "right_arm", "right_hand", "left_thigh", "left_leg", "left_foot", "right_thigh", "right_leg" and "right_foot".
The model output includes local and mean skin temperature, local core temperature, local and mean skin wettedness, and heat loss from the skin etc. The model output can be accessed using "dict_results()" method and be converted to a csv file using "to_csv" method. Each output parameter also can be accessed using getter methods. (ex. X.t_skin, X.t_skin_mean, X.t_core)
If you use this package, please cite us as follows and mention the version of pythermalcomfort used: Y. Takahashi, A. Nomoto, S. Yoda, R. Hisayama, M. Ogata, Y. Ozeki, S. Tanabe, Thermoregulation Model JOS-3 with New Open Source Code, Energy & Buildings (2020), doi: https://doi.org/10.1016/j.enbuild.2020.110575
Note: To maintain consistency in variable names for jsthermalcomfort and pythermalcomfort, some variable names differ from those used in the original paper.
(number?
= JOS3Defaults.height
)
body height, in [m].
(number?
= JOS3Defaults.weight
)
body weight, in [kg].
(number?
= JOS3Defaults.body_fat
)
fat percentage, in [%].
(number?
= JOS3Defaults.age
)
age, in [years].
(("male"
| "female"
)?
= JOS3Defaults.sex
)
sex.
(number?
= JOS3Defaults.cardiac_index
)
Cardiac index, in [L/min/m2].
(("harris-benedict"
| "harris-benedict_origin"
| "japanese"
| "ganpule"
)?
= JOS3Defaults.bmr_equation
)
The equation used
to calculate basal metabolic rate (BMR).
(("dubois"
| "fujimoto"
| "kruazumi"
| "takahira"
)?
= JOS3Defaults.bsa_equation
)
The equation used to calculate body
surface area (bsa).
(([] | "all"
)?
= []
)
This is used when you want to display results other than the default output
parameters (ex.skin temperature); by default, JOS outputs only the most necessary parameters in order to reduce
the computational load.
Estimates the saturation vapour pressure in [torr].
(number)
dry bulb air temperature [C]
number
:
saturation vapour pressure [torr]
Estimates the saturation vapour pressure in [torr].
Array<number>
:
saturation vapour pressure [torr]
Calculates operative temperature in accordance with ISO 7726:1998 [5].
(number)
air temperature [C]
(number)
mean radiant temperature [C]
(number)
air speed [m/s]
(("ISO"
| "ASHRAE"
)
= "ISO"
)
the standard to use
number
:
operative temperature [C]
Calculates operative temperature in accordance with ISO 7726:1998 [5].
"ISO"
| "ASHRAE"
)): Array<number>(("ISO"
| "ASHRAE"
)
= "ISO"
)
the standard to use
Array<number>
:
operative temperature [C]
Converts globe temperature reading into mean radiant temperature in accordance with either the Mixed Convection developed by Teitelbaum E. et al. (2022) or the ISO 7726:1998 Standard [5].
"Mixed Convection"
| "ISO"
)): number(number)
globe temperature, [°C]
(number)
air temperature, [°C]
(number)
air speed, [m/s]
(number
= 0.15
)
diameter of the globe, [m] default 0.15 m
(number
= 0.95
)
emissivity of the globe temperature sensor, default 0.95
(("Mixed Convection"
| "ISO"
)
= "Mixed Convection"
)
either choose between the Mixed Convection and ISO formulations.
The Mixed Convection formulation has been proposed by Teitelbaum E. et al. (2022)
to better determine the free and forced convection coefficient used in the
calculation of the mean radiant temperature. They also showed that mean radiant
temperature measured with ping-pong ball-sized globe thermometers is not reliable
due to a stochastic convective bias
[22]
. The Mixed Convection model has only
been validated for globe sensors with a diameter between 0.04 and 0.15 m.
number
:
Converts globe temperature reading into mean radiant temperature in accordance with either the Mixed Convection developed by Teitelbaum E. et al. (2022) or the ISO 7726:1998 Standard [5].
"Mixed Convection"
| "ISO"
)): Array<number>(("Mixed Convection"
| "ISO"
)
= "Mixed Convection"
)
either choose between the Mixed Convection and ISO formulations. Refer to the
t_mrt
function for more information
Array<number>
:
Calculates psychrometric values of air based on dry bulb air temperature and relative humidity.
(number)
air temperature, [°C]
(number)
relative humidity, [%]
(number
= 101325
)
atmospheric pressure, [Pa]
PsyTaRhReturnType
:
object with calculated psychrometrics values
import { psy_ta_rh } from "jsthermalcomfort";
const results = psy_ta_rh(21, 56);
console.log(results); // { p_sat: 2487.7, p_vap: 1393.112, hr: -2.2041754048718936, t_wb: 15.4, t_dp: 11.9, h: -5575107.96 }
Returns the body surface area in square meters
"dubois"
| "takahira"
| "fujimoto"
| "kurazumi"
)): number(number)
body weight, [kg]
(number)
height, [m]
(("dubois"
| "takahira"
| "fujimoto"
| "kurazumi"
)
= "dubois"
)
formula used to calculate the body surface area. default="dubois"
number
:
body surface area, [m2]
Estimates the relative air speed which combines the average air speed of the space plus the relative air speed caused by the body movement. Vag is assumed to be 0 for metabolic rates equal and lower than 1 met and otherwise equal to Vag = 0.3 (M - 1) (m/s)
number
:
relative air speed, [m/s]
Estimates the relative air speed which combines the average air speed of the space plus the relative air speed caused by the body movement. Vag is assumed to be 0 for metabolic rates equal and lower than 1 met and otherwise equal to Vag = 0.3 (M - 1) (m/s)
Array<number>
:
relative air speed, [m/s]
Estimates the dynamic clothing insulation of a moving occupant. The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met)
(number)
clothing insulation, [clo]
(number)
metabolic rate, [met]
(("ASHRAE"
| "ISO"
)
= "ASHRAE"
)
If "ASHRAE", uses Equation provided in Section 5.2.2.2 of ASHRAE 55 2020
number
:
dunamic clothing insulation, [clo]
Estimates the dynamic clothing insulation of a moving occupant. The activity as well as the air speed modify the insulation characteristics of the clothing and the adjacent air layer. Consequently, the ISO 7730 states that the clothing insulation shall be corrected [2]. The ASHRAE 55 Standard corrects for the effect of the body movement for met equal or higher than 1.2 met using the equation clo = Icl × (0.6 + 0.4/met)
"ASHRAE"
| "ISO"
)): Array<number>(("ASHRAE"
| "ISO"
)
= "ASHRAE"
)
If "ASHRAE", uses Equation provided in Section 5.2.2.2 of ASHRAE 55 2020
Array<number>
:
dunamic clothing insulation, [clo]
Converts IP values to SI units
"IP"
| "SI"
)): T(T)
[t, v] units to convert
(("IP"
| "SI"
)
= "IP"
)
specify system to convert from
T
:
converted values in SI units
Converts IP values to SI units
"IP"
| "SI"
)): T(T)
[t, v] units to convert
(("IP"
| "SI"
)
= "IP"
)
specify system to convert from
T
:
converted values in SI units
Estimates the running mean temperature also known as prevailing mean outdoor temperature
"IP"
| "SI"
)): number(number
= 0.8
)
constant between 0 and 1. The EN 16798-1 2019
[3]
recommends a value of 0.8,
while the ASHRAE 55 2020 recommends to choose values between 0.9 and 0.6,
corresponding to a slow- and fast- response running mean, respectively.
Adaptive comfort theory suggest that a slow-response running mean (alpha = 0.9)
could be more appropriate for climates in which synoptic-scale (day-to-day)
temperature dynamics are relatively minor, sich as the humid tropics.
(("IP"
| "SI"
)
= "SI"
)
select the SI (International System of Units) or the IP (Imperial Units) system.
number
:
running mean outdoor temperature
Met values of typical tasks.
Type: Object
(number)
: 0.7
(number)
: 0.8
(number)
: 1.0
(number)
: 1.0
(number)
: 1.0
(number)
: 1.1
(number)
: 1.2
(number)
: 1.2
(number)
: 1.2
(number)
: 1.4
(number)
: 1.5
(number)
: 1.7
(number)
: 1.8
(number)
: 1.8
(number)
: 2.0
(number)
: 2.1
(number)
: 2.2
(number)
: 2.2
(number)
: 2.4
(number)
: 2.6
(number)
: 2.7
(number)
: 3.2
(number)
: 3.4
(number)
: 3.5
(number)
: 3.8
(number)
: 3.8
(number)
: 4.0
(number)
: 4.0
(number)
: 4.4
(number)
: 6.3
(number)
: 7.8
import { met_typical_tasks } from "jsthermalcomfort/utilities"; //The path to utilities
console.log(met_typical_tasks['Seated_Cquiet']);
// output 1.0
Total Clothing insulation of typical ensembles
"Walking shorts, short-sleeve shirt"
| "Typical summer indoor clothing"
| "Knee-length skirt, short-sleeve shirt, sandals, underwear"
| "Trousers, long-sleeve shirt"
| "Knee-length skirt, long-sleeve shirt, full slip"
| "Sweat pants, long-sleeve sweatshirt"
| "Jacket, Trousers, long-sleeve shirt"
| "Typical winter indoor clothing"
)): number(("Walking shorts, short-sleeve shirt"
| "Typical summer indoor clothing"
| "Knee-length skirt, short-sleeve shirt, sandals, underwear"
| "Trousers, long-sleeve shirt"
| "Knee-length skirt, long-sleeve shirt, full slip"
| "Sweat pants, long-sleeve sweatshirt"
| "Jacket, Trousers, long-sleeve shirt"
| "Typical winter indoor clothing"
))
Typical ensembles. One of:
number
:
Clothing insulation of the given ensembles
const result = clo_typical_ensembles("Trousers, long-sleeve shirt"); // returns 0.61
Clo values of individual clothing elements. To calculate the total clothing insulation you need to add these values together.
Type: Object
(number)
: 0.0
(number)
: 0.01
(number)
: 0.01
(number)
: 0.02
(number)
: 0.02
(number)
: 0.03
(number)
: 0.02
(number)
: 0.03
(number)
: 0.03
(number)
: 0.04
(number)
: 0.06
(number)
: 0.06
(number)
: : 0.08,
(number)
: 0.08
(number)
: 0.1
(number)
: 0.15
(number)
: 0.1
(number)
: 0.12
(number)
: 0.14
(number)
: 0.15
(number)
: 0.16
(number)
: 0.17
(number)
: 0.1
(number)
: 0.17
(number)
: 0.18
(number)
: 0.19
(number)
: 0.2
(number)
: 0.2
(number)
: 0.23
(number)
: 0.25
(number)
: 0.34
(number)
: 0.34
(number)
: 0.31
(number)
: 0.34
(number)
: 0.42
(number)
: 0.46
(number)
: 0.48
(number)
: 0.57
(number)
: 0.69
(number)
: 0.15
(number)
: 0.24
(number)
: 0.28
(number)
: 0.3
(number)
: 0.49
(number)
: 0.14
(number)
: 0.33
(number)
: 0.47
(number)
: 0.29
(number)
: 0.23
(number)
: 0.27
(number)
: 0.25
(number)
: 0.36
(number)
: 0.36
(number)
: 0.44
(number)
: 0.42
(number)
: 0.48
import { clo_individual_garments } from "jsthermalcomfort/utilities"; //The path to utilities
console.log(clo_individual_garments['Metal_chair']);
// output 0.0
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
When reporting a bug please include:
If you find any issue in our online documentation please open an issue.
jsthermalcomfort could always use more documentation, whether as part of the official jsthermalcomfort docs, in JSDocs, or even on the web in blog posts, articles, and such.
The best way to send feedback is to file an issue at https://github.com/FedericoTartarini/jsthermalcomfort/issues
If you are proposing a feature:
To set up jsthermalcomfort for local development:
Fork jsthermalcomfort (look for the “Fork” button).
Clone your fork locally. Fetch and pull all the updates from the master branch before you do anything:
git clone git@github.com:FedericoTartarini/jsthermalcomfort.git
We use git submodules to pull validation data for the tests, to ensure tests are successful please run:
git submodule update --init --recursive
Create a branch for local development. The naming rule for new branch are, as follows:
You can create a branch locally using the following command. Make sure you only push updates to this new branch only:
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes run all tests using Jest:
npm install
npm run test
npm run format
git add .
git commit -m "Your detailed description of your changes."
npm run docs
git add .
git commit -m "Your detailed description of your changes."
git push origin name-of-your-bugfix-or-feature
Submit a pull request after you have done all your modifications and tested your work. The pull request should include a detailed description of your work:
If you need some code review or feedback while you’re developing the code just make the pull request.
For merging, you should:
npm run test
).We are using JSDoc and documentation.js to automatically build the documentation.
All the files needed to generate the documentation can be found in the docs_theme
repository.
After updating the Markdown files, please run the command:
npm run docs
Please ignore the docs
folder, this folder contains all the files generated by the above command.
Add a file under src/models/
with the name of the function/model and document it.
Add any related functions that are used by your function either in src/utilities/utilities.js
or src/psychrometrics/
. See existing code as example.
@public
, add it to its
corresponding category, for example for models you should do @memberof models
, and lastly you should give it a
proper name for the documentation with @docname
, for example: @docname Clothing prediction
. It is important to
note that you should also add the @public
tag to any types the function exposes/uses.Test your function by writing a test in tests/models/<name_of_model>.test.js
.
To run a subset of tests you can do the following:
npm run test -- '<path_to_test_file>' -t '<test_pattern/name>'
If you are using VSCode you can use the Jest Runner extension to easily run subset of tests.
To create a new release do the following:
package.json
version to the new version (we use the semantic release system for versioning)npm run build
to update the lib
directory (output with types of the library that gets published to NPM)Draft a new release
Choose a tag
and type the new version, for example v0.1.1
Publish release
[1] ANSI, & ASHRAE. (2020). Thermal Environmental Conditions for Human Occupancy. Atlanta.
[2] ISO. (2005). ISO 7730 - Ergonomics of the thermal environment — Analytical determination and interpretation of thermal comfort using calculation of the PMV and PPD indices and local thermal comfort criteria.
[3] EN, & BSI. (2019). Energy performance of buildings - Ventilation for buildings. BSI Standards Limited 2019.
[4] Schiavon, S., & Lee, K. H. (2013). Dynamic predictive clothing insulation models based on outdoor air and indoor operative temperatures. Building and Environment, 59, 250–260. doi.org/10.1016/j.buildenv.2012.08.024
[5] ISO. (1998). ISO 7726 - Ergonomics of the thermal environment instruments for measuring physical quantities.
[6] Stull, R., 2011. Wet-Bulb Temperature from Relative Humidity and Air Temperature. J. Appl. Meteorol. Climatol. 50, 2267–2269. doi.org/10.1175/JAMC-D-11-0143.1
[7] Zare, S., Hasheminejad, N., Shirvan, H.E., Hemmatjo, R., Sarebanzadeh, K., Ahmadi, S., 2018. Comparing Universal Thermal Climate Index (UTCI) with selected thermal indices/environmental parameters during 12 months of the year. Weather Clim. Extrem. 19, 49–57. https://doi.org/10.1016/j.wace.2018.01.004
[8] ISO, 2004. ISO 7933 - Ergonomics of the thermal environment — Analytical determination and interpretation of heat stress using calculation of the predicted heat strain.
[9] Błażejczyk, K., Jendritzky, G., Bröde, P., Fiala, D., Havenith, G., Epstein, Y., Psikuta, A. and Kampmann, B., 2013. An introduction to the universal thermal climate index (UTCI). Geographia Polonica, 86(1), pp.5-10.
[10] Gagge, A.P., Fobelets, A.P., and Berglund, L.G., 1986. A standard predictive Index of human reponse to thermal enviroment. Am. Soc. Heating, Refrig. Air-Conditioning Eng. 709–731.
[11] ISO, 2017. ISO 7243 - Ergonomics of the thermal environment — Assessment of heat stress using the WBGT (wet bulb globe temperature) index.
[12] Rothfusz LP (1990) The heat index equation. NWS Southern Region Technical Attachment, SR/SSD 90–23, Fort Worth, Texas
[13] Steadman RG (1979) The assessment of sultriness. Part I: A temperature-humidity index based on human physiology and clothing science. J Appl Meteorol 18:861–873
[14] Masterton JM, Richardson FA. Humidex, a method of quantifying human discomfort due to excessive heat and humidity. Downsview, Ontario: CLI 1-79, Environment Canada, Atmospheric Environment Service, 1979
[15] Havenith, G., Fiala, D., 2016. Thermal indices and thermophysiological modeling for heat stress. Compr. Physiol. 6, 255–302. DOI: doi.org/10.1002/cphy.c140051
[16] Blazejczyk, K., Epstein, Y., Jendritzky, G., Staiger, H., Tinz, B., 2012. Comparison of UTCI to selected thermal indices. Int. J. Biometeorol. 56, 515–535. DOI: doi.org/10.1007/s00484-011-0453-2
[17] Steadman RG (1984) A universal scale of apparent temperature. J Appl Meteorol Climatol 23:1674–1687
[18] ASHRAE, 2017. 2017 ASHRAE Handbook Fundamentals. Atlanta.
[20] Höppe P. The physiological equivalent temperature - a universal index for the biometeorological assessment of the thermal environment. Int J Biometeorol. 1999 Oct;43(2):71-5. doi: 10.1007/s004840050118. PMID: 10552310.
[21] Walther, E. and Goestchel, Q., 2018. The PET comfort index: Questioning the model. Building and Environment, 137, pp.1-10. DOI: doi.org/10.1016/j.buildenv.2018.03.054
[22] Teitelbaum, E., Alsaad, H., Aviv, D., Kim, A., Voelker, C., Meggers, F., & Pantelic, J. (2022). Addressing a systematic error correcting for free and mixed convection when measuring mean radiant temperature with globe thermometers. Scientific Reports, 12(1), 1–18. DOI: doi.org/10.1038/s41598-022-10172-5
[23] Liu, S., Schiavon, S., Kabanshi, A., Nazaroff, W.W., 2017. Predicted percentage dissatisfied with ankle draft. Indoor Air 27, 852–862. DOI: doi.org/10.1111/ina.12364
[24] Polydoros, Anastasios & Cartalis, Constantinos. (2015). Use of Earth Observation based indices for the monitoring of built-up area features and dynamics in support of urban energy studies. Energy and Buildings. 98. 92-99. 10.1016/j.enbuild.2014.09.060.
[25] Yao, Runming & Li, Baizhan & Liu, Jing. (2009). A theoretical adaptive model of thermal comfort – Adaptive Predicted Mean Vote (aPMV). Building and Environment. 44. 2089-2096. 10.1016/j.buildenv.2009.02.014.
[26] Fanger, P. & Toftum, Jorn. (2002). Extension of the PMV model to non-air-conditioned buildings in warm climates. Energy and Buildings. 34. 533-536. 10.1016/S0378-7788(02)00003-8.
[27] Schweiker, M., 2022. Combining adaptive and heat balance models for thermal sensation prediction: A new approach towards a theory and data‐driven adaptive thermal heat balance model. Indoor Air 32, 1–19. DOI: doi.org/10.1111/ina.13018