Surface Temperature Extraction
Posted: Mon Apr 28, 2025 11:27 am
Directed here by IES support. It's my first question here, so sorry if I'm asking the obvious, be kind...
I believe this question has been asked 3 times already, dating back 7 years. If I get an answer I will close off these 3 too:
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2018 “Any recommendations on how do I extract surface temperature … from an internal wall”
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2022 “I am trying to extract the surface simulation data using VE Python API, I went through all of the surfaces and a lot of data was missing, “
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2020 “I have noticed however it doesn't work on internal partitions, nor fully glazed surfaces. Why? How Can I fix it?”
Now my original question to support:
I'm trying to extract surface temperatures for each surface in the model, and for each hour of the year.
My attempt is with the code below. For each room, it finds each surface and gets out temperatures. But it only gives out temperatures for external rooms. My guess: you need to drill down into adjacency level for internal rooms with multiple adjacency. I just (and the 3 other people before me) don't know how to drill down to this level. Code attempt below:
import iesve
from ies_file_picker import IesFilePicker
project = iesve.VEProject.get_current_project()
real_building = project.models[0]
file_name = IesFilePicker.pick_aps_file()
aps_file = iesve.ResultsReader.open(file_name)
c=0
bodies = real_building.get_bodies(False)
for body in bodies:
print("BODY",body.name)
surfaces = body.get_surfaces()
for surface in surfaces:
c=c+1
print ("SURFACE ID ",surface.index," ", surface.type)
surf_properties = surface.get_properties()
surf_dict=aps_file.get_all_surface_results(body.id, surf_properties['aps_handle'],'Int surface temperature')
print(surf_dict)
if c>40:
break
Works fine for external surfaces, but not for internal surfaces. My guess it’s something to do with adjacencies?
Can you help me have the code output temperatures for internal surfaces (or adjacencies) too?
Here's the output,
BODY 000Lift00
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x00
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 ext_wall
{'Int surface temperature': array([4.443468 , 4.434904 , 4.4239907, ..., 3.6893606, 3.6863866,
3.6823366], dtype=float32)}
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x01
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x02
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 ext_wall
{'Int surface temperature': array([4.977598 , 4.9690895, 4.958558 , ..., 4.2698812, 4.266589 ,
4.262176 ], dtype=float32)}
SURFACE ID 4 ext_wall
{'Int surface temperature': array([4.9940414, 4.984935 , 4.9737625, ..., 4.287549 , 4.2839885,
4.2791514], dtype=float32)}
SURFACE ID 5 int_wall
None
BODY 000x03
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 ext_wall
None
SURFACE ID 3 ext_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x05
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 ext_wall
{'Int surface temperature': array([8.746157 , 8.74024 , 8.73263 , ..., 6.658963 , 6.6573944,
6.6548862], dtype=float32)}
SURFACE ID 5 int_wall
None
BODY 000x06
SURFACE ID 0 ground_floor
{'Int surface temperature': array([6.3013434, 6.1525903, 5.9676476, ..., 5.0933304, 5.065756 ,
5.0105977], dtype=float32)}
SURFACE ID 1 roof
{'Int surface temperature': array([6.2879477, 6.1224437, 5.930233 , ..., 5.079647 , 5.052657 ,
4.9985204], dtype=float32)}
SURFACE ID 2 ext_wall
{'Int surface temperature': array([6.7030573, 6.6509085, 6.578186 , ..., 5.335616 , 5.328577 ,
5.313607 ], dtype=float32)}
SURFACE ID 3 int_wall
None
SURFACE ID 4 ext_wall
{'Int surface temperature': array([6.679811 , 6.628497 , 6.5566716, ..., 5.310723 , 5.304026 ,
5.2896314], dtype=float32)}
SURFACE ID 5 ext_wall
{'Int surface temperature': array([6.7254567, 6.6723433, 6.598647 , ..., 5.360592 , 5.3527813,
5.336939 ], dtype=float32)}
I believe this question has been asked 3 times already, dating back 7 years. If I get an answer I will close off these 3 too:
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2018 “Any recommendations on how do I extract surface temperature … from an internal wall”
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2022 “I am trying to extract the surface simulation data using VE Python API, I went through all of the surfaces and a lot of data was missing, “
https://forums.iesve.com/viewtopic.php? ... 64e04e1776
Asks in 2020 “I have noticed however it doesn't work on internal partitions, nor fully glazed surfaces. Why? How Can I fix it?”
Now my original question to support:
I'm trying to extract surface temperatures for each surface in the model, and for each hour of the year.
My attempt is with the code below. For each room, it finds each surface and gets out temperatures. But it only gives out temperatures for external rooms. My guess: you need to drill down into adjacency level for internal rooms with multiple adjacency. I just (and the 3 other people before me) don't know how to drill down to this level. Code attempt below:
import iesve
from ies_file_picker import IesFilePicker
project = iesve.VEProject.get_current_project()
real_building = project.models[0]
file_name = IesFilePicker.pick_aps_file()
aps_file = iesve.ResultsReader.open(file_name)
c=0
bodies = real_building.get_bodies(False)
for body in bodies:
print("BODY",body.name)
surfaces = body.get_surfaces()
for surface in surfaces:
c=c+1
print ("SURFACE ID ",surface.index," ", surface.type)
surf_properties = surface.get_properties()
surf_dict=aps_file.get_all_surface_results(body.id, surf_properties['aps_handle'],'Int surface temperature')
print(surf_dict)
if c>40:
break
Works fine for external surfaces, but not for internal surfaces. My guess it’s something to do with adjacencies?
Can you help me have the code output temperatures for internal surfaces (or adjacencies) too?
Here's the output,
BODY 000Lift00
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x00
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 ext_wall
{'Int surface temperature': array([4.443468 , 4.434904 , 4.4239907, ..., 3.6893606, 3.6863866,
3.6823366], dtype=float32)}
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x01
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x02
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 ext_wall
{'Int surface temperature': array([4.977598 , 4.9690895, 4.958558 , ..., 4.2698812, 4.266589 ,
4.262176 ], dtype=float32)}
SURFACE ID 4 ext_wall
{'Int surface temperature': array([4.9940414, 4.984935 , 4.9737625, ..., 4.287549 , 4.2839885,
4.2791514], dtype=float32)}
SURFACE ID 5 int_wall
None
BODY 000x03
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 ext_wall
None
SURFACE ID 3 ext_wall
None
SURFACE ID 4 int_wall
None
SURFACE ID 5 int_wall
None
BODY 000x05
SURFACE ID 0 floor
None
SURFACE ID 1 ceiling
None
SURFACE ID 2 int_wall
None
SURFACE ID 3 int_wall
None
SURFACE ID 4 ext_wall
{'Int surface temperature': array([8.746157 , 8.74024 , 8.73263 , ..., 6.658963 , 6.6573944,
6.6548862], dtype=float32)}
SURFACE ID 5 int_wall
None
BODY 000x06
SURFACE ID 0 ground_floor
{'Int surface temperature': array([6.3013434, 6.1525903, 5.9676476, ..., 5.0933304, 5.065756 ,
5.0105977], dtype=float32)}
SURFACE ID 1 roof
{'Int surface temperature': array([6.2879477, 6.1224437, 5.930233 , ..., 5.079647 , 5.052657 ,
4.9985204], dtype=float32)}
SURFACE ID 2 ext_wall
{'Int surface temperature': array([6.7030573, 6.6509085, 6.578186 , ..., 5.335616 , 5.328577 ,
5.313607 ], dtype=float32)}
SURFACE ID 3 int_wall
None
SURFACE ID 4 ext_wall
{'Int surface temperature': array([6.679811 , 6.628497 , 6.5566716, ..., 5.310723 , 5.304026 ,
5.2896314], dtype=float32)}
SURFACE ID 5 ext_wall
{'Int surface temperature': array([6.7254567, 6.6723433, 6.598647 , ..., 5.360592 , 5.3527813,
5.336939 ], dtype=float32)}