Added 1 to fit with the length needed by FAST_READD

This commit is contained in:
Pilar 2021-11-18 13:07:48 -05:00
parent d738ba242f
commit 4c23a112a1
3 changed files with 17 additions and 3 deletions

View File

@ -23,5 +23,5 @@ class SimulationParameters:
heating_power = '100000000'
inside_emissivity = '0.9'
alpha_coefficient = '0.3'
alpha_coefficient = '1'
radiative_coefficient = '2.25'

View File

@ -36,13 +36,20 @@ class ThermalDemandDynamicSimulation:
file += "%email: pilar.monsalvete@concordia.ca\n"
for thermal_zone in self._building.thermal_zones:
total_area = 0
for thermal_boundary in thermal_zone.thermal_boundaries:
total_area += thermal_boundary.area
for thermal_opening in thermal_boundary.thermal_openings:
total_area += thermal_opening.area
for thermal_boundary in thermal_zone.thermal_boundaries:
thermal_boundary.inside_emissivity = self._simulation_parameters.inside_emissivity
thermal_boundary.alpha_coefficient = self._simulation_parameters.alpha_coefficient
thermal_boundary.alpha_coefficient = str(float(self._simulation_parameters.alpha_coefficient) \
* thermal_boundary.area / total_area)
thermal_boundary.radiative_coefficient = self._simulation_parameters.radiative_coefficient
for thermal_opening in thermal_boundary.thermal_openings:
thermal_opening.inside_emissivity = self._simulation_parameters.inside_emissivity
thermal_opening.alpha_coefficient = self._simulation_parameters.alpha_coefficient
thermal_opening.alpha_coefficient = str(float(self._simulation_parameters.alpha_coefficient) \
* thermal_opening.area / total_area)
thermal_opening.radiative_coefficient = self._simulation_parameters.radiative_coefficient
# insel template
@ -121,6 +128,9 @@ class ThermalDemandDynamicSimulation:
else:
n_records += 2
inputs = [f"{n_hoy}.1"]
# todo: this length depends on the OS, so it has to be modified.
# The idea is to erase all carriage return from the file in the block and, therefore,
# the length here will be n_records * 13 - 1
parameters = [f"{n_records * 13 + 1} %[RecLen]",
f"'{weather_path}' %[FileName]",
f"',' %[Separator]"]
@ -131,6 +141,9 @@ class ThermalDemandDynamicSimulation:
n_ig = i_block
n_records = number_usage_zones * 6
inputs = [f"{n_hoy}.1"]
# todo: this length depends on the OS, so it has to be modified.
# The idea is to erase all carriage return from the file in the block and, therefore,
# the length here will be n_records * 13 - 1
parameters = [f"{n_records * 13 + 1} %[RecLen]",
f"'{ig_path}' %[FileName]",
f"',' %[Separator]"]

View File

@ -10,6 +10,7 @@ from imports.geometry_factory import GeometryFactory
from imports.geometry.helpers.geometry_helper import GeometryHelper
from city_model_structure.city import City
name_gml = 'one_building_in_kelowna.gml'
function_format = 'hft'
construction_format = 'nrel'