HAMLab (Heat, Air and Moisture Laboratory) is basically an all-in-one collection of models and tools suitable for MatLab and/or Simulink and/or COMSOL, developed by students and researchers under supervision of dr.ir. Jos van Schijndel expert on Computational Building Physics at the Department of the Built Environment of the Eindhoven University of Technology.
Please note that every thing on the webstite is free for research & education. However, if our models have inspired you, please refer to the scientific publication directly related with HAMLab : Schijndel, A.W.M. van (2007). Integrated heat air and moisture modeling and simulation. Eindhoven: Technische Universiteit, PhD thesis, 200 pages.
1. MATLAB TOOLS
HAMBASE (Heat Air and Moisture model for Building And Systems Evaluation). HAMBase is a simulation model for the heat and vapour flows in a building. With the model the indoor temperature, the indoor air humidity and energy use for heating and cooling of a multi-zone building can be simulated. A first version of this model (ELAN, see Figure 1.1a) was published in 1987 (de Wit 1987;1988).
Separately a model for simulating the indoor air humidity (AHUM) was developed (de Wit 1990). In 1992 the two models were combined (WAVO) and programmed in the MATLAB environment. The choice of MATLAB turned out to be crucial for the further development. The powerful tools for matrix manipulation of MATLAB together with a very transparent code make it easy to implement improvements and extensions of the model. With the evolution of MATLAB capabilities e.g. the cell-arrays, also WAVO evolved. The maximal use of general purpose software in order not to loose precious time with programming but use that for modelling took the place of the search for simplicity. The approach of WAVO turned out to be excellent for making S-functions for MATLAB-SIMULINK and enabling the simulation of complicated HVAC installations and controls simultaneously with the building. This new development started recently (van Schijndel 2007) and will go on in future. In 2004 the model got a new name: HAMBASE. Find out how to start using the HAMBase start guide. The following MatLab files and documents of HAMBase are available The HAMBase model , the accompanying Scientific report and the Userguide. Figures 1.1.b and 1.1.c show the validation results using the IEA Annex 41 Common Exercise 3, the following files are available the mfiles for this validation study and the accompanying report . The newest HAMBase version (MatLab release 2010 required!) can be download here HAMBase 2013apr beta version, including documentation. There is also a beta version of a student HAMBase-getting-Started guide for HAMBase that can be download here pdf, mfiles,including documentation and mfiles.
1.2 HAMBASE Applications
- Figure 1.2a presents an example of how HAMBase can be used as sensitivity analysis tool applied for Case 600 of the BESTest. The aim of this work is to provide a starting point for performing parameter sensitivity studies for other HAMBase models. Here you can find the Guideline, the Solution of the provided exercises and mfiles.
- Figure 1.2b presents an example of how HAMBase can is used for the Annex 41 sensitivity studies. Here you can find the paper and mfiles.
- Figure 1.2c presents the work of Rik Kramer. He used HAMBase to simulate the indoor climate in two specific monumental buildings using future climate REMO data of de Bilt from 2010 - 2100. Here you can find the report and mfiles.
- Figure 1.2d This figure shows a tool to calculate the solar irradiation: Gh Global horizontal and Dh Diffuse horizontal from a (meteonorm) file into HAMBase Diffuse and Direct (beam) radiation Click here for the mfiles.
- Figure 1.2e presents a powerfull example of how HAMBase can be used to simulate the indoor climates of a reference building that is exposed to (>130) reference external climate locations spread over whole Europe. The main mfile reads all external climates in a directory automatically. For each external climate it simulates the indoor climates and saves the results in a indoor climate (ic) text file. Thus for each provided external climate a corresponding indoor climate is produced. Click here for the mfiles.
- Figure 1.2f shows a EU mapping function developed for the Climate for Culture project. Input is a data (txt) file with: Column 1: Longitudes, Column 2: Lattitudes, Column 3-n: the parameters to be mapped. Click here for the mfiles. Please note that the MatLab Mapping Toolbox is required!
- Together with Stan van Kleef, we developed a tool to import climate data from the KNMI website to be used with HAMBase. The provided file imports the climate files for Eindhoven for 2011 - now Click here for the mfiles. The user can adapt this mfile to get climate date for HAMBase for other locations and other years. Please not that this tool is in beta phase
- Tjeerd Spruijt and Joep Bischoff developed models for natural air flow simulation including benchmarks from literature. Here you can find the report and mfiles.
1.3 Building Physics Toolbox
- A first version of our building physics toolbox was published in 1999 (van Schijndel & de Wit 1999). This toolbox provides additional functions voor building physics and systems calculations including: (1) Glaser method with monthly means, checking a construction, (2) irradiance on a inclined surface, (3) Saturation vapour pressure (4) Solar position (elevation and azimuth), (5) Dewpoint (6) View factor. Click here for the mfiles
- Figure 1.3b presents the Physics of Monuments Plots toolbox (Martens/Schellen 2009) including Climate Evaluation Charts (CECs). Click here for a userguide including accompanying mfiles.
- Figure 1.3c presents a State Space NL Climate Response Tool developed by Frank van Schie, Click here for a userguide including accompanying mfiles.
- We have developed a few stand-alone applications including a Glaser method that can be used without MatLab. Click here for the zipfile
- Rick Kramer provided files and descriptions for
1.4 Inverse Modeling Applications
- The first tool is presented Figure 1.4. It is an example of how Matlab can be used inverse modeling tool applied for indoor climate modeling. The aim of this work is to provide a starting point for performing inverse modeling studies for indoor climate problems. Here you can find the Main Guideline, an ODE solving exercise and mfiles.
- The second collection is provided by Rick Kramer. It contains inverse models for the indoor climate of several mostly unheated monumental buildings. Click here for the complete report including accompanying matlab files.
2. SIMULINK TOOLS
The HAMBase model is implemented in an S-Function by splitting the energy and vapour flows into two parts. First, a discrete part was developed for modeling ‘slow responses’ i.e. the transmittance through walls. Second, a continuous part was developed for the ’fast responses’ i.e. admittance, ventilation, heat gains, etc.
Detailed information can be found at (de Wit 2006). This new model, named HAMBase_S (abbreviation for HAMBase model in SimuLink) to avoid confusion, is able to simulate complicated HVAC installations and controls simultaneously with the building. The main advantages are: a) The dynamics of the building systems where small time scales play an important role (for example on/off switching) are accurately simulated. b) The model becomes time efficient because the computation of the ‘slow response’ part of the model only takes place at an hourly intervals and not on every (much smaller) time step of the ‘fast response’ part of the model. c) The moisture (vapour) transport model of HAMBase_S is also included. With this feature, the (de-) humidification of HVAC systems can also be simulated. So the main difference between HAMBase and HAMBase_S is time stepping. HAMBase has fixed step sizes of one hour. HAMBase_S has variable step sizes (ranging from smaller than a second to 15 minutes) depending on the model parameters.
The codes in the S-Functions, used for ODEs and PDEs are quite comprehensible meaning that the relation between implemented code and mathematical model is clear and the code itself is concise. However the code of the whole building model in the S-Function is much more complex. In order the gain confidence in the modeling i.e. HAMBase_S, two benchmark studies are presented now for the evaluation of the modeling approach using S-Functions. Click here on How to export HAMBase mfile to SimuLink and add control, Click here for the exercise on building a standard office & cooling control model in SimuLink including accompanying mfiles.
2.2 ODE based models using S-Functions
ODE based models have been integrated into SimuLink using the continuous states part of an S-Function. A heat pump as used as an illustrative example. The first step is to develop a mathematical model of the heat pump, based on first principles, in the form of ODEs:
Where T is temperature [oC], COP Coefficient of Performance [-], k heat pump efficiency [-], cw specific heat capacity of water [J/kgK], C heat capacity of the water and pipes in the heat pump [J/K], t time[s], F mass flow [kg/s], Ehp heat pump electric power supply [W]. Subscript c means water at the condenser, v water at the evaporator, in means incoming, out means outgoing.The second step is to prepare the input-output definition of the model. This is presented in the table. The third step is to build the input-output structure connected with the S-function block. The fourth step is to write code into a S-Function. The technical detail of this step is presented in (van Schijndel 2007). The importance of these details is that the relation between mathematical model and implemented model is clear and it is useful for developers who want to create their own ODE based models. It should be mentioned that the time scale problem (i.e. the lowest time constant present in the dynamic system is an order of magnitude 5 lower than the highest one) seems less relevant in case of ODE based models because there are special designed solvers for this case. So-called stiff solvers can handle such a problem accurately and time efficient (Ashino et al. 2000). On the other hand, simulating controllers for example (rapid) on/off switching can generate small time steps during simulation. Although accurate results are obtained in this case, it could still lead to relative long simulation duration times. For validation (simulated data compared with experimental data), use has been made of a test site at the Eindhoven University. This test site contained a configuration with the following subsystems: a heat pump, a heat exchanger on the roof (energy roof) and a thermal energy storage system Click here for these models and description. All subsystems were modelled using the modeling approach of this Section. The experimental results obtained from the test site were used to validate the models of respectively a heat pump, an energy roof and thermal energy storage. From this work, published in van Schijndel (2007), the validation results of the heat pump are presented in figure 2.2.1c Click here for a complete example on using S-Functions including accompanying mfiles.
2.3 Building Systems Toolbox
Currently the toolbox consists of the following collections of models. Some examples are shown in the figures:
- The first collection is provided by Jeroen Rietkerk. It contains verified models for: Concrete core conditioning; heating coil; cooling coiling. Click here for the complete report including accompanying mdl-files.
- The second collection (in dutch) is also provided by Jeroen Rietkerk. It contains verified models for: warmtewiel; verwarmingsbatterij; koelbatterij; bevochtigingsbatterij Click here for the complete report (in dutch) including accompanying mdl-files.
- The third collection (in dutch) is provided by Rogier Lony. It contains verified models for: twincoil warmteterugwinning; verwarmingsbatterij; koelbatterij; naverwarmer; be- en ontvochtiging. Click here for the complete report (in dutch) including accompanying mdl-files.
- The fourth collection is provided by Derek Vissers. It contains verified models for a integrated evaporative cooling of large glass-covered spaces. Click here for the complete report including accompanying mdl-files.
- The fifth collection (in dutch) is provided by Alet van den Brink. It contains a state-of-the-art verified model for a heat exchanger with cooling/heating/(de)humidification. Click here for the summary including accompanying mdl-files.
Putting all models together in a single Toolbox is under construction.
2.4 Sustainable Energy Technology (SET) Toolbox
Currently the toolbox consists of the following models, see also figures:
- The first collection is provided by Ralph van Oorschot (2010). It contains models for: desiccant evaporative cooling (DEC), solar thermal panel, thermal water storage buffer, desiccant wheel, heat recovery wheel, humidifier, fan. Click here for the complete report including accompanying mdl-files.
- The second collection is provided by Coen Hoogervorst (2010, in Dutch). It contains models for: Urban area, heat pump, heat exchanger, hot water profiles. Click here for the complete report including accompanying mdl-files.
- Some SimuLink models contain so-called embedded functions. This can cause problems when running the models with a different MatLab version. A method to solve this is provided in this zip file.
- The third collection is provided by the top case studies of the Master Course 7y700 Sustainable Building and Systems Modeling (2011, 2012):
- D.R. Vissers & H.N. Maaijen: PV panels and air-to-water heatpump. Poster , Report , Modeling files
- M.P.E. Maas & B. Kersten: Adsorption chiller, Floor heating/cooling and solar collector (with thermal buffer). Poster , Report , Modeling files
- A.A. Khayrullina & G.C.H. Doudart de la Gree: Aquifer thermal storage, heat pump and wall heating. Poster , Report , Modeling files
- G. ter Voert: Ventilation control, DX-chiller. Poster , Report , Modeling files
- Z. Qiao & Y. Yang: Geothermal heat pump, fan coil, heat recovery, solar PV panels. Poster , Report , Modeling files
- J.J. Groeneveld & F.T. van Schie: Dwelling, flate plate-, vacuum tube-, plastic collectors. Poster , Report , Modeling files
ISE (Indoor temperature Simulink Engineering tool) is a tool for simulating the indoor temperature of 1 zone of a building. ISE is a simplified model (compared with HAMBase) and has a user-friendly graphical userinterface in SimuLink, providing quick results. ISE can be used in SimuLink for (a) a quick evaluation of the indoor temperature performance; (b) a quick estimation of heating, cooling amounts and capacities; (c) a building model for the design and evaluation of systems and controllers. Click here for the user guide including accompanying mdl-files.
3. COMSOL TOOLS
Many scientific problems in building physics can be described by PDEs. There are a lot of software programs available in which one specific PDE is solved. They are developed in order to get the simulation results in a short time and most often a lot of effort has been put into the simplicity of input of data, e.g. geometrical data. A disadvantage is that they often are not very flexible when the user wants to change or combine models. Another drawback is that they most often act as black boxes. Another category of commercially available software like Comsol [Comsol 2006] is developed specifically for solving PDEs where the user in principle can simulate any system of coupled PDEs. Practical physics/engineering problems in the area of heat transfer, electromagnetism, structural mechanics and fluid dynamics can be solved with the software. The practical problems solved in this chapter are: a 2D thermal bridge problem, a 1D moisture transport problem, a 2D airflow problem and a 3D combined heat and moisture transport problem. One of the main advantages of Comsol is that the user can focus on the model (PDE coefficients on the domain and the domain boundary) and does not have to spend much time on solving and visualization. The scientist can concentrate on the physics behind the models and the engineer can calculate details for designing purposes using validated models.
- Figure 3.1.1a show 3D dynamic Heat, Air and Moisture Corner including accompanying - Movie (avi) , - Comsol model , - A complete Userguide for building this model using Comsol/MatLab and - zip file including all Comsol/MatLab models of the Userguide .
- Figure 3.1.1b shows a verification results of the HAMStad Benchmark project. Click here for a report on the use of COMSOL for HAMStad including accompanying Comsol mph files.
- Figure 3.1.1c presents HAM Modeling With the A of Air. This work presents a case study on the modeling and simulation of 2D heat and moisture transport with and without air movement for a building construction including Movies & Snapshots and COMSOL mph Files (size 85 MB).
3.1 Comsol Applications
- Evaluation of heat and moisture induced stress and strain of historic building materials and artefacts MSc report of Natalie Williams Portal (copyright Chalmers)
- Modelling the performance of underground heat exchangers and storage systems MSc report of David van Reenen (copyright Chalmers)
4 COMSOL models integrated into SimuLink
5.1 MSc Courses
The following MSc courses are related with HAMLab:
- 7S532 Heat and Moisture in Building Envelopes. Click here for the Course Book including accompanying Exercises Book
- 7Y700 Sustainable Building and Systems modeling. Click here for the Course Book including accompanying Modeling Files
- 7S801 Computational Building Physics and Systems using MatLab. Click here for the Course Book including accompanying Execises Files
5.2 COMSOL Educational applications
The following studies are included by the work of Bram Kersten:
- The impact of thermal diffusivity and thermal effusivity Guide and mph files.
- The equivalent thermal conductivity of a construction with thermal bridges Guide and mph files.
- Penetration of periodic climate conditions into different soil types Guide and mph files.
- Performance of an window system with air cavity Guide and files mph Part 1 Part 2 Part 3 Part 4 Part 5 .
- Heat exchange between inner and outer leaf of a cavity wall Guide and mph files.
- Internal or external vapor / thermal insulation Guide and mph files.
- Influence of corner surface temperatures Guide and files mph Part 1 Part 2 Part 3 .
- The insulated pipe problem Guide and mph files.
IEA Annex 41 (2009) Final report.
Schijndel, A.W.M. van,; Wit, M.H. de. (1999) A Building Physics Toolbox in Matlab. 5th Symposium on Building Physics in the Nordic Countries. Gothenburg, Sweden.,1999
Schijndel, A.W.M. van (2007). Integrated heat air and moisture modeling and simulation. Eindhoven: Technische Universiteit, PhD thesis, 200 pages
Wit, M.H. de; Driessen, H.H. and Velden, R.M.M. van (1987) ELAN, a Computer Model for Building Energy Design, Theory and Validation. Eindhoven University of Technology.
Wit, M.H. de; Driessen, H.H. (1988) ELAN- A Computer Model for Building Energy Design. Building and Environment 23, pp. 285-289
Wit, M.H. de; Donze, G.J.(1990) A model for the prediction of indoor air humidity. Proc. International Symposium on Energy, Moisture and Climate in Buildings. CIB pub 121, Rotterdam, sept 1990, pp. 5.
Wit, M.H. de, (2006). HAMBase, Heat, Air and Moisture Model for Building and Systems Evaluation, Bouwstenen 100, Eindhoven University of Technology