From 839dc91bc06b98c891a6d3f5cde7c8f601f86412 Mon Sep 17 00:00:00 2001 From: mlauster Date: Wed, 20 Jul 2016 13:45:07 +0200 Subject: [PATCH] allows defining weather file path and weather file header --- .../data/output/modelicatemplate/AixLib/AixLib_model | 6 ++++-- teaser/project.py | 10 ++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/teaser/data/output/modelicatemplate/AixLib/AixLib_model b/teaser/data/output/modelicatemplate/AixLib/AixLib_model index 61399c560..61752a08b 100644 --- a/teaser/data/output/modelicatemplate/AixLib/AixLib_model +++ b/teaser/data/output/modelicatemplate/AixLib/AixLib_model @@ -42,7 +42,8 @@ model ${bldg.name} Sky_rad=true, Ter_rad=true, fileName=Modelica.Utilities.Files.loadResource( - "modelica://AixLib/Resources/WeatherData/TRY2010_12_Jahr_Modelica-Library.txt"), + "${weather}"), + tableName="${weather_header}", % if bldg.latitude is None: Latitude=49.5, % else: @@ -176,7 +177,8 @@ end ${bldg.name}; Sky_rad=true, Ter_rad=true, fileName=Modelica.Utilities.Files.loadResource( - "modelica://AixLib/Resources/WeatherData/TRY2010_12_Jahr_Modelica-Library.txt"), + "${weather}"), + tableName="${weather_header}", % if bldg.latitude is None: Latitude=49.5, % else: diff --git a/teaser/project.py b/teaser/project.py index d81f6b16f..c46dea11f 100644 --- a/teaser/project.py +++ b/teaser/project.py @@ -79,8 +79,9 @@ def __init__(self, load_data=True): self.modelica_info = ModelicaInfo() self.modelica_project = self.name - self.weather_file_header = "" - self.weather_file_path = "" + self.weather_file_header = "wetter" + self.weather_file_path = "modelica://AixLib/Resources/WeatherData/" \ + "TRY2010_12_Jahr_Modelica-Library.txt" self.buildings = [] self._calculation_method = "vdi" @@ -1012,8 +1013,9 @@ def set_default(self): self.name = "Project" self.modelica_project = self.name - self.weather_file_header = "" - self.weather_file_path = "" + self.weather_file_header = "wetter" + self.weather_file_path = "modelica://AixLib/Resources/WeatherData/" \ + "TRY2010_12_Jahr_Modelica-Library.txt" self.buildings = [] self._number_of_elements_calc = 2 self._merge_windows_calc = False