Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue679 interzonal elements, soil temperature, and interior geometry estimation #785

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
bc988be
teaser subfolder moved to main folder to enable direct usage of the p…
PGorzalka Mar 16, 2020
b5cccff
Modelica FourElement template, four_element, innerwall, thermalzone, …
PGorzalka Mar 27, 2020
be2fefa
export to Modelica model (working in Dymola) works with plausible out…
PGorzalka Apr 3, 2020
cef7f52
adjustments to cover number of floors, height of floors, year of cons…
PGorzalka Apr 14, 2020
a1d0bb4
able to consider layer info and infiltration rate when generating arc…
PGorzalka Apr 15, 2020
46a9ead
bug fixes, btom-to-AixLib now working
PGorzalka Apr 23, 2020
4e26511
Merge remote-tracking branch 'upstream/master' into 1-thermal-zone-co…
PGorzalka Apr 27, 2020
31d601c
Merge remote-tracking branch 'upstream/issue639_inner_ir_emissivity_c…
PGorzalka Apr 27, 2020
d376262
working version. validation still needs to be done
PGorzalka Jul 1, 2020
e3ebee5
handles window imports from btom now
PGorzalka Jul 28, 2020
599e698
inner walls, ceilings and floors can now be defined via _names
PGorzalka Jul 31, 2020
bc7751c
added possibility to apply insulation not only to the outside, and to…
PGorzalka Aug 7, 2020
0b1b938
bug fixes
PGorzalka Aug 10, 2020
101a23a
added view factors support
PGorzalka Oct 11, 2020
3ca6140
new use conditions for reduced setpoint
PGorzalka Jan 27, 2021
65ebb0e
nz borders included in json output
PGorzalka Mar 10, 2021
2830339
removed usage of is with literals
PGorzalka Sep 30, 2022
9a30354
Merge remote-tracking branch 'origin/1-thermal-zone-connections' into…
PGorzalka Apr 6, 2023
0197f01
some adaptations to a subset of code files regarding removal of chang…
PGorzalka Apr 12, 2023
12d5059
interzonal elements as a new type of element instead of implementing …
PGorzalka Apr 13, 2023
3cd24b8
implementation of interzonal elements to thermalzone.py and others
PGorzalka Apr 14, 2023
63b7437
implementation of interzonal elements to teaserjson input and output
PGorzalka Apr 14, 2023
5f406e0
removal and adjustment of parameters due to the AixLib implementation…
PGorzalka Apr 21, 2023
8e98b2c
put the stuff back to its actual location. integrate soil temperature…
PGorzalka Apr 25, 2023
7aba7bc
changes to input, output and building objects calculation because of …
PGorzalka Apr 28, 2023
9fde5f2
sample constant t_soil file, some bugs and consistency errors removed…
PGorzalka May 2, 2023
bb0972a
several changes to the tests, bugs found during tests, and modificati…
PGorzalka May 5, 2023
f2b5619
typo
PGorzalka May 5, 2023
c991b3a
some bugfixes based on tests
PGorzalka May 8, 2023
85a6304
bug fixes
PGorzalka Jun 16, 2023
4553a4a
bug fixes
PGorzalka Jun 16, 2023
6748f13
new example and bugfix in retrofit_wall
PGorzalka Jun 30, 2023
d704496
debug in examples and due to failed tests.
PGorzalka Jul 10, 2023
427564d
towards a concise solution for handling interzonal elements depending…
PGorzalka Jul 12, 2023
6cef2f5
Syntax error fixed
PGorzalka Jul 17, 2023
7ba3a36
bugfixing
PGorzalka Aug 2, 2023
c35e961
some bugs
PGorzalka Aug 18, 2023
708b980
small bugfix in np.subtract of buildingphysics.wall
PGorzalka Sep 13, 2023
5212325
t_soil files only to copy if they are needed, TABULA standard import …
PGorzalka Jul 26, 2024
3f5a842
Merge remote-tracking branch 'upstream/development' into issue679_cus…
PGorzalka Jul 26, 2024
3ac811e
resolved additional merge conflicts
PGorzalka Jul 26, 2024
6401b08
included additional features and changes in the development branch, a…
PGorzalka Jul 26, 2024
0e3d475
adjustments that were necessary due to recent changes in the TEASER d…
PGorzalka Nov 6, 2024
eb9082c
added new AixLib Multizone NZ parameters to the export templates
PGorzalka Nov 6, 2024
7507096
Merge remote-tracking branch 'origin/development' into issue679_custo…
PGorzalka Nov 6, 2024
9ec3463
added dynamic heat load calculation for FiveElement template
PGorzalka Nov 17, 2024
d35d887
Merge remote-tracking branch 'upstream/main' into issue679_custom_pat…
PGorzalka Nov 17, 2024
0cb3faa
part of example was accidentally uncommented
PGorzalka Nov 17, 2024
eb1d3b7
adaptations to AixLib namespace corrections made in AixLib PR 1546
PGorzalka Nov 18, 2024
7846d83
minor docu fixes and indentation
DaJansenGit Nov 25, 2024
4fc94ad
minor docu fixes and indentation
DaJansenGit Nov 25, 2024
c155104
adaptations to records necessary because of renaming the ground tempe…
PGorzalka Dec 8, 2024
3ab2731
Merge main branch into issue679_custom_paths_interzonal_soil
PGorzalka Dec 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"AixLib_ThermalZoneRecord_TwoElement",
"AixLib_ThermalZoneRecord_ThreeElement",
"AixLib_ThermalZoneRecord_FourElement",
"AixLib_ThermalZoneRecord_FiveElement",
],
"teaser.data.output.modelicatemplate.IBPSA": [
"IBPSA_OneElement",
Expand Down
75 changes: 68 additions & 7 deletions teaser/data/input/buildingelement_input_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
import teaser.data.input.material_input_json as mat_input
import logging

def load_type_element(element, year, construction, data_class):
def load_type_element(element, year, construction, data_class,
element_type=None, reverse_layers=False):
"""Load BuildingElement from json.

Loads typical building elements according to their construction year and
Expand Down Expand Up @@ -35,19 +36,34 @@ def load_type_element(element, year, construction, data_class):
Material (typically this is the data class stored in prj.data,
but the user can individually change that.

element_type : str
Element type to load - only to specify if the data_class entry for a
different type than type(element) is to be loaded, e.g. InnerWall
instead of OuterWall

reverse_layers : bool
defines if layer list should be reversed - this is necessary for zone
borders to maintain consistency

"""
element_binding = data_class.element_bind

if element_type is None:
element_type = type(element).__name__

for key, element_in in element_binding.items():
if (
element_in["building_age_group"][0]
<= year
<= element_in["building_age_group"][1]
and element_in["construction_data"] == construction
and key.startswith(type(element).__name__)
and key.startswith(element_type)
):
_set_basic_data(element=element, element_in=element_in)
for id, layer_in in element_in["layer"].items():
for id, layer_in in (
element_in["layer"].items().__reversed__()
if reverse_layers else element_in["layer"].items()
):
layer = Layer(element)
layer.id = id
layer.thickness = layer_in["thickness"]
Expand All @@ -60,6 +76,51 @@ def load_type_element(element, year, construction, data_class):
f"year{year}, element={type(element).__name__}")


def load_type_element_by_key(element, key_str, data_class,
reverse_layers=False):
"""Load BuildingElement from json by key string.

Loads typical building elements according to their key string from a JSON.
The elements are created by using building characteristics from
cite:`BundesministeriumfurVerkehrBauundStadtentwicklung.26.07.2007` and
:cite:`KurzverfahrenIWU`, which is combined with normative material data
from :cite:`VereinDeutscherIngenieure.2012b`.

Parameters
----------
element : BuildingElement()
Instance of BuildingElement or inherited Element of TEASER

key_str : str
key string to the type element of the building characteristics sources

data_class : DataClass()
DataClass containing the bindings for TypeBuildingElement and
Material (typically this is the data class stored in prj.data,
but the user can individually change that.

reverse_layers : bool
defines if layer list should be reversed

"""
element_binding = data_class.element_bind

element_in = element_binding[key_str]

_set_basic_data(element=element, element_in=element_in)
for id, layer_in in (
element_in["layer"].items().__reversed__()
if reverse_layers else element_in["layer"].items()
):
layer = Layer(element)
layer.id = id
layer.thickness = layer_in["thickness"]
material = Material(layer)
mat_input.load_material_id(
material, layer_in["material"]["material_id"], data_class
)


def _set_basic_data(element, element_in):
"""Set basic data for building elements.

Expand All @@ -83,17 +144,17 @@ def _set_basic_data(element, element_in):
or type(element).__name__ == "Rooftop"
or type(element).__name__ == "Door"
):

element.inner_radiation = element_in["inner_radiation"]
element.inner_convection = element_in["inner_convection"]
element.outer_radiation = element_in["outer_radiation"]
element.outer_convection = element_in["outer_convection"]

elif type(element).__name__ == "Window":

element.outer_radiation = element_in["outer_radiation"]
element.outer_convection = element_in["outer_convection"]
element.g_value = element_in["g_value"]
element.a_conv = element_in["a_conv"]
element.shading_g_total = element_in["shading_g_total"]
element.shading_max_irr = element_in["shading_max_irr"]

if type(element).__name__.startswith("Interzonal"):
element.outer_radiation = element_in["inner_radiation"]
element.outer_convection = element_in["inner_convection"]
Loading
Loading