Skip buildings that doesn't have internal zone in the MEB export
This commit is contained in:
parent
34172055a6
commit
3d883fc068
|
@ -13,14 +13,14 @@ from hub.imports.weather.helpers.weather import Weather
|
||||||
import hub.helpers.constants as cte
|
import hub.helpers.constants as cte
|
||||||
|
|
||||||
_CONSTRUCTION_CODE = {
|
_CONSTRUCTION_CODE = {
|
||||||
cte.WALL: '1',
|
cte.WALL: '1',
|
||||||
cte.GROUND: '2',
|
cte.GROUND: '2',
|
||||||
cte.ROOF: '3',
|
cte.ROOF: '3',
|
||||||
cte.INTERIOR_WALL: '5',
|
cte.INTERIOR_WALL: '5',
|
||||||
cte.GROUND_WALL: '6',
|
cte.GROUND_WALL: '6',
|
||||||
cte.ATTIC_FLOOR: '7',
|
cte.ATTIC_FLOOR: '7',
|
||||||
cte.INTERIOR_SLAB: '8'
|
cte.INTERIOR_SLAB: '8'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class InselMonthlyEnergyBalance(Insel):
|
class InselMonthlyEnergyBalance(Insel):
|
||||||
|
@ -35,8 +35,10 @@ class InselMonthlyEnergyBalance(Insel):
|
||||||
self._insel_files_paths.append(building.name + '.insel')
|
self._insel_files_paths.append(building.name + '.insel')
|
||||||
file_name_out = building.name + '.out'
|
file_name_out = building.name + '.out'
|
||||||
output_path = Path(self._path / file_name_out).resolve()
|
output_path = Path(self._path / file_name_out).resolve()
|
||||||
self._contents.append(self.generate_meb_template(building, output_path, self._radiation_calculation_method,
|
if building.internal_zones is not None:
|
||||||
self._weather_format))
|
self._contents.append(
|
||||||
|
self.generate_meb_template(building, output_path, self._radiation_calculation_method,self._weather_format)
|
||||||
|
)
|
||||||
self._export()
|
self._export()
|
||||||
|
|
||||||
def _export(self):
|
def _export(self):
|
||||||
|
@ -86,7 +88,7 @@ class InselMonthlyEnergyBalance(Insel):
|
||||||
total_internal_gain = 0
|
total_internal_gain = 0
|
||||||
for ig in usage.internal_gains:
|
for ig in usage.internal_gains:
|
||||||
total_internal_gain += float(ig.average_internal_gain) * \
|
total_internal_gain += float(ig.average_internal_gain) * \
|
||||||
(float(ig.convective_fraction) + float(ig.radiative_fraction))
|
(float(ig.convective_fraction) + float(ig.radiative_fraction))
|
||||||
parameters.append(f'{total_internal_gain} % BP(12) #2 Internal gains of zone {i + 1}')
|
parameters.append(f'{total_internal_gain} % BP(12) #2 Internal gains of zone {i + 1}')
|
||||||
parameters.append(f'{usage.thermal_control.mean_heating_set_point} % BP(13) #3 Heating setpoint temperature '
|
parameters.append(f'{usage.thermal_control.mean_heating_set_point} % BP(13) #3 Heating setpoint temperature '
|
||||||
f'zone {i + 1} (degree Celsius)')
|
f'zone {i + 1} (degree Celsius)')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user