IES operative temperature (TM 52/CIBSE) different from calculated operative temperature
Posted: Wed Sep 04, 2024 4:32 pm
Issue
IES VE Version: 2023.5.2.0
Hi, I have calculated the operative temperature following CIBSE's TM52 guidance and my output is different to what the IES API returns for the "Operative temperature (TM 52/CIBSE)" variable from VistaPro.
I've run this in two different models and the absolute difference has ranged from 0.1 to 0.4 in one model, and in another model it has ranged from 0.1 to 3.0. The difference also only seems to appear between the 3000-7000 hour mark.
Model 1

Model 2

I am obtaining the "Air temperature", "Mean radiant temperature", and "Operative temperature (TM 52/CIBSE)" from the IES API using the iesve.ResultsReader class.
Then, I perform the operative temperature calculation using the obtained "Air temperature" and "Mean radiant temperature" from the API with an air speed of 0.1. (I've also set the air speed to 0.1 in the thermal template that's applied).
I have followed calculation (1.2) as defined in CIBSE's TM52 guidance:

Finally, I compare the calculated operative temperature and the "Operative temperature (TM 52/CIBSE)" from the IES API. I plot this difference and dump the separate operative temperatures to a csv.
As shown above, the plot shows that there is indeed a difference between the two operative temperatures and I would like to understand why this is the case?
Code
The code below will allow you to reproduce the output with the plot and a CSV of the calculated operative temperature and the IES "Operative temperature (TM 52/CIBSE)".
IMPORTANT: The ROOM_ID variable is currently set to 2N000001 which is a room in my MODEL 1.
The output is dumped in the project's folder in an ies-comparison folder.
Any help with this issue is much appreciated!
IES VE Version: 2023.5.2.0
Hi, I have calculated the operative temperature following CIBSE's TM52 guidance and my output is different to what the IES API returns for the "Operative temperature (TM 52/CIBSE)" variable from VistaPro.
I've run this in two different models and the absolute difference has ranged from 0.1 to 0.4 in one model, and in another model it has ranged from 0.1 to 3.0. The difference also only seems to appear between the 3000-7000 hour mark.
Model 1
Model 2
I am obtaining the "Air temperature", "Mean radiant temperature", and "Operative temperature (TM 52/CIBSE)" from the IES API using the iesve.ResultsReader class.
Then, I perform the operative temperature calculation using the obtained "Air temperature" and "Mean radiant temperature" from the API with an air speed of 0.1. (I've also set the air speed to 0.1 in the thermal template that's applied).
I have followed calculation (1.2) as defined in CIBSE's TM52 guidance:
Finally, I compare the calculated operative temperature and the "Operative temperature (TM 52/CIBSE)" from the IES API. I plot this difference and dump the separate operative temperatures to a csv.
As shown above, the plot shows that there is indeed a difference between the two operative temperatures and I would like to understand why this is the case?
Code
The code below will allow you to reproduce the output with the plot and a CSV of the calculated operative temperature and the IES "Operative temperature (TM 52/CIBSE)".
IMPORTANT: The ROOM_ID variable is currently set to 2N000001 which is a room in my MODEL 1.
The output is dumped in the project's folder in an ies-comparison folder.
Code: Select all
"""This is purely to check whether the operative temperature calculation returns the same data as what the IES API returns."""
import pathlib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import iesve
from ies_file_picker import IesFilePicker
project = iesve.VEProject.get_current_project()
file_name = IesFilePicker.pick_aps_file()
results_file_reader = iesve.ResultsReader.open(file_name)
FDIR_COMPARISON = pathlib.Path(project.path[:-1]) / "ies-comparison"
FDIR_COMPARISON.mkdir(exist_ok=True, parents=True)
ROOM_ID = "2N000001" # Define a room ID that exists within the project.
def calculate_operative_temp(air_temp: np.array, air_speed: float, mean_radiant_temp: np.array) -> np.array:
"""Calculates Operative Temperature for Given Conditions
*See CIBSE TM52: 2013, Page 4, Equation 1.2, Box 1*"""
if air_speed < 0.1:
air_speed = 0.1
return (air_temp * np.sqrt(10 * air_speed) + mean_radiant_temp) / (1 + np.sqrt(10 * air_speed))
def get_air_temp(room_id: str, start_day: int=1, end_day: int=365) -> np.array:
return results_file_reader.get_room_results(
room_id,
"Air temperature",
"Air temperature",
"z",
start_day=start_day,
end_day=end_day
)
def get_mean_radiant_temp(room_id: str, start_day: int=1, end_day: int=365) -> np.array:
return results_file_reader.get_room_results(
room_id,
"Mean radiant temperature",
"Mean radiant temperature",
"z",
start_day=start_day,
end_day=end_day
)
def get_operative_temp(room_id: str, start_day: int=1, end_day: int=365) -> np.array:
return results_file_reader.get_room_results(
room_id,
"Operative temperature (TM 52/CIBSE)",
"Operative temperature (TM 52/CIBSE)",
"z",
start_day=start_day,
end_day=end_day
)
def plot_comparison():
fig, ax = plt.subplots()
ies_operative_temp = get_operative_temp(room_id=ROOM_ID)
ies_air_temp = get_air_temp(room_id=ROOM_ID)
ies_mean_radiant_temp = get_mean_radiant_temp(room_id=ROOM_ID)
air_speed = 0.1
calc_operative_temp = calculate_operative_temp(
air_temp=ies_air_temp,
air_speed=air_speed,
mean_radiant_temp=ies_mean_radiant_temp
)
operative_temp_diff = calc_operative_temp - ies_operative_temp
df = pd.DataFrame({
'calc_operative_temp': calc_operative_temp,
'ies_operative_temp': ies_operative_temp
})
# Save the DataFrame to a CSV file
df.to_csv(FDIR_COMPARISON / f"{ROOM_ID}-op_temp-diff.csv", index=False)
plt.plot(range(len(operative_temp_diff)), operative_temp_diff)
plt.xlabel('Hours')
plt.ylabel('Change between IES VistaPro and Calculated')
plt.title(f'Operative Temperature - {ROOM_ID}')
plt.grid(True)
fig.savefig(FDIR_COMPARISON / f"{ROOM_ID}-operative-temp-diff")
plt.close(fig)
if __name__ == "__main__":
plot_comparison()