PHS.js is a JavaScript implementation of the Predicted Heat Strain (PHS) model described in the standard "ISO/FDIS 7933 Ergonomics of the thermal environment — Analytical determination and interpretation of heat stress using calculation of the predicted heat strain". PHS.js is based on "Predicted Heat Strain (PHS) model: computation program written in Quick Basic" in Annex E of the standard.

PHS.js export the following functions:

Loading PHS.js results in a global variable boj.PHS which contains an associative array with references to the exported functions.

Parmeters are handeled using parameter_util.js, which provide functions for setting default values and accessing the parmeters. In the beginning of PHS.js there are descriptions of the parameters. Parameters in par_spec_sim must not be changed during a simulation. Paramters in par_spec_step can be changed between time steps in the simulation.

The text below assumes the statetment var phs = boj.PHS;.

The main steps in a PHS simulation are:

  1. (optional) phs.reset();
  2. Set parameters using parameter_util.js.
  3. phs.sim_init();
  4. For each time step
  5. phs.current_result()

PHS_wci.js (used by PHS.html) is an example of how PHS.js can be used.

One of the goal with PHS.js is to be CPU efficient. The time_step() function will be the most frequently used function and it should do as little as possible. Calculations which results do not changed in a time step are done by the change of parameters.