IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

The VE Python API allows users create simple programs using the Python Programming Language, to interact with a VE Model and/or Vista Results File
Post Reply
ohensby
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Feb 24, 2022 4:29 pm

IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by ohensby »

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
Image

Model 2
Image

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:
Image

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()
Any help with this issue is much appreciated!
RossThompson87
VE Professor
VE Professor
Posts: 202
Joined: Mon Feb 13, 2012 8:56 am

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by RossThompson87 »

Hi,

I basically had the exact same issue.
I got a perfect match with the API and VistaPro in Winter, but it is different in Summer.

https://forums.iesve.com/viewtopic.php? ... c9c53d918a

I haven't been able to solve it. Potentially an adjustment due to clocks changing for British Summer time could be involved.

IES Technical support guided me to this forum, but haven't had a response.

Let me know if you solve it!

Ross
ohensby
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Feb 24, 2022 4:29 pm

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by ohensby »

I think the issue may be with the API obtaining different results to VistaPro for Operative Temperature (TM52/CIBSE).

Image

I am not sure why these results differ but it would be good to figure out why this is the case.
User avatar
Terence
Site Admin
Site Admin
Posts: 411
Joined: Mon Aug 25, 2008 12:58 pm
Location: Glasgow, UK
Contact:

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by Terence »

An update on this, our developers have confirmed an error in the API obtained Operative Temperature variable and are working to correct this for our next major release (VE 2025) Thanks for bringing this to our attention.
Terence McMahon
IES Technical Support
Linkedin
RossThompson87
VE Professor
VE Professor
Posts: 202
Joined: Mon Feb 13, 2012 8:56 am

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by RossThompson87 »

Thanks Terence,

Is this going to have an impact on the Part O reporting feature?

I'm assuming that is using the API obtained operating temperature.

Ross
ohensby
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Feb 24, 2022 4:29 pm

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by ohensby »

Hi Terence,

Thanks for getting back to us on this problem. Just want to follow up with another question...

Will this operative temperature bug affect the Comfort Analysis TM52 report?

We have a calculation for the CIBSE TM52 criteria and we're confident that our calculation is correct but it is producing different results to the IES VE Comfort Analysis TM52 report.

IES TM52 Report

Here is an example of a room from my model using the IES VE CIBSE TM52 reporting tool:

Image

Image

with the air speed set like this:

Image

Our TM52 Report

Here is what our calculation produces (for air speed 0.1m/s) which we can see is different for criteria 1 and 2:
Image

Our calculation uses the air temperature, mean radiant temperature, number of people, and dry bulb temperature all from the IES VE API.

Question

It would be good to figure out where the issue is because in the IES TM52 report the room is passing, whereas in ours it is failing!

Would you mind checking with the developers whether the API operative temperature problem is affecting the IES VE TM52 report output?

We're very happy to share the repository of our code if the developers want to see it.
ohensby
VE Newbie
VE Newbie
Posts: 8
Joined: Thu Feb 24, 2022 4:29 pm

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by ohensby »

Please ignore this above comment ^

The issue was on our end.
tan_veer
VE Newbie
VE Newbie
Posts: 8
Joined: Fri Feb 23, 2024 3:08 pm

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by tan_veer »

Hi Olly,

Are you getting correct Criterion 1 result using delta T variable from vistapro or calculating it using mean outdoor and operative temperatures ? I have observed that VE API throws value of delta T at 0.8m/s not 0.1m/s.
RossThompson87
VE Professor
VE Professor
Posts: 202
Joined: Mon Feb 13, 2012 8:56 am

Re: IES operative temperature (TM 52/CIBSE) different from calculated operative temperature

Post by RossThompson87 »

Terence wrote: Tue Nov 19, 2024 1:03 pm An update on this, our developers have confirmed an error in the API obtained Operative Temperature variable and are working to correct this for our next major release (VE 2025) Thanks for bringing this to our attention.
Hi Terence,

Did this get sorted for IES 2025? I still seem to get different values from the API and Vista Pro...

This was in the release notes, but not too sure if it is releavent..
Python API includes comfort variables in results [ID-182858]: Python API can access all
comfort variables in simulation results files.


Thanks
Ross
Post Reply