pythermalcomfort icon indicating copy to clipboard operation
pythermalcomfort copied to clipboard

PHS code

Open FedericoTartarini opened this issue 1 year ago • 1 comments

Implement the new PHS code published in the 2023 standard

FedericoTartarini avatar Dec 18 '24 07:12 FedericoTartarini

At the moment there's the parameter

    acclimatized : int, optional
        100 if acclimatized subject, 0 otherwise. Defaults to 100.

Are there any reasons this is int instead of a bool?

rcqz avatar Apr 14 '25 10:04 rcqz

I know this is strange, but this is how they wrote the code in the ISO standard, it makes no sense, I know.

Image

However, we should leave it like this since we are planning to propose a model which will use this integer value to change the max skin wetdness value.

FedericoTartarini avatar Apr 15 '25 01:04 FedericoTartarini

I have reviewed the new 2023 standard and I believe this variable is set to be 0 or 1 in the sample code. Along with this, I believe there are only a few minor updates:

  1. sw_max is only dependent on acclimatized now.
  2. valid ranges for variables t_a and met are changed

There also seems to be a discrepancy between the sample code and the standard:

  • The sample code has Eveff = 1 - wreq ^ 2 / 2 but the standard says $r_{req} = \frac{(1-w_{req})^2}{2}$. This part in the flowchart is also inconsistent and makes it confusing.

rcqz avatar Apr 15 '25 07:04 rcqz

Are these the only changes? It seems that the one you have listed are very minor changes.

FedericoTartarini avatar Apr 15 '25 07:04 FedericoTartarini

These are the main differences I found after comapring the current Python implementation to the 7933-2023 document. Some changes are already implemented, and some of the constants also slightly differ, but I thought they are just approximation problems. Some examples:

  1. In the 2004 standard and the current implementation we have sp_heat = 57.83 * weight / a_dubois, but in the 2023 standard there is aux = 3490 * Weight / Adu: . aux is then divided by 60 whenever it is used later, so there is only a difference of about 0.3 in the constant.
  2. 2023 standard has Tcreqm = 0.0036 * Met + 36.6 but the 2004 one has Tcreqm = 0.0036 * Met + 36.6. I believe this is already implemented.

I do think the changes are overall very minor, but I'll try to double check to see if I've missed anything

rcqz avatar Apr 15 '25 10:04 rcqz