solved some small errors in meb exporter
This commit is contained in:
parent
d432373156
commit
ee58d21b47
@ -1,181 +1,116 @@
|
||||
<catalog lod="1">
|
||||
<generation_equipments>
|
||||
<equipment id="1" type="boiler" fuel_type="gas">
|
||||
<name>Fuel-fired water boiler</name>
|
||||
<heating_efficiency>0.85</heating_efficiency>
|
||||
</equipment>
|
||||
<equipment id="2" type="boiler" fuel_type="electricity">
|
||||
<name>Electric water boiler</name>
|
||||
<heating_efficiency>1</heating_efficiency>
|
||||
</equipment>
|
||||
<equipment id="3" type="furnace" fuel_type="gas">
|
||||
<name>Fuel-fired furnace and fuel boiler for acs</name>
|
||||
<heating_efficiency>0.85</heating_efficiency>
|
||||
</equipment>
|
||||
<equipment id="4" type="furnace" fuel_type="electricity">
|
||||
<name>Electrical furnace and fuel boiler for acs</name>
|
||||
<heating_efficiency>1</heating_efficiency>
|
||||
</equipment>
|
||||
<equipment id="5" type="cooler" fuel_type="electricity">
|
||||
<name>Air cooled DX with external condenser</name>
|
||||
<cooling_efficiency>3.23</cooling_efficiency>
|
||||
</equipment>
|
||||
<equipment id="6" type="electricity generator" fuel_type="renewable">
|
||||
<name>PV system</name>
|
||||
<electrical_efficiency>0.22</electrical_efficiency>
|
||||
</equipment>
|
||||
</generation_equipments>
|
||||
<distribution_equipments>
|
||||
<equipment id="1" type="??">
|
||||
<name>???</name>
|
||||
<distribution_heat_losses units="%">10</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
</equipment>
|
||||
<equipment id="2" type="??">
|
||||
<name>???</name>
|
||||
<distribution_heat_losses units="%">25</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
</equipment>
|
||||
<equipment id="3" type="??">
|
||||
<name>???</name>
|
||||
<distribution_heat_losses units="%">0</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
</equipment>
|
||||
</distribution_equipments>
|
||||
<dissipation_equipments>
|
||||
<equipment id="1" type="baseboards">
|
||||
<name>Baseboards</name>
|
||||
<parasitic_consumption>???</parasitic_consumption>
|
||||
</equipment>
|
||||
</dissipation_equipments>
|
||||
<systems>
|
||||
<system id = "1">
|
||||
<system id="1" type="boiler" fuel_type="gas">
|
||||
<name>Fuel-fired water boiler with baseboards</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>1</generation_id>
|
||||
<distribution_id>1</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>0.85</heating_efficiency>
|
||||
<distribution_heat_losses units="%">10</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="2">
|
||||
<system id="2" type="boiler" fuel_type="electricity">
|
||||
<name>Electrical resistance water boiler</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>2</generation_id>
|
||||
<distribution_id>1</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>1</heating_efficiency>
|
||||
<distribution_heat_losses units="%">10</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>true</storage>
|
||||
</system>
|
||||
<system id="3">
|
||||
<system id="3" type="furnace" fuel_type="gas">
|
||||
<name>Fuel-fired furnace and fuel boiler for acs</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>3</generation_id>
|
||||
<distribution_id>2</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>0.85</heating_efficiency>
|
||||
<distribution_heat_losses units="%">25</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="4">
|
||||
<system id="4" type="furnace" fuel_type="electricity">
|
||||
<name>Electrical resistance furnace and electrical boiler for acs</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>4</generation_id>
|
||||
<distribution_id>2</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>1</heating_efficiency>
|
||||
<distribution_heat_losses units="%">25</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="5">
|
||||
<system id="5" type="baseboard" fuel_type="gas">
|
||||
<name>Baseboards: hydronic with fuel boiler</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>1</generation_id>
|
||||
<distribution_id>1</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>0.85</heating_efficiency>
|
||||
<distribution_heat_losses units="%">10</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="6">
|
||||
<system id="6" type="baseboard" fuel_type="electricity">
|
||||
<name>Electrical baseboards and electrical boiler for acs</name>
|
||||
<demands>
|
||||
<demand>heating</demand>
|
||||
<demand>domestic_hot_water</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>2</generation_id>
|
||||
<distribution_id>3</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<heating_efficiency>1</heating_efficiency>
|
||||
<distribution_heat_losses units="%">0</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="7">
|
||||
<system id="7" type="cooler" fuel_type="electricity">
|
||||
<name>Air cooled DX with external condenser</name>
|
||||
<demands>
|
||||
<demand>cooling</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>5</generation_id>
|
||||
<distribution_id>3</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<cooling_efficiency>3.23</cooling_efficiency>
|
||||
<distribution_heat_losses units="%">0</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="8">
|
||||
<system id="8" type="cooler" fuel_type="electricity">
|
||||
<name>Water cooled, water chiller</name>
|
||||
<demands>
|
||||
<demand>cooling</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>5</generation_id>
|
||||
<distribution_id>1</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<cooling_efficiency>3.23</cooling_efficiency>
|
||||
<distribution_heat_losses units="%">10</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="9">
|
||||
<system id="9" type="cooler" fuel_type="electricity">
|
||||
<name>Air cooled DX</name>
|
||||
<demands>
|
||||
<demand>cooling</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>5</generation_id>
|
||||
<distribution_id>3</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<cooling_efficiency>3.23</cooling_efficiency>
|
||||
<distribution_heat_losses units="%">0</distribution_heat_losses>
|
||||
<distribution_consumption_fix_flow units="%">1000000000</distribution_consumption_fix_flow>
|
||||
<distribution_consumption_variable_flow units="%">1000000000</distribution_consumption_variable_flow>
|
||||
<storage>false</storage>
|
||||
</system>
|
||||
<system id="10">
|
||||
<system id="10" type="electricity generator" fuel_type="renewable">
|
||||
<name>PV system</name>
|
||||
<demands>
|
||||
<demand>electricity</demand>
|
||||
</demands>
|
||||
<equipments>
|
||||
<generation_id>6</generation_id>
|
||||
<distribution_id>???</distribution_id>
|
||||
<dissipation_id>???</dissipation_id>
|
||||
</equipments>
|
||||
<electrical_efficiency>0.22</electrical_efficiency>
|
||||
<storage>true</storage>
|
||||
</system>
|
||||
</systems>
|
||||
|
@ -130,7 +130,15 @@ class InselMonthlyEnergyBalance(Insel):
|
||||
f'% BP(11) #1 Area of zone {i + 1} (m2)')
|
||||
total_internal_gain = 0
|
||||
for ig in usage.internal_gains:
|
||||
total_internal_gain += ig.average_internal_gain * (ig.convective_fraction + ig.radiative_fraction)
|
||||
internal_gain = ig.average_internal_gain * (ig.convective_fraction + ig.radiative_fraction)
|
||||
for schedule in ig.schedules:
|
||||
total_values = sum(schedule.values)
|
||||
total_hours = 0
|
||||
for day_type in schedule.day_types:
|
||||
total_hours += cte.DAYS_A_YEAR[day_type] / 365 / 24
|
||||
total_values *= total_hours
|
||||
total_internal_gain += internal_gain * total_values
|
||||
|
||||
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 '
|
||||
f'zone {i + 1} (degree Celsius)')
|
||||
|
@ -127,7 +127,7 @@ class ConfigurationHelper:
|
||||
def soil_thickness(self) -> float:
|
||||
"""
|
||||
Get configured soil thickness for surfaces touching the ground
|
||||
:return: 0.5
|
||||
:return: 0.5 m
|
||||
"""
|
||||
return self._config.getfloat('buildings', 'soil_thickness').real
|
||||
|
||||
|
@ -57,14 +57,14 @@ DAYS_A_MONTH = {'monday': [5, 4, 4, 5, 4, 4, 5, 4, 4, 5, 4, 5],
|
||||
'sunday': [4, 4, 4, 5, 4, 4, 5, 4, 5, 4, 4, 5],
|
||||
'holiday': [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]}
|
||||
|
||||
DAYS_A_YEAR = {'monday': 53,
|
||||
'tuesday': 52,
|
||||
'wednesday': 52,
|
||||
'thursday': 52,
|
||||
'friday': 52,
|
||||
DAYS_A_YEAR = {'monday': 51,
|
||||
'tuesday': 50,
|
||||
'wednesday': 50,
|
||||
'thursday': 50,
|
||||
'friday': 50,
|
||||
'saturday': 52,
|
||||
'sunday': 52,
|
||||
'holiday': 0}
|
||||
'holiday': 10}
|
||||
|
||||
# data types
|
||||
ANY_NUMBER = 'any_number'
|
||||
|
@ -105,18 +105,19 @@ class NrcanPhysicsParameters:
|
||||
thermal_boundary.window_ratio = 0
|
||||
if thermal_boundary.type == cte.WALL or thermal_boundary.type == cte.ROOF:
|
||||
if construction_archetype.window is not None:
|
||||
if math.pi / 4 <= thermal_boundary.parent_surface.azimuth < 3 * math.pi / 4:
|
||||
if -math.sqrt(2) / 2 < math.sin(thermal_boundary.parent_surface.azimuth) < math.sqrt(2) / 2:
|
||||
if 0 < math.cos(thermal_boundary.parent_surface.azimuth):
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['north']) / 100
|
||||
else:
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['south']) / 100
|
||||
elif math.sqrt(2) / 2 <= math.sin(thermal_boundary.parent_surface.azimuth):
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['east']) / 100
|
||||
elif 3 * math.pi / 4 <= thermal_boundary.parent_surface.azimuth < 5 * math.pi / 4:
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['south']) / 100
|
||||
elif 5 * math.pi / 4 <= thermal_boundary.parent_surface.azimuth < 7 * math.pi / 4:
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['west']) / 100
|
||||
else:
|
||||
thermal_boundary.window_ratio = \
|
||||
float(construction_archetype.window_ratio['north']) / 100
|
||||
float(construction_archetype.window_ratio['west']) / 100
|
||||
except ValueError:
|
||||
# This is the normal operation way when the windows are defined in the geometry
|
||||
continue
|
||||
|
@ -54,6 +54,9 @@ class NrcanUsageParameters:
|
||||
sys.stderr.write(f'Building {building.name} has unknown usage archetype for usage: {comnet_usage_name}\n')
|
||||
continue
|
||||
|
||||
storeys = int(building.eave_height / building.average_storey_height)
|
||||
volume_per_area = building.volume / building.floor_area / storeys
|
||||
|
||||
for internal_zone in building.internal_zones:
|
||||
if internal_zone.area is None:
|
||||
raise Exception('Internal zone area not defined, ACH cannot be calculated')
|
||||
@ -61,7 +64,8 @@ class NrcanUsageParameters:
|
||||
raise Exception('Internal zone volume not defined, ACH cannot be calculated')
|
||||
if internal_zone.area <= 0:
|
||||
raise Exception('Internal zone area is zero, ACH cannot be calculated')
|
||||
volume_per_area = internal_zone.volume / internal_zone.area
|
||||
if len(building.internal_zones) > 1:
|
||||
volume_per_area = internal_zone.volume / internal_zone.area
|
||||
usage = Usage()
|
||||
usage.name = usage_name
|
||||
self._assign_values(usage, archetype_usage, volume_per_area, building.cold_water_temperature)
|
||||
|
Loading…
Reference in New Issue
Block a user