Integration of Heat Flow through Borders between Adjacent Zones in AixLib’s Reduced-Order Model

For dynamically simulating the thermal behavior of a building, the reduced-order model (ROM) implemented in the Modelica IBPSA and AixLib libraries provides a time-efficient calculation method based on the standard VDI 6007-1. Additionally, the Python package TEASER features a possilibity to fill the model parameters with automatically generated typical and/or enriched building data. So far, both have not been capable of modelling heat flow through borders between thermal zones. In this contribution, we present the integration of this feature into the open-source software combination. Additional new features include non-constant soil temperatures and a new approach to estimate interior building elements in cases without proper knowledge. Calculation results are presented for an exemplary application and show satisfactory agreement with measured values. The respective code (including the example presented here) is in the process of being published as part of the AixLib and TEASER open-source repositiories.


Introduction
The building sector faces the need to reduce carbon emissions and increase energy efficiency drastically.As a consequence, building energy simulation has become an important tool to investigate the possible effects of planned measures in single-building applications as well as to get an overview of the building stock with limited data availability on an urban scale.Among others, Modelica libraries for building energy simulation have been created in recent years.For example, important advances in opensource libraries for these purposes have been reached in the framework of IBPSA Project 1 and the previously completed project IEA EBC Annex 60 (Wetter, Treeck, et al. 2019).The library AixLib (Müller et al. 2016) is also connected to this framework and is being continuously developed further.In this publication, we present the integration of a feature for heat flow through borders between adjacent thermal zones into the so-called ReducedOrder model (ROM) of AixLib and the complimentary Python tool TEASER (Remmen et al. 2018).The motivation for this work was the possibility to enrich geometrically available data of existing buildings with typical thermal properties using TEASER, thereby enabling a workflow to create fully parameterized simulation models quickly in cases of limited (digital) data availability.For this use case, the feature has been previously identified as a shortcoming of the ROM (Jansen et al. 2021).
This paper is structured as follows: Section 2 introduces the state of the art regarding the workflow that the ROM is usually applied in, the model concept itself, and previous work on the topic treated here.In Section 3, we describe the methodology for the new implementation in AixLib and TEASER.An exemplary application and its results are presented in Section 4. We discuss them further in Section 5.In Section 6, we conclude the paper and give an outlook to future work.

State of the Art
The foundations for this work were created by the developers of the open-source Modelica library AixLib and the complimentary Python tool TEASER.Therefore, relevant aspects of these tools that this publication builds up on are introduced in the following.Additionally, this section summarizes a previous approach to introduce heat flow between adjacent zones into the combination of the two tools and what is recommended in this regard by the guideline VDI 6007-1, which is the theoretical basis for the used model.

Automatically Parameterized Modelica Simulation Models
Figure 1 shows the workflow of TEASER to generate dynamic building simulation models and the corresponding simulation results.The main strength of TEASER is the automation of the time-consuming parameterization of the model described in VDI 6007-1.TEASER allows creating parametric building models in Python and to transfer them directly into a Modelica model, automating the complete calculation of the relevant variables.The availability of statistical data in TEASER enables a creation of so- Proceedings of the Modelica Conference 2023 October 9-11, 2023, Aachen, Germany called archetype models with a minimal data set of input data.In addition, detailed creation of concrete buildings is also possible.In this case, the modeler specifies the entire building, all thermal zones including the usage conditions of these zones, and the assignment of the respective components (outer walls, inner walls, windows, etc.) to them.
Each component can then be given layer structures and materials.In this process, data enrichment can be used at any time to enrich missing information, such as wall structures or information about usage profiles.

AixLib's Reduced-order Model
AixLib is an open-source Modelica library for building energy simulation based on the Modelica IBPSA Library (Wetter, Blum, and Hu 2019).It is currently (June 2023) available in version 1.3.2.AixLib contains a wide range of models covering heating, ventilation, and air conditioning (HVAC) equipment as well as two packages for thermal zone models with different level of detail (HighOrder and ReducedOrder (ROM)).The latter is relevant for this contribution.Its development is described in detail by Lauster (2018).In the following, some relevant aspects of the model structure and its calculation approach are explained briefly.The hierarchical concept of the ROM is visualized in Figure 2. A building is represented by a Multizone object.This object mainly serves to collect externally defined boundary conditions, such as weather data, setpoint temperatures, and internal gains.Furthermore, it optionally contains a model of an air handling unit (e.g. for ventilation systems).Within the Multizone environment, an array of n zones ThermalZone objects is specified.The boundary conditions are passed to these objects.Each thermal zone consists of a core resistancecapacitance (RC) module and supplementary components.
Core RC modules are available in different levels from OneElement to FourElement.With decreasing number of elements, more building components (roof and floor plate, in that order) are lumped into the element for exterior walls.For the final step from TwoElement to OneElement, the inner walls, i.e. solid interior masses, are neglected.As roofs and exterior walls do not differ in their description, presenting the ThreeElement model is sufficient here.Figure 3 shows a visually adjusted version of the thermal network representation by Lauster (2018).
In the network, nodes represent temperatures.If they are connected to capacities, a thermal mass with that temperature is present.Resistances govern the heat flow between temperature nodes.Some heat flows, represented by arrows in the figure, are prescribed boundary conditions.Blue-coloured boxes are parts of the network that may be repeated in a series connection.However, this feature is not used for the scope of this paper.
The centre-right node in the network represents the air inside the zone with temperature ϑ air .Qg,cv is the sum of convective heat gains, including the convective share of heat flow from solar gains through windows, heating and cooling, machines, lights, and humans.Radiative flows from the same sources are directly applied to the different lumped elements' surfaces.On the far side of the elements, a fixed soil temperature ϑ soil (floor plate element) and equivalent temperatures merging convection and both longwave and shortwave radiation (window, exterior wall, and roof elements) are set.For the simulation, this means that the different zones are not interconnected, which reduces calculation complexity.In practice, the TwoElement model has shown to be a good tradeoff between calculation times and accuracy (Remmen et al. 2018).Lumping to two elements is also suggested by VDI 6007-1 (2015-06), the standard on which the modelling approach of ROM is based.

Heat Exchange with Adjacent Zones According to VDI 6007-1
As mentioned in Section 2.2, AixLib's ROM so far does not feature a possibility to model heat flow between zones.However, the underlying standard VDI 6007-1 mentions adjacent zones.It suggests lumping heat flow through borders to adjacent rooms with the heat flow to the exterior using an equivalent temperature ϑ eq,NR = ϑ air,NR + Qrad,se,NR where ϑ air,NR is the air temperature in the adjacent room, Qrad,se,NR is the sum of the radiant heat sources and sinks onto the adjacent room's wall surface A se,NR , and α cv,se,NR is the convective heat transfer coefficient on that surface.ϑ eq,NR is supposed to be merged into the equivalent temperature calculation of the 2-element model mentioned above.

Previous Work on the Topic
Previous efforts to include interzonal heat transfer into the TEASER/AixLib tool chain were made in connection with measurements at an exemplary single-family building (Gorzalka et al. 2021).Instead of following Equation 1 and introducing adjacent rooms into the equivalent temperature, a fifth element was inserted into the ROM's    3 and 4 for an explanation of the variables and indices.core RC model.This fifth element and the RC elements for exterior walls and roofs were defined as Modelica arrays instead of single RC chains such that not all building parts, but only those with equal azimuth and tilt, were lumped into one element.With this and additional modifications e.g.regarding non-constant soil temperatures, a satisfactory agreement between the room air temperature measurements within the example building and the results of the simulation model was reached.In total, a largely automated thermal modelling workflow for existing buildings based on drone images was demonstrated.

Methodology
Building up on the works presented in the previous section, we developed a methodology to integrate heat flow through borders between adjacent zones into the AixLib ROM as well as its counterpart in the Python package TEASER.This section describes both aspects.

FiveElement ROM
We initially considered three possible approaches for the integration of heat exchange with adjacent zones into the ROM: 1.The equivalent temperature approach described in Section 2.3 2. The vectorized approach described in Section 2.4 3. The introduction of a fifth element without modifications to the rest of the ROM Trying to stick as much as possible to the design principles previously applied in the model, we ruled out option 1: Equation 1 does not fit to the implementation of a largely simplified equivalent temperature calculation entirely based on boundary conditions.Furthermore, interconnecting Qrad;se;NR from within the core ROM with the far side of the other zone and vice-versa would result in modelling the same building element twice, but lumped with different other elements and therefore with different boundary conditions.This would not only risk physically false results, but also simulation crashes.
Option 2 would require significant changes to the core RC model and affect the established IBPSA core library.Additionally, the benefits of a more detailed model were considered not worth the increase in calculation time, as the ROM is mostly used for simplified modelling.
Option 3 seemed most promising as a consequence.In our implementation, we keep the thermal network (shown for three elements in Figure 3) and add a possibility to connect multiple thermal zones, in this regard following the vectorization idea presented by Gorzalka et al. (2021).Each zone border element is modelled as part of the RC model of the zone with the lower index through the Multizone model (see Figure 2) to avoid double modelling.In the adjacent zone, the heat flow is directly connected to the surface area.The resulting thermal network is shown in Figure 4.In the figure, array connections are represented by dashed lines.The dotted line between the interior surface nodes stands for the pairwise connection of the nodes by resistances for radiation heat exchange.Qg,rad,zb   3 and 4 for an explanation of the variables and indices.
Other than in the original implementation, the temperature on the outer surface of the ground floor element ϑ soil is not necessarily a constant here.It can also be connected to a table in a file, a sine function, or the AixLib.BoundaryConditions.GroundTemperature.GroundTemperatureKusuda model that was already a part of AixLib.

Complimentary Features in TEASER
TEASER is an integral part of the automatic model creation workflow shown in Section 2. As a consequence, features of the ROM should also be represented there.In this case, we added three features to TEASER: (i) a representation of borders between adjacent zones including the interface to the FiveElement ROM; (ii) a possibility to adapt the boundary conditions of the exported Modelica model, including non-constant soil temperatures and a partly customizable interface; and (iii) a new estimation approach for interior thermal masses that accounts for the newly added zone borders.

Zone borders
So far, TEASER has featured OuterWall, Rooftop, GroundFloor, Window, and Door elements mod-elling building elements between a zone and the exterior.Additionally, the InnerWall, Ceiling, and Floor elements are used to describe the vertical and horizontal interior thermal masses for the zone.Following the principle for the inner elements, we introduce InterzonalWall, InterzonalCeiling, and InterzonalFloor for modelling borders to other zones on the same floor, on a floor above, and on a floor below respectively.Upon export to the AixLib ROM, they are lumped to a single element per adjacent zone using the established algorithms of TEASER.The workflow of enriching data of an only geometrically described building in TEASER and exporting it to Modelica is described in the following and visualized in Figure 5.
One of the arguably most important features of TEASER is the availability of default layers and thermal properties for the building elements, e.g. from the TAB-ULA typology (Loga, Stein, and Diefenbach 2016).This enables the user to add energetically relevant data for a building for which only the envelope geometry was known before.So far, all boundaries to the exterior had their counterparts in TABULA and were mapped to default layers and U-values from that database.For inner elements, although not covered by TABULA as such, typical el- ements for each of TABULA's building age periods are available in TEASER, too.Lacking a proper state-of-theart approach, Lauster (2018) implemented an algorithm estimating their size based on the number of floors and usual room lengths and widths for the given use conditions, assuming that the uppermost border of a zone is the rooftop, the lowermost is the ground floor, and that each room has one outer wall.
As they can either be borders to unconditioned zones or to other conditioned zones, the new interzonal elements do not have a direct counterpart in TABULA.Therefore, depending on whether the associated thermal zones are equally conditioned or not, we map the elements either to the default respective outer or inner type element.Due to the hierarchical system of TEASER, each zone border is created for each of both zones.The resulting Python objects are assigned equal properties.Default layer sequences are reversed for the border elements of unconditioned thermal zones.This is also considered when calculating the RC parameters for the ROM using the asymmetrical algorithm of VDI 6007-1.Although the creation of two separated element objects for one physical zone border means that care has to be taken to keep the model consistent if changes are made after data enrichment, the export to AixLib uses only one of the two elements due to the RC component not being modelled in the higherindexed zone as visible in Figure 4.

Interface to the AixLib ROM
In addition to the previously existing Modelica file templates for OneElement to FourElement models, we added a FiveElement zone parameter template covering the parameters of the new interzonal elements.The user can choose for which pairs of zones (e.g.depending on heating and cooling setpoints) interzonal heat transfer should be considered.Other elements are treated as inner elements on each side.If exporting to a ROM with less than five elements, interzonal elements are lumped to the exterior wall element if an unheated zone is on the other side or to the interior wall element otherwise.The sine model and table options for the soil temperatures were included in all five element templates.Furthermore, we added an option to introduce custom Multizone templates, which allows more individual boundary condition settings like custom weather file readers, internal gains, or setpoint tables.

Interior Thermal Mass Estimation
As a matter of fact, the previously available approach to estimate the size of inner walls, floors, and ceilings (see Section 3.2.1)does not consider interzonal elements.Keeping it would increase the tendency of TEASER to overestimate interior thermal masses.However, the typical length and width of a room defined by the usage as introduced by Lauster ( 2018) is still the best base for the calculation that we could find.Using the number of floors and rooms that the zone should have depending on its area and height, the new 'typical_minus_outer' option in TEASER estimates the area of inner elements by subtracting all bordering elements (considering their tilt) from the overall surface area of the typical rooms separately for walls, floors, and ceilings.

Exemplary Application and Results
With the methodology presented above, a FiveElement model was created for the exemplary building used by Gorzalka et al. (2021).This section presents the results of simulating the about three weeks of time with changing heat load within the building (warm-up, approximately constant temperature, free cooling) for which measured air temperatures are available.

Model Setup
The exemplary building is a vacant single-family house in Morschenich, Germany.It consists of two heated floors interconnected with an open staircase and unheated floors (basement and attic) below and above.Geometry and temperature measurements are sourced from an actual building.The thermal properties of the building elements are based on the best knowledge after on-site assessment for one of the model variations (D) and typical values for a single-family house in Western Germany built in the 1960s with windows exchanged in 1995 for the others (A to C) with different properties of the interior masses.
For modelling, the two heated floors were considered as a single zone.The Modelica model was created in four different variations: • With the purpose of assessing the influence of model parameterization, three variations (A to C) cover the different estimation approaches for interior thermal masses.All building elements were given the typi-cal properties as mentioned above through TEASER.
With the areas for the three zones listed in Table 1, variation A is based on the one previously implemented in TEASER, variation B uses the newly implemented approach, and variation C uses the known area of the building.The attic has no inner walls, so its interior element surface area is always 0 m 2 .
• For demonstrating the applicability of the model in a real-world case, one variation (D) uses the actual thermal properties of the building as far as they are known from Gorzalka et al. ( 2021): ("[The variation] contains the best knowledge from building plans and on-site investigations about the walls (exterior and interior) and the roof of the building.As the actual compositions of the building parts in contact to soil and of the basement ceiling are unknown, it falls back to TABULA values there.").For all variations, heating setpoints (to very high temperatures) and usage profiles (to zero) were set in such a way that they do not influence the simulation.Instead, the measured loads of the installed heaters were defined as internal gains.Air exchange rates were kept at the default value for the conditioned zone.For the unconditioned zones, they were set to 10 h -1 for the attic and 1 h -1 for the basement, following the recommendations in Table 7 of ISO 13789 (2017-06).Table 8 in the same standard is the source for the interior surface heat transfer coefficients of nonvertical surfaces.They are set to 5.0 W m −2 K −1 for upwards and 0.7 W m −2 K −1 for downwards heat flow.The default value in TEASER is 1.7 W m −2 K −1 for both because the coefficients are constants in the ROM and the direction of the heat flow changes over the course of a full year.
Weather data (temperature and solar radiation) as well as the temperature of the surfaces in contact to soil were sourced from measurements recorded on site during the test period.

Temperature Comparison
The model was simulated from January 18, 8:00 to March 1, 16:00 (simulation time 1 497 600-5 155 200 s, where 0 s is the beginning of the year 2019).This left enough time for the model to stabilize under constant weather conditions (the actual building was unheated at the time) before the comparison period starts in the evening of February 4. Simulated temperatures and the volumetric mean of roomwise temperature measurements are compared for the conditioned zone in Figure 6 and for basement and attic in Figure 7.
For the conditioned zone, the results show that the two variations with automatically estimated interior surfaces areas (A and B) fit very well to the measurement in periods without a steep increase or decrease of the temperature (February 11 to 16 and 22 to 26).Variation C with the actual surface areas shows a tendency to overheat (February 7 to 12) and cool down too much (February 20 to 26).However, given that the thermal properties of the building were taken from the typology rather than from actual values, differences to the measured temperatures are not relevant for an evaluation of the model.
Variation D containing the best knowledge of the actual building shows an overall good agreement to the measured temperatures.The root-mean-square error (RMSE) for the hourly temperature difference between February 5, 15:00 and February 26, 24:00 is 1.13 K. Obvious deviations occur during warm-up (too slow until February 8, slight overheating afterwards; overall RMSE 1.51 K between February 5, 15:00 and February 13, 11:00) and cooldown (overall RMSE 0.90 K between February 17, 1:00 and February 26, 24:00).In the period of approximately constant temperature between February 13, 12:00 and February 16, 24:00, the simulated temperature is mostly overestimating the measured temperature to a minor degree with an RMSE of 0.59 K.
The sensitivity to changing interior masses is also interesting.Here, the reduction by 22.5% from variation A to B has an only minor impact.The additional reduction by 31.8% (approximately the same absolute reduction) to variation C changes the model behaviour to a far larger extent.Although this calls for further investigations into the sensitivity of the ROM, the different variations are comparable in times with dynamic loads in the magnitude of those appearing in usual application cases, i.e. interior temperatures of conditioned zones being kept within a range of a few K.A similiar observation can be made for the unconditioned zones.Here, the difference in daily fluctuations of the basement temperature between measured (almost no fluctuation) and all four simulated air temperatures (about 1-5 K) might be the result of an overestimated air exchange rate or of the model neglecting the vertical temperature distribution in the heated zone.For the attic, a poor performance of variation D is apparent between February 13 and February 18 during night times.Possible reasons are the same as for the deviations in basement temperatures.Variation C compensates these issues by a higher-than-actual U-value (0.84 W m −2 K −1 instead of 0.52 W m −2 K −1 ) for the interzonal ceiling.

Comparison to TwoElement and FourElement
To evaluate the influence of the FiveElement model on simulation results and its impact on calculation time, we created models for the exemplary building with two, four, and five elements.In the TwoElement and FourElement model, unheated zones were not included.Instead, we replaced the borders to the attics by a Rooftop element with reduced outer convection and the borders to the basements by a GroundFloor element.The temperature of the soil in contact to the outer surface of these and the FiveElement basement's GroundFloor elements was set to the TEASER default value of 13 • C. Results for a simulation of the test period showed that the fit to the measured values depends heavily on this soil temperature value.As a consequence, we decided to simulate a full year under comparable conditions, which is a more useful indicator for model performance.In these full-year models, default use conditions for residential zones were taken from TEASER, with the following exceptions: • Table 2 shows the calculation times on a Windows notebook (Dymola 2020x, 32-bit compiler, solver Radau, tolerance 1 × 10 −4 ) as well as the heating and cooling energy used for the main zone from the simulation run.Regarding the interior thermal masses, the results show their importance in application cases with highly dynamic loads.However, this is rarely the case for use cases of the ReducedOrder model.As a consequence, the new estimation approach for interior masses improves the consistency of the overall workflow, but is most likely not essential for reliable results.
Although interzonal heat transfer does not need to be considered for the use case of urban-scale simulations, it is very important when considering specific buildings.The prior lack of interzonal heat transfer for the ROM was already discussed by Jansen et al. by comparing simulation results of the ROM to results of the well-established simulation tool EnergyPlus (Jansen et al. 2021).With the implemented changes, this shortcoming of the ROM was solved.However, the expansion is also accompanied by an increasing parameterization effort, since it must be known which zones are in contact with each other via which components.Nevertheless, this effort is put into perspective, especially when automated approaches are used for model creation.For example, if Building Information Modeling (BIM) is used as a data source, the contact points of the zones can be automatically identified and forwarded to TEASER.The existing approach BIM2SIM1 , which also uses TEASER, can therefore use the presented changes to create more realistic ROMs based on BIM data.
The calculation time for a full-year FiveElement simulation showed to be three times the duration of a run without the two unheated zones and without interzonal elements (see Table 2).This shows that the added complexity of connecting the zones did not increase computation effort significantly more than simulating them in parallel, which is in line with past findings that "simulation time [...] is correlated to the number of state variables resp.thermal capacitances" (Lauster and Müller 2019).For unknown reasons, we also did not find an increased simulation time for FourElement in comparison to TwoElement although the number of state variables increases from 10 to 12. Regarding energy demand, the interzonal heat transfer influenced heating and cooling loads mainly in summer.In particular, replacing the constant soil temperature by a simulated basement zone caused a reduction of heat flows through the floor of the main zone.

Conclusion
In the previous sections, we presented a new feature of the AixLib ReducedOrder (ROM) model and its compli-mentary Python tool TEASER.It is now possible to simulate heat flow through borders between adjacent zones with the help of an additional RC component for these building elements available in the FiveElement model of the ROM.Furthermore, TEASER can now automatically source thermal properties of these building parts from the German TABULA typology.All contributions to the two software tools are currently in the process of being published open-source 2 .
In an exemplary application to a single-family house, we have seen an acceptable agreement between measured and simulated air temperatures-interestingly not only with the best knowledge of the actual building, but also with statistical data for its age.Although this cannot replace the test of the new ROM features with an appropriate test case for validation, it demonstrates that the ROM is able to simulate the highly dynamic loads to the largely simplified single-family house, resulting in an overall RMSE of 1.13 K.
The importance of interior masses for dynamic simulation has been investigated by comparing two approaches for the estimation of inner wall sizes and the actual interior geometry of the building.The results show large differences during highly dynamic loads, but these loads rarely appear in the use cases of the ROM.This led to the conclusion that inner wall sizes are mostly a question of parameter consistency.
A modest increase in simulation time was predominantly caused by the added zones rather than by the interzonal elements.Therefore, we recommend to check which zones need to be explicitly simulated when using the feature.
Regarding the overall workflow, the new developments are embedded into other work regarding the BIM2SIM approach towards an automated toolchain from BIM via TEASER to the AixLib ROM that can create more realistic ROMs based on BIM data.

Figure 2 .
Figure 2. Visualization of the ROM concept with the three model levels.Numbers in the RC core indicate which elements are added from OneElement up to the FiveElement model introduced here.Zoom in for details.

Figure 3 .
Figure 3. Thermal network representation of the AixLib ThreeElement model according to Lauster (2018), visually adjusted.Refer to Tables3 and 4for an explanation of the variables and indices.

Figure 4 .
Figure 4. Thermal network representation for the new FiveElement implementation in AixLib, with the fifth element modelling heat exchange with adjacent zones.Refer to Tables3 and 4for an explanation of the variables and indices.

Figure 5 .
Figure 5. Visualization of the data sourcing process for the ROM used by TEASER described in Section 3.2.Numbers in parentheses represent the number of ROM elements, e.g."Floor pl.(≥ 3)/exterior wall" means the ground floor is exported to a floor plate element from ThreeElement on and is lumped to the exterior wall element for lower-order models.

Figure 6 .Figure 7 .
Figure 6.Measured and simulated mean air temperatures for the conditioned zone of the exemplary building.
No internal gains and neither heater nor cooler in the unheated zones of the FiveElement model • Cooling active with setpoint 25 • C • Heating setpoint 20 • C se,rt R rest,rt

Table 1 .
Surface area of the interior elements of each zone and source for materials and thermal properties for the four model variations.

Table 2 .
Duration of the calculation and integrated heating and cooling power for the full-year simulations of the TwoElement, FourElement, and FiveElement representations of the exemplary building.Upon contribution of the presented model to the open-source version of AixLib, we plan to add it in addition to the already implemented VDI 6007-1 and ASHRAE 140 cases for single-zone applications.However, there are only annual and no hourly validation results available for case 960.So, the validity of the dynamic calculations cannot be tested.
zonal heat transfer is not possible with the applicable standards.All test examples in VDI 6007-1 consider only one room.In ANSI/ASHRAE Standard 140 (2020), the tests relevant for the ROM are those of class I.They comprise a test case with interzonal heat transfer (case 960).

Table 3 .
List of variables.

Table 4 .
List of abbreviations in variable indices.