CBE Thermal Comfort Tool: Online tool for thermal comfort calculations and visualizations

© 2020 The Authors The Center for the Built Environment (CBE) Thermal Comfort Tool is a free online tool for thermal comfort calculations and visualizations that complies with the ASHRAE 55–2017, ISO 7730:2005 and EN 16798–1:2019 Standards. It incorporates the major thermal comfort models, including the Predicted Mean Vote (PMV), Standard Effective Temperature (SET), adaptive models, local discomfort models, SolarCal, and dynamic predictive clothing insulation. Our tool also provides dynamic and interactive visualizations of thermal comfort zones. The CBE Thermal Comfort Tool has several practical applications and each year is used by more than 49,000 users worldwide, including engineers, architects, researchers, educators, facility managers and policymakers.


Motivation and significance
People spend the majority of their time indoors and thermal environmental conditions significantly affect their well-being, performances and the overall satisfaction with the built environment [1][2][3]. For this reason, starting in the 1960's, numerous thermal comfort indices have been developed. Among which, the most widely adopted and used are the Predicted Mean Vote (PMV ) [4], the Standard Effective Temperature (SET ) [5] and the EN and ASHRAE Adaptive thermal comfort models [6,7].
International thermal comfort Standards, such as the ASHRAE 55-2017 [8] and the ISO 7730:2005 [9], and scientific publications provide methods to calculate thermal comfort indices, but they are not freely available to the public. Moreover, even for * Corresponding author.
E-mail address: federicotartarini@berkeley.edu (F. Tartarini). skilled users it may take a significant amount of time to rewrite the source code to calculate a comfort index, making it an error prone process. Open source packages to calculate thermal comfort indices such as: comf [10] and pythermalcomfort [11] are available and can be used by researchers or skilled users. However, we did not find any available tool which could be used to calculate thermal comfort indices, provide visual and highly interactive representation of the thermal comfort zones with no prior coding skills [12]. Possibly because the conversion of equations to codes, requires a combination of high programming skills, and a significant investments of time which in turns discourages developers in releasing free tools. An open source interactive visualization tool may on the other hand help engineers, architects, researchers, educators, facility managers and policymakers to better understand how to design and operate buildings to enhance thermal comfort conditions indoors while minimizing energy consumption. To overcome all the above mentioned issues and provide an easy to use platform to calculate and visualize thermal comfort indices we developed the Center for the Built Environment (CBE) Thermal Comfort Tool. Our tool provides a simple user interface, making it a valuable tool for users with different backgrounds and skill sets. It allows users to perform complex thermal comfort calculations without the need of having to write code. The CBE Thermal Comfort Tool is freely accessible via the following public URL: https://comfort.cbe.berkeley.edu. It offers a wide range of features, ranging from simple ones like allowing users to select their preferred systems of units (i.e. SI or IP) to advanced features like the ''Upload'' page which can be used by experts in the building sector to upload time-series data and quantify the thermal environment in either new or existing buildings.
The first version of the CBE Thermal Comfort Tool was originally published in 2014 [12]. In 2019, we released a new version which added several new features to the original tool including: the 'Upload' page; comfort compliance calculation and visualization for the ISO 7730:2005 [9] and the EN 16798-1:2019 [13] Standards; the 'heat loss against air temperature' chart; the 'air velocity against operative temperature' chart; we made the code compliant with the latest version of the ASHRAE 55-2017 [8] Standard; added the predicted percentage dissatisfied with ankle draft model [14]; and, the predicted percentage dissatisfied with vertical temperature gradient [15]. We improved the design and usability of the graphical user interface. A detailed description of the functionalities of the CBE Thermal Comfort Tool can be found in Section 2.2.
This manuscript describes the CBE thermal comfort tool. The software architecture and functionalities are described in Section 2. Illustrative examples on how to use our software are presented in Section 3. The tool impact and practical applications are detailed in Section 4. Conclusions are presented in Section 5. Fig. 1 shows a screenshot of the home page for the CBE Thermal Comfort Tool. The tool comprises six different pages: ASHRAE 55, EN 16798, Compare, Ranges, Upload and Other CBE tools. The navigation bar on the top side of the web-page allows users to navigate between pages. The left side of each page (excluding Upload and Other CBE tools) contains the input values that users can modify and adjust. The right side displays the results and generally contains an interactive chart. The chart and the results update in real-time as users change the input values. In addition, some charts display psychrometrics parameters when the mouse is hovered over the plot area. Notes regarding the applicability limits and a brief description of each chart, where present, are shown below the main figure. The great majority of the text contain static links to the appropriate Wikipedia [16] page or to the tool official documentation. Finally, the footer, located at the bottom of the page reports information on how to cite the website, contact the developer, report code issues or request new features, and a link to video tutorials on how to use the tool.

Software architecture
The CBE Thermal Comfort Tool is a web-based application. It uses Flask [17] as a web server gateway interface for Python [18], while it uses HTML5, CSS and JavaScript [19] to control the client-side page behavior. Bootstrap is used to ensure maximum compatibility between different devices [20]. The CBE Thermal Comfort Tool has been successfully tested in Google Chrome, Firefox, Safari, Microsoft Edge, Microsoft Explorer, and Opera. The tool employs several JavaScript open source libraries, including d3.js [21], jQuery, jQueryUI, and Chart.js [22], to plot the interactive charts and to implement functionalities which are not included in HTML5. The computational engine of the tool mainly consists of JavaScript functions with the only exception of the functions used to calculate the thermal comfort indices in the Upload page, which instead uses the pythermalcomfort Python package [11].

Software functionalities
The main functionalities of the CBE Thermal Comfort Tool are described below.
• Thermal comfort indices visualization -The tool dynamically updates the chart and the calculated thermal comfort indices (e.g. PMV , Predicted Percentage of Dissatisfied (PPD), SET , Cooling Effect (CE)) as users change the input parameters. Users can choose to calculate the PMV and PPD in accordance with either the ASHRAE 55-2017 or the EN 16798-1:2019 Standards. In addition, users can decide to visualize the results in any of the following charts: the psychrometric chart with either the operative temperature or the air temperature on the x-axis; the relative humidity vs. air temperature chart; or the air speed vs. operative temperature chart. Finally, users can plot how the human body heat loss (estimated with the PMV method) varies as a function of user defined input parameters and indoor dry-bulb air temperature (t db ).
• Adaptive comfort visualization -The tool allows to visualize the thermal comfort zones on a chart with indoor operative temperature as ordinate and different outdoor temperature indices as abscissa in compliance with the adaptive models provided in the ASHRAE 55-2017 or the EN 16798-1:2019 Standards. This visualization can be selected using the dropdown menu located at the top of the input section. As the user changes the input values, both the figure and results are updated in real-time.
• Thermal comfort comparison (Compare page) -Up to three thermal comfort conditions can be calculated and plotted on the same psychrometric chart at the same time. Users can then compare how different combinations of input conditions affect thermal comfort conditions.
• Thermal comfort ranges (Ranges page) -Generally comfort indices calculations are performed with constant input parameters, however, thermal environment conditions in real buildings are usually not uniform both in space and time. To overcome this problem, the CBE Thermal Comfort Tool allows users to define a range of discrete intervals over which either average air speed (v a ), metabolic rate, or clothing insulation can vary. This feature allows users to assess how thermal comfort zones change as a function of the selected input parameters.

• Comfort indices calculation (Upload page) -It allows users
to upload time-series data, or large sets of input parameters and automatically calculate: PMV , PPD, SET , and CE. This feature can be used, for example, to perform exceedance predictions (annual or seasonal) for simulated or real buildings.
• Local discomfort assessment -This feature can be accessed by clicking on the 'local discomfort' button. It comprises several local discomfort models, including radiant temperature asymmetry, ankle draft and vertical air temperature difference as defined in the ASHRAE [14,15,23] and EN Standards.
• Globe to mean radiant temperature (t r ) -This feature can be accessed by clicking on the 'Globe temp' button. It allows users to calculates the t r as a function of t db , v a and globe temperature (t g ) according to the equation provided in the ISO 7726 Standard [24].  • Shortwave (solar) gain calculator -This feature can be accessed by clicking on the 'Solar gain on occupants' button.
It allows users to converts solar gain (i.e. direct, sky-diffuse, and ground-reflected shortwave radiation) to the equivalent t r [26].
• SI/IP unit selection -Users can toggle between the international system (SI) and the imperial system (IP) of units.

PMV and PPD calculation
This example depicts how an user can calculate the PMV and PPD indices using the CBE Thermal Comfort Tool and plot the thermal comfort zone boundary region. Firstly, the user is required to select whether to perform the calculations in compliance with the ASHRAE or EN Standard by selecting the ''ASHRAE-55" or ''EN-16798" tab in the navigation bar. In this example we will select the ''ASHRAE-55" tab, but the calculation procedures are the same for both cases. Secondly, the user needs to define the input parameters by changing the default values on the left side of the web-page as shown in Fig. 1. As the user changes the input values, changes are displayed in real-time on the right side of the page. Users can visualize the results on different chart types using the drop down menu located above the chart. Fig. 2a and Fig. 2b show the thermal comfort region boundaries on the 'Relative humidity vs. air temperature' chart and the 'Air speed vs. the operative temperature chart', respectively.  Figure (a) and (b) display the same thermal comfort region (i.e. generated using the same inputs) on two different chart types, the 'Relative humidity vs. air temperature' chart and the 'Air speed vs. the operative temperature chart'.

Comfort indices calculation -Upload page
This example shows how an user can calculate the PMV , PPD, SET , and CE values using the Upload page. Firstly, users need to download either the SI or IP template using the provided link. Secondly, they should replace the example data, in the previously downloaded file, with their data. No missing values are allowed. Finally, they should save the edited file in .csv format and upload it by clicking on the ''Choose File'' button first and then on the ''Upload File'' button. The CBE Thermal Comfort Tool will perform the calculations in the back-end and will automatically download the file, when all calculations have been completed.

Impact
The CBE Thermal Comfort Tool is a free and open-source web based tool to calculate and visualize thermal comfort indices. It is intended to be used by users with different backgrounds including engineers, architects, researchers, educators, facility managers and policymakers. It can even be used by non-technical users with no analytical or programming skills. To our knowledge this is the only freely available tool that allows users to perform thermal comfort calculations in compliance with the major thermal comfort Standards and the results are visualized in an user friendly interface. The CBE Thermal Comfort Tool can be used via any device which has a browser and it is compatible with Google Chrome, Firefox, Safari, Microsoft Edge, Microsoft Explorer, and Opera. We have also open-sourced the code, so users around the world can contribute to our project or use our functions in their applications. For example, the source code was used to develop two Python Packages: pythermalcomfort [11] and ladybug-comfort [27]. The former version of the CBE Thermal Comfort Tool had a significant impact in the building sector community. In 2017, it was adopted as the official comfort tool by ASHRAE. The 13th edition of the Mechanical and Electrical Equipment for Buildings [28] suggests the use of the CBE Thermal Comfort Tool for thermal comfort calculations and visualizations. The Technical Guide and Requirements 2017 published by the Building and Construction Authority in Singapore states that CBE Thermal Comfort Tool can be used to demonstrate project's compliance to thermal comfort [29]. In 2019, data collected using Google Analytics showed that the tool had been used by 49,000 unique users in all continents excluding Antarctica. The CBE Thermal Comfort Tool had also been cited 175 times in different publications. We expect that the new version of CBE Thermal Comfort Tool, which has a better user interface and additional features, could bring greater benefit to many sectors.

Conclusions
The CBE Thermal Comfort Tool is a free web-based thermal comfort tool that allows users to perform calculations and visualizations in compliance with the major thermal comfort Standards. In 2019, we released a new version of this tool which has a better user interface, new charts, features and thermal comfort models. Moreover, it complies with more International thermal comfort Standards. Hence, we foresee that this new updated version will reach even a wider audience and will be used for diverse thermal comfort related applications. Our tool allows users to perform complex thermal comfort calculations and visualize the results without the need of having to write any code, making it a valuable tool for a wide audience.

Declaration of competing interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.