Package: pythermalcomfort
Package to calculate several thermal comfort indices (e.g. PMV, PPD, SET, adaptive) and convert physical variables.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.100578Free software: MIT licenseInstallationpip install pythermalcomfortYou can also install the in-development version with:pip install https://github.com/CenterForTheBuiltEnvironment/pythermalcomfort/archive/master.zipDocumentationhttps://pythermalcomfort.readthedocs.io/Examples and TutorialsExamplesfiles on how to use some of the functionsContributingContributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given. Clickhereto learn more on how to contribute to the project.DeploymentI am using travis to test the code. In addition, I have enabled GitHub actions.
Every time the code is pushed or pulled to themasterrepository then the GitHub action tests the code and if the tests pass, a new version of the package is published automatically on PyPI.
See file in.github/workflows/for more information.Changelog2.9.1 (2024-01-19)Fixed error calculation of mass sweating in PET mode, the unit was incorrect2.9.0 (2024-01-15)Warningpythermalcomfort 2.9.0 is no longer compatible with Python 3.8The PHS model accepts arrays as inputs2.8.11 (2023-10-26)wrote more test and improved code2.8.11 (2023-10-26)fixed issues with the documentation and sorted the models in alphabetical order2.8.7 (2023-10-23)Adaptive ASHRAE now returns a dataclass2.8.6 (2023-10-09)re-structured and linted the code2.8.4 (2023-09-20)calculation of cooling effect in pmv (standard=’ashrae’) triggered only when v>0.1 m/s2.8.3 (2023-09-14)general improvements in the JOS3 model2.8.2 (2023-09-04)general improvements in the JOS3 modelfixed error when e_max == 02.8.1 (2023-07-05)pythermalcomfort needs Python version > 3.8fixed issue in Cooling Effect calculation2.8.0 (2023-07-03)allowing the cooling effect to range from 0 to 40fixed PHS documentationimproved JOS3 documentation2.7.0 (2023-02-16)changed coefficient of vasodilation in set_tmp() to 120 to match ASHRAE 55 2020 codeslightly modified value in validation tables2.6.0 (2023-01-17)max sweating rate can be passed to two node modelmax skin wettedness can be passed to two node modelrounding w to two decimalsuse_fans_heatwave function accepts arraysfixed typos unit documentation2.5.4 (2022-10-12)PHS model accepts all required inputs to be run on a minute by minute basisfix error check compliance PHS model2.5.0 (2022-06-13)Added the adaptive thermal heat balance (ATHB) model2.4.0 (2022-06-10)Added e_pmv model - Adjusted Predicted Mean Votes with Expectancy FactorAdded a_pmv model - Adaptive Predicted Mean Vote2.3.0 (2022-06-01)Added discomfort index2.2.0 (2022-05-17)Implemented a better equation to calculate the mean radiant temperature2.1.1 (2022-05-17)Fixed how DISC is calculated2.1.0 (2022-04-20)Added Physiological Equivalent Temperature (PET) modelIn PMV and PPD function you can specify if occupants has control over airspeed2.0.2 (2022-04-12)UTCI accepts lists as inputs2.0.0 (2022-04-07)WarningVersion 2.0.0 introduces some breaking changes. Now the default behaviour of most of the function is that they return anp.nanif the inputs are outside the model applicability limits.For most functions we are no longer printingWarnings. If you want the function to return a value even if your inputs are outside the model applicability limits then you can set the variablelimit_input = False. Please note that you should refrain from doing this.NoteStarting from Version 2.0.0 of pythermalcomfort now most of the functions (see detailed list below) accept Numpy arrays or lists as inputs. This allows you to write more concise and faster code since we optimized vectorization, where possible using Numba.Allowing users to pass Numpy arrays or lists as input to the pmv_ppd, pmv, clo_tout, both adaptive models, utci, set_tmp, two_nodesChanged the input variable from return_invalid to limit_inputIncreased speed by using Numba @vectorize decoratorChanged ASHRAE 55 2020 limits to match new addendaImproved documentation1.11.0 (2022-03-16)Allowing users to pass a Numpy array as input into the UTCI functionNumpy is now a requirement of pythermalcomfortImproved PMV, JOS-3, and UTCI documentationTesting PMV, SET, and solar gains models using online reference tables1.10.0 (2021-11-15)Added JOS-3 model1.9.0 (2021-10-07)Added Normal Effective Temperature (NET)Added Apparent Temperature (AT)Added Wind Chill Index (WCI)1.8.0 (2021-09-28)Gagge’s two-node modelAdded WBGT equationAdded Heat index (HI)Added humidex index1.7.1 (2021-09-08)Added ASHRAE equation to calculate the operative temperature1.7.0 (2021-07-29)Implemented function to calculate the if fans are beneficial during heatwavesFixed error in the SET equation to calculated radiative heat transfer coefficientFixed error in SET definitionMoved functions optimized with Numba to new file1.6.2 (2021-07-08)Updated equation clo_dynamic based on ANSI/ASHRAE Addendum f to ANSI/ASHRAE Standard 55-2020Fixed import errors in examples1.6.1 (2021-07-05)optimized UTCI function with Numba1.6.0 (2021-05-21)(BREAKING CHANGE) moved some of the functions from psychrometrics to utilitiesadded equation to calculate body surface area1.5.2 (2021-05-05)return stress category UTCI1.5.1 (2021-04-29)optimized phs with Numba1.5.0 (2021-04-21)added Predicted Heat Strain (PHS) index from ISO 7933:20041.4.6 (2021-03-30)changed equation to calculate convective heat transfer coefficient in set_tmp() as per Gagge’s 1986fixed vasodilation coefficient in set_tmp()docs changed term air velocity with air speed and improved documentationadded new tests for comfort functions1.3.6 (2021-02-04)fixed error calculation solar_altitude and sharp for supine person in solar_gain1.3.5 (2021-02-02)not rounding SET temperature when calculating cooling effect1.3.3 (2020-12-14)added function to calculate sky-vault view fraction1.3.2 (2020-12-14)replaced input solar_azimuth with sharp in the solar_gain() functionfixed small error in example pmv calculation1.3.1 (2020-10-30)Fixed error calculation of cooling effect with elevated air temperatures1.3.0 (2020-10-19)Changed PMV elevated air speed limit from 0.2 to 0.1 m/s1.2.3 (2020-09-09)Fixed error in the calculation of erfUpdated validation table erf1.2.2 (2020-08-21)Changed default diameter in t_mrtImproved documentation1.2.0 (2020-07-29)Significantly improved calculation speed using numba. Wrapped set and pmv functions1.0.6 (2020-07-24)Minor speed improvement changed math.pow with **Added validation PMV validation table from ISO 77301.0.4 (2020-07-20)Improved speed calculation of the Cooling EffectBisection has been replaced with Brentq function from scipy1.0.3 (2020-07-01)Annotated variables in the SET code.1.0.2 (2020-06-11)Fixed an error in the bisection equation used to calculated Cooling Effect.1.0.0 (2020-06-09)Major stable release.0.7.0 (2020-06-09)Added equation to calculate the dynamic clothing insulation0.6.3 (2020-04-11)Fixed error in calculation adaptive ASHRAEAdded some examples0.6.3 (2020-03-17)Renamed function to_calc to t_oFixed error calculation of relative air speedrenamed input parameter ta to tdbAdded function to calculate mean radiant temperature from black globe temperatureAdded function to calculate solar gain on peopleAdded functions to calculate vapour pressure, wet-bulb temperature, dew point temperature, and psychrometric data from dry bulb temperature and RHAdded authorsAdded dictionaries with reference clo and met valuesAdded function to calculate enthalpy0.5.2 (2020-03-11)Added function to calculate the running mean outdoor temperature0.5.1 (2020-03-06)There was an error in version 0.4.2 in the calculation of PMV and PPD with elevated air speed, i.e. vr > 0.2 which has been fixed in this versionAdded function to calculate the cooling effect in accordance with ASHRAE0.4.1 (2020-02-17)Removed compatibility with python 2.7 and 3.50.4.0 (2020-02-17)Created adaptive_EN, v_relative, t_clo, vertical_tmp_gradient, ankle_draft functions and wrote tests.Added possibility to decide with measuring system to use SI or IP.0.3.0 (2020-02-13)Created set_tmp, adaptive_ashrae, UTCI functions and wrote tests.Added warning to let the user know if inputs entered do not comply with Standards applicability limits.0.1.0 (2020-02-11)Created pmv, pmv_ppd functions and wrote tests.Documented code.0.0.0 (2020-02-11)First release on PyPI.