architecture-building-systems / CityEnergyAnalyst

The City Energy Analyst (CEA)
https://www.cityenergyanalyst.com/
MIT License
195 stars 65 forks source link

CEA can't handle underground buildings. #3224

Open lguilhermers opened 2 years ago

lguilhermers commented 2 years ago

If there are underground buildings, the script of solar radiation generates an error.

Currently the workaround is to push those buildings above the ground so CEA is able to account for them. The radiation script should be changed to handle those cases. Maybe the demand also needs adjustment in the heat exchanges from surface to outdoor. In this case, should we treat all the envelope as the current floor heat exchange?

lguilhermers commented 2 years ago

Comments raised on another issue and copied here:

@martin-mosteiro: Hm... I guess the most consistent way to deal with underground building is to import a "short" (1m or something) building with WWR = 0 and Hs_ag = 0. But yeah, it's probably best to revert back to # of floors in that case.

On a related but actually separate issue, I also think OSM doesn't differentiate underground and above ground floors either, so if OSM says a building is 5 floors it might still be, say, 2 above ground floors and 3 underground. So we might still be importing the wrong height. That appeared to be the case for a lot of Swiss buildings I worked with back in the day.

@MatNif : Yes, the issue I encountered with underground buildings in the radiation script is in the portion where CEA tries to determine which portion of the building lies under the terrain surface (set at 1m height by default). If the script can't find that intersection it ends up crashing. A simple work-around for this portion would be to select the buildings by height range [height_bg,height_ag] to determine which ones should even be considered for the terrain intersection portion of the script. For the buildings with a height range that is entirely under the terrain line we could then simply fill the radiation results with 0s.

martin-mosteiro commented 2 years ago

@MatNif's suggestion to skip underground buildings and fill in the results with 0's makes a lot of sense!