Skip to content

Commit

Permalink
Revert "Merge branch 'issue566weatherfile' into development"
Browse files Browse the repository at this point in the history
This reverts commit 9e772fbff69fbce8711cf3629f0aec4eea0363c3.
  • Loading branch information
MartinRaetz committed Nov 24, 2020
1 parent 09ed335 commit e376eec
Show file tree
Hide file tree
Showing 31 changed files with 194 additions and 262 deletions.
17 changes: 0 additions & 17 deletions teaser/data/output/aixlib_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from mako.template import Template
from mako.lookup import TemplateLookup
import teaser.logic.utilities as utilities
import shutil


def export_multizone(buildings, prj, path=None):
Expand Down Expand Up @@ -96,7 +95,6 @@ def export_multizone(buildings, prj, path=None):
package_list=buildings,
addition=None,
extra=None)
_help_weather_data(prj.weather_file_path, path)

for i, bldg in enumerate(buildings):

Expand Down Expand Up @@ -140,7 +138,6 @@ def export_multizone(buildings, prj, path=None):
out_file = open(utilities.get_full_path
(os.path.join(bldg_path, bldg.name + ".mo")), 'w')

# ToDo: this weather file here might be obsolete now
out_file.write(model_template.render_unicode(
bldg=bldg,
weather=bldg.parent.weather_file_path,
Expand Down Expand Up @@ -174,7 +171,6 @@ def export_multizone(buildings, prj, path=None):
addition=bldg.name + "_",
extra=None)


print("Exports can be found here:")
print(path)

Expand Down Expand Up @@ -236,16 +232,3 @@ def _help_package_order(path, package_list, addition=None, extra=None):
out_file.write(order_template.render_unicode
(list=package_list, addition=addition, extra=extra))
out_file.close()

def _help_weather_data(origin_path, desired_path):
"""Copies the imported .mos weather file to the results folder.
Parameters
----------
origin_path : str
path of local weather file
desired_path : str
path of where the weather file should be placed
"""

shutil.copy2(origin_path, desired_path)
42 changes: 29 additions & 13 deletions teaser/data/output/modelicatemplate/AixLib/AixLib_Multizone
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ within ${bldg.parent.name}.${bldg.name};
model ${bldg.name}
"This is the simulation model of ${bldg.name} with traceable ID ${bldg.building_id}"


AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
% if bldg.internal_gains_mode==1 or bldg.internal_gains_mode==2:
AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
redeclare package Medium = Modelica.Media.Air.SimpleAir,
buildingID=${bldg.building_id},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start = ${bldg.thermal_zones[0].t_inside},
Expand All @@ -13,20 +14,28 @@ AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
ASurTot=${bldg.library_attr.total_surface_area},
numZones = ${len(bldg.thermal_zones)},
internalGainsMode = ${bldg.internal_gains_mode},
% if bldg.internal_gains_mode==3:
use_C_flow = true,
use_moisture_balance = true,
redeclare package Medium = AixLib.Media.Air(extraPropertiesNames={"C_flow"}),
% else:
use_C_flow = false,
use_moisture_balance = false,
redeclare package Medium = Modelica.Media.Air.SimpleAir,
% endif
zoneParam = {
%for zone in bldg.thermal_zones:
${bldg.name}_DataBase.${bldg.name}_${zone.name}()${',' if not loop.last else ''}
%endfor
},
%else:
AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneMoistAirEquipped multizone(
redeclare package Medium = AixLib.Media.Air,
buildingID=${bldg.building_id},
energyDynamics=Modelica.Fluid.Types.Dynamics.FixedInitial,
T_start = ${bldg.thermal_zones[0].t_inside},
VAir = ${bldg.volume},
ABuilding=${bldg.net_leased_area},
ASurTot=${bldg.library_attr.total_surface_area},
numZones = ${len(bldg.thermal_zones)},
internalGainsMode = ${bldg.internal_gains_mode},
zoneParam = {
%for zone in bldg.thermal_zones:
${bldg.name}_DataBase.${bldg.name}_${zone.name}()${',' if not loop.last else ''}
%endfor
},
% endif
% if bldg.with_ahu:
heatAHU=${get_true_false(bldg.central_ahu.heating)},
coolAHU=${get_true_false(bldg.central_ahu.cooling)},
Expand Down Expand Up @@ -60,6 +69,13 @@ AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
intWallRC(thermCapInt(each der_T(fixed=true))),floorRC
(thermCapExt(each der_T(fixed=true))),roofRC(thermCapExt(each
der_T(fixed=true))))),
% if bldg.internal_gains_mode==1 or bldg.internal_gains_mode==2:
redeclare model thermalZone =
AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZoneAirExchange,
% else:
redeclare model thermalZone =
AixLib.ThermalZones.ReducedOrder.ThermalZone.ThermalZoneMoistAirExchange,
% endif
redeclare model corG =
AixLib.ThermalZones.ReducedOrder.SolarGain.CorrectionGDoublePane,
% if bldg.central_ahu:
Expand All @@ -73,8 +89,8 @@ AixLib.ThermalZones.ReducedOrder.Multizone.MultizoneEquipped multizone(
AixLib.BoundaryConditions.WeatherData.ReaderTMY3 weaDat(
calTSky=AixLib.BoundaryConditions.Types.SkyTemperatureCalculation.HorizontalRadiation,
computeWetBulbTemperature=false,
filNam=Modelica.Utilities.Files.loadResource(
"modelica://${bldg.parent.name}/${bldg.parent.weather_file_name}"))
filNam=
"${weather.replace("\\", "/")}")
"Weather data reader"
annotation (Placement(transformation(extent={{-82,30},{-62,50}})));

Expand Down
1 change: 0 additions & 1 deletion teaser/examples/e9_building_data_import_from_excel.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,6 @@ def warn_constructiontype(element):
bldg = Building(parent=project)
bldg.name = building_name
bldg.year_of_construction = construction_age
bldg.internal_gains_mode = 3 # HardCodedInput
bldg.with_ahu = True # HardCodedInput
if bldg.with_ahu is True:
bldg.central_ahu.heat_recovery = True # HardCodedInput
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/bmvbs/custom/institute.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,14 @@ class Institute(Office):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
office_layout : int
Structure of the floor plan of office buildings, default is 1,
which is representative for one elongated floor.
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/bmvbs/custom/institute4.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@ class Institute4(Office):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
office_layout : int
Structure of the floor plan of office buildings, default is 1,
which is representative for one elongated floor.
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/bmvbs/custom/institute8.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,14 @@ class Institute8(Office):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015), the co2 calculation is based on
Engineering ToolBox (2004)
consideration of moisture. The calculation is based on SIA 2024
office_layout : int
Structure of the floor plan of office buildings, default is 1,
which is representative for one elongated floor.
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/bmvbs/office.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,14 @@ class Office(NonResidential):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
office_layout : int
Structure of the floor plan of office buildings, default is 1,
which is representative for one elongated floor.
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/bmvbs/singlefamilydwelling.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,14 @@ class SingleFamilyDwelling(Residential):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015), the co2 calculation is based on
Engineering ToolBox (2004)
consideration of moisture. The calculation is based on SIA 2024
residential_layout : int
Structure of floor plan (default = 0)
0: compact
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/nonresidential.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ class NonResidential(Building):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
Attributes
----------
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/residential.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,14 @@ class Residential(Building):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
Attributes
----------
central_ahu : instance of BuildingAHU
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/tabula/de/apartmentblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ class ApartmentBlock(SingleFamilyHouse):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
construction_type : str
Construction type of used wall constructions default is "existing
state"
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/tabula/de/multifamilyhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ class MultiFamilyHouse(SingleFamilyHouse):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
construction_type : str
Construction type of used wall constructions default is "existing
state"
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/tabula/de/singlefamilyhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,14 @@ class has exactly one usage zone, which is 'Living'. TABULA also does not
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
construction_type : str
Construction type of used wall constructions default is "existing
state"
Expand Down
10 changes: 4 additions & 6 deletions teaser/logic/archetypebuildings/tabula/de/terracedhouse.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,16 +47,14 @@ class TerracedHouse(SingleFamilyHouse):
assigned to attribute central_ahu. This instance holds information for
central Air Handling units. Default is False.
internal_gains_mode: int [1, 2, 3]
mode for the internal gains calculation done in AixLib:
1: Temperature and activity degree dependent heat flux calculation for persons. The
mode for the internal gains calculation by persons:
1: Temperature and activity degree dependent calculation. The
calculation is based on SIA 2024 (default)
2: Temperature and activity degree independent heat flux calculation for persons, the max.
2: Temperature and activity degree independent calculation, the max.
heatflowrate is prescribed by the parameter
fixed_heat_flow_rate_persons.
3: Temperature and activity degree dependent calculation with
consideration of moisture and co2. The moisture calculation is
based on SIA 2024 (2015) and regards persons and non-persons, the co2 calculation is based on
Engineering ToolBox (2004) and regards only persons.
consideration of moisture. The calculation is based on SIA 2024
construction_type : str
Construction type of used wall constructions default is "existing
state"
Expand Down
Loading

0 comments on commit e376eec

Please sign in to comment.