Compare commits

..

3 Commits

8 changed files with 20 additions and 1585353 deletions

View File

@ -71,7 +71,7 @@ class DomesticHotWaterHeatPumpTes:
hp_electricity[i] = 0
t_tank[i + 1] = t_tank[i] + (delta_t_hp - delta_t_freshwater - delta_t_demand + delta_t_coil)
total_consumption[i] = q_hp[i] + q_coil[i]
total_consumption[i] = hp_electricity[i] + q_coil[i]
tes.temperature = []
hp_electricity_j = [(x * cte.WATTS_HOUR_TO_JULES) / number_of_ts for x in hp_electricity]
heating_coil_j = [(x * cte.WATTS_HOUR_TO_JULES) / number_of_ts for x in q_coil]

View File

@ -74,8 +74,8 @@ class HeatPumpBoilerTesHeating:
hp_cop[i + 1] = self.hp_characteristics.air_to_water_cop(source_temperature[i + 1], t_tank[i + 1], mode=cte.HEATING)
hp_electricity[i + 1] = q_hp[i + 1] / hp_cop[i + 1]
else:
hp_cop[i] = 0
hp_electricity[i] = 0
hp_cop[i + 1] = 0
hp_electricity[i + 1] = 0
# boiler operation
if q_hp[i + 1] > 0:
if t_sup_hp[i + 1] < 45:
@ -105,7 +105,7 @@ class HeatPumpBoilerTesHeating:
m_dis[i + 1] = self.heating_peak_load / (cte.WATER_HEAT_CAPACITY * factor)
t_ret[i + 1] = t_tank[i + 1] - demand[i + 1] / (m_dis[i + 1] * cte.WATER_HEAT_CAPACITY)
# total consumption
total_consumption[i + 1] = q_hp[i + 1] + q_boiler[i + 1] + q_coil[i + 1]
total_consumption[i + 1] = hp_electricity[i + 1] + boiler_energy_consumption[i + 1] + q_coil[i + 1]
tes.temperature = []
hp_electricity_j = [(x * cte.WATTS_HOUR_TO_JULES) / number_of_ts for x in hp_electricity]
boiler_consumption_j = [(x * cte.WATTS_HOUR_TO_JULES) / number_of_ts for x in boiler_energy_consumption]

View File

@ -43,12 +43,12 @@ class HeatPump:
else:
if self.hp.heat_efficiency_curve is not None:
cop_curve_coefficients = [float(coefficient) for coefficient in self.hp.heat_efficiency_curve.coefficients]
cop_coefficient = (1 / (cop_curve_coefficients[0] +
cop_curve_coefficients[1] * inlet_water_temperature +
cop_curve_coefficients[2] * inlet_water_temperature ** 2 +
cop_curve_coefficients[3] * source_temperature +
cop_curve_coefficients[4] * source_temperature ** 2 +
cop_curve_coefficients[5] * inlet_water_temperature * source_temperature))
cop_coefficient = (cop_curve_coefficients[0] +
cop_curve_coefficients[1] * source_temperature +
cop_curve_coefficients[2] * source_temperature ** 2 +
cop_curve_coefficients[3] * inlet_water_temperature +
cop_curve_coefficients[4] * inlet_water_temperature ** 2 +
cop_curve_coefficients[5] * inlet_water_temperature * source_temperature)
hp_efficiency = float(self.hp.heat_efficiency)
hp_cop = cop_coefficient * hp_efficiency
return hp_cop

View File

@ -16,27 +16,23 @@ class StorageTank:
self.heating_coil_capacity = heating_coil_capacity
def heat_loss_coefficient(self):
r_tot = sum(float(layer.thickness) / float(layer.material.conductivity) for layer in
self.materials)
u_tot = 1 / r_tot
d = math.sqrt((4 * self.volume) / (math.pi * self.height))
a_side = math.pi * d * self.height
a_top = math.pi * d ** 2 / 4
if self.number_of_vertical_layers == 1:
r_tot = sum(float(layer.thickness) / float(layer.material.conductivity) for layer in
self.materials)
u_tot = 1 / r_tot
d = math.sqrt((4 * self.volume) / (math.pi * self.height))
a_side = math.pi * d * self.height
a_top = math.pi * d ** 2 / 4
ua = u_tot * (2 * a_top + a_side)
return ua
else:
r_tot = sum(float(layer.thickness) / float(layer.material.conductivity) for layer in
self.materials)
u_tot = 1 / r_tot
d = math.sqrt((4 * self.volume) / (math.pi * self.height))
a_side = math.pi * d * self.height
a_top = math.pi * d ** 2 / 4
ua_side = u_tot * a_side
ua_top_bottom = u_tot * (a_top + a_side)
return ua_side, ua_top_bottom
def calculate_space_heating_fully_mixed(self, charging_flow_rate, discharging_flow_rate, supply_temperature, return_temperature,
def calculate_space_heating_fully_mixed(self, charging_flow_rate, discharging_flow_rate, supply_temperature,
return_temperature,
current_tank_temperature, heat_generator_input, ambient_temperature, dt):
ua = self.heat_loss_coefficient()
t_tank = (current_tank_temperature +
@ -47,6 +43,5 @@ class StorageTank:
return t_tank
def calculate_dhw_fully_mixed(self, charging_flow_rate, discharging_flow_rate, supply_temperature, return_temperature,
current_tank_temperature, heat_generator_input, ambient_temperature, dt):
current_tank_temperature, heat_generator_input, ambient_temperature, dt):
pass

View File

@ -1,70 +0,0 @@
"""
Energy System rule-based sizing
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2023 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@concordia.ca
"""
import hub.helpers.constants as cte
class SystemSizing:
"""
The energy system sizing class
"""
def __init__(self, buildings):
self.buildings = buildings
def hvac_sizing(self):
for building in self.buildings:
peak_heating_demand = building.heating_peak_load[cte.YEAR][0] / 3600
peak_cooling_demand = building.cooling_peak_load[cte.YEAR][0] / 3600
if peak_heating_demand > peak_cooling_demand:
sizing_demand = peak_heating_demand
for system in building.energy_systems:
if 'Heating' in system.demand_types:
for generation in system.generation_systems:
if generation.system_type == 'Heat Pump':
if generation.source_medium == cte.AIR:
generation.source_temperature = building.external_temperature
generation.nominal_heat_output = 0.6 * sizing_demand / 1000
if generation.energy_storage_systems is not None:
for storage in generation.energy_storage_systems:
if storage.type_energy_stored == 'thermal':
storage.volume = building.heating_peak_load[cte.YEAR][0] / (cte.WATER_HEAT_CAPACITY*cte.WATER_DENSITY * 20)
elif generation.system_type == 'Boiler':
generation.nominal_heat_output = 0.4 * sizing_demand / 1000
else:
sizing_demand = peak_cooling_demand
for system in building.energy_systems:
if 'Cooling' in system.demand_types:
for generation in system.generation_systems:
if generation.system_type == 'Heat Pump':
generation.nominal_heat_output = sizing_demand / 1000
def montreal_custom(self):
for building in self.buildings:
energy_systems = building.energy_systems
for energy_system in energy_systems:
demand_types = energy_system.demand_types
generation_systems = energy_system.generation_systems
if cte.HEATING in demand_types:
if len(generation_systems) == 1:
for generation in generation_systems:
generation.nominal_heat_output = building.heating_peak_load[cte.YEAR][0]
else:
for generation in generation_systems:
generation.nominal_heat_output = building.heating_peak_load[cte.YEAR][0] / (len(generation_systems))
elif cte.COOLING in demand_types:
if len(generation_systems) == 1:
for generation in generation_systems:
generation.nominal_cooling_output = building.cooling_peak_load[cte.YEAR][0]
else:
for generation in generation_systems:
generation.nominal_heat_output = building.cooling_peak_load[cte.YEAR][0] / (len(generation_systems))

View File

@ -1,54 +0,0 @@
"""
EnergySystemSizingSimulationFactory retrieve the energy system archetype sizing and simulation module
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Saeed Ranjbar saeed.ranjbar@mail.concordia.ca
"""
from energy_system_modelling_package.system_simulation_models.archetype13 import Archetype13
from energy_system_modelling_package.system_simulation_models.archetype13_stratified_tes import Archetype13Stratified
from energy_system_modelling_package.system_simulation_models.archetype1 import Archetype1
from energy_system_modelling_package.system_simulation_models.archetypes14_15 import Archetype14_15
class EnergySystemsSimulationFactory:
"""
EnergySystemsFactory class
"""
def __init__(self, handler, building, output_path):
self._output_path = output_path
self._handler = '_' + handler.lower()
self._building = building
def _archetype1(self):
"""
Enrich the city by using the sizing and simulation model developed for archetype13 of montreal_future_systems
"""
Archetype1(self._building, self._output_path).enrich_buildings()
self._building.level_of_detail.energy_systems = 2
self._building.level_of_detail.energy_systems = 2
def _archetype13(self):
"""
Enrich the city by using the sizing and simulation model developed for archetype13 of montreal_future_systems
"""
Archetype13(self._building, self._output_path).enrich_buildings()
self._building.level_of_detail.energy_systems = 2
self._building.level_of_detail.energy_systems = 2
def _archetype14_15(self):
"""
Enrich the city by using the sizing and simulation model developed for archetype14 and archetype15 of
montreal_future_systems
"""
Archetype14_15(self._building, self._output_path).enrich_buildings()
self._building.level_of_detail.energy_systems = 2
self._building.level_of_detail.energy_systems = 2
def enrich(self):
"""
Enrich the city given to the class using the class given handler
:return: None
"""
getattr(self, self._handler, lambda: None)()

View File

@ -1,191 +0,0 @@
[
{
"DN": 16,
"inner_diameter": 16.1,
"outer_diameter": 21.3,
"thickness": 2.6,
"cost_per_meter": 320
},
{
"DN": 20,
"inner_diameter": 21.7,
"outer_diameter": 26.9,
"thickness": 2.6,
"cost_per_meter": 320
},
{
"DN": 25,
"inner_diameter": 27.3,
"outer_diameter": 33.7,
"thickness": 3.2,
"cost_per_meter": 320
},
{
"DN": 32,
"inner_diameter": 37.2,
"outer_diameter": 42.4,
"thickness": 2.6,
"cost_per_meter": 350
},
{
"DN": 40,
"inner_diameter": 43.1,
"outer_diameter": 48.3,
"thickness": 2.6,
"cost_per_meter": 375
},
{
"DN": 50,
"inner_diameter": 54.5,
"outer_diameter": 60.3,
"thickness": 2.9,
"cost_per_meter": 400
},
{
"DN": 65,
"inner_diameter": 70.3,
"outer_diameter": 76.1,
"thickness": 2.9,
"cost_per_meter": 450
},
{
"DN": 80,
"inner_diameter": 82.5,
"outer_diameter": 88.9,
"thickness": 3.2,
"cost_per_meter": 480
},
{
"DN": 90,
"inner_diameter": 100.8,
"outer_diameter": 108,
"thickness": 3.6,
"cost_per_meter": 480
},
{
"DN": 100,
"inner_diameter": 107.1,
"outer_diameter": 114.3,
"thickness": 3.6,
"cost_per_meter": 550
},
{
"DN": 110,
"inner_diameter": 125.8,
"outer_diameter": 133,
"thickness": 3.6,
"cost_per_meter": 550
},
{
"DN": 125,
"inner_diameter": 132.5,
"outer_diameter": 139.7,
"thickness": 3.6,
"cost_per_meter": 630
},
{
"DN": 140,
"inner_diameter": 151,
"outer_diameter": 159,
"thickness": 4,
"cost_per_meter": 700
},
{
"DN": 150,
"inner_diameter": 160.3,
"outer_diameter": 168.3,
"thickness": 4,
"cost_per_meter": 700
},
{
"DN": 180,
"inner_diameter": 184.7,
"outer_diameter": 193.7,
"thickness": 4.5,
"cost_per_meter": 700
},
{
"DN": 200,
"inner_diameter": 210.1,
"outer_diameter": 219.1,
"thickness": 4.5,
"cost_per_meter": 860
},
{
"DN": 250,
"inner_diameter": 263,
"outer_diameter": 273,
"thickness": 5,
"cost_per_meter": 860
},
{
"DN": 300,
"inner_diameter": 312.7,
"outer_diameter": 323.9,
"thickness": 5.6,
"cost_per_meter": 860
},
{
"DN": 350,
"inner_diameter": 344.4,
"outer_diameter": 355.6,
"thickness": 5.6,
"cost_per_meter": 860
},
{
"DN": 400,
"inner_diameter": 393.8,
"outer_diameter": 406.4,
"thickness": 6.3,
"cost_per_meter": 860
},
{
"DN": 450,
"inner_diameter": 444.4,
"outer_diameter": 457,
"thickness": 6.3,
"cost_per_meter": 860
},
{
"DN": 500,
"inner_diameter": 495.4,
"outer_diameter": 508,
"thickness": 6.3,
"cost_per_meter": 860
},
{
"DN": 600,
"inner_diameter": 595.8,
"outer_diameter": 610,
"thickness": 7.1,
"cost_per_meter": 860
},
{
"DN": 700,
"inner_diameter": 696.8,
"outer_diameter": 711,
"thickness": 7.1,
"cost_per_meter": 860
},
{
"DN": 800,
"inner_diameter": 797,
"outer_diameter": 813,
"thickness": 8,
"cost_per_meter": 860
},
{
"DN": 900,
"inner_diameter": 894,
"outer_diameter": 914,
"thickness": 10,
"cost_per_meter": 860
},
{
"DN": 1000,
"inner_diameter": 996,
"outer_diameter": 1016,
"thickness": 10,
"cost_per_meter": 860
}
]

File diff suppressed because it is too large Load Diff