politecnico di milano · rosalia sciortino matr. 740769 anno accademico 2010 - 2011. 2 all’amico...

125
POLITECNICO DI MILANO Facoltà di Ingegneria Industriale Corso di Laurea in Ingegneria Energetica Dipartimento di Elettronica e Informazione Object-Oriented scalable-detail with building simulation: a model library and some comparisons with state-of-the-art tools. Relatore: Prof. Francesco CASELLA Co-relatore: Ing. Alberto LEVA Ing. Marco BONVINI Tesi di Laurea di: Rosalia SCIORTINO Matr. 740769 Anno Accademico 2010 - 2011

Upload: others

Post on 22-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

  • POLITECNICO DI MILANO

    Facoltà di Ingegneria Industriale

    Corso di Laurea in

    Ingegneria Energetica

    Dipartimento di Elettronica e Informazione

    Object-Oriented scalable-detail with building simulation: a model

    library and some comparisons with state-of-the-art tools.

    Relatore: Prof. Francesco CASELLA

    Co-relatore: Ing. Alberto LEVA

    Ing. Marco BONVINI

    Tesi di Laurea di:

    Rosalia SCIORTINO

    Matr. 740769

    Anno Accademico 2010 - 2011

  • 2

    All’amico

    don Fabio Coppini

  • Contents

    1. INTRODUCTION ......................................................................................... 13

    1.1 The energy problem ...................................................................................... 13

    1.2 European legislation ...................................................................................... 15

    1.3 The Italian scenario ....................................................................................... 16

    1.4 Limits of the Italian legislation ..................................................................... 18

    1.5 Advantages and disadvantages of “simplified” procedures .......................... 20

    1.6 Usefulness of dynamic simulation ................................................................ 22

    2. BUILDING SIMULATION TOOLS........................................................... 25

    2.1 Classification of calculation codes ................................................................ 25

    2.1.1 Clarke and Maver’s classification .................................................... 25

    2.1.2 Sahlin’s classification ....................................................................... 26

    2.1.3 CIRIAF’s classification .................................................................... 27

    2.2 Thermal simulation methods for buildings ................................................... 29

    2.2.1 The finite – difference method ......................................................... 30

    2.2.2 The finite element method ................................................................ 32

    2.3 A literature review ......................................................................................... 34

    2.4 Peculiar difficulties of dynamic modeling .................................................... 37

    2.4.1 The complexity of energy exchanges ............................................... 37

    2.4.2 Difficulty in writing the equation for building simulation ............... 40

    2.4.3 Different physical phenomena .......................................................... 42

    2.4.4 Different disciplines.......................................................................... 43

    2.4.5 Different time scales and spatial sizes .............................................. 43

    2.5 Current dynamic tools ................................................................................... 44

    3. AN OBJECT-ORIENTED SOLUTION BASED ON MODELICA ........ 45

    3.1 Model library structuring .............................................................................. 45

    3.1.1 Structuring step 1 .............................................................................. 45

    3.1.2 Structuring step 2 .............................................................................. 47

    3.2 Object Oriented Modeling (and Simulation) ................................................ 49

    3.2.1 Physically meaningful connections .................................................. 49

    3.2.2 Interface abstraction and a-causal approach ..................................... 50

  • 4

    3.3 Modelica ........................................................................................................ 51

    3.4 A Modelica library ........................................................................................ 56

    3.4.1 Overview........................................................................................... 56

    3.4.2 An example model ............................................................................ 59

    4. VALIDATION AND CASE STUDIES ....................................................... 65

    4.1 Test 1: dynamic simulation and (static) certification .................................... 66

    4.2 Test 2: comparison with other simulation programs ..................................... 72

    4.2.1 Simulation in winter conditions ........................................................ 74

    4.2.2 Simulation in summer conditions ..................................................... 87

    4.3 Test 3: a complete simulation model at various detail level ......................... 95

    4.4 Test 4: including sub-zonal models1 ........................................................... 114

    5. CONCLUSIONS AND FUTURE WORK ................................................ 121

    6. ACRONYMS ............................................................................................... 122

    7. BIBLIOGRAPHY ....................................................................................... 123

  • 5

    List of figures

    1.1 Distribution of European consumption for end-use................................. 14

    1.2 Distribution of consumption in the European Community for final

    uses .......................................................................................................... 14

    1.3 Distribution of European consumption for end-use................................. 15

    1.4 Effects of inertia on the wave thermal ..................................................... 19

    1.5 A good way to design using dynamic simulation.................................... 23

    2.1 Heat transfer simulation methods ............................................................ 30

    2.2 Discretization of a multi-component ....................................................... 33

    2.3 Relative distance between nodes ............................................................. 33

    2.4 Energy flows in a building ...................................................................... 39

    2.5 Factors that influence the air flow distribution in buildings ................... 40

    3.1 Connection of three fluid subsystems ...................................................... 50

    3.2 Simulation of model Example1 in listing 1 ............................................. 55

    3.3 Organization of the BUILD Modelica library ......................................... 58

    3.4 An example of room model ..................................................................... 59

    4.1 A room model for test 1 ........................................................................... 66

    4.2 Test 1: temperature trade of the North wall ............................................ 71

    4.3 Test 1: temperature trade of the air-conditioned environment ................ 71

    4.4 Test 1: plant and section of the building ................................................. 73

    4.5 Test 2: the building model implemented in Modelica ............................. 75

    4.6 Test 2: comparison of the primary specific energy demands

    (kWh/m2y) for heating of the containment ............................................. 78

    4.7 The Sun variable position through zenith and azimuth angles ................ 79

    4.8 Example of the Sun path in January ........................................................ 79

    4.9 Example of the Sun path in June ............................................................. 80

    4.10 Changing of external temperature during the coldest month in 2010 ..... 81

    4.11 Azimuth and zenith trades ....................................................................... 82

    4.12 Sunrise and sunset hour trades in 31 days ............................................... 83

    4.13 External temperature trade during the coldest month in 2010 ................ 83

    4.14 Test 2: winter settings for Milan (second method) .................................. 84

    4.15 Mean external temperature trade (°C) during the entire heating

    season ...................................................................................................... 85

    4.16 Sunrise and sunset hour trades in 183 days ............................................. 86

    4.17 External temperature trade during the winter season .............................. 87

    4.18 Test 2: comparison of the primary specific energy demands

    (kWh/m2y) for cooling of the containment ............................................. 89

  • 6

    4.19 Changing of external temperature during the hottest month in 2010 ...... 91

    4.20 External temperature trade during the hottest month in 2010 ................. 91

    4.21 Test 2: summer settings for Milan (third method) .................................. 92

    4.22 Mean external temperature trade (°C) during the entire summer

    season ...................................................................................................... 93

    4.23 External temperature trade during the summer season ........................... 94

    4.24 Test 2: total specific energy need (kWh/m²y) of the containment on

    annual basis ............................................................................................. 95

    4.25 Test 3: the building model ....................................................................... 96

    4.26 Test 3: lost energy of walls by transmission at different exposures ....... 97

    4.27 Test 3: dynamic study - Level 0 ............................................................ 100

    4.28 AWPI analogue control ......................................................................... 102

    4.29 Test 3: dynamic analysis of the room only and control system

    for each local - Level 1a ....................................................................... 102

    4.30 Test 3: temperature trades in adjacent rooms - Level 2 ........................ 103

    4.31 Test 3: power supplied by the control system - Level 1a ..................... 103

    4.32 Test 3: studies with decoupling control - Level 1b ............................... 104

    4.33 Block system of a general decoupling ................................................... 105

    4.34 Representation of a generic compensator .............................................. 105

    4.35 “Backwards" decoupling for a 2×2 system ........................................... 108

    4.36 Test 3: action and correction of the multivariable control system -

    Level 1b ................................................................................................. 108

    4.37 Test 3: building model in open loop ...................................................... 109

    4.38 Test 3: temperature trends in open loop ................................................ 109

    4.39 Test 3: simplified analysis of the heater only - Level 2 ........................ 110

    4.40 Test 3: temperature trades in the rooms - Level 2 ................................. 111

    4.41 Test 3: analysis of the heater only with control system - Level 3 ......... 112

    4.42 Test 3: temperature trades in adjacent rooms - Level 3 ........................ 112

    4.43 Test 3: power supplied by the control system - Level 3 ........................ 113

    4.44 Test 3: comparison between level 1(a) and level 3 ............................... 113

    4.45 Test 4: Modelica elements for the application example models ........... 114

    4.46 Possible configurations of all the model elements ................................ 115

    4.47 Test 4: control of the mean room temperature (K), levels L1- 4 ........... 116

    4.48 Test 4: control of the power (W), levels L1 - 4 ..................................... 116

    4.49 Test 4: the total computed consumption (J), levels L1 - 4 .................... 117

    4.50 Test 4: temperature at different heights, levels L2 and L4 .................... 118

    4.51 Different positions for a temperature sensor ......................................... 118

    4.52 Test 4: temperature and power control, and the total consumption

    with different sensor positions at L2 ..................................................... 119

  • 7

    List of tables

    1.1 Using the methodology of calculation of energy building

    performance ............................................................................................. 17

    2.1 Calculation codes of the first level for evaluating building energy ........ 28

    2.2 Calculation codes of the second level for evaluating building energy .... 28

    2.3 Comparison of E/E with ESP-r/DOE-2/BLAST Weather Data

    Formats .................................................................................................... 36

    4.1 Test 1: settings ......................................................................................... 67

    4.2 Test 1: physical characteristics of walls .................................................. 68

    4.3 Test 1: physical characteristics of the roof .............................................. 68

    4.4 Test 1: physical characteristics of the floor ............................................. 69

    4.5 The exposure factors ............................................................................... 69

    4.6 Test 1: comparison in terms of energy lost by transmission ................... 70

    4.7 Test 1: thermal transmittance .................................................................. 70

    4.8 Test 1: energy performance index ........................................................... 70

    4.9 Physical characteristics of the building ................................................... 74

    4.10 Heating and cooling seasons ................................................................... 74

    4.11 Test 2: transmission lost power (W) of the building located

    in Milan ................................................................................................... 76

    4.12 Test 2: energy performance index in winter conditions for

    the building located in Milan.................................................................. 76

    4.13 Test 2: transmission lost power (W) of the building located

    in Rome .................................................................................................. 76

    4.14 Test 2: energy performance index in winter conditions for

    the building located in Rome................................................................... 76

    4.15 Test 2: software results ............................................................................ 77

    4.16 Test 2: physical proprieties in stationary conditions (first method) ........ 80

    4.17 Test 2: physical proprieties for monthly calculation

    (second method) ...................................................................................... 81

    4.18 Mean monthly external temperatures (°C) during

    the winter season ..................................................................................... 85

    4.19 Test 2: physical proprieties for annual calculation (third method) ......... 86

    4.20 Test 2: different energy performance index for the building

    containment situated in the same location (Milan) ................................. 87

    4.21 Test 2: energy performance index in summer conditions for

    the building located in Milan.................................................................. 88

  • 8

    4.22 Test 2: energy performance index in summer conditions for

    the building located in Rome................................................................... 88

    4.23 Software results in the summer season .................................................... 89

    4.24 Test 2: stationary conditions in the summer season ................................ 90

    4.25 Test 2: mean monthly external temperatures during the summer

    season (°C) .............................................................................................. 93

    4.26 Test 2: different energy performance index of the building situated

    in the same location (Milan) .................................................................... 94

    4.27 Test 3: settings ......................................................................................... 97

    4.28 Test 3: physical characteristics of walls .................................................. 97

    4.29 Test 3: physical characteristics of the roof .............................................. 97

    4.30 Test 3: physical characteristics of internal walls ..................................... 97

    4.31 Test 3: physical characteristics of the floor ............................................. 98

    4.32 Test 3: physical characteristics of building components ......................... 98

    4.33 Test 3: energy lost by transmission and ventilation for

    each exposure ......................................................................................... 99

    4.34 Test 3: comparison between static and dynamic calculation ................ 101

  • 9

    Ringraziamenti

    Vorrei ringraziare il Professore Francesco Casella, per la grande possibilità di

    lavorare a questa Tesi. E ancor di più desidero ringraziare il Professore Alberto

    Leva e Marco Bonvini per il loro sostegno ed aiuto durante l’intero periodo di

    lavoro. La loro grande esperienza nel campo è stata di grande valore per i

    risultati presentati in questa Tesi, ma è stata soprattutto la passione, attenzione,

    dedizione e cura nel lavoro svolto insieme a stupirmi e ad incoraggiarmi.

    E così ringrazio tutti quei professori a cui ho guardato con grande ammirazione

    per l’amore all’insegnamento e l’interesse sincero mostratomi durante questi

    anni, durante i quali la strada che portava all’università e poi al lavoro si faceva

    sempre più chiara. Ricordo in particolare l’insegnante di italiano del liceo, che,

    terminata la maturità, mi ragalò una tartarughina fatta da lei all’uncinetto.

    Questo piccolo peluche porta al collo un foglio arrotolato con la seguente

    citazione: «Il professore è uno che parla nel sonno altrui» (W. H. Auden).

    E ora i ringraziamenti più difficili, non perché non riesca a trovare le parole

    adatte, ma per l’impossibilità di poter arrivare - come io vorrei - a tutte le

    persone incontrate lungo il cammino. Prima di tutto ringrazio i miei genitori,

    Salvo e Laura, per il sostegno e l’amore ricevuto, ma soprattutto la pazienza.

    E i miei più cari amici senza i quali non avrei potuto fare un passo. Il primo sei

    tu, don Fabio, che mi hai insegnato ad amare, a saper guardare con il cuore e a

    giudicare tutte le circostanze che vivevo affinchè potessi diventare una donna.

    E il mio pensiero va ai più piccoli amici dell’oratorio, mi avete regalato la

    possibilià di vedervi crescere nella vostra semplicità d’animo, e diventare grandi

    e curiosi della vita. E a voi, amici incontrati in università o meglio compagni di

    viaggio, a voi rivolgo tutto il mio affetto. Vivere l’università in vostra

    compagnia ha dato un significato alla scelta dei miei studi. Così lo studio non

    era più una fatica ma un modo attraverso il quale poter scoprire e conoscere di

    più me stessa. E così tutto il tempo passato insieme portava a un “di più”.

    Ho davvero davanti a me molti volti di cui vorrei scrivere per ciascuno il nome

    in modo tale che rimanga inciso in questo lavoro che per me rappresenta il

    completamento di un incredibile percorso umano. Decido di lasciarvi un breve

    passo di Oscar Milosz tratto dal libro “Miguel Manara” che mi permette di poter

    abbracciare e voler bene fino in fondo ciascuno di voi.

    "Verrà forse un giorno in cui Dio ti permetterà di entrare brutalmente, come

    una scure, nella carne dell'albero, di cadere pazzamente, come una pietra, nella

    notte dell'acqua e di scivolare cantando, come il fuoco, nel cuore del metallo.

    E quel giorno saprai di quale carne è fatto il mondo, e parlerai liberamente

    all'anima del mondo dell'Albero, dell'Acqua e del Metallo, e gli parlerai con la

    voce del vento e della pioggia e della donna innamorata"

  • 10

    Abstract

    The main idea behind this thesis is to show that dynamic simulation can help

    achieve better energy efficiency in buildings. To this end, moreover, it is very

    important to be able of conducting system-level studies with a scalable detail

    level. This work presents the motivations for the statements above, and explains

    how simulation can be a decision aid tool along the entire life of a project, be it

    a new design or a refurbishing. Finally, OOMS (Object-Oriented Modeling and

    Simulation) is proposed as the formalism for the required modeling and

    simulation tasks, and the reasons for adopting that formalism in system-level

    building simulation are illustrated by means of convenient examples.

    The work also acknowledges the relevant problems involved in such a matter,

    especially the necessity for dynamic simulation models to maintain steady-state

    consistence with design-oriented ones (in the classical sense). In so doing, we

    define the role and expected outcome of the major types of tools, for example

    showing what one can (and cannot) expect from certification systems, sizing-

    oriented models, and so forth.

    The goal of the long-term research to which this thesis belongs is constructing a

    set of dynamic simulation models and procedures capable of tackling the whole-

    building problem in a unified framework, and with fully scalable complexity. In

    order to do that in practice, a model library is thus introduced, and some

    examples demonstrate the improvements yielded by OOMS to both the ease and

    the usefulness of simulation in building design. By means of some case studies,

    show the usefulness on two different fronts:

    The same model can be used to conduct studies at different levels of detail, allowing the designer to base his/her decisions on simulation

    outputs right from the beginning of a design, and maintaining coherence

    along that design process;

    Models conceived in this way allow to synthesize and compare different control systems, both at a high level (correctness of a strategy and

    suitability for the specifications at hand) and with arbitrarily fine detail

    (capability of the installed devices to actually realize that strategy).

    Finally, this work preliminarily shows how OOMS allows to model relevant

    facts such as the behavior of air movers, and sub-zonal airflow descriptions.

    In doing so, OOMS allows to capture energy-relevant phenomena at a level that

    is surely coarse with respect to fine-scale 3D CFD codes. However, this in

    OOMS is done together with all other modeling task, in a single framework and

    tool.

  • 11

    Specifically, the contribution of this thesis consists in implementing some

    library models, and especially in defining and conducting comparative tests to

    relate the proposed approach to well assessed engineering techniques, thereby

    evidencing the proposal’s advantages.

    Keywords: Building simulation, object-oriented modelling, and scalable detail.

    Sommario

    L’idea principale che sta alla base di questa tesi è mostrare come la simulazione

    dinamica possa aiutare a raggiungere una migliore efficienza energetica negli

    edifici. A tal proposito, è molto importante che essa, inoltre, sia in grado di

    condurre le analisi a livello di sistema di controllo con un livello di dettaglio

    scalabile. Questo lavoro presenterà le motivazioni di quanto appena dichiarato, e

    spiegherà come la simulazione possa essere uno strumento di aiuto decisionale

    lungo l’intera vita di un progetto, sia che si tratti di nuova costruzione o di

    rimessa a nuovo. Infine, il linguaggio orientato agli oggetti definito OOMS

    (Object-Oriented Modeling and Simulation) viene proposto come formalismo

    per la modellazione e simulazione, e alcuni esempi saranno presentati per

    illustrare le ragioni per le quali si è scelto tale formalismo per la simulazione

    degli edifici a livello di sistema di regolazione. Il lavoro riconosce anche i

    problemi rilevanti coinvolti in tale materia, in particolare la necessità dei

    modelli di simulazione dinamica di mantenere la consistenza dello stato

    stazionario con quello orientato (nel senso classico). Così facendo, si definisce il

    ruolo e i risultati attesi dei principali tipi di strumenti, mostrando per esempio

    ciò che uno può (e non può) aspettarsi dai programmi di certificazione,

    dimensionamento degli modelli orientati, e così via.

    L’obiettivo della ricerca a lungo termine a cui appartiene questa tesi è di

    formulare una serie di modelli di simulazione dinamica e procedure in grado di

    affrontare la progettazione dell’intera costruzione attraverso un quadro unitario e

    una complessità completamente scalabile. A tale scopo, nella pratica saranno

    presentati un modello di libreria e alcuni esempi che dimostreranno i

    miglioramenti apportati dal linguaggio OOMS sia per la facilità sia per l’utilità

  • 12

    della simulazione nella progettazione edilizia. Per mezzo di alcuni casi di studio,

    si dimostra tale utilità su due fronti differenti:

    Lo stesso modello può essere utilizzato per condurre studi a diversi livelli di dettaglio, consentendo in tal modo al progettista di basare le

    proprie decisioni progettuali sulle uscite di simulazione fin dall’inizio

    della costruzione dell’edificio, e di mantenere la coerenza lungo quel

    processo di progettazione;

    Modelli concepiti in questo modo permettono di sintetizzare e confrontare i diversi sistemi di controllo, sia ad alto livello (correttezza

    di una strategia e idoneità per le specifiche a portata di mano) sia con

    dettagli arbitrariamente sottili (capacità dei dispositivi installati per

    realizzare effettivamente la strategia).

    Infine, questo lavoro mostra preliminarmente come il linguaggio OOMS

    permetta di modellare alcune situazioni rilevanti come il comportamento dei

    moti dell’aria (compreso il caso che si tratti di una descrizione sub-zonale). In

    tal modo, la tecnica agli oggetti orientati permette di catturare fenomeni

    energetici rilevanti ad un livello che è sicuramente grossolano rispetto alla scala 3D dei codici eleborati da CFD. Tuttavia, nel linguaggio di programmazione

    scelto questo viene fatto insieme a tutti gli altri compiti di modellazione

    attraverso un unico strumento. In particolare, il contributo di questa tesi consiste

    nell’implementare alcuni modelli della libreria, e soprattutto nel definire e

    condurre alcune prove comparative per mettere in relazione l’approccio

    proposto con le tecniche di ingegneria ben consolidate, evidenziando così i

    vantaggi della proposta.

    Parole chiave: simulazione di edificio, modellazione object-oriented e studio di

    dettaglio scalabile

  • 13

    Chapter 1

    Introduction

    1.1 The energy problem Since 1997 the global climate change debate has focused largely around the

    Kyoto Protocol that requires industrialized countries to reduce their emissions of

    greenhouse gases. The identification of effective strategies to control climate

    change is therefore a key challenge for the research undertaken on sustainability

    issues.

    Nowadays, energy savings and improved efficiency in end uses seem to be the

    way forward to be able to resolve, at least partially, the serious energy problems

    that are affecting all countries.

    Since 1973, when the first oil crisis happened, the state of energy began to be

    analyzed and assessed. Especially in the Anglo-Saxon world professions such as

    Energy Managers were created with the task of analyzing and solving all the

    problems related to improper use of energy resources. In support of this, a series

    of regulations was subsequently launched that took into account energy saving

    and provided guidance to improve end-use efficiency.

    The work of the World Climate Conference (particularly the COP 3 in 1997 that

    defined the Kyoto Protocol) has gradually promoted programs, strategies and

    actions aimed at reducing air pollution and consumption of non-renewable

    energy sources, the promotion of renewable energy and energy-saving incentive

    [1]. The need to rethink the way we produce and use energy is inescapable: first,

    the inadequacy of the current energy production in meeting the demands of

    consumption growth and, secondly, the impact on the environment and quality

    of life that an increase in production and consumption of fossil fuels would

    bring.

    The energy consumption of cities is particularly significant: according to recent

    estimates, in fact, half the world's population lives in urban settlements. For

    example, in Italy, one third of the population and most activities are

    concentrated in a seventeenth of the national territory.

    In terms of energy, in 2003 the Europe Union has spent a total of 1,505 million

    tons of oil equivalent: a breakdown in end uses can see a large part of

    consumption attributable to the residential and tertiary sector (see fig. 1.1).

    Energy efficiency is the most important, fast and effective tool identified by the

    European Union to ensure global competitiveness, security and quality of our

    environment, reducing dependence on foreign supply of raw materials and

  • 14

    energy. It has been estimated that the EU would be able to save, with

    appropriate interventions, at least 20% of the current consumption of around 60

    billion euro per year: on a smaller scale, an average family could save from 200

    to 1,000 euro per year.

    Figure 1.1. Distribution of European consumption for end-use (The Green Paper, 2000)

    In the energy balance of EU countries an important role is played by the civil

    sector, which includes energy consumption for the use and management of

    residential and tertiary buildings. According to data presented by the EU itself,

    this sector uses more than 40% of the total EU final energy demand (see fig.

    1.2).

    Figure 1.2. Distribution of consumption in the European Community for final uses (The

    Green Paper, 2005)

    The end-uses in a building are numerous and include the air-conditioned

    (heating and cooling), the production of hot water, ventilation and air handling,

    lighting, use of appliances and electronic equipment [2].

    42%

    28%

    30%

    Residential and tertiary Transport Industry

  • 15

    Figure 1.3 - Final consumption of energy in residential use category (ENEA data

    processing MAP – 2004)

    The air conditioning in buildings in winter and summer season is the most

    energy-consuming component, even considering the differences between

    buildings due to different types of construction and intended use (see fig. 1.3).

    In addition, the increased use of cooling systems in residential construction has

    contributed in recent years, the significant increase in energy consumption for

    air conditioning in summer.

    Based on these evaluations and considering that existing building stocks are

    many cases ancient and inefficient in terms of energy1, the EU and member

    countries have identified a strategic sector for achieving the overall energy

    efficiency.

    Thus, in recent years, both at European and national level, a new legislative

    framework has established, able to develop the necessary regulatory

    requirements, financial, technological and cultural challenge for adequate

    response to the energy efficiency of buildings.

    1.2 European legislation In 2002 the European Parliament adopted Directive 2002/91/EC (Energy

    Performance of Buildings Directive) on energy efficiency in buildings with the

    aim of improving the energy performance of buildings within the Community.

    This Directive [3] dictates, in fact, that each State shall provide an energy

    performance certificate at the time of construction, sale and leasing of new or

    existing building. This certificate shall be obtained based on a methodology for

    1 in Italy there are 13 million of existing buildings, of which about 11 million prior to the Act 373/73 - Source: White Paper on Energy, Building, Environment

  • 16

    calculating the energy performance of buildings. Standards are therefore needed

    to define, quantify, and assess energy performance.

    The objective of Energy Performance of Building Directive is to “promote the

    improvement of the energy performance of buildings within the European

    Community, taking into account outdoor climatic and local conditions, as well

    as indoor climate requirements and cost-effectiveness” (Art.1).

    This is to be achieved through five main actions:

    The creation of a single methodology that can be used to calculate the energy performance of buildings.

    The application of minimum requirements, to all new residential and tertiary (generally public and commercial) buildings and to the major

    refurbishment of existing buildings with floor areas greater than 1,000

    square meters.

    The introduction of an energy performance certificate to be produced whenever a building is constructed, rented or sold.

    Regular inspection of boilers with outputs of more than 20 kW and inspection every two years for boilers of more than 100 kW.

    Regular inspection of air conditioning systems with outputs of more than 12 kW.

    Confirming the increased focus on more effective integration of building into

    the environment surrounding, Art.8 of the initial considerations provides that

    “Member States shall set minimum energy performance requirements for

    technical building systems that are installed in buildings”.

    1.3 The Italian scenario

    In Italy, Law 373 of 30 April 1976 concerns, in particular, limitations in energy

    consumption for heating. It requires that the building envelope ensure the least

    possible loss of heat to the outside.

    By Act 10 of 9 January 1991 the approach to the problem of energy saving was

    of a different nature, although in the analogous purpose of inducing the user to

    reduce energy consumption for its own needs for environmental heating. In

    practice, the observations should be concentrated on the energy needs of the user

  • 17

    over an entire year in question. It is necessary to consider not only the effects of

    isolation, but also the free contributions (people, lights, solar radiation, etc.) that

    contribute to environmental heating.

    Following the European Directive, we have seen a renewal of legislation [4],

    that has led to the promulgation of national Legislative Decree 192 of 19 August

    2005, which was, later, supplemented and corrected by legislative decree of 29

    December 2006, n. 311 and more recently by the implementing decrees, D.P.R.

    59/09 and D.M 29/06/2009 containing the "National guidelines for energy

    certification of buildings".

    These certifications are based on precise calculation methods of national

    reference, divided by new and existing buildings, by type of building, size and

    complexity of the same (see tab. 1.1).

    In particular, new buildings are referred to the “method of calculation of

    project” (paragraph 5.1 of Annex A of 06/26/2009 Decree). It refers to UNI/TS

    11300-1 and UNI/TS 11300–2 [5] for index calculation of energy performance

    for heating (EPi and EPi invol) and cooling (EPe,invol). This procedure is applicable

    to all types of buildings, whatever their size.

    Table 1.1. Using the methodology of calculation of energy building performance (Annex 3

    of Annex A of 26/06/2009 Decree)

  • 18

    For existing buildings, however, one has to refer to the "method of calculation to

    relief on the building" (paragraph 5.2 of Annex A of 06/26/2009 Decree). It

    refers to UNI/TS 11300-1 and UNI/TS 11300-2 for index calculation of energy

    performance for heating (EPi and EPi,invol) and cooling (EPe,invol) and it provides

    the following three levels of detail, depending on the type and size of the

    building:

    1. For all building types, regardless of their size, the technical standards UNI/TS 11300-1 and UNI/TS 11300-2 (and their simplifications provided for

    existing buildings) are the national reference.

    2. Only for residential buildings with floor area up to 3000 m2 it refers to the method of DOCET calculation, prepared by CNR and ENEA on the basis of

    the technical standards UNI/TS 11300-1 and UNI/TS 11300-2. This method

    meets the requirements of simplification, aimed at minimizing the burden on

    applicants.

    3. Only for residential buildings with floor area up to 1000 m2, the simplified method set out in Annex 2 of Annex A of 06/26/2009 Decree is used as a

    reference for the calculation of building energy performance indices for

    winter heating (EPi and EPiinvol).

    1.4 Limits of the Italian legislation Designing second a proper approach due to the principles of sustainable

    architecture, the building envelope will need to: release little heat and capture

    solar energy from sunlight in the winter season, and reject the solar radiation

    and release heat when necessary, if summer season.

    In this regard, countries with a temperate climate (Southern Europe) will solve a

    more difficult task: to design solutions that can deal with the cooling as well as

    with the heating.

    Much research [6] has been conducted to evaluate the performance of buildings

    and their materials with the change in thermal inertia. The thermal inertia is

    simply the ability of materials to store heat and release it gradually over time:

    the energy received during the hottest hours is stored in the mass of the building

    and then gradually released. Materials have the task to mitigate (damping) and

    delay (time lag) entry in the environment of a heat wave (see fig 1.4) due to

    incident solar radiation on the building envelope. This ability depends on the

    thickness of the material, the thermal capacity and conductivity. This will

  • 19

    determine, within the building, a lag and a reduction of fluctuations and peaks

    that characterize the outside temperature.

    Figure 1.4. Effects of inertia on the wave thermal (TERMOBUILD)

    The conscious use of the mass has a significant positive effect on comfort

    conditions, energy consumption and cooling loads, particularly those peak,

    which is one of the reasons for the summer blackout.

    In assessing the energy costs, one must therefore consider both the total

    consumption and the maximum loads, which determine the sizing of air

    conditioning. The mass is not in itself a solution applied indiscriminately to

    automatically improve the energy performance. The use of a heavy containment

    implies a deep understanding of the dynamic properties of the closures. It is a

    solution that fits nicely with the passive cooling strategies also mentioned in the

    initial note (n.18) by EPBD. The European Union, in this note, remember that in

    recent years in countries of southern Europe, there has been an increased use of

    facilities for air conditioning thus posing serious problems at peak load2.

    Therefore, it states that priority with respect to energy consumption for cooling

    rather than heating should be given in some European countries.

    With reference to air conditioning in summer, the Legislative Decree 192/05 and

    311/06 require (for some climate zones and destinations of use) the adoption of

    certain solutions of containment without also requiring any calculations [7].

    In particular, establishing a single limit, equal for all locations to the surface

    mass of opaque component, is a simplistic prescription. It does not properly

    consider some effects of various parameters (thermal, solar, user and

    environmental) on summer loads and energy needs. Finally, the only indicator of

    energy performance introduced by these regulations refers to the winter heating

    (EPi). This seems at odds with the Directive 2002/91/EC which comprises the

    2 it was summer-time record of power equal to 56,589 MW (source TERNA - July 20, 2007)

  • 20

    total energy consumption of the building: winter heating, summer air

    conditioning, domestic hot water, lighting, ventilation.

    1.5 Advantages and disadvantages of “simplified” procedures When one plans to proceed with the simulation for the design of buildings, it is

    convenient to wonder if it is advantageous to opt for a stationary rather than a

    dynamic evaluation. To overcome the complexity of data collection and a real

    dynamic simulation of energy behavior of the building, the standardization

    organizations have called for simplified procedures.

    Some software tools (CENED, DOCET, BESTClass, MC Impianto and so forth)

    quantify the energy performance of a building [8]. They have a broad consensus

    among experts thanks to several advantages:

    - their immediacy of use,

    - simplicity,

    - repeatability,

    - understandability for user,

    - transparency to all actors involved (designer, project manager, tester),

    - reduced expensiveness.

    The implemented computational procedures (called “quasi-stationary”) were

    translated into rules that require methodological simplifications, such as those

    derived from CEN (Comitato Europeo di Normazione). The decrees transposing

    EU Directive on energy efficiency in buildings are based on these procedures.

    Currently, commercial software for the energy certification, as well as those

    provided by ITC-CNR or by individual regions, returns a set of data and

    indicators on energy performance on a monthly basis.

    However, steady-state simulations can only partially investigate the actual

    performance of a building, because they start from the assumption that the

    periodic changes in temperature and the contribution of solar radiation can be

    neglected or zeroed out by averaging. It is therefore possible to use highly

    aggregated climate data. As such, these tools are not able to properly appreciate

    the effects of climate change detectable within 24 hours. Therefore, static

  • 21

    procedures are not sufficient to calculate the real thermal-dynamic behavior of

    the constructive system.

    Simulations carried out in dynamic conditions, instead, allow a much more

    realistic and comprehensive analysis. They assess in detail the response of the

    building affected by various external factors such as the outdoor temperature,

    solar radiation, natural ventilation, the behavior of the occupants, the air

    conditioning system.

    In professional terms, it is therefore important to deepen as much as possible the

    energy analysis, establishing means and skills to use the tools that operate in

    dynamic regime, which can give particularly efficient and tangible support to

    the design.

    To understand how the energy behavior of the building changes with the change

    in the methods of calculation, we advise the reader to analyze the search result

    [9] of Simone Ferrari - Environmental Technical Assistant Professor of Physics

    at the Department of the Polytechnic BEST Milan. The study reveals that the

    simplified procedures are insensitive to appreciate the effects of heat capacity

    building to respond to the variability of weather conditions. The change in

    climate, especially on the contribution of solar radiation, measured with

    sophisticated instruments, not only plays a key role in determining the energy

    requirements for buildings, but allows a designer to appreciate the advantages

    given by the heat capacity of the building.

    The study [10] made in the University of Technology in Finland could be also

    interesting. Researchers have analyzed the effects of thermal mass on heating

    and cooling energy in Nordic climate and for modern, well-insulated Nordic

    buildings. The effect of thermal mass was analyzed by calculations made by

    seven different calculation programs. Six of these programs are simulation

    programs (Consolis Energy, IDA-ICE, SciaQPro, TASE, VIP, VTT House

    model) and one monthly energy balance method based on the standard EN 832,

    which is the predecessor of ISO DIS 13790. The study purpose was to evaluate

    the reliability of the monthly energy calculation method and especially its gain

    utilization factor compared with the simulation programs. The results showed

    that the simplified standard methods of EN 832 and of ISO DIS 13790 generally

    give accurate results in calculating the annual heating energy, e.g., in the context

    of energy design and energy certification. However, the gain utilization factor of

    these standards was too low for very light buildings having no massive surfaces

    resulting in too high energy consumption. The study showed that the differences

    in input data cause often greater differences in calculation results than the

    differences between various calculation and simulation methods.

  • 22

    1.6 Usefulness of dynamic simulation The need to improve energy efficiency has also influenced the construction

    sector. Improving the energy performance of buildings is, in fact, the basis of

    new legislation (2010/31/EC) which aims to contribute to the efficiency-related

    energy use. Specifically, in the context of production processes and buildings,

    whether for residential, commercial or industrial, we can identify four main

    types of intervention: energy savings associated with devices and/or good

    design/restructuring, rationalization in use of energy, cogeneration, and

    integration of different sources.

    The fundamental problems of classical design/modeling are related to:

    Ineffectiveness of the stationary approaches when the designed systems assume a substantial degree of complexity;

    A lack of technology that allows simultaneous analysis of the interaction between buildings, variable weather conditions, presence of renewable

    resources, issues of performance limits.

    A significant advantage of a good simulation method is the ability to investigate

    the sensitivity of individual parameters, which allows designers to efficiently

    compare different designs. In fact, during the design or refurbishing of a

    building, a designer has to take some complex decisions and dynamic simulation

    is an optimal tool to do that as all the problems can be identified and solve in

    advance. It can give a full and tangible support to the design (fig. 1.5),

    simulating the project at any time, irrespective of what was already fully

    designed. It makes also possible to move back and forth among the complexity

    levels implicitly defined above, in the case some past decision needs re-

    discussing.

    Using a dynamic model of the system, one can evaluate the behavior of the

    generating section while the heat and electrical load are not constant. This will

    give a designer the possibility to assess the integration of more energy-efficient

    technologies (renewables, CHP, solar-cooling, etc.) according to the weather

    characteristics of the site and the demands of the territory.

  • 23

    Figure 1.5. A good way to design using dynamic simulation

    In some sense, the availability of a dynamic simulator “joins” the existing

    instruments, and can provide additional information with respect to that

    available in the planning, design or (semi) static evaluation. In fact, dynamic

    simulation is a necessary tool in the design phase of thermal plants, especially

    when it comes to test the responses of innovative systems. It plays a crucial role

    in the early stages of a design, since the control strategies and the necessary

    equipment are evaluated, to the certification of the validity of the control

    system.

    Dynamic modeling and transient analysis are however frequently thought to

    require considerable effort and investment. Such investments are most often

    paid off by savings to be gained by optimizing the configuration of the system

    or by the discovery of potential vulnerabilities, instead of having to perform

    timely and more costly in the future. Nonetheless, simulation models must be

    efficient (in terms of machine time), modular (the model is made by assembling

    appropriate models of individual components, each relating to a portion of

    physical plant), transparent (the code must be legible and reflect the original

    equations); said models also need to enforce integrity (the model is to grasp the

    essential dynamics and be able to match the model of the control system,

    demonstrating the ability of the system to work properly).

    A complete building simulation tool has three main classes of potential users

    with different requirements:

    - building designers,

    - government policy makers, and

    - research scientists.

  • 24

    These users can apply a simulation tool to pre-construction testing, indoor air

    quality prediction, energy efficient heating and ventilation design, and design

    validation (Kendrick 1993).

    In so complex a panorama, this thesis belongs to a long-term research proposing

    OOMS (Object-Oriented Modeling and Simulation) as a possible solution in

    terms of a unified framework where to cast the overall problem.

  • 25

    Chapter 2

    Building simulation tools

    After a brief introduction on the current legislation and the usefulness of

    dynamic simulation, this chapter presents different ways to classify simulation

    tools and shows some relevant problems in dynamic modeling.

    2.1 Classification of calculation codes In building simulation the first software tools arose from the implementation of

    “handbook” procedures, characterized by a simplified outline, and operating in

    steady state. Therefore, such procedures provide only first-cut results.

    Later on models appeared that took into account part of the energy dynamics in

    buildings. These applications were however difficult to use, in particular

    because of the lack of a graphical interface, and of limited usefulness because

    they were aimed at resolving specific problems such as the sizing of air ducts, or

    the determination of thermal loads.

    In the current generation of software tools, the behavior of the entire building-

    plant complex can in principle be simulated, matching both analytical and

    numerical procedures. In particular the modeling of heat flows, electrical,

    lighting, sound and behavior of the occupants can be solved simultaneously.

    Although they present easier and more intuitive graphical interface and various

    functions have been introduced to help the process of data entry, these software

    however involve non trivial mechanism (up to co-simulation) and as a

    consequence may often require considerable experience on the part of the user.

    2.1.1 Clarke and Maver’s classification

    A way to classify building simulation tools was proposed by Clarke and Maver

    (1991), who suggest the following classification [11]:

    1st generation: such tools are handbook oriented computer implementations, analytical in formulation, and biased towards

  • 26

    simplicity. They often lack rigorous approach, and thus provide only

    indicative results within constrained solution domains.

    2nd generation: such tools are characterized by the introduction of the dynamics coming from the containment, but are decoupled in relation to

    the treatment of air movement, systems and control. Early tools were

    decoupled from the design process by limited interfaces and

    computational requirements which were demanding for their time. Later

    implementations are often still marketed owing to their ease of use and

    speed of solution.

    3rd generation: such tools are characterized by treating the entire building as a coupled field problem and employing a mix of numerical

    and analytical techniques. These tools require considerable experience

    and resources to go beyond simple problems. Interfaces are able to

    reduce some barriers to their use. Modeling integrity is enhanced but the

    tools are often used to derive information to be incorporated in

    simplified techniques.

    4th generation: such tools are characterized by full computer-aided building design integration and advanced numerical methods which

    allow integrated performance assessments across analysis domains.

    Interfaces and underlying data models are evolved to present and operate

    on simulation entities as objects in the user’s domain. One common

    evolution is the incorporation of knowledge bases within the tool

    infrastructure.

    The first and second generations refer to as simplified methods because of their

    constrained treatment of the underlying physics, and the third and fourth

    generations refer to as simulation or dynamic methods (Hand 1998).

    It is worth noticing that nowadays, commercial tools have more or less reached

    the performance of generation 3; the rest is still mostly research.

    2.1.2 Sahlin’s classification

    Another classification criterion was given by Sahlin (1996), who suggest

    classifying simulation program by “modular” vs. “traditional” tools [11]. In

    order to clarify the concept of modular software, two conditions are reported

    that must be observed to fall into this category:

  • 27

    Models are treated as data. The key characteristic of an MSE is that the mathematical models are exchangeable. The environment allows

    radically different models to be used for the same physical device.

    Software models for modeling and solution are separated. The software architecture allows exchange of solvers. Although only a few MSEs

    really offer a selection of different solvers, they are flexible in this

    respect.

    2.1.3 CIRIAF’s classification

    According to [12] the institution CIRIAF (Centro Interuniversitario di Ricerca

    sull’Inquinamento da Agenti Fisici), classified computer codes in two levels,

    based on the temporal scheme of calculation:

    1st level: codes that work in steady regime.

    2nd level: codes that work in dynamic regime.

    Within each level, the computer codes can then be further subdivided in other

    macro-categories based on:

    The interface, dividing the codes in instruments backed by a computer graphics interface (input graph) and tools with no graphical interface;

    The evaluated building systems, basically codes that allow the evaluation of energy performance in winter conditions and those that analyze the

    summer conditions.

    Table 2.1 and 2.2 show, for the first and second level respectively, the

    classifications of tools to evaluate building energy more available and widely

    used in the construction sector, accompanied by information concerning the

    origin, the implementation team and possible Internet sites.

  • 28

    Table 2.1. Calculation codes of the first level for evaluating building energy (CIRIAF)

    Table 2.2. Calculation codes of the second level for evaluating building energy (CIRIAF)

  • 29

    2.2 Thermal simulation methods for buildings Models can be either identified from data, or derived from first principles. To

    describe something that does not exist yet, such as a building that is being

    designed, the second way is the only possible, and thus this work focuses on it.

    Dynamic first principle models are based on the (dynamic) balances of mass,

    energy and momentum:

    0)(

    w

    t

    (Mass)

    )()()( TTcwet

    p

    (Energy)

    fpwwwt

    )()( (Momentum)

    The scalars p, T, cp and are respectively the fluid pressure, temperature, specific energy and density; the vectors w and f are the fluid velocity and the

    possible motion driving forces, and the scalar parameters and cp are the fluid thermal conductivity and constant-pressure specific heat capacity. In this case

    we consider air as a mixture of ideal gases, so it allows expressing the specific

    energy e as cv*T, where cv is the constant - volume specific heat capacity.

    Solving partial differential equations that are obtained from said balances means

    finding the motion of the state variables that characterize it. The entire

    resolution is reported in [13].

    The solutions can be obtained by analytical or numerical way. In the first case

    one can find the exact solution, limited to problems where the geometry and

    boundary conditions are very simple; in the latter case, appropriate

    approximations are used to help a simulator resolve any problems on computers

    through the calculation programs and to identify the solution with reasonable

    accuracy. Analytical solutions allow for the calculation of variables at any point

    in the model, but with very long calculation time. Therefore, they are suitable

    only to solve simple problems. With numerical methods, conversely, one can

    easily solve problems of any degree of complexity: they have general

    applicability, but refer only to points (segments, areas or volumes) by default.

    The selected (or discrete) points will be characterized by the properties of a

    small region which they belong. Such a discrete point is frequently termed a

    nodal point (or simply a node), and the aggregate of points is termed a nodal

    network, grid or mesh.

    According to [11], Kallblad (1983) grouped building heat transfer simulation methods in time-dependent methods and simplified methods. The simplified

  • 30

    methods can further be categorized ad steady-state heat balance, degree-day, and

    other methods (see fig. 2.1).

    Figure 2.1. Heat transfer simulation methods (Kallblad 1983)

    Dynamic thermal simulation methods can be classified as heat balance and

    weighting factor methods, with the heat balance method giving more detail

    output data than the weighting factor method.

    When the heat balance method is used, the solution of the time-dependent

    temperature distribution within a solid during transient process is often difficult

    to obtain. Therefore, where possible, a simple approach is preferred. One such

    approach is termed the lumped capacitance method, where the temperature of

    the solid is assumed spatially uniform at any instant during the transient process.

    This assumption implies that the temperature gradient within the solid is

    negligible (Incropera and De Witt 1990).

    The numerical methods used are various: we report below those that are more

    suited to solving the problem of heat transfer, in particular the technique of

    finite differences and finite volume. Notice, with a view to evidencing the

    peculiarity of this work, which OOMS tools allow to use either of them freely.

    2.2.1 The finite – difference method

    An approximate solution to solve a problem of heat conduction through a wall in

    the direction of one-dimensional is given by the finite difference method

  • 31

    (FDM). In the field of iterative methods it is the easiest to treat in terms of

    writing equations.

    The equations (2.1) and (2.2) that characterize the finite difference method

    derived from the discretization of the derivative of a generic function in a

    predefined point, made by Taylor series.

    )(!3

    )(2

    )()()(32

    xfh

    xfh

    xfhxfhxf (2.1)

    )(!3

    )(2

    )()()(32

    xfh

    xfh

    xfhxfhxf (2.2)

    By the relations written above, it is possible to approximate the first derivative.

    This can be done in two different ways (2.3) (2.4), “forward” and “backward”:

    )(!3

    )(2

    )()()('

    2

    xfh

    xfh

    h

    xfhxfxf

    (2.3)

    )(!3

    )(2

    )()()(

    2

    xfh

    xfh

    h

    hxfxfxf

    (2.4)

    Then subtracting the former from the latter we get “central” discretization (2.5):

    )(!32

    )()()(

    2

    xfh

    h

    hxfhxfxf

    (2.5)

    Similarly, for the second derivative,

    )(2 2

    2

    21 hoh

    fffif iii

    (forward)

    )(2 2

    2

    12 hoh

    fffif

    iii

    (backward)

    )(2 2

    2

    11 hoh

    fffif iii

    (central)

    Dividing the spatial and temporal domains with an arbitrary number of nodes

    separated by a step h, it is possible, through direct or iterative methods, solve the

    system of equations thus created (in which the unknown function f for us is the

    temperature T) and obtain a solution to the problem. However, the solution is

    approximated by its truncation in the Taylor series, and the error introduced is

    unavoidable, as is inherent to the logic of discretization. Since the temporal and

  • 32

    spatial coordinates of the problem switching from continuous domain to an

    approximate one, a good solution will be given by a computational grid dense

    enough to reduce the pace and to approach the real solution to the approximate

    one. Of course, the program structure must be such as to ensure convergence

    and stability of the calculation.

    2.2.2 The finite element method

    The finite volume method (FVM) consists in splitting the domain into “control

    volumes” adjacent to one another and applying to them the balance equations in

    their integral form. Nodes are placed within each volume, usually in the middle.

    Unlike the previous method, the unknown quantities are not related to the nodes

    but it is the grid to define the faces of control volumes. Because the variable

    refers to each node, even in this case, a system composed of many algebraic

    equations as there are volumes of discretization is obtained.

    In order to numerically solve the problem of heat conduction in a solid, for

    example, is necessary to introduce the concept of spatial discretization, in order

    to define control volumes. The volume control (VC) are defined as the

    application of a Cartesian grid computing with a pitch not necessarily constant:

    if we consider, for example, the case of a multilayer wall, the procedure

    involves first identifying of each layer (possibly divided into sub volumes), after

    the awarding of a central node at each volume considered (using the "cell

    centered" method). Figures 2.2 and 2.3 show the location of the nodes for given

    control volume: the distance between them is a fundamental fact about writing

    of the equations that solve the problem.

    It is assumed that heat transfer occurs between node and node, and that:

    the physical and thermal properties of the body are uniform and are not a function of temperature;

    the heat capacities are concentrated in the nodes;

    changes in temperature between the nodes are linear;

    heat transfer takes place only between adjacent nodes.

  • 33

    Figure 2.2. Discretization of a multi-component

    Figure 2.3. Relative distance between nodes (a)

    Figure 2.3. Relative distance between nodes (b)

    Unlike the problems in steady state, where it is sufficient to refer only to the

    spatial discretization, for dynamic problems the need for time integration arises:

    the solution should be calculated referring to the individual intervals where the

  • 34

    time domain is divided. Among the temporal discretization methods that require

    only two moments of time for each equation we refer to the Euler method:

    1. explicit: ttf nnnn ),(1 (2.6)

    2. implicit: ttf nnnn

    ),( 111 (2.7)

    There too, notice that OOMS tools natively support the time derivative as a

    language primitive, so that only the spatial one remains as a burden for the

    analyst.

    2.3 A literature review

    The US Department of Energy (DOE) has compiled an extensive summary of

    building simulation tools [14], which describes more than 200 energy-related

    software tools for buildings, with an emphasis on using renewable energy and

    achieving energy efficiency and sustainability in buildings. In the following

    paragraphs, a brief description of five of the most commonly used building

    simulation tools is provided to show typical features of tools. A complete

    comparison can be seen in [15] resumed in table 2.3.

    DOE-2 is a tool that uses hourly weather data to simulate a building’s energy

    use and energy cost for a given description of the building’s indoor climate,

    architecture, materials, operating schedules, and HVAC equipment. Its

    development has been funded by the U.S. Department of Energy. It is used for

    building science research, teaching, designing energy-efficient buildings,

    analyzing the impact of new technologies and developing energy conservation

    standards [16].

    EnergyPlus is a building simulation program that is currently being developed

    by the Simulation Research Group at Lawrence Berkeley National Laboratory,

    the Building Systems Laboratory at the University of Illinois, the U.S. Army

    Construction Engineering Research Laboratory, and U.S. Department of Energy.

    This program combines the best capabilities and features from BLAST and

    DOE-2 along with new capabilities. It models heating, cooling, lighting,

    ventilation, other energy flows, and water use. EnergyPlus includes many

    innovative simulation capabilities: time-steps less than an hour, modular

    systems and plant integrated with heat balance-based zone simulation, multi-

    zone air flow, thermal comfort, water use, natural ventilation and photovoltaic

    systems [16].

  • 35

    ESP-r is a comprehensive simulation environment which can address problems

    related to several domains. It has been developed at the Strathclyde University

    in Scotland since 1974. ESP-r allows researchers and designers to assess the

    manner in which actual weather patterns, occupant interactions, design

    parameter changes and control systems affect energy requirements and

    environmental states. It is used in many European universities and research

    institutes, and in some private companies. Within ESP-r, it is possible to select

    different approaches to domain solution – one, two or three dimensional

    calculation, a mix of scheduled air flow, network or computational fluid

    dynamics (CFD) for flow assessments, and a mix of ideal or explicit

    representation of plant and control systems [17].

    IDA is an advanced simulation environment for building and energy system

    simulation. It has originally been developed at the Swedish Institute of Applied

    mathematics in co-operation with the department of Building Services

    Engineering at Royal university of Stockholm. This simulation package consists

    of IDA Modeller, IDA Solver, and a Neutral Model Format (NMF) library. The

    key idea is to separate the models, which are defined by free combinations of

    algebraic and differential equations in NMF format, and the solver. By adopting

    this approach, several practical problems with traditional monolithic simulation

    tools can be avoided (Sahlin 1996). Namely, new building component models

    can be described in NMF format, and they still can be solved by a differential-

    algebraic equation (DAE) solver without any need to rewrite simulation and

    solution source code [18].

    TRNSYS (TRaNsient SYstem Simulation Program) was developed during the

    early seventies at the Solar Energy Laboratory at the University of Wisconsin.

    The primary application was initially solar energy systems. An important feature

    of TRNSYS is that component models are pre-compiled. This means that end

    users may compose system models with fixed components without access to a

    compiler (Sahlin 1996). Historically, TRNSYS has been used for simulating

    solar thermal systems, modern renewable energy systems including PV and

    wind power, general HVAC systems, and buildings [19].

    Each simulation tool has special features and some limitations. For example,

    DOE-2 is based on a simplified modeling approach which makes it difficult to

    include new systems and devices in the model. This had led to a whole new

    development effort (i.e. EnergyPlus), which is still going on (Crawley 2000).

    ESP-r is a very comprehensive simulation environment, but this simulation tool

    is available only in special mainframe computers using UNIX operating system

    (Hand 1998). IDA is a modern and promising simulation environment. It is

  • 36

    becoming gradually more popular, but it has been reported some problems with

    long execution times. The latest version of TRNSYS features many

    improvements, and it has been utilized successfully in many cases. However,

    TRNSYS also has some limitations due to adopted modeling methods.

    Therefore, despite the fact that a great effort has been put in developing all the

    existing building simulation tools, additional work is needed to rectify their

    deficiencies.

    Table 2.3. Comparison of E/E with ESP-r/DOE-2/BLAST Weather Data Formats

  • 37

    2.4 Peculiar difficulties of dynamic modeling

    Building simulation is an interdisciplinary subject, with elements from

    numerical analysis, information technology, signal processing, as well as the

    building sciences (Sahlin 1996). This makes it a fascinating field with the

    endless challenge to estimate interacting energy flow paths encountered within

    buildings with a meaningful level of accuracy. Further complexity comes from

    the behavior of the heat and mass transfer mechanisms themselves, because they

    are often highly non-linear, coupled and are dependent on design parameters

    which, in turn, change with time (Clarke and Maver 1991).

    A simulation of a building is a mathematical representation of the physical

    behavior of each of its parts. However, it cannot precisely replicate a real

    construction because all the simulations are based on a number of key

    assumptions that affect the accuracy. The dynamic modeling approach tries to

    preserve the integrity of the entire building-plant system, simultaneously

    analyzing all the energy flows with a level of detail appropriate for the

    objectives of the problem and the amount of data available. In this regard, a

    building must be seen as systemic (entire system consists of many separate

    parts), dynamic (the parts interact, have some memory of the past, and may

    evolve at different rates), nonlinear (thermodynamic parameters depend on the

    state) and, above all, complex (there are a myriad of interconnections and

    iterations between the parties).

    Assuming that the simulation has a theoretically perfect representation of the

    operation of a building, it cannot perfectly replicate the real dynamics that

    govern the behavior of energy. For example, the climate can drift apart from the

    available meteorological data; the systems never work exactly as expected from

    the curves of partial load operation; the performance may also change with the

    age of the plant and the actual number of hours worked since the last cleaning or

    maintenance. Consequently, particular care when interpreting the results, as they

    constitute a representation on how it works, or can work, a building-plant

    system.

    2.4.1 The complexity of energy exchanges

    As shown in figure 2.4, the internal environment conditions in buildings are

    determined by different energy sources that evolve with different speeds and

    characteristics. The main sources can be identified as:

    external climate, whose main variables are: air temperature, radiant temperature, humidity, solar radiation, speed and direction of wind;

  • 38

    occupants, causing an unpredictable energy supply because of their metabolism, the use electrical equipment and the adjustment of the

    settings regulation;

    auxiliary systems, which can provide heating, air conditioning or ventilation of the indoor environment.

    In buildings, the air flows that result in an increase of heat transfer by

    convection are infiltration, flows with the neighboring areas and forced

    ventilation.

    Infiltration means all air inlets from the outside; they can be divided into two

    categories:

    uncontrollable air infiltration through the seals of the windows and through the building envelope itself;

    desired air inputs, implemented with the opening of doors and windows (natural ventilation).

    Figure 2.5 shows the main factors influencing the distribution of air flow.

    Random events, such as opening doors and windows, intermittent use of

    ventilation systems have a strong influence on the assessment of the air flows

    because they affect not only the areas directly affected but also the adjacent

    rooms. So, modeling air is not easy and needs a particular accuracy.

    Air movement is often computed on a mesh, where nodes represent volumes of

    fluid, characterized by thermodynamic parameters such as temperature,

    pressure, humidity; while nodal connections represent pathways, including loss,

    which connect these volumes and through which air can flow. To determine the

    parameters of each node in the network, techniques of numerical analysis are

    commonly used. Many examples exist for the solution of the Navier-Stokes

    equations with (continuity) ones of mass and energy balance.

    Every air flow simulation model that uses the network approach must model

    these phenomena.

    The model of the air could be described by a three-dimensional model, using

    advanced methods of calculation (i.e. CFD). Through an approach based on the

    principle of finite elements, it could be possible to fully describe the motion of

    the air in all conditions and provide information on speed, pressure and

    temperature at each point in the simulated environment.

  • 39

    Figure 2.4. Energy flows in a building (Hand 1998)

  • 40

    Figure 2.5. Factors that influence the air flow distribution in buildings (Feustel and Dieris

    1992)

    2.4.2 Difficulty in writing the equation for building simulation

    The problems associated with the thermodynamics of a building are complex for

    a variety of reasons: for example the heat transfer processes are simultaneous

    and have different characteristics; the heat input from air plants and solar

    radiation are a function of time and space; the control volumes defined in the

    discretization of the system may not always be homogeneous and isotropic; then

  • 41

    the system geometry is multidimensional: the solution of these problems, therefore, can only be numeric. If the system is discretized with a grid arbitrarily

    thick and conservation laws are written for each volume, unless discretization

    error the results may be sufficiently "good".

    The partial differential equations that govern the conductive heat transfer in

    solids can be obtained from the energy conservation principle, which expresses

    an energy balance for a volume V:

    A VV

    p dVqdAnqdVt

    c 0

    (2.8)

    where the first term represents the change in internal energy, the second the heat

    flux entering and the third generation of internal heat on the volume V, q is the

    specific heat flux vector, n

    is the unit vector normal to the surface and directed

    outwards; finally, q is the internal heat generation over time.

    The general equation of conduction in isotropic solids is:

    qkt

    cp

    )(

    (2.9)

    Where the scalars θ, cp, and k are respectively the fluid temperature, constant-pressure specific heat capacity, density and thermal conductivity.

    Fourier's postulate is obtained by replacing (2.9) in (2.8):

    tkq (2.10)

    We consider a control volume in thermodynamic equilibrium with the regions

    surrounding it. The heat fluxes for this volume can result from energy

    (mechanisms of convection, conduction, radiation) or mass exchanges. The

    general problem must be placed in a dynamic context: assuming the presence in

    Volume I of an internal heat generation, assumed, for convenience, independent

    of temperature in the region, we obtain the numerical formulation corresponding

    to (2.8):

    ttIj

    n

    j

    IjII

    IIpI qkt

    Vc )()(

    )()()(1

    ,

    0

    , (2.11)

  • 42

    Where I is the control volume, j adjacent regions; the term )(I is

    characteristic density of volume I in ξ time [kgm-3

    ], )(, Ipc is characteristic

    constant-pressure specific heat capacity [Jkg-1

    °C-1

    ], )(V is cell volume [m3],

    finally, n is the number of regions that exchange heat with I.

    This type of equations refer to a time step, or two distinct moments in time: the

    apex 0 indicates that the value is relative to known reference time. The

    assessment of heat flow and the heat generation [W] referring to instant of

    known time tt provides an explicit formulation, while at instant of

    unknown time t an implicit formulation. Equation (2.8) written for each

    node, provides a set of differential equations that can describe the exchange of

    energy (in this case conductive) of the building-plant system. These equations

    can then be collected to build the system and, therefore, the matrix for

    computers.

    So, the dynamic simulation of a building is not possible without a proper

    modeling of systems installed in it. To make the mass and energy balances

    describing the system, the components of a system are modeled by nodes and

    inter-linked. The balance equations, again picked by a system, are written

    through the matrix and solved simultaneously.

    2.4.3 Different physical phenomena

    The dynamic behavior of any "building-system" is influenced by:

    - one or more walls (structure, roofing and cladding);

    - fixed or mobile openings (such as windows, doors, gates, etc.);

    - one or more energy conversion facilities that provides the necessary thermal energy for air conditioning of the building;

    - one or more of the thermal energy distribution systems;

    - one or more regulation systems of temperature, humidity, light;

    - the influx of people;

    - the usage factor.

  • 43

    It is easy to see that the complexity of each part of the building - due to the

    nonlinearity, the variability of the boundary conditions, etc. - means that its

    dynamic behavior is difficult to predict. This is even more evident when

    considering the overall system, where interactions between a component and the

    others are not negligible.

    2.4.4 Different disciplines

    It is worth noticing that the contexts in which control problems arise, are very

    varied, as well as technological realizations of controllers may be different. It is,

    therefore, natural to ask how to deal with so heterogeneous equipment, ranging

    from physics to hydraulics and electronics, in a unified way.

    First, it is very convenient to recast the problem in purely mathematical terms.

    Descriptions of the items that appear in the control system should be expressed

    in mathematical form. As well as for the process, transducers and actuators,

    appropriate mathematical models should be formulated. Facing the modeling of

    a physical system is generally complex and the complexity grows exponentially

    with the size of the initial problem.

    2.4.5 Different time scales and spatial sizes

    Model components are heterogeneous, and quite often their temporal dynamics

    are different. Just think of the energy flow through a wall and along a conduit.

    Another difficulty is represented by the fact that it is not easy to find a suitable

    method to model a given physical situation. A resolution procedure, such as

    finite difference approximation to solve a differential equation, might be perfect

    (this includes mathematics and its computer coding to solve a particular model).

    However, the model may be inadequate. For example, a method to model the

    heat transfer through a wall is accomplished by using simplifying assumptions

    such as the one-dimensional conduction. However, it can happen that one make

    a mistake using a one-dimensional thermal conduction model to represent a

    situation where the two-dimensional conduction is dominant.

  • 44

    2.5 Current dynamic tools

    There are different tools currently available (including MATLAB Simulink,

    Energy Plus, CFD – related ones such as Fluent or Code-Saturne, and so forth).

    Consequently, the approach of simulation is different among different language

    codes, which create an ad-hoc model of a specific subsystem. The optimal

    solution would be to exchange simulation models from different domains and

    create collaboration among the various simulation languages. However, the lack

    of separation between models, data and solvers makes it hard to integrate

    models from different disciplines for co-simulation. In addition, any code

    conducts specific system-level studies with a scalable detail level, based on the

    particular simulation purpose. From an engineer’s perspective, it could be hard

    to manage components in a modular manner and not convenient in terms of

    timing of the simulation process. In addition, many essential elements of

    building models are described in a distributed-parameter way, in one dimension

    (piping) or even in three (air volume). It is the reason why simulation is difficult

    to manage.

    There is, therefore, a need to develop appropriate tools to carry out the

    simulation of the entire system. A unique language is needed that is not aimed at

    any particular branch of engineering (such as mechanics, thermodynamics,

    electronics) but allows modeling of various systems, provided that described by

    differential algebraic equations. In this way, reports from different backgrounds

    can be treated in the same way. As a result, it will be immediate to combine

    models coming from different fields of engineering, characterized by control

    systems with continuous or discrete time. It is against this background that the

    object-oriented modeling places.

  • 45

    Chapter 3

    An object-oriented solution based on

    Modelica

    After evidencing the major problems to be solved for efficient building

    simulation, this chapter sketches out a solution based on OOMS.

    3.1 Model library structuring

    As anticipated, project-oriented system-level simulations need conducting at

    different levels of detail. In the opinion of the author said levels have to play a

    key role in structuring a model library, and for that purpose, adopting the

    Object-Oriented Modeling and Simulation (OOMS) paradigm is highly

    beneficial, allowing to cast the entire set of addressed problems into a single,

    unitary framework. Doing so however requires a specific effort in a view to

    suitably structuring the library, so that the inherent OOMS advantages are

    exploited. Notice that such a structuring methodology, discussed in the

    following, is novel with respect to similar works in the literature. The proposed

    library structuring is composed of three steps [20].

    3.1.1 Structuring step 1

    The first step consists of defining and qualifying the already mentioned detail

    levels. In this work four levels, are defined, corresponding to the basic questions

    encountered along a building project. Of course the matter is more articulated,

    and one could consider defining more levels, or further customizing them based

    on the needs of some particular class of applications.

    For each defined level, we point out (a) the purpose, i.e., what type of analysis it

    is conceived for; (b) the hypotheses under which its models are valid; (c) the

    analysis protocol, i.e., how the intended analysis is to be performed; (d) the

    structural limitations, i.e., what facts the models are by construction unable of

    capturing, and thus are implicitly considered negligible in the intended analysis;

    (e) the practice-based limitations, i.e., for example, what the models could in

    p