2024 Introduction To ESP-r 1ed
2024 Introduction To ESP-r 1ed
2024
University of Strathclyde Publishing
ISBN: 978-1-914241-71-0
This document is distributed under the Creative Commons License CC BY-SA 4.0.
For updates, visit http://www..esru.strath.ac.uk/
Contents
About this document 1
PART 1 Introduction to ESP-r 5
Introduction 7
1 Overview of ESP-r capabilities 8
2 ESP-r exemplars 18
Installing ESP-r 31
3 Before installing ESP-r 32
4 Windows: Run Ubuntu using WSL 33
5 Linux: Install compiling from source code 36
6 macOS: Compile from source on Apple Silicon processors 44
7 Install supporting software 48
Thermal Domain 49
8 Exploring a thermal model 50
9 Exploring results of a thermal model 85
10 Changing climate data and HVAC controls 110
11 Changing model geometry and materials 128
12 Creating a new thermal model 148
13 Thermal model with a PV panel 165
14 Exploring exemplars variants 173
Bulk Fluid Flow Domain 175
15 Exploring an airflow network 176
16 Analysing the results of an airflow network 181
17 Creating a new airflow network 187
Contaminant Domain 205
18 Exploring a contamination network 206
19 Contaminant concentration in airflow networks 210
20 Creating a new contaminant network 214
Electrical Domain 225
21 Exploring an electrical model 226
22 Exploring results of an electrical network 237
23 Create electrical network with a PV panel 241
Explicit Plant & Systems Domain 273
24 Opening, inspecting and running a HVAC model 274
25 Analysing the results of a HVAC model 285
26 Editing a HVAC model 290
Idealised Plant & Systems Domain 297
27 Opening, inspecting and running a model with idealised HVAC 298
28 Exploring results of a model with idealised HVAC 305
29 Implementing an idealised HVAC system in a model 308
Moisture Domain 321
30 Exploring a model with moisture transfer 322
31 Exploring results with moisture transfer 329
CFD domain 335
32 Exploring a model with CFD 336
33 Exploring CFD results 344
Lighting Domain 357
34 Lighting domain 358
Productivity tools 361
35 Automating tasks in ESP-r 362
36 Uncertainty analysis 376
37 Variants 391
Source Code 397
38 Exploring the source code 398
39 Editing the source code 406
40 Debugging 415
41 Validation 422
PART 2 res - the result analysis application for ESP-r 425
Starting res 427
42 ESP-r result files 428
43 Starting res using the command line 433
44 Starting res using ESP-r Project Manager prj 441
45 Main elements of res graphic interface 446
46 Module Options 454
Graph: Parameter plot 463
47 Graph types 464
48 Parameter plot menu 465
49 Assessment period and display period 480
50 Parameter plot: a weather 482
51 Parameter plot: b temperature 488
52 Parameter plot: c comfort metrics 509
53 Parameter plot: d solar processes 519
54 Parameter plot: f zone flux 523
55 Parameter plot: g surface flux 532
56 Parameter plot: h heat/cool/humidity 549
57 Parameter plot: i zone RH 560
58 Parameter plot: j casual gains 562
59 Parameter plot: m renewable/adv. comp. 567
Other types of graphs 569
60 Graph: Intra-construction temperature 570
61 Graph: 3D profile 577
62 Graph: frequency histogram 581
63 Graph: variable v. variable 586
64 Graph: network flows 588
Time-series export and post-processing 607
65 Tabular Output 608
66 Enquire about 616
PART 3 Tutorials 629
67 Create MRT sensors 630
68 Save temperature of nodes inside constructions 639
69 Import weather data to ESP-r 641
70 Use a fan curve in a fluid network 646
71 Understanding fluid flow network control files 660
72 Define solar obstructions 678
73 Disable time-step averaging of results 688
74 Create operation file from scratch 689
75 Understanding the impact of latent casual gains in the RH of the zone 695
76 Change the emissivity or absorptivity of a component 699
77 Link controls loops to thermal zones 703
78 Use custom fixed convective transfer coefficients 706
79 Create a weather file based on custom data 714
80 Modelling blinds activated as a function of temperature 721
81 Modelling adjacent zones 739
82 Calculate reverberation time 751
83 Life-cycle analysis 755
84 Computing the thermal effect of reflections from obstructions via Radiance 758
Appendix 1 Additional resources 763
85 Tips for new Linux users 764
86 WSL tips and troubleshooting 774
Appendix 2 Alternative approaches to compile ESP-r 785
87 Run Ubuntu on a VM (alternative approach for Windows) 786
88 Install using the pre-compiled installer (alternative approach for Linux) 792
89 macOS: Compile from source on Intel processor 795
About this document
An introduction to ESP-r
ESP-r is a modular, open-source, freeware, comprehensive energy simulation program
developed and validated over decades by researchers around the globe1. ESP-r is a research
code, and as such, the efforts put into software development were mainly focused on
adding new calculation functionalities rather than improving documentation and user
experience (which are often the focuses of commercial software). This explains the historical
challenge of learning ESP-r, characterised by its sparse and incomplete documentation and
its temperamental user interface. This document aims to contribute to addressing these
issues by bringing a straightforward overview of ESP-r capabilities so new users can
understand the sort of things that can simulate with this program. By addressing the main
ESP-r functionalities, this document is meant to help the reader on using building physics
knowledge and understanding regarding modelling to develop a model in ESP-r, run
simulations and analyse results.
This document was conceived as a self-contained introduction to ESP-r, and as such, it does
not assume previous knowledge of Linux (the operational system where it runs). For new
users, it provides a chance to familiarise themselves with some Linux commands and
functionalities. However, it is strongly recommended that ESP-r users invest some time
learning Linux, as this document only addresses the minimum necessary Linux features to
run ESP-r.
If you want to contribute (or access the latest version of this document), visit
https://appdocs.esru.strath.ac.uk/ (where videos covering parts of this book are also
available).
1
See a completely list of developers at: https://www.esru.strath.ac.uk/applications/ESP-r/About.html
Clarke brings a comprehensive description of the theory behind ESP-r, and many papers
and theses are listed on the ESRU website describing specific parts of ESP-r calculations.
Many books provide broad discussions about simulation which may be useful for
experienced simulators as well as for newcomers learning ESP-r. Here are a few of them:
Model complexity
This book often uses models of low complexity (such as the one on the image below the
left) to describe ESP-r functionalities. However, this should not be taken as a statement of
ESP-r capabilities, which are probably better represented by the image below on the right.
The differences go beyond the fidelity of spatial representation, and also include the
modules invoked during the simulation to account for air and water movement, 3d ground
heat transfer effects, detailed HVAC systems and control representation, electrical network
with renewables, etc. The usage of low-complexity models in this book is meant to facilitate
2
the learning process, and enable users to develop fit-for-purpose models (which often
require high-fidelity complex representation of energy systems).
3
4
PART 1
Introduction to ESP-r
This guide provides information on installing and running ESP-r on multiple
platforms. It also describes application features relating to the creation and
simulation of models.
5
6
Introduction
7
1 Overview of ESP-r capabilities
1.1 A research-oriented tool for integrated energy simulation
These are some examples of ESP-r models, showcasing its versatility to handle arbitrary
building geometries.
8
The Gherkin - London . UK.
1.2 Validation
Among other projects, ESP-r was part of BESTEST, an IEA initiative that created a benchmark
for quality assessment of energy simulation software:
This benchmark was later incorporated into ASHRAE Standard 140 - Method of Test for
Evaluating Building Performance Simulation Software:
9
• Judkoff, R.; Neymark, J. (2013). Twenty Years On!: Updating the IEA BESTEST
Building Thermal Fabric Test Cases for ASHRAE Standard 140 (Report). NREL/ J.
Neymark & Associates, Golden, CO (United States). doi:10.2172/1220110. OSTI
1220110.
• "ASHRAE Standard 140 Resource Files".
(https://data.ashrae.org/standard140/AccompanyingSec5-2A.html)
Validation models are available to any user through the ESP-r interface.
1.3 Features
ESP-r is research-oriented, so the usability of the features listed below may show wide
variations. Some features are accessible to beginner users, while others require expert
knowledge of ESP-r input files and/or source code.
10
Time-dependent Arbitrary geometry Import CAD and BIM
material properties Capability to handle Capabilities to import DXF
Finite difference method complex, non-conventional and gbXML models.
capable of handling shapes.
variation in properties on
time-step basis, such as
changes in thermal
conductivity as a function
of moisture content.
11
Coupled thermal and Electrical module Electrical-thermal
pressure calculations in Detailed calculation of coupling
plants power flows based on Detailed calculation of
Performance of pumps and equipment power factor, electrical performance of
fans calculated in cable length and PV panels in relation to
combination with thermal impedance, efficiency of their temperature.
effects of fluid flow. inverters, etc.
12
HVAC components as Lighting simulation Glare risk
zones Radiance simulations Automated calculation
Capability to explicitly integrated in ESP-r. Results using Radiance, with
model ducts, AHU and can be linked to internal results post-
other fluid flow gains due to natural and processed using EN-ISO
components as thermal artificial lighting. standards.
zones.
13
Detailed solar Multiple convection View factor calculations
calculations empirical models Longwave radiation
Solar radiation gains per Dozens of empirical exchange based on
surface in the indoor equations implemented calculated view factor
environment using covering many convection between surfaces, instead
raytracing. regimes. of area-weighted factors.
14
Sensitivity/Uncertainty 3D ground modelling CFD for every time-step
analysis Heat flux from/to buildings Fully coupled CFD solver
Integrated routines for calculated based on a 3D interacting with the
Factorial analysis or Monte ground model. thermal domain.
Carlo simulations.
15
Fully scriptable Single source code for X interface
ESP-r can be run in text calculations and GUI ESP-r uses a low-level
mode and has a The same executables library for its interface, so
straightforward scripting handle user interface and developers can implement
language that facilitates calculations, facilitating the any required feature with
automating repetitive development of the GUI by minimal constraints.
tasks. researchers.
16
Portability Tester QA report
ESP-r was compiled on ESP-r releases are ESP-r provides
various Unix and Linux compared to results of comprehensive reporting
distributions and previous models to ensure tools to document the
computational calculations are as reliable model for quality
infrastructures, from Solaris in new versions as in assurance and/or convey
workstations to Raspberry previous ones. information to other
Pi. stakeholders.
17
2 ESP-r exemplars
2.1 Overview of categories
ESP-r has several exemplar models available to users and distributed with the source code.
These exemplars provide a broad coverage of ESP-r capabilities, so exploring them provides
an easy way to understand what ESP-r features. This introduction also uses several
exemplars to explore ESP-r features; therefore, it is helpful to have an overview of available
models before starting to use ESP-r. Exemplars are structured in the following categories,
discussed below in more detail.
18
The first model in this category (opened in ESP-r) is shown in the image below. The title
indicates that it has a convective heater delivering energy to the air inside the thermal zone.
This model demonstrates essential features of ESP-r thermal zone modelling, covering the
geometry of the problem, boundary conditions, construction materials, imposed air
infiltration and casual gains, and ideal controls for heating.
In ESP-r, variants of a model are often adopted in exemplars to demonstrate how a new
feature can be implemented in existing models. On the list of models in this category
(shown above), option b ... with underfloor heating shows the same single zone model,
19
but with floor heating instead of a convective heater. Option c shows the same base model,
but evaluates the impact of shading elements placed outside the building (blocks in the
image below representing surrounding buildings).
On the list of models in this category (shown above), option f multizone with convective
heating and basic controller shows a version of the previous model with an attached
office and the roof void represented as a thermal zone. This model demonstrates how
thermal zones interact regarding heat conduction, boundary conditions, and air flow.
Options g to o on the list show variants of the multizone model covering several features
available in ESP-r.
20
2.2.2 b technical features
This category is dedicated to several variants of a model with three thermal zones.
The model has two adjacent small offices (manager_a and manager_b) and a zone
representing the corridor. This model represents two rooms on a typical floor of a large
building. The walls, floor, and ceiling have boundary conditions that emulate the presence
of similar offices. This model makes it possible to study energy-saving features in one of
the rooms and use the other as a reference for comparison. As only two offices are included
in the model, applying changes and analysing their impact is straightforward.
21
The available variants cover a wide range of features (and many variants have several
offices to demonstrate these features). Some features are easy to configure, such as
option b ...with shading, but most variants are aimed at experienced users.
22
The model below, of a high-resolution house with network flow wet central heating system
representation, is one of the most detailed ones in ESP-r. It has radiators, solar collectors,
and water storage modelled as thermal zones filled with water, providing a detailed
representation of this complex heating system.
23
The image below, for example, shows the model for an office section in Ottawa, Canada.
24
2.2.5 e training workshop
These exemplars are similar to the first two categories, as they show simple applications
of ESP-r, with variations in features for demonstration/teaching purposes.
The image below shows the model for a medical centre with user-imposed flows.
25
The image below shows a model with a Trombe wall and controls.
26
Some models, such as exemplar a rudimentary mechanical system, do not have thermal
zones, nor control files, and only represent the system on its own. The screenshot below
shows that this model has 0 zones defined (in the section Buildings on the right menu), but
it has a network representing plant & systems (marked as defined). In ESP-r, it is possible
to simulate only the relevant part of the problem for a given analysis, as exemplified by this
model with no thermal zones.
27
2.2.9 i construction-related issues
This category is dedicated to a variety of advanced features related to heat and moisture
transfer in solids.
The image below shows a model with 3D ground conduction, in which the interaction
between the building and the ground is calculated (rather than imposed, as in other
models in ESP-r).
28
2.2.11 k fluid movement
This category shows exemplars related to CFD simulations in ESP-r, either stand-alone or
coupled with the thermal zone and/or air flow network calculations.
The image below shows a model dedicated to decoupled CFD simulation in ESP-r.
29
2.2.12 l combined heat and power
This category comprises three models dedicated to energy generation using PVs and CHP
systems.
In the following sections, some exemplars are explored in detail to illustrate ESP-r
capabilities and instruct users on the settings required to implement features in their
models.
However, readers should keep in mind that some of the exemplars listed above are meant
for experienced ESP-r users, and the fact that they are available does not indicate that
running or reproducing their features is straightforward.
30
Installing ESP-r
31
3 Before installing ESP-r
3.1 ESP-r runs on Linux
ESP-r was developed for Unix and later ported to Linux. Currently, ESRU recommends using
ESP-r in machines running Ubuntu desktop 20.04. If you already use Linux, you may skip
the next section and go directly to the following one to install ESP-r and compile it from
the source code. If you run another OS (likely Windows or OS X), you can use Linux as a
client on your computer and then use this client to install ESP-r (instructions provided in
the following sections).
These instructions do not address the use of dual-boot systems. Although it is possible and,
in some cases, straightforward, dual-booting has a key limitation: it is impossible to use the
two OSs at the same time. In the multitasking environment, most people work in nowadays,
the idea of shutting up your Windows system every time you need to run a simulation is
not very feasible. Some ESP-r users opt for having a separate computer dedicated to
running Linux. As Linux and ESP-r do not require powerful computers, this option may be
cost-effective in many cases. Its key advantage is the simplicity of having a computer for
each OS, not facing the problems related to virtualisation or subsystems needed otherwise.
32
4 Windows: Run Ubuntu using WSL
This tutorial is recommended for most Windows users.
4.2 WSL
4.2.1 Enable Windows Subsystem for Linux (WSL)
If you are running a recent version of Windows (Windows 11 or Windows 10 Build 19044+
or superior), open PowerShell as Administrator:
33
Restart your computer.
Set up a new Linux user account with a username and password. This is completely
separate from the login to Windows system, and does not have to be the same. Most
users adopt a simple password for Ubuntu, as this password is often used to run
commands as superuser.
Some computers come with the support for virtualisation disabled. In these cases, an
error related to Intel VT-X or AMD-V appears during the VM installation/setup/usage. See
the appendix for WSL tips and troubleshooting.
34
Once Ubuntu is ready, the prompt shows:
WSL setup is concluded. At this point, users may proceed to the next section to install
ESP-r.
35
5 Linux: Install compiling from source code
Install dependencies, download and compile the code, and create links to ESP-r
executables
sudo apt update ; sudo apt -y install build-essential gfortran libtool ; sudo apt -y install
libx11-dev ; sudo apt -y install libxft-dev ; sudo apt -y install libxml2-dev libxslt-dev ;
sudo apt -y install libsqlite3-dev ; sudo apt -y install imagemagick xfig transfig ; sudo apt
-y install csh xterm curl ; sudo apt -y install pandoc ; cd ~ ; sudo rm -r ESP-
r_V13.3.17_Src.tar.gz ; sudo wget --no-check-certificate
"https://www.esru.strath.ac.uk//Downloads/esp-r/ESP-r_V13.3.17_Src.tar.gz" ; echo
"Extracting ESP-r compressed files. This may take a few minutes..." ; sudo rm -r ESP-
r_V13.3.17_Src ; sudo tar -xzf ESP-r_V13.3.17_Src.tar.gz ; sudo rm ESP-r_V13.3.17_Src.tar.gz
; cd ESP-r_V13.3.17_Src ; sudo mv /opt/esp-r /opt/esp-r_previousinstall; echo "if there was
a previous install in the /opt/esp-r folder it will be moved to /opt/esp-r_previousinstall";
sudo ./Install --silent ; cd /usr/local/bin; for FILE in /opt/esp-r/bin/*; do sudo ln -sf $FILE
"$(basename -- $FILE)"; done ; cd ~ ; ls ; esp-r
⚠ This command will install several packages and may take up to one hour to complete.
The command above should work for most users and install all dependencies, download
the source code, extract compressed files, and run ESP-r Install script. It may take up to one
hour to execute. Copy the whole command above, paste it into the Linux terminal, and
execute it. If successful, ESP-r will open at the end of the installation. In case it does not
work, execute the commands one by one, as listed in the step-by-step instructions below,
to identify where the problem occurs.
36
sudo apt -y install build-essential gfortran libtool
Fonts:
XML support:
SQLite support:
Visualisation support:
Additional applications:
cd ~
Download the file directly from the Ubuntu terminal (either on native Ubuntu or WSL):
⚠ If the command above does not work, you can also manually download the source
code from https://www.esru.strath.ac.uk/applications/
If you download the file manually using an internet browser, the file and folder locations
provided below may need to be adapted depending on your system.
Check if you have a file named ESP-r_V13.3.17_Src.tar.gz (or similar, depending on the
version number)
37
ls
Extract the source code from the compressed tar.gz file (adapt the command below
depending on the version you downloaded):
⚠ Linux is case-sensitive, so pay attention to upper and lower case when typing
commands such as the one above.
5.2.3 Compiling
Move to the folder with installation files (replace the version number with the one you
downloaded):
cd ESP-r_V13.3.17Src
Inside this folder is a Readme file with information about several optional flags that can be
used when installing ESP-r. However, new users can skip the Readme file and compile ESP-
r by calling the Install script using:
sudo ./Install
You will be prompted with several questions. You can accept the default option for all
questions, as they suit most ESP-r users.
38
The installation takes several minutes.
cd /opt
ls
List the contents of this folder, and you should see a folder named ESP-r. You can check
the content of this folder where all ESP-r files are located.
39
⚠ On Windows WSL, this folder can also be see on Windows File Manager at:
wsl.localhost\Ubuntu-20.04\opt
or
\\wsl$\Ubuntu-20.04\home\user\basic\doc
40
cd bin
⚠ In practice, users will rarely call ESP-r itself and will rather use one of the many
programs in the ESP-r suite, such as prj, bps, or res.
cd /usr/local/bin
cd ~
You can check if the link was created correctly by issuing the following command:
which esp-r
41
5.3.3 Update the PATH (an alternative approach that may be used instead of creating
links as described above)
Some users prefer to modify the system PATH instead of creating symbolic links in
the /usr/local/bin folder.
This will open the file. Include the following new line in the end of the document:
PATH="$PATH:/opt/esp-r/bin"
⚠ WSL users should use the command below to update the PATH:
42
⚠ If you are using WSL on Windows 10 (prior to Build 19044), remember that XLaunch
should run before starting ESP-r.
Some WSL users may encounter errors in text mode. Updating the system (sudo apt
update) and rebooting Ubuntu may solve the problem.
The message "cannot find" in the text feedback area can be ignored and does not impact
ESP-r functionality.
43
6 macOS: Compile from source on Apple Silicon
processors
There are two sets of instructions on this session. The first addresses Apple Silicon chips,
and the second is describe in the appendix and is dedicated to computers with and intel
processors.
xcode-select --install
xcode-select --install
Select install when prompted and wait for the tools to install. This may take a few
minutes.
6.1.3 XQuartz
A X11 environment is required. Apple no longer internal support this so download the
package from this link: https://www.xquartz.org Click on the pkg in your downloads folder
and follow the instructions. You will then have to log out and back in to complete the
install.
6.1.4 Homebrew
A package manager is required to install all the dependencies and utilities required.
Homebrew is a good one and will be used in this install. Go to https://brew.sh and copy
and paste the script into the terminal window to install. After installing homebrew there
are a couple next steps suggested, run those commands.
The next step is to enhance this by setting up our own definitions of what the paths
should be. We’re going to use a little text editor that works within the OSX terminal
window. Use the commands:
cd
44
nano .profile
PATH=$HOME/bin:/opt/esp-r/bin:/opt/homebrew/bin:$PATH
export PATH
save the text by pressing "Control + O" and exit with "Control + X"
source .profile
which brew
You should see: /opt/homebrew/bin/brew. Next make sure homebrew is all up to date.
brew update
brew upgrade
45
ESP-r will also expect to find gcc g++ and gfortran. Several versions may be available but
Version 11 works best for M1.
which gcc-11
which gfortran-11
To ensure that the pre-compiled executable find the libraries we need to create a link:
cd /opt/homebrew/opt
in -s /opt/homebrew/opt/gcc@11 /opt/homebrew/opt/gcc
cd
mkdir Models
cd
mkdir Src
cd Src
mkdir ESP-r
ESP-r is 'traditionally' located in /opt/esp-r . This folder needs to be created, but you
need to use sudo to create it and then make yourself owner of that new folder.
cd /opt
46
6.1.7 Installing precompiled M1 Version of ESP-r
Get the precompiled M1 version of ESP-r: http://contrasting.onebuilding.org/esp-
r_13.3.17_precompiled_M1.tar.xz
If not found substitute a 18 or 19 for the 17 to get an updated version. Go to the folder
where the file has been downloaded to. The default is usually:
cd
cd Downloads
cd /opt/esp-r/bin
./clm
If an application starts, then you are almost there. Return to home folder and check that
the new software is found.
cd
source .profile
which prj
Should return: /opt/esp-r/bin Last go to model folder and start ESP-r and select and
exemplar model:
cd
cd Models
prj
ESP-r should now be fully installed and you can begin simulating.
47
7 Install supporting software
There are several programs that can be used with ESP-r to improve its calculation or work
flow capabilities. These instructions are for reference only. Check the documentation of
these applications for detailed instructions.
⚠ The software listed below is not required for most simulations, so you may install it at a
later stage when you are more familiar with ESP-r.
7.1 Radiance
Radiance is an open-source application for lighting simulation. It can be used to simulate
artificial and/or natural lighting in ESP-r.
Decompress both the source tree and auxiliary files into a single directory, then issue the
following command to install Radiance:
7.2 Modish
Modish is an open-source application for the calculation of the reflection of solar
radiation by external obstruction impacting thermal analysis in ESP-r, using Radiance as a
calculation engine.
sudo cpan
upgrade
install List::AllUtils
install Vector::Object3D::Polygon
install Math::Polygon::Tree
install Statistics::Basic
install Data::Dump
install Regexp::Common
Then press ‘q’ to return to the shell.
Some components of the above packages will not activate until next log in.
48
Thermal Domain
49
8 Exploring a thermal model
This tutorial explores an ESP-r model focused on the thermal domain and describes the
steps to run a simulation.
ESP-r can solve several different energy and mass transfer processes. The thermal domain,
for example, solves the thermal energy balance of fluid bodies enclosed by solid surfaces.
It does not include, among others, the calculation of air/water flow volumes (fluid network
domain), the concentration of contaminants (also in the fluid domain), the detailed energy
balance of fluids (CFD domain), the energy balance considering HVAC components (plant
domain), the energy balance of components consuming/storing/generating electricity
(electrical domain). Each energy and mass transfer process requires solving a particular set
of equations, which may (or may not) be enabled in a given model and are referred to in
this document as a domain.
• model geometry
• constructions and boundary conditions
• operation regarding imposed air flow rates and internal heat gains
• controls for HVAC systems
• climatic conditions imposed around this model
cd ~
Select open existing. ESP-r contains a number of Exemplars. These are found in "other" or
"exemplar". Select Exemplar. ESP-r then offers a list of Exemplars. Open a simple, then
select a zone with convective heating & basic control.
Options in the menu can be selected using the mouse or by typing the first letter of the
option in the menu. For example, for the option simple, either click on it using the mouse
or type a.
50
Once a selection is made, the item is marked with an asterisk (*), as shown below. The user
can click on the same option to deselect it if necessary. This selection mode is used in many
ESP-r menus.
51
As default, ESP-r copies the model from the installation folder into the home folder
(home\<username>\simple). In the example below, the user is called Ubuntu. Note that the
home folder might be different for different users. To save the file to a different location,
type the link to the desired location in the text box.
Select OK, and the model is copied to the home folder. ESP-r shows the model wireframe
in the interface's graphic window.
It asks to restart ESP-r; accept to restart. The copied model should now be available in the
specified link. Alternatively, ESP-r may automatically restart and show the copied model
without prompting the user.
Note that folder and file locations may be different depending on your system.
At this point, reviewing ESP-r's file structure might be handy. On the application Files
(equivalent to File Explorer on Windows), select "other locations" and then "computer." ESP-
r is installed at "opt" and "esp-r."
ESP-r executables are located in "bin". "Training" models (including the models available
through prj interface under exemplar are in "training"). Open the folder "training" and then
52
"simple". ESP-r models, such as the "simple" model, are made by the combination of the
files in all those folders. The folder "simple" holds the original model, which is being copied
now to home/user/simple.
The main file in ESP-r is the file extension .cfg in the cfg folder. The .cfg file gives general
information about the model and points to other files in this folder structure.
53
Move to the home folder, typing:
cd ~
cd simple
cd cfg
Open the model in ESP-r by invoking the application prj using the file parameter to point
to the .cfg of interest.
Add the symbol & at the end of any command to start the process in the background and
keep the terminal usable (otherwise, the terminal remains locked until ESP-r is closed).
54
8.5 Project manager application
ESP-r shows a model with a room and a few doors and windows. The thermal domain of
ESP-r adopts the concept of the thermal zone (in this case, this room), where surfaces
enclose a fluid body (air or water), and the goal is to calculate thermal energy flow from/to
the fluid body through the surface.
55
This screen contains several options and information, so it is valuable to spend time
exploring them. Sometimes, users may get stuck on a screen. ESP-r can be closed in this
case, and the model is rarely damaged. Open the model again using the terminal.
Select composition.
56
8.6 Building composition
Under composition, the three first options cover the main attributes of a thermal zone:
geometry, a set of construction materials and an operation file. While the term Building
appears in several places in the ESP-r interface, the program can be used to model a variety
of systems and not only buildings.
57
Select a geometry & attribution and a reception.
This menu offers several functionalities for defining and editing the position of vertices and
the list of vertices that describe each surface.
58
8.7 Zone geometry
8.7.1 Surface topology
Select e Surface list & edges. prj shows a list with surface names (such as North, South,
glazing, ceiling, floor), the number of vertices used to describe each surface and the id of
these vertices. The floor, for example, is defined by points number 1, 28, 27, 7 and 6.
59
Select - exit menu
60
Regarding boundary conditions, most surfaces face the exterior environment, i.e., they are
exposed to sun, wind, and external air temperature, and they exchange longwave radiation
with the surroundings, etc. The exceptions are Floor and Passage. The Floor faces a
"constant temperature" environment representing the temperature of the ground. The
Passage faces a "similar" environment, indicating other parts of the building that are not
included in the model, such as a corridor or other rooms, and the surface Passage faces
one of such parts. Assuming a "similar" environment emulates the heat transfer between
the two rooms, or room and corridor through the wall between the two zones. Heat transfer
is negligible due to small the temperature difference. Regarding heat transfer, the other
side of the surface Passage is assumed to have the same temperature as the Reception in
the previous time step.
The ceiling (roof_1) and floor (floor_1) are made of different materials when compared to
the walls (extern_wall), and the windows are double-glazed (dbl_glz).
Information regarding each thermal zone geometry is stored in files extension .geo, located
in the folder zones.
61
Open the file reception.geo. The contents below show the same information seen on the
Project Manager interface. The primary purpose of prj is to support the creation and edition
of model files. Users can also edit files directly; changes are reflected in the prj interface.
62
8.8 Zone constructions
Return to the Building Composition menu by selecting - exit menu a few times.
Select use it (this indicates that prj found a file in the model related to constructions for
this zone and recommends its use).
⚠ Buttons can be selected using the mouse or by typing the letter a for first button, b for
the second, c for the third as so on. In the example above, typing the letter a selects the
option "use it"
63
Select continue (TMC holds data related to transparent constructions, and some additional
options are available on how these properties can be described in model files - in most
cases these options are not applicable and can be ignored).
The properties of this construction are shown, such as emissivity, absorptivity (for solar
radiation), the number of layers in this construction, and the respective thickness and
material properties.
64
Detailed information about the composition of construction materials is stored in model
files with extension .con located in the zone folder. Open the file reception.con. The
sample below shows the same information accessible through the prj interface.
The properties of constructions are also stored in ESP-r databases (described later in this
document).
65
Select c operation details. Then, select a reception to access the operation data about
internal heat gains by people, equipment and artificial lighting for the reception. Select ok
(or press the Enter key).
In the thermal domain of ESP-r, Zone Operations holds information about imposed or
estimated air changes (as air carries energy from/to the zone) and about internal heat gains
by people, equipment and artificial lighting (casual gains).
66
8.10 Scheduled air flows
Select c edit scheduled air flows. The graph air flow volumes are expected in this thermal
zone (this is input data in the calculation). This is a simplistic way to impose an air flow rate,
as the mass flow is not calculated based on window positions, size, wind speed, fan capacity,
duct diameters, or other relevant parameters. Air change schedule, for instance, indicates
that 24 hours a day, seven days a week, there is a constant infiltration rate of 0.3 air changes
per hour (ACH). So, 30% of the volume of this thermal zone is renewed with air from the
outside per hour.
This is a deterministic way to impose casual gains from computers, people, or anything
releasing heat in this thermal zone. The casual gains in this model show a more complex
pattern than the one seen in the airflow. During Saturdays, Sundays, and night time on
weekdays, there is a fixed value of 800W, while during the weekdays in working hours from
9:00 to 5:00, there is an increase in the gains. Occupant behaviour, Lights, Equipment, etc.,
cause such gains. The factors and their respective gains are tabulated on the right-hand
side of the screen.
67
As in the geometry and constructions, the information regarding operations is stored in a
file in the Zones folder with the extension .opr.
The menu section dedicated to Controls indicates that one loop was defined. Thermal
domain control is responsible for injecting or extracting thermal energy from the thermal
zone to model heating and cooling systems.
Select i zones.
Select ok. The main Controls menu is displayed. It shows three control loops: one for
weekdays, one for Saturdays, and one for Sundays.
68
Select the option for weekday.
The figure shows a bug in the interface, where two letters "e" are used in the menus. Use
the mouse to select the correct option instead of the keyboard.
The image below shows important information in the feedback text window (lower left
corner). The control for weekdays starts at 0.00 hours in free-floating mode. Free-floating
is used when heating and cooling systems are unavailable or inactive. At 7.00 hours, another
control becomes active, with a heating capacity of 3000W and a heating setpoint of 15°C,
pre-warming the zone to the arrival of occupants later in the day. At 9.00 hours, the heating
system's temperature is raised to 20°C. Then, at 18.00 hours, the control is again in free-
floating mode, indicating that the heating and cooling systems have been turned off. This
information is compatible with a heated building located in a cold area.
69
Select d period data. The information shown in the previous image in the feedback text
window is now available on menus for editing.
70
8.13 Databases
Return to the Building composition menu by selecting - exit menu a few times.
Select b databases.
The Database management menu provides the names of several databases. Some of them
are used in every model (such as the annual weather), while others are available to users in
case new features are included in the model. This menu shows the standard ESP-r
71
installation path <std>, where the original database files are located. All options in this
menu have the <std> tag, indicating this model relies on the original databases. The field
<mod> indicates where customised databases used only in this model are placed (in this
case, they are in the dbs folder of the model).
8.14 Climate
The image above shows that the model uses the standard ESP-r climate "clm67".
Select a annual weather. The Weather menu provides options to analyse the currently
selected weather file or to select another one.
Select a analysis tool. The Weather Module is opened. This is another program called clm,
which is part of the ESP-r suite. Note that the Program Manager (prj) is still open. ESP-r is
a collection of programs; none of them are called ESP-r.
72
Select ok to accept the name of the climate file linked to the Simple model. Then, select d
graphical (to access the data plotting tools) and select a dry bulb temperature. Select !
draw graph.
The image below shows an example of the temperature plot for the clm67 climate file.
73
Dry Bulb Temperature Graph
The graph shows temperature variation throughout the year. The temperature is very low
in the early and late weeks (January and December) of the year, with a peak of 25°C in the
summer months. It can determine that the modelled location is in the northern
hemisphere, in a cold location.
Select a browse/edit
74
Materials are not directly applied in thermal domain models but instead grouped in
construction components. The image below shows the material properties available in the
database.
The list of materials and the respective properties of a Brick is shown below.
The properties of the Brick sub-category, a Breeze Block, are shown in the image below.
75
8.16 Construction database
From the Database Management menu, select e construction
Select a browse/edit
76
A set of Construction Classes are shown.
Select j legacy construction & models (this is where most constructions used in the
Simple model are defined)
Select a extern_wall
77
Properties of each layer of this construction are shown, and options for editing them are
provided.
78
At this point, the following key features of the Simple exemplar model have been covered:
• geometry
• constructions and boundary conditions
• operations regarding imposed air flow rates and internal heat gains
• controls for HVAC systems
• climatic conditions imposed around this model
Select m browse/edit/simulate.
79
Select u content report.
The Model reports menu becomes available. This menu shows options to increase or reduce
the amount of information included in the report.
80
Select > contents >> text feedback
81
In this example, a 13-page report describing the model is generated (a sample of this
report is reproduced in the image below).
Select s simulation
The Simulation Controller menu shows, among other things, the starting and ending date
for the simulation (option g).
Select automated
The ESP-r suite's Integrated Simulator program (bps) is briefly open while the simulation is
running and then closes automatically once it is finished.
83
The next section covers the result analysis tool.
84
9 Exploring results of a thermal model
This tutorial explores basic functions for the result analysis of a simple model in ESP-r. Some
users might get an error message - "Error opening session log". Select the result file name
as needed and select ok. The first window from the t results analysis module is shown
below. Select a graphs.
85
Select -exit menu, then select ! draw graph. The result is shown in the image below.
86
Zone Dry Bulb Temperature Graph
This simulation computes temperature variation over a 168-hour period - from January 9th
to 15th. This is defined in the settings in s simulation window (shown below), as discussed
in the previous tutorial. These settings can be changed as per requirement.
87
In the dry bulb graph, the pattern is as expected on weekdays. The average temperature is
20°C from 9 AM to 5 PM (work hours). During the night, this temperature drops. At 7:00 am
the next day, the heating is switched on at 15 °C to preheat the building, and at 9 o'clock,
the building heats up again. For Saturday and Sunday, when the heating is off, the
temperature decreases with time. There is a noticeable increase in temperature on Saturday,
likely because of solar radiation entering the zone during this day, so it can be assumed
that Saturday was sunny. Whereas, Sunday could have been an overcast day since there is
no significant increase in temperature.
88
Dry Bulb Temperature Compared to Available Solar Radiation (Direct and Diffused)
The solar radiation graph shows that Monday has some solar radiation. Tuesday was
overcast and thus had negligible direct radiation. Wednesday had some solar radiation.
Thursday had more diffused solar radiation (accounting for the slight increase in
temperature) but not much direct solar radiation. Saturday had the highest solar radiation
during the day, and the sky was clear. The temperature increases due to solar radiation
entering the zone through the windows and heating it to a certain extent. Sunday has
relatively lesser solar radiation (accounting for the minor increase in temperature during
the day) and has no noticeable direct solar radiation. The unit of solar radiation intensity is
W/m².
89
Selecting options without clearing the selections creates plots where the new data is shown
together with previous selections, which is useful for comparison, as seen above. To start
afresh, select /clear selections.
Selecting e wind speed plots the wind speed (in m/s) measured at the meteorological
station and included in the weather file used by ESP-r, as shown below.
The wind direction (where the wind comes from) can also be plotted using the option f
wind direction (0 equals north, values in degrees clockwise). The graph is given below.
90
Wind Direction Graph
It is also possible to plot the relative humidity, sky illuminance, cloud cover, and
atmospheric pressure variation.
9.2.2 Temperature
91
This menu is dedicated to temperature values in the thermal zone, such as the dry bulb air
temperature inside the zone (a dry buld (db) temp.). The second option (b (db -ambient)
temp) refers to the ambient temperature - in ESP-r jargon, it is the outdoor dry bulb air
temperature, so this graph plots the ΔT, or temperature difference between the inside and
outside temperature. It is possible to use the ΔT between the present and other zones,
using the option c (db -other zone) temp.
d Control Point temperature is used in cases where the system is undersized. This means
that the temperature inside the room or the zone (if it's a boiler or any other sort of
equipment) might not be the same one defined in the control setpoint.
92
Resultant Temperature Graph
The resultant temperature in the graph above is lower than 20 ºC. This is because the walls
in this building are likely to be much colder than 20 ºC. Heating the air, in turn, heats the
walls, but the walls never reach 20 ºC due to the temperature gradient between either side
of the wall ( ΔT between the inside and outside temperature - heat lost due to conduction).
It is possible to plot the mean radiant temperature (MRT) by selecting f zone mean
radiant temperature.
93
Zone MRT Graph
The following graph shows a dew point plot used to check for possible moisture
condensation in this zone. Select h dew point temperature. The graph indicates that the
dew point is low compared to the indoor temperature, which means there is little risk of
condensation in this case.
94
Dew Point Graph
To draw the surface graphs, select i inside surface temperature option, then exit menu,
then select the required surfaces (in this case, h ceiling and i floor). Select these surfaces
since they have different boundary conditions.
95
Temperature Comparison between Ceiling and Floor
The graph shows that the floor is much warmer because it faces the ground, which is at a
constant temperature (as prescribed in the file). The ceiling has much lower temperatures
since it faces the outdoor air and the sky. Due to the high convective heat exchange and
high radiative heat exchange, the temperature is reduced.
Similar patterns can be seen in the comparison between the passage facing another room
(as seen in the previous tutorial) and the south wall. Select a south and c passage. The
passage has a higher temperature than the wall because it faces the other room. In this
case, the temperature difference is not significant.
96
Temperature Comparison between South Wall and Passage
Select / clear selection. Plot the south wall and ceiling temperature. The plot shows that
the ceiling is the surface bringing the temperature down. This is because the ceiling shows
lower temperatures, leading to higher levels of heat exchange, and thus, it requires better
insulation for a cold climate like this one.
97
Temperature Comparison between South Wall and Ceiling
98
PMV is supposed to be used only in places with steady-state conditions so that it can be
used during the days in this zone.
Clothing level 0.7 CLO, which is an indicator of how well-insulated clothing is: 0 is naked,
and 1 is a full suit. Select METs. It then asks us for the metabolic level since comfort is felt
differently when sitting down or doing heavy work. For this case, specify 1 MET (one person
resting). For the air velocity, as this model in ESP-r does not calculate the air velocity in this
model, a very low air velocity of 0.1 m/s can be adopted. Air velocity must be specified
because it affects how humans perceive the environment. For the casual gains that
represent occupancy, select occupied and then draw the graph.
The predicted mean vote is actually between +3 and -3. Values in the plot range from -6 to
-2, meaning the room is quite cold. During the day, this room is not acceptable because
the mean radiant temperature is very low, which means that the operative temperature is
also low.
Other comfort metrics can describe this zone. The percentage of dissatisfaction (PPD)
measures the percentage of people dissatisfied with the conditions in the zone. To draw
this graph, select c PPD.
99
PPD graph
It shows that 100% of the people are classified as dissatisfied on nights and weekends.
However, this data is not applicable because the zone is not in steady-state. For the working
hours, the percentage of dissatisfaction is between 80 - 90% of the people. This is certainly
not something desirable in an environment.
The graph indicates a lot of solar radiation on Saturday—close to 1600 Watts at the peak.
100
Solar Energy Entering from Outside
101
Solar Energy Entering from Adjacent Rooms
102
Select l total surf conv to plot the surface convection.
The graph indicates heat is lost by convection to the outside environment. The heat loss is
in the order of 3000 Watts during the weekdays when the zone is heated up and much
lower during the weekend when the zone is not being heated. When the room is not being
103
heated, the heat gradient between the interior and exterior of the zone is smaller, which
means that less energy is lost due to convection.
Select c occupant casual gain. The graph shows some gains during the five days of the
week, but it is pretty small compared to the heat loss. Thus, a heating system is required.
Select g surface flux. In the same way graphs can show heat balance in the zone, it is also
possible to plot energy balance parts for each surface.
104
So, for each of the surfaces, plot the convection and conduction for the interior and exterior
walls (which would be the other face). Plating casual gains from lighting, occupants, and so
on is also possible. Three types of radiation - LW (long wave) plots are available (i.e.,
radiation exchanged between people, buildings, ground and sky). Solar radiation (i.e. SW,
short wave) plots are available in two categories.
105
Draw the graph for the sensible heating load. This is in the order of 3 kW (3000 W), which
is not surprising because the previous graph showed that this zone is losing ~3000 W by
convection. This energy needs to be added back to the zone to maintain the room
temperature at 20 ºC.
The graph shows that sensible heat changes during the day. As the simulation starts, the
zone accumulates heat every day. This means that the heating required is reduced every
day due to the residual heat from the previous days stored in the walls and floors. This
could be an initialisation error or a result of the conditions outside. If the error is due to
initialisation, running the simulation for a prolonged period might negate this error.
106
Heat load and Ambient Temperature
It is possible to check the source of this error by checking the temperature outside. Plot the
a dry bulb temperature in the a climate menu in the same graph. The graph shows the
error is not due to initialisation. The weekends are much warmer than the weekdays, thus
reducing the heating load required on the weekdays due to higher solar radiation.
This model does not implement the option to model airflow. With this option, ventilation
rates could be assessed instead of imposed. Imposing 0.3 ACH is a gross simplification.
It is also possible to model water flow, in case components such as radiators and boilers
are modelled using thermal zones.
There are CFD metrics for computational fluid dynamics if this feature is included in the
model.
Other options are dedicated to imported measured data (observed data to this
environment) used to facilitate comparison against simulation results.
• c reports
• g performance metrics
• > display to to toggle between the options screen and file, and select "file",
o Set the file name. This file is created in the model cfg folder. ESP-r shows a
warning in the feedback window that the file was opened.
• Select the metrics to be exported, such as temperatures, weather data, and comfort
metrics.
• ! list data to write the performance metrics to file.
• > display to to toggle back to the screen option. ESP-r shows a warning in the
feedback window that the file was closed.
file opened
file closed
The image below shows an example of exported data from ESP-r. It uses "Space" as a field
separator and shows dry bulb temperature at one thermal zone and also the heating
injected in the zone during hours with occupancy. This fie can be imported in spreadsheet
applications, such as Excel.
108
109
10 Changing climate data and HVAC controls
This tutorial explores options to reduce the demand for a building. Select d open existing,
then exemplar. Select a simple. Then, select the option f multi-zone with convective
heating and basic control, instead of one zone model used in the previous tutorial. The
default number of zones for the multi-zone is 3. Select proceed. Then specify the name of
the folder to copy the model to by typing the location link. This command copies the
exemplar model from the ESP-r tutorials to the home folder. Note, the home folder name
is vary for different users.
Now that this model is copied to the home folder, it can be used instead of using the model
directly from the ESP-r training folder. This prevents damage to the original model. In case
there is an issue with the new model, it is possible to delete the file and restart the process
described above.
The software needs to restart so that the path for the model is set correctly. In the home
folder, a new folder named "basic" becomes available. Note, restarting the software may
not be required for all users. This model includes daylight simulation and control (not
addressed in this tutorial).
To open the model at a later time, go to the copy folder using the same steps as described
in a previous tutorial and use the command:
In this weather list, there are weather files of several locations listed across five pages. For
this tutorial, select u Chicago, which has a severe winter and a very clear summer.
111
Weather analysis window should open. Then select the weather file name, click ok, and
close the window. Change the weather file year. Now, Chicago weather has been selected
for this analysis. Select ok to update the name.
It is good practice to run a simulation every time a change is made in the model to check
if it is still working correctly. New users should avoid making several changes in the model
at the same time.
It is possible to import new data into ESP-r if necessary (see instructions here).
Change the simulation time from the 1st of January to the 31st of December to simulate an
entire year.
Option h zone results contains the name of the file in which the results are going to be
stored. Run an integrated simulation, called as such because it brings together the thermal
domain, the airflow domain, the lighting domain, and any other domains that are defined
in the model and simulates the domains in an integrated manner.
Select the option q integrated simulation. There are two options for the integrated
simulation: interactive and automated. Interactive asks several questions to the user,
many of which were defined in the pre-settings in the previous window. Automated is a
113
simpler version that runs silently, assuming the setting defined in the pre-settings or
defaults. In this tutorial, use the automated version.
The simulator window opens and the simulator runs for a few seconds.
Select the option t result analysis. followed by option a graphs. Option 3 output period,
shows the the simulation period which is set from January 1st to December 31st. It is
possible to retrieve results for one specific date or period, but keep these settings are they
are for now.
It is possible to focus the analysis for a specific zone using the option 4 zones, which shows
the three zones available in this model - the reception, office, and roof space. For now,
select all three zones.
114
Back to the main menu, select option d enquire about. In this Enquire about menu, select
option a summary statistics, which gives access to highlights in terms of climate,
temperature, fluxes, etc. for a specific zone. Option b frequency table shows how often
certain values achieve certain thresholds. It can count c hours above a value and d hours
below a value. Of particular interest for this tutorial is the option f energy delivered. In
order to calculate the energy demand of a building on an annual basis, it might be easier
to have a single value than creating a graph, exporting the graph and then adding the
values hour by hour. The energy delivered option presents a single value that is much more
convenient than a graph.
Select f energy delivered and then a reception. For the reception, the sensible heating
energy delivery is in the order of 4 kWh/m2. This is required for 450 hours of the year.
Considering that a year has 8760 hours, this is a relatively small value. Humidification is not
applicable to this model.
115
The energy delivered for the office is much larger than the energy delivered for the
reception. For the roof space, there is no energy required for heating (there are no controls
for heating in this particular zone).
Plot a graph of temperatures just to check if there is any cooling system in this particular
model. Select a graph, then 4 zones. Select *All. Then a parameter plot, then select b
temperature, then a dry bulb (db) temperature. These settings create a graph as shown
below for all the zones for the duration of the year 2001 (as selected earlier).
In the graph, the temperature in the roof space plummets to approximately -20 ºC in the
winter. The reception and office space also get very cold, probably at night. The
temperature in all the zones is above 40 ºC in the summer, so it is really uncomfortable in
this place due to the fluctuating temperatures.
116
Now change the display period to a week in the winter. Select 3 display period then select
the start date as 1/1 and the end date as 7/1. Leave the output time-step increment as 1.
Plot the graph again.
The temperature during the day in this office is in the order of 20 ºC, but during the night
there is a significant drop in the temperature probably because the level of insulation in the
space is inadequate. During the weekend, there are minor gains during the day probably
due to solar radiation. To check this, let us plot the solar radiation. Select the option d solar
processes, then select the option a entering from outside. Plot the graph now.
117
The graph shows how solar radiation entering the room increases the zone temperature
during the weekend. Most likely, there is no heating here during the weekend. On the fifth
day of the week, there is a significant amount of solar radiation, which increases the
temperature of the reception above the 20 ºC setpoint defined in the simulation. The roof
space is much colder because there is no heating there, and the level of insulation is likely
to be lower than in the other zones.
The following part of this tutorial explores how changes in simulation settings may affect
temperatures and the energy demand for this building.
Quit the module. As the model has been copied, the model can modify and it is always
possible to return to copy if needed.
Select the option m browse/edit/simulate. Even without any cooling in this building, the
temperatures are very low. One approach to tackle this issue is by changing the controls of
this building by using the option i zones in the control sub-section. Select ok to choose the
file name. In the control window, there are three different patterns: one for the weekdays,
one for Saturdays and one for Sundays.
Click on the e weekdays option. The Editing Options menu is shown below. Option b
sensor details is used to specify the sensor details such as what details the sensor senses
(the air temperature of a current/mixed zone), the dry bulb temperature and the position
of the sensor on a surface of a component or embedded inside a building component).
Option c actuator details is used to specify where the heat is injected/extracted from/to
the zone, such as an air-based heater delivering energy purely by convection to the air
node, a radiant floor delivering energy inside a floor layer, or a radiator where part of the
energy is delivered to the air and part is delivered to the surrounding surfaces. This tutorial
does not address changes in these details.
118
Change the heating setpoint and capacity data by selecting option d period data.
There are four periods for the weekday. For Period 1 (from 0 to 7 am), there is no heating.
For period 2 (from 7 to 9 am), there is some heating. Since the main energy consumption
is in Period 3 (from 9 am to 6 pm), change the set points for this period.
119
The heating is activated at 20 ºC, i.e., the heating setpoint. This means that if the
temperature of this zone drops below 20 ºC, heating will be activated. The maximum
heating capacity available is 1000 W. The capacity could be reduced to simulate the use of
a smaller heating system and understand the impact of this decision when demand is too
high. Keep this value unchanged.
As temperatures in the summer months are very high, change the maximum cooling
capacity to 1000 W. The current settings indicate that cooling is only activated if the
temperature is above 100 ºC, i.e. cooling is never activated based on this value. Change the
cooling setpoint to 25 ºC. The new settings indicate that, from 9 AM to 6 PM, the cooling
system is active if the temperatures go above 25 ºC and if the temperature goes below 20
ºC, the heating system is activated.
Exit and save the changes. Warnings about linking zones can be ignored (it is possible to
return to this menu and re-link the zones if needed). Make sure to save control data in the
controls menu.
10.3 Simulation and results with new climate and HVAC controls
Return to the browse/edit/simulate menu and run an integrated simulation
(automated). Let us see the results.
Go to results, then enquire about and energy delivered. Now, the energy required for
heating in the three zones can be calculated.
120
Window Navigation Buttons
This button can be used to change the size of the feedback window in
comparison to the graph window.
The energy used for heating in the reception is lower than that used for the office. The
heating in the reception is 4.52 kWh/m², whereas that for the office is 30.51 kWh/m², while
the sensible energy for cooling is 29 kWh/m² for the reception and 46 kWh/m² for the
office. This means that the cooling system consumes considerable energy to solve the
problem of high temperatures.
Bear in mind that those values are sensible heating and cooling. Normal air conditioning
would also have a high humidification load that is not addressed in this particular
simulation. To see if this cooling is actually adding some comfort, let's check the
temperatures.
Plot the dry bulb temperatures as before. Change the display period to 1/7 till 7/7, ie, a
week in July. It is expected to see much lower temperatures during the summer, particularly
during the day.
121
Temperatures in a week in July
During the day, the temperatures at the office are much lower but still not as low as
expected. For the office (orange line), the temperature is 25 ºC during the day, and as soon
as the air-conditioning is turned off, the temperature increases. The pattern is easier to
identify if the simulation is carried out for two days. Change the display period from the
2nd to the 4th of July.
The sensible cooling load for the reception is fixed at 1000 W. However, it can still not bring
the temperature down to 25 ºC, probably due to the high gains in this particular zone. It
would be possible to increase the cooling system's capacity to lower the temperature and
provide optimum comfort.
The gains for the office space are much lower, which means that 1000 W is adequate to
bring temperatures close to 25 ºC. At the start of the day, the cooling loading is less than
1000 W; probably, solar radiation entering at this point is low. So, a relationship exists
between the cooling capacity, the temperature setpoint, and the energy and comfort in the
zone.
Now, go to enquire about and energy delivered. Change the output period from 1/1 to
31/12 ie, 1 year.
123
Updated Energy Delivered
Let's change the setpoint and increase the energy available for this cooling system. Go to
the browse/edit/simulate menu and select zones in the control sub-section. Go to the e
weekday option, d period data. For the third period, change the cooling capacity to 5000
W and the heating setpoint to 21 ºC.
These heating and cooling set points can be defined with a certain degree of freedom to
provide different levels of comfort and they have a significant impact on the energy
consumption, as shown when the cooling setpoint was changed it from 100 to 25.
Run an automated integrated simulation. Go to results, then enquire about and then
energy delivered.
124
The energy delivered, in this case, is now much higher. This means that increasing the
cooling capacity and heating setpoint increases the energy required and can imagine that
the temperatures are now lower in the office. Changing the heating setpoint by one degree
increased the energy required for heating from 4 to 5.3.
So, changing the heating and cooling set points has a direct effect on the energy demand
of the zones. Temperatures and comfort metrics can also be manipulated to provide
optimum comfort and save energy. Many places, particularly in cold countries, leave
buildings extremely cold when they are not occupied.
The graph shows that the reception temperatures are higher than the ones in the office,
but a clear pattern from 9:00 to 6:00, when the temperature is ~ 25 ºC. That is the expected
pattern, so by using the system's maximum capacity and the setpoint for the system, it is
possible to manipulate how temperatures evolve in the model.
125
Temperatures have an impact in comfort metrics, such as the PMV. Go to a graphs,
parameter plots, c comfort metrics, then, a PMV. I'm assuming a clothing level of 0.7, a
MET level of 1.2, and an air velocity of 0.1. This gives me an error because this zone has no
radiant temperature sensor (see create MRT sensors).
Now, clear all selections. In the building zones option, change the zones to only the
reception, then go to b temperatures, and then plot the a dry bulb temperature and the
e resultant temperature.
126
Dry Bulb v/s Resultant Temperature for Reception
The graph above shows the dry bulb temperature (air temp) is 25 ºC, as expected. Still, the
resultant temperature, ie, the temperature that people perceive in this environment, is in
the order of appx. 28 ºC. This means that providing the desirable environment requires
lower setpoints or changes other features in this zone.
This tutorial addressed controls: setpoints, maximum capacities, and operating times of the
heating and cooling systems. Only the time period of 9 am-6 pm was covered, but similar
changes can be applied to other periods and days of the week.
Edit Selection
The q edit selection option can be used to remove or retain some information in the
graphs. In the example below, the option marked by the asterisk can be selected to
remove them from the graph. Clicking on the option deselects it (removing the asterisk).
Exit to save the changes.
Thermal Domain
127
11 Changing model geometry and materials
This tutorial describes how to alter the reception constructions, geometry, and operation
to improve comfort. Some of the things that can be done are change the geometry,
construction materials, and zone operations.
Here, three things can be changed: the geometry, the construction materials, and the
operations. This section discusses the construction materials, particularly for the reception.
Click on the option b construction materials, then a reception. Select use it, then continue.
128
Here is a list of all the materials in the reception. Click on any option to access further details
on the materials and their relevant properties.
Now, click on a south wall. The emissivity and absorptivity values are defined for both
sides of the wall. Emissivity is related to the capacity of the material to release energy by
longwave radiation, and here, the emissivity value is 0.9, which is a normal value.
Absorptivity is related to the ability of the material to absorb solar radiation (short-wave
radiation).
129
Change the absorptivity value for the south wall to a lower level, which would occur with
the use of special paint. This approach reduces solar gains on the wall, thereby decreasing
the cooling needs in the zone.
Click on d absorptivity, then change the values for both walls to 0.3.
This tutorial does not run the simulations after each change, otherwise, it would get quite
long. However, it is recommended that new users run the simulation after making every
change. The changes made above, in particular, have a very small effect on the results since
it is a change in only one wall.
This tutorial does not change the absorptivity of all the walls in the reception since it is
unlikely that the major gain is through the walls. Most likely, the major gains are through
the windows or through the roof, which is poorly insulated.
Change in emissivity values, on the other hand, may have a significant impact (in spite of
the challenges on implementing them in real buildings). Suppose a very low emissivity
material, like polished aluminum, is used. Click on c emissivity, then change the values for
both walls to 0.1.
Now, the wall is made of polished aluminum with very low absorptivity. The simulation can
be run to observe the effect of these changes on the results. Properties of the different
walls can also be adjusted to examine their impact as well.
130
Layer 2, with a very low conductivity value of 0.04, serves as the thermal insulation layer. It
has a thickness of 75 millimeters, providing substantial insulation. Additionally, an air gap
exists—layer m—with a conductivity of 0.00 (negligible) and a resistance value of 0.17.
The U-value indicates the performance of this wall. The U-value, or thermal transmittance,
represents the rate of heat transfer through a surface divided by the temperature difference
across it. For further details about the U-value, refer to the following link: U-Value
Explanation.
Click on b construction, then select j legacy constructions & models, then select a
extern_wall.
As shown in the image above, the U-value of all layers in this wall is approximately 0.39.
This indicates that the thermal transmittance of this wall (excluding solar radiation under
steady-state or idealized lab conditions) is around 0.4 Watts/m² per degree Kelvin
difference between the indoor and outdoor temperatures—a relatively low value.
Now, adjust the wall selection to compare the U-values of the two walls.
In this case, the U-value is higher, indicating that the transmittance value is also greater.
This wall permits more heat to enter from outside during the cooling system’s operating
hours. Previous tutorials showed that at night, this zone remained very hot due to the
accumulation of daytime heat that couldn’t escape the building.
131
A higher U-value is not always advantageous, especially in summer, as it may prevent the
building from cooling down effectively. Testing different U-value levels could help
determine if adjustments provide any benefits. Note that this value doesn’t account for wall
weight, so additional analysis may be required to consider whether the wall is constructed
from lighter or denser materials like concrete or brick.
Let's investigate how to implement a new construction in the model since, in many cases,
that is a better option. Go to b material databases in the model management window
(the first ESP-r window). Here, option c material properties and e construction are useful
for changing the model properties. Click on the option e construction.
Using the standard ESP-r database means the path for this database is set to the standard
ESP-r installation. To avoid modifying the ESP-r default file, create a copy of the
construction and materials in a local file. To do this, click on d copy default file to model.
Select the file name and save it.
132
Once the file is copied file, it is possible to change properties.
The External Wall consists of four layers comprising of brick, glass wool, insulation and
breeze block. Here the type of material or the thickness of the layer can be changed. Reduce
the level of insulation in this wall. The current U-value is approximately 0.39, and a change
is desired. Click on m glasswool and select yes.
133
The type of insulation material or its thickness can be changed here. Click on the option u
glasswool, the material which are already being used.
Change the bricklayer by click on the option l lt brown brick. Use the same material, but
change the thickness of the layer to 300 mm.
134
The U values have changed. Changing the properties of the different layers affects the
overall transmittance and thermal conductivity. In layer 1, the wall is a massive wall, and
requires significant amounts of energy to cool down and heat up. So, even though the
resistance might be similar between the walls with thicknesses of 100 and 300 mm of brick
the U-values changed significantly.
When changing the construction materials, consider the transmittance and thermal
capacitance of the surface. Various properties of the brick wall are displayed in the feedback
window, including a conductivity of 0.96 and a density of 2000. The thermal capacity of this
wall can be calculated using the specific heat.
So far, all tutorials have utilized predefined materials, such as brick and glass wool. If a new
material is required, exit the construction database and navigate to the materials database.
Click on c material properties in the Database Management Window. Again, copy this
material file to the model file.
135
Here, new materials such as new bricks, insulation, or concrete can be created. Take, for
example, light brick. Go to a Brick, then g light brown brick. Clicking on this option lists
all the properties of this material.
Change the density of this brick to 2200 kg/m3, the updated information from the
manufacturer. Save the changes. Now, this value is be used in all the simulations. Exit the
menu.
It is good practice to save the material database and then update the construction
database. Go to the construction database, click on browse/edit, go to the material light
brown brick and see if the changes made in the material database show up on the
construction database. Save the changes and exit.
After this process is completed, make sure that you update the changes for all the zones.
To do that, go to m browse/edit/simulate, then c composition, then b construction
materials and click on update all zones. Then exit.
With this, the first part of this tutorial is concluded - demand adaptation using zone
properties in construction materials.
136
Now, materials and construction properties can be adjusted to reduce or increase thermal
gains in appropriate areas. In this case, the roof may be the primary issue; however, it is
essential to investigate all zones and the energy requirements thoroughly. Given that the
roof is significantly hotter than the other zones, it is likely that the roof contributes to the
heating in those areas.
Construction properties for the glazing can be changed in the same manner as done for
the external wall earlier in the tutorial.
Glazing sets have different construction types, listed in b construction, which are a
particular sequence of layers. The optical property files are stored in the optical property
option.
The optical properties determines how energy passes through the glass, defined in terms
of solar radiation - transmission, absorption, and reflection. Click on b construction then d
glazing, then h tripglz 089. Selecting the different options substantially changes the
amount of energy that passes through this window, ie, the solar gains entering this zone.
137
Changing the glazing type also updates the optical properties to reflect the corresponding
optical data for the selected glazing type. Exit and save the changes, then update all zones.
Error Message
Returning to the reception, an error message may appear due to a mismatch between the
number of layers and the transparent optical properties of the selected material. To fix this
issue, update all zones.
Initial Geometry
138
Every vertex in the model corresponds to a set of x, y, and z coordinates. Clicking on d
vertex coordinates lists all the vertexes and the corresponding list of coordinates. By
changing these coordinates, the position of any point in the model can be adjusted,
allowing the model to be rebuilt for specific purposes. In this case, the size of the window
can be altered by modifying the vertex coordinates.
Option e surface list and edges lists all the surfaces and the corresponding edges and
vertex number. The south window has the following set of vertexes: [15, 16, 17, 18], as
seen in the option j glz_s.
139
Changing the position of this point should allow for the adjustment of the window size. Go
back to the vertex coordinate list and note the coordinate sets for the vertexes of the south
window.
There is no need to change the y-coordinates, as they define the location of the points in
the horizontal direction. Change the values of the z-coordinates from 1 to 1.5 for points 15
and 16.
140
This method is a straightforward demand reduction approach since changing the size of
the surfaces relative to each other reduces the energy demand.
A useful option is the i rotation and transformation feature, which allows for the rotation
of zones within the model. By changing the direction, the model can be oriented to face
East, West, or North. While it is not possible to change the orientation of an existing
building, rotating a building under design can sometimes enhance its thermal performance.
This option is not explored in this tutorial.
Click on c operational details. Start from the roof since the reception and the office are
expected to have a certain amount of fresh air coming into the space to supply air for the
occupants. This adds a certain amount of casual gains in these two zones, but that is not
the case for the roof. Click on d edit casual gains to see the casual gains in the roof.
141
Casual Gains in the Roof
As noted, there are some casual gains from lights present in this roof space (which is
uncommon in most buildings). Currently, 800 W of energy enters this roof during weekdays,
which is an unreasonable assumption. Change this value to 0 W. This simple measure
should reduce the temperature of the zone. Since the roof space is connected to the other
zones, this adjustment should also decrease the cooling demand for those zones. However,
it will increase the heating demand because the energy that was entering the roof
previously helped maintain warmth in the building. When adjusting lighting or equipment
gains, it is important to remember that any changes may have opposite effects in summer
and winter.
Click on c edit scheduled airflow. It can be seen that there is no airflow. This scenario is
well-suited for the winter when we would expect to have an airtight roof to prevent cold
air from entering inside the roof. This would prevent the extraction of the heat from the
other zones. This, however, would be unpleasant for the summer, During the summer, there
is a need to have a different infiltration rate, to emulate opening windows in the roof to
cool it down, particularly during the night. So a model is needed that is focused on the
winter or on the summer, with varying cooling and heating needs.
Assuming that this model is for the summer, a flow rate suitable for the summer could be
implemented. To do that, add a new period by clicking on the option +
add/delete/copy/import flows. Select add period, all day types, and specify the time
from 0 (midnight) to 4 am. Select AC/h (Air Chains per hour), with an infiltration rate of 3
ac/h. Infiltration and ventilation in this context have the same meaning - air coming in from
the outside, so leave ventilation as is.
142
Night-time Purge Ventilation
This strategy is called night ventilation. During the summer, it is a very effective strategy
to reduce the energy consumption of buildings because it uses cool air from outside to
ventilate this space, thus cooling it down. In the morning as the occupants enter, the cooling
load should be reduced due to the already cool air inside. This requires an automated
window that would open at midnight and close at 4:00 am in the morning. If it is simulated
for the entire year, the simulation gives inadequate results in the winter when windows
should not be opened for cooling purposes.
So for this demand reduction strategy, it is required to have two separate models - one to
analyze the winter airflows and one to analyze the summer airflows in such a way that it
can be seen this strategy in a simplistic way.
143
Reception Airflows
There is an infiltration rate of 0.3 AC/h (air coming from outside) and a ventilation rate of 1
AC/h (air coming from office - see image above), 24 hours a day. Again, it is particularly
suitable for the full year, especially in the winter because the airflow would bring cold air
into the reception. Click on c vent rate to change this value, and then specify the airflow
unit to AC/h, no need to change the ventilation rate, then click on ambient db T, and select
yes. The new vent rate should be seen as 0 and the new infiltration rate as 1.3.
This is a rather simple approach. A better idea would be to add a new period. Go to+
add/delete/copy/import flows. Select add period, one day type, then a weekday, and
specify the time from 0 (midnight) to 9 am. Select AC/h (Air Chains per hour), with the
ventilation and infiltration rate of 0 ac/h. Now there is a new period from 0 to 9 and the
rest of the day from 9 to 24, both with an infiltration rate of 1.3 and a ventilation rate of 0.
144
Change the infiltration of the first period to 0.3, by clicking on b infil rate. During the night,
there is some undesired air entering this building but no ventilation and during the day.
Infiltration accounts for air coming from outside (either by infiltration through cracks or by
openable windows). The field Ventilation is restricted to air movement between zones, or
to air injection into the zone at predefined temperatures. This is why ESP-r adds up the
ventilation flow rate into the infiltration one, and sets ventilation to 0.
The same can be done for the end of the day. Add a new period from 6 pm (18) to midnight
(24). Change the infiltration rate to 0.3 and the ventilation rate to 0.
Amended Airflows
145
Now, during the day, outside air comes to the zone; during the night we don't have air
coming to the zone. Thus, by controlling the amount of air entering the zone, the cooling
can be controlled and heating needs of the zone.
Guidelines and standards provide reference value in liters per second, per meter square of
building, or per person, depending on how to approach this problem. The method shown
above is a very efficient demand reduction strategy because only fresh air is provided when
it is needed and in the amount that is needed.
During the winter, the casual gains have a positive effect because the additional energy
helps to keep the building warm. During the summer casual gains have the opposite effect
when there is need to remove this heat by air conditioning or other means. So, it should be
analysed carefully to see if these values are reasonable.
146
Each person is assumed to add energy in the order of 100 Watts and since the gain is 800
Watts, talking about a place with 7-8 people in this reception what needed. This is a
significant number, but the assumption that all people are present in the reception all the
time is not a very sensible assumption. The office space attached to the zones is quite small
so it could be manipulated and this would have an impact on the heating and cooling
demands.
The user could test how the building would react to these different values. Equipment as
well; there is here in the order of 2.5 kW of equipment running in this zone. Particularly
during the night, from 0 to 9, there are still 600 Watts of equipment, and from 5 to midnight,
800 Watts.
By analyzing this and making fair assumptions, demand can be manipulated to better
reflect reality, not just to reduce the load. That would make absolutely no sense.
With this, this tutorial concludes, covering how to control the energy demand of the
building by changing the construction materials and editing the material and construction
databases for the model. It was also learned how to change the geometry of the building
by adjusting the relative size of surfaces and how to modify operational details, including
imposed air infiltration and ventilation, as well as casual gains related to people, equipment,
and lighting.
Thermal Domain
147
12 Creating a new thermal model
This tutorial will cover the creation of a simple ESP-r model with one zone.
The window will close and the new window will open with the new model and the above
settings.
The model should also be saved in the system. This can be checked by either going to the
home folder or by checking using the UBUNTU command prompt.
12.2 Geometry
To start creating the geometry of the zone, click on m browse/edit/simulate. Then click
on c composition in the Building sub-section. Here, the geometry, construction and
operational details can be created to run a simple simulation.
148
Start with creating the geometry. There are multiple methods of creating the geometry, as
seen in the image below.
Here, the input dimensions option will be used, as it is the simplest method. The zone can
be named Reception, and the description can be adjusted according to requirements. This
is important if the file is exported, as this information will be copied.
Next, there are multiple options for the zone shape, as shown in the image below. A
rectangular zone, a polygon-based plan, a general 3D, or a bitmap can be created in case
a building or system design is available. A nice example of this is in the user's guide.
In this case, the rectangular plan will be used. First, define the lower-left corner as (0,0,0),
then set the length, width, and height (i.e., the opposite top right corner) as (1, 0.5, 1.7).
This essentially describes a fridge.
The orientation of the rectangle can also be changed. In this case, it will be kept at 0.0
degrees. The elevation option is useful if the model has several floors or levels. The zone
will be assumed to be on the floor, and the elevation will be left at 0.
Now, the wireframe of the model is visible. The zone name will be changed to Fridge by
clicking on the option to a name it.
149
The menu also has zone statistics such as volume, area, etc.
Option d vertex coordinates lists all the coordinates. Here, the coordinates can be edited
in order to change dimensions or to transport the model to a different location.
150
Option e surface lists and edges lists all the surfaces and the corresponding vertex as well.
The surface name and vertices can be changed according to requirement.
Select attribute many. As seen from the image below, there are multiple ways to define
surface attribution. Select Impose Boundary Conditions.
151
Define the boundary condition as exterior. This means that all the walls are facing the
outside environment. Then exit. Select all items.
Now, since the base cannot face the same environment as the other walls, the boundary
condition for the base will be changed. Click on the base, then on f environment. Assuming
this will be a well-insulated base, click on i adiabatic.
Now, in the construction, Go to attribute many, then select composition. Click on j Legacy
constructions and models.
152
An external wall will be selected, which is a massive insulated panel with 75 mm of glass
wool, and it will be attributed to all items on the list.
Now, all surfaces are fully attributed. By clicking on a surface, properties such as areas,
thickness, thermo-physical properties, and the name can be viewed.
Now, click on % of surface area, and specify the percentage as 70%. This means that the
window will occupy 70% of the door-frame surface area. The wireframe should now show
the window within the door frame. Select ok and then name the window as per preference.
153
In the menu, it can be seen that ESP-r has created new vertices to accommodate the
window. Another point to note is that the door frame is no longer a surface, but a
rectangular cut-out, with coordinates detailed in the menu.
154
Now, it has to be specified the surface attribution for the window. It has the exterior
boundary conditions since it inherited this property from the door frame. However, the
composition has not been specified. Go to e construction, then click on d glazing. Then
click on the option for double glazing - a dbl_glz.
Exit and save by clicking on ! save in the Zone 1 Geometry menu. Exit.
155
Now, it should display all the properties that has been defined in the surface attributes
earlier. Save the construction data.
Click on c operational details. Click on a fridge and select the file name based on
requirement and click ok. Click on nothing happens in this zone, ie, there is no pattern of
casual gains and no internal gain. It will not be taken into consideration the gains due to
the lights that are inside this fridge. It is also assumed that there is no airflow. Also, the
cooling required for the repeated opening of the fridge. So it's quite a simplification, but it
is adequate to run a simple simulation.
156
All options in the thermal domain—geometry, construction, and operations—have now
been defined.
ESP-r offers many more possibilities in terms of the electrical domain, CFD - modelling all
the compressors, the heat exchangers and heat pumps, and much more.
Go to i zones in the control sub-section. Specify the file name as per requirement, then
click ok. Then click on make new file. Click on heating and cooling, then select one day
type since the fridge needs to be in operation regardless of the day. Specify the number
of periods as 1 to have only one time period - of the 24-hour regime. This makes the model
creation much simpler since it is no longer need to define the controls in the different time
periods separately.
157
Now click on e bld_loop_01 and click on b sensor details. Then click on a senses current
zone db temp. There are no nested controls, so click on no.
Click on c actuator details. Here, the position of the actuator will be defined. Click on a
current zone air point, as it is assumed that the heat flow is fully convective and all the
heat delivered to the zones is delivered to the air.
158
Now, click on d period data. At this stage, the control is free-floating, ie, there is no
heating or cooling in this fridge.
If the simulation is closed now, ESP-r would run the simulation. However, this will be
changed to the heating and cooling law, so the law will be adjusted from free floating.
Click on option a, then 2 Law to change the control law. There are a number of laws to suit
the different types of control systems. Click on the option a Basic controller for
heating/cooling.
159
Now define the heating and cooling settings. Specify both the heating and cooling
setpoints to 5 ºC, which means that regardless of the condition outside, the system will try
to maintain the internal temperature at 5 ºC. Save the changes.
160
Now, it can be seen the updated controls in the control period menu.
Exit. In the Controls menu, click on d link loop to zones. Now, save control data.
First, plot the dry bulb temperature graph. As expected, the temperature is exactly at 5 ºC.
162
Dry Bulb Temperature Graph
Now, click on b sensible cooling load. The cooling load is negative since it extracts energy
from this fridge to keep it at a lower temperature. As the sun rises, it will lead to some solar
gain entering from the window. This energy will need to be extracted to maintain the
temperature in the fridge at 5 ºC.
163
Zone Temperature with Heating and Cooling Loads
164
13 Thermal model with a PV panel
This tutorial covers the modelling of a renewable energy source, the Photovoltaic Panel, in
an existing ESP-r model using integrated renewables. No electrical network is involved in
this tutorial.
Open ESP-r, then click on d open existing, and select exemplar. Then select a simple and
f multi-zone with convective heating and cooling. Exit the menu. Click on proceed and
select the file location where the file is to be copied. The new model will now open.
To check the material used for the roof, select m browse/edit/simulate, click on c
composition and then b construction materials. Select c roof_space, then select use it.
Now, the composition of the roof is visible, identified as OPAQ roof_1. It is necessary to
search for roof_1 in the database and include the PV layers in roof_1. Click on roof_1.
165
As evident from the picture above, roof_1 does not have glazed layers for the PV. It consists
of material for insulation and the outer and inner layers of the roof.
Press exit several times and return to the model management menu. Press - exit one more
time it will close the model.
Go to b databases and then e constructions. As evident, the model is using the standard
database material in ESP-r. Instead of changing this database, copy it to the model file by
selecting d copy default file to model. This means that now instead of being in the
standard database, the file will be in the model.
Now, if "exit" is pressed, it will be evident that the file being used is the <mod> (model)
file, not the <std> (default) file. This change can be seen in the saved file on the computer
system as well.
166
Now that the file is copied to the model, it can be edited. Go to a browse/edit. Since it is
known that roof_1 is in j legacy construction and models, go to that option and click on
e roof_1. Instead of changing roof_1, make a copy of it. It is good practice to change this
copy, instead of the file itself. Go to 1 add/delete/copy/invert then click on roof_1. Exit the
menu and change the name as per preference.
Now, the layers related to the PV panel on the roof can be added.Click on ! add or delete
a layer and click on insert. Here, the existing layers of the roof can be added. The roofing
felt in the outermost layer where the PV Panel is to be inserted. The other layers are the
inner layers. So, select c roofing felt. Exit the menu and select use it.
First, a gap between the PV panel and the roof will be required. Click on q GAPS and select
an air gap. Click on it and choose the default for all remaining questions. Now, the gap has
been inserted. However, the material cannot be left in this manner; a gap cannot be the
outer layer. Therefore, if an attempt is made to exit the menu now, it will fail.
Now, another layer will be added. This time, after selecting ! add or delete a layer and
then insert, select the gap later since it is the outermost layer now. Go to m glass and
167
ceramics. Three layers of glass are required: two layers of the low iron glass that is used in
PV panels and one layer of the EVA - the electrical layer that actually has the PV cells,
between the two low iron glass layers.
Click on j low-iron glass. Change the thickness to 3 mm. Repeat this process for the
remaining EVA and low-iron glass layer. Each time, be sure to select the outermost layer
and change the thickness to 3 mm for all the layers - first the EVA layer, then the glass layer.
Now, there is a layer of EVA panel with two layers of glass on either side and a gap layer
between the glass and the roof layer, along with the pre-existing internal layers of the roof.
Exit and save the data. Now there is a new roof with a PV panel.
168
If the automated simulation is run with the previous material (roof_1), the energy delivered
is 42.5 KWh, but if the simulation is run for the new material with the PV panel (roof_12),
the energy is 42.9 kWh. There is a small increase in the energy. This is because adding new
layers requires more energy.
The energy delivered can be accessed by going to t result analysis, d enquire about and
f energy delivered.
To add new renewables, click on + add/delete items and click on new component. Select
1 crystalline PV and a BP_saturn_36cell. The information about this cell is available on
the internet. The data is pre-loaded in ESP-r already, so, there is no need to type in all the
information. Accept all the defaults.
The reference insolation is used for collecting this data and the reference temperature is
used to calculate the temperature of the layer at each time step and correct the efficiency
of the PV panel. The PV Panel should be placed on the EVA layer on the s_roof (south roof).
ESP-r will automatically select the node in the middle of the layer (node 4).
169
The radiation that strikes the south roof will be converted into electricity based on the
properties of the PV Panel that was selected above. Now, update the file.
Now, run an automated simulation. After the simulation is completed, open the result
window. Go to energy delivered. The energy delivered is the same as earlier. And with PV a
small increment in the heating demand is present because part of the thermal radiation
that was available before is no longer available - it was converted into electricity.
170
The output of the PV panel should correlate with the solar radiation. Go to a weather, c
direct normal solar radiation.
The solar radiation is quite high on the two days with significant energy production from
the panel, measuring around 700 W/m², which leads to a production of 80 W. The results
for all the days will need to be integrated to determine the actual output. The other days
are likely overcast; however, if the diffuse solar radiation is plotted, some degree of
radiation will be observed on these days as well. The diffused solar radiation is also being
converted into electricity.
This is the simplest approach to calculate PV production, electricity production using PVs
in ESPR without using an electrical network. This method neglects the interaction between
the PV and the other parts of the electrical system, so it's a rough initial estimate of
electricity production. Note the maximum power - which is around 80 W.
Now, try to see the effect of changing the number of PV panels on the surface. Go to c
composition, m integrated renewables. The special component file exists already. Select
b BP_saturn_36cell to change/edit the component. Accept all the defaults, but change the
number of panels from 2 to 5. Follow the same process as before.
Change the name of the result file before running the integrated simulation. In the result
analysis, it can be seen that the Power Output has increased to 210 W. So, the increase in
energy can be seen as the number of panels is increased.
171
Integrated PV Power Output With 5 Cells
172
14 Exploring exemplars variants
14.1 Exemplar text files
One of the most important characteristics of ESP-r is its openness. Therefore, input is
defined in text files that can be easily opened, investigated, and modified in any text editor.
The user interface of ESP-r is meant to support new users. However, users often prefer to
manipulate input files directly for certain tasks once they get familiar with the file structure
and syntax. New users are not required to read or manipulate input text files, but getting
used to these files can improve the ESP-r learning curve.
The folder img of the model has two montages, one for the base model and one for the
variant (reproduced below).
The first model opened in ESP-r is shown in the image below (left), and a montage with this
model representing the control hours and setpoints is provided (right).
173
Line 62 (in both files) shows that these models use different HVAC control files. This is
expected as heating is injected on the floor in the second model. Apart from the control
file, the models have no significant differences.
The lack of additional differences indicates that floor heating is modelled using a high-level
abstraction of the system, describing it only by the way the control file interacts with the
model. It also indicates the model is likely the representation of an electric heater, as a
water-based floor heating system would require additional information such as pipe
diameter, pipe material, flow rates, and inlet temperature. Finally, as components are
modelled as 1D heat transfer energy paths, the approach used in this model means energy
is delivered to the whole floor at the same rate, and the circuit of wires, the distance
between them, and any other 3D effects are not accounted for. Investigating changes in
input files can reveal valuable information about the nature of the model.
174
Bulk Fluid Flow Domain
175
15 Exploring an airflow network
This tutorial explores a model with an airflow network and reviews its most common
features.
Select the file name and copy the model files to the user folder.
176
The model consists of two offices and a corridor. It can be visualized as a part of a larger
building with rooms on the other side and several other rooms on the top and bottom
floors since these surfaces are all defined as similar in boundary conditions.
In the m browse/edit/simulate menu, the item f network flow in the network sub-
heading is already defined (since the model has an in-built natural convection system). In
the Control sub-heading, several control loops are defined as well.
Click on f network flow. Select existing network (this is the file that stores all the settings
of this air flow network), then select the file name and click ok. Select yes for file summary.
177
15.2 Network nodes
Click on c nodes.
In total, there are eight nodes in the model. Among these, five are boundary conditions,
which are wind-defined at various heights. The orientation of these boundary condition
nodes can be seen in the Data 2 column. Several nodes are at 180 degrees (facing south).
The corridor left is at 270 degrees on the manager_a side of the building. The remaining
nodes are the three internal nodes that are defined for each one of the three zones -
corridor, manager_a and manager_b.
a door_cr is the crack between the doors that links the corridor and the offices, and
window_cr is the crack around the windows, both of which are component type 120. There
are high and low ventilation window cracks (low_win and high_win), and a grill on the
window (grill). These components are of the type 110. Component type 120 is specific for
cracks, while 110 is specific for openings, defined on purpose and tailored for natural
ventilation.
178
Click on e grill and select Edit component grill. Leave the component's name as it is, and
then select no for the type of component to see the list of component types. Exit the menu.
The grill's opening area is specified as 0.2 m2. The pressure drop over this opening does not
need to be specified (ESP-r calculates it automatically).
179
180
16 Analysing the results of an airflow network
This tutorial will explore the results of an airflow network in ESP-r.
The name of the file where the results are going to be stored has already been specified
earlier, so select ok.
181
Click on s commence simulation and continue the simulation. Save the results and
complete the simulation.
Exit the window. The options here are all related to the simulation itself such as running the
simulation rather than configuring the simulation and input required.
In the menu, there are several different options related to the airflow network, such as wind
speed, direction, relative humidity, the pressure at each one of these three nodes, calculated
for each time step, pressure difference across connections, the temperature of the nodes,
the mass flow rate, etc.
182
Click on i mass flow rate, one of the most important values relevant for an airflow network.
Select c total entering node, then manager_a.
183
The mass flow rate is given in kg/s.
Mass flow entering the node is always a positive value. In the case of flow through
connections, the sign of results is related to the order nodes are listed in the connection.
Positive values indicate the flow is from node 1 to node 2, while negative values indicate
the opposite.
Without clearing the selection, click on options b wind speed and c wind direction.
On some days here the wind direction is around 180 degrees ie, the south. When the wind
comes from the North, there is no significant pressure on the windows to drive the airflow,
as seen from the lower mass flow rates.
Click on k air changes, then c total entering node, then manager_a. The air change rate
is in the number between 1 and 31 air-changes here. Again, the values are much larger than
what the graphs indicate. Even though 1 may seem like a small number, that is not really
the case and 31 is an incredibly large number.
184
Air Change Graph
Click on a ambient temperature. In the graphs, the outside temperature is in the order of
5 or 7 degrees, which means that having this amount of airflow might not be necessarily
interesting.
185
The concentration of contaminants cannot be analysed in case, as this data is not available
in this network. There can be a network only for mass flow, or a network for mass flow with
contaminants calculation. To do that, sources and sinks of contaminants need to be set.
There is no data on the contaminants. The third tutorial on this topic covers contaminant
modelling.
Exit the menu and go to c reports, then i network air/wtr flow. Select > display to
>>screen to export to a file. This saves the simulation results. To save a specific result to
another file, select that option, and click on ! list data to export the file.
186
17 Creating a new airflow network
The idea of a flow network is to impose boundary conditions as in an energy problem and
see how the fluid moves around and affects energy transfer processes in the zone. This
tutorial uses the multi-zone model with convective heating and basic control model.
Since the reception and roof have been deleted, the boundary conditions of the wall
previously facing the two zones have to be changed. Go to a geometry & attribution and
select a office. Then select f surface attributes and click on part_b. Go to f environment
and select a exterior. Repeat this process for part_a and door_a and ceiling.
187
Adjust the controls and impose a fix temperature of 20°C in the zone at all time. This
facilitate visualizing the air flow due to stack effect.
There are several options to create an AFN - empirical model, scheduled flow, and new
network. Empirical models, as the name suggests are empirical - the fluid flows here have
been measured by researchers and they give a rough idea about the flow in a given
188
situation. However, the model does not take into account the boundary conditions and the
other factors that guide the flow. The schedule model is applicable when the flow is known.
Select New Network. The method described here uses menus & lists rather than the
graphic tool.
Select the file name where all the information is to be stored. Select create new file since
no pre-existing file exists.
For a model such as water storage with radiators or a hot water collector, it would have a
zone full of water that has water flowing to other zones and transferring energy there. For
this model, select air as the working fluid.
ESP-r automatically discretizes the wall for thermal flow in a zone, such that each wall is
divided into three nodes. In the case of fluid flow, the number of nodes needs to be
specified. Go to c node and select yes for auto-generate fluid nodes. This creates flows for
189
all the zones. Select the office. This will create a node in the office, that has a type of fluid,
it has a position in space and other relevant data.
Two more nodes need to be added, that will be the two boundary conditions. Click on
+add/delete/copy node, select add, then specify the name of the new node as Window_1.
Select boundary, wind induced since in this case, the pressure will be provided by the
wind. This pressure will guide the fluid flow through my domain.
Select a office. The menu lists all the surfaces in the office. Select h west_glz dbl_glz to
put the node in the window.
Now, a new node named Window_1 has been created. Click on the node to view the details.
The fluid, node type, and node location are shown. The wind pressure set should be left at
1. There are several pressure sets depending on how sheltered or how obstructed the
building is.
190
The third node will be created in the door, to properly visualize the flow. Click on add
another node and name it Door. The working fluid is air. The node type is specified since
the pressure in the office is unknown, boundary, wind induced. Select a office and then g
door_a door to put the node in the door.
Clicking on the node shows its properties. The position, XYZ is important because at
different heights there can be some degree of stack effect - the warm air within the room
will move up, escape through the upper surfaces or the upper openings and enter the zone
by the lower point. The pressure set can be left as 1 for this node as well.
The internal unknown node is the office since its pressure is unknown. The pressure of the
office will be related to the pressure of the other nodes.
191
17.1.3 Component definition
Now that the boundaries are defined, along with the internal nodes, the nodes need to be
connected so that the energy or, in this case, the fluid can flow between them. To do this,
components are used. The procedure is similar to the electrical network.
In the electrical network, there are boundary nodes, which is the grid in most cases. Then
there are other nodes which are the PV panel, the lighting, and so on. Connecting these
nodes using connection devices and wires carries energy between these nodes in the
electrical network. The driver is the potential, so differences in potential will be translated
into fluxes of electricity and current. In this case, the difference in the potential is the
pressure, which will be translated into fluxes of fluid between these nodes through the
components.
For a window, the efficiency is close to 0.6, which means that 40% of the energy is dissipated
when the air passes through this window and 60% is converted into the flow. Other types
of components such as ducts (for example, in an air conditioning system) tend to absorb
energy. The longer the duct or the shorter the cross-section, the higher the energy loss.
There are empirical equations to measure energy losses.
192
Select j 40 common orifice flow component and select air. Specify the area of the opening
as 1 m2 and the discharge coefficient as 0.6. The discharge coefficient for different types of
openings such as screens, grills, etc. can be found in the literature. The more barriers on
the flow, the lower this number. This means that for the same pressure drop, the flow is
slower.
For the position in space, select the option via a specific surface and click on a office.
Select g door_a and then select surface upper edge as the position.
Create another component using the same steps as before. Specify the opening area as 0.5
and the discharge coefficient as 0.6.
193
Again, select via a specific surface and click on a office. This time, select the window and
place it on the surface lower edge, to measure the stack effect.
Click on + add/ delete/ copy, and select add. Then, click on b Window_1 and a office to
connect the two components. Click on New_comp2. Keep the height as is. Add another
connection with the same process described above. Connect a office to c Door using
New_comp. Again, leave the height as is.
194
Now the nodes, components and connections have been defined. The wind reduction
factors can also be changed depending on the context.
Click on g link nodes and zones. Link the office node of the fluid flow network to the office
node of the thermal network. Click on accept.
With this method, fluid flow can be modeled. Having more zones is just a matter of creating
more nodes and more connections between these zones.
195
Run an automated integrated simulation. Then go to result analysis. Click on a graphs, f
network flows.
In the result analyzer, ESP-r may not suggest the new flow network name that was specified
before the simulation. Specify the Flow Library name as the one defined previously,
flow1.mfr.
The graph should reveal that higher wind speeds will lead to higher mass flows; lower
windspeeds to lower mass flows. However, the wind direction also affects the manner in
which wind speed affects mass flow.
196
Mass Flow Rate compared to Windspeed and Wind Direction
The window is oriented at 270°, so when the wind is directed at 270°, the mass flow directly
affects the flow rate. Clear all selections and plot the wind direction and mass flow rate.
Wind coming from 270° will be very useful for this office because it's blowing directly on
the face of the window. Wind coming from any other direction will not have a major impact
since it cannot push air through one of the openings and push it through the other.
197
The highest flow rate happens when the wind direction is close to 270°. The combination
of high wind speed and wind direction is the one that led to this particular airflow.
Stack Effect
198
There is a temperature difference between these two nodes since one of the openings is
on the upper surface and the other is located in the lower surface. Thus, ESP-r calculates
the difference in the stack effect between the two nodes. The difference in stack effect is
also translated into a difference in pressure, which is in turn translated into mass flow.
The points of highest pressure do not correspond with the points of higher temperature
difference and vice versa.
The individual pressures at both nodes can also be plotted by using the option e press @
node.
199
Comparison of Pressure at Window_1 and Office
At t=0, the temperature of the system is unknown. So, an initial temperature needs to be
imposed. It can be changed according to the requirements. However, the impact of this
change will not be seen very clearly since most energy simulation tools start the calculation
a couple of days before the date specified. This is done to fix the initialization error.
200
Close the module and return to the s simulation menu. Go to g from:, which shows that
the simulation period is defined from the 6th to the 12th of February. The option c start-
up days shows that the simulation actually starts three days earlier than the simulation
period.
For a simulation with a very clear and precise initial temperature, the start-up days need to
be changed to 0, ensuring that the effect of the initial temperature can be seen in the first
time step.
In the Browse/edit/simulate menu of Project Manager, go to f network flow and then select
legacy network. Then dereference it. This will turn off the mass flow so that the effect of
changing the initial temperature can be seen properly. The number of networks will change
to 0.
201
The files are still there in the model. In the model folder location basic/nets, the file that
describes the flow network is still defined there, but it is no longer linked to the model. If
needed it can be used again.
Go again to the interactive simulation window. Click on initiate simulation and discard
the previous result set. Go to g simulation options. Again change the initial temperature
to 7 °C. Exit the menu and commence simulation.
Exit the module and go to t result analysis. If the simulation runs fine, ESP-r will report a
graph with very peculiar temperatures starting at 7 °C.
For a very well-prescribed problem, the initial conditions and initialization of days, and
changing warm-up days are very useful.
Selecting Options
The options in the menu can be selected by clicking on the corresponding alphabet or
symbol.
202
For dialogs like the ones below, the options can also be selected by clicking on a, b, c, etc.
according to the position of the option.
For instance, a is used to select internal, unknown, b is used to select internal, known
and so on.
203
204
Contaminant Domain
205
18 Exploring a contamination network
This tutorial covers the contamination model in air flow networks.
Click on d open existing, exemplar, then b technical features. Select g with CO2 tracking
(open windows). Select the file name and then copy the model files to the user folder. In
this model, there is a sketch detailing how the airflow network is defined in the images
folder.
The airflow network in this model is much simpler. There are six nodes - one boundary node
in the south, one in the west and one in the east, one in the corridor, and one in each
ventilation grill on either side of the corridor. Symbol C identifies the cracks and O identifies
the openings.
To get contaminant results, an additional set of equations need to be defined, for which an
additional set of elements should be defined. Go to m browse/edit/simulate and then
click on h contaminant. Click on yes to display the synopsis. The synopsis details the
occupants in these rooms, which release CO2 into the environment, showing a list of the
contaminant sources and sinks in the model.
206
18.2 Simulation
Return to the m browse/edit/simulate menu and go to s simulation. The image here
shows the concentration of CO2, mostly at 500 ppm and it changes during the day since the
CO2 release also varies. The image should show up automatically if the Image Viewer is
installed. If not, the image can still be found in the model folder in the Images file.
CO2 Concentration
207
Variation of CO2 contamination over the week
The concentration of CO2 is 0.5 g/kg, which would be around 500 ppm. It should be kept
in mind that this unit is the mass ratio, which is not a way to represent ppm. It is an
alternative unit that is still useful to analyze the overall pattern of results.
Now, click on i mass flow rate, c total entering node, manager_a to compare the mass
flow rate entering the node to the CO2 contamination.
208
As the mass flow rate decreases, CO2 contamination increases and vice-versa. The variation
pattern of the contaminant reflects the pattern of the flow rate because the discharge of
contaminants continues during the occupied hours by the users and as the wind or as the
mass flow changes, the concentration changes as well, and this is calculated dynamically by
ESP-r.
209
19 Contaminant concentration in airflow
networks
This tutorial covers changing the settings in a contaminant network and analyzing the
results. This helps to understand how the different factors are interrelated in such a
network.
Increase all occupancy numbers from 9 am to 5 pm by a factor of six. Simply multiply the
Sensible and Latent gains for the options d, e, and f by six. This now emulates six people in
the office during working hours.
210
CO2 Levels with Edited Occupancy
The baseline concentration is 0.5 g/kg, at non-working hours, but during working hours,
the CO2 concentration levels spike to ~2 g/kg. This is in stark contrast with the previous
case, where the maximum concentration was ~0.78 g/kg. Thus, increasing the occupancy
increases the CO2 level, lowering the air quality significantly.
Click on i mass flow rate. Then select c total entering node, manager_a to compare the
mass flow rate entering the node manager_a to the CO2 contamination.
Now, clear all selections. Display the contamination levels in manager_a, along with a wind
speed and b wind direction. The option q edit selection can also be used to remove the
mass flow rate graph. Remember to click on ! draw graph to see the changes. This method
can create some issues with the display in some cases. If that happens, simply clear all
selections and choose the options as usual.
the graph shows that higher wind speeds lead to higher mass flows; lower windspeeds to
lower mass flows. However, the wind direction also affects the manner in which wind speed
affects mass flow. The office is oriented at 180°, which means that when the wind flows at
180°, the effect of the wind on the mass flow rate and contamination levels should be the
most evident. This is the case in this graph as well.
Now plot the along with a wind speed and b wind direction and the mass flow rate.
212
Wind Speed and Direction Compared to Mass Flow Rate
In this graph, when the wind direction is 180 deg, the wind speed affects the mass flow rate
directly. Additionally, the highest mass flow rate corresponds to the highest wind speeds.
213
20 Creating a new contaminant network
This tutorial describes the creation of a new contaminant network.
Open ESP-r and click on d open existing, then b technical features. Then select c with
natural ventilation.
214
20.2 Editing the model
In the Model Management menu, click on m browse/edit/simulate. In the Network sub-
section, there should be a network flow already defined (since the model has an in-built
natural convection system). In the Control sub-heading, several control loops are also
defined.
Then, click on h contaminant. Select yes to proceed with the model definition.
Select the file name where all the information is to be stored. Select make new file since
no pre-existing file exists.
215
20.3 Contaminants
20.3.1 Define the contaminant
In this model, CO2 is used as the contaminant.
216
20.3.2 Sources/sink model
Click on d source/sink models, go to +add/delete/copy and select add.
217
Select yes to take the metabolic rates from the casual gains from the occupancy, ie, the
persons present in the room.
Repeat this process for the second source, with the name occup_man_b.
Now select # link to contaminants. For both sources, select CO2 as the contaminant.
Select yes.
Finally, to cross-check, select h contaminant again and display the synopsis. The synopsis
should match the details given below.
219
Exit the menu.
20.5 Simulation
Go to s simulation and run an automated simulation. The simulator window should pop-
up for a short while and close after the simulation is finished.
20.5.1 Results
Go to t result analysis. Click on a graphs, then f network flows, m contaminant @ node.
Plot the graph for a manager_a for CO2.
220
Click on i mass flow rate, c total entering node, manager_a to compare the mass flow
rate entering the node to the CO2 contamination.
The occupancy levels can now be changed, and the effect on the contaminant levels be
analyzed.
221
Now, for the time period from 9 am to 5 pm, increase the Sensible and Latent Gains by a
factor of 5, ie, multiply each number by 5. This essentially means that five more persons
have been added to the room during the working hours.
Select d 9 12. Leave the start and finish hours as is. Select ok.
Change the Sensible and Latent Gain to 500 W and 250 W, respectively. Then select ok.
Repeat this process for the remaining time periods, ie, options e and f.
222
Exit the Menu and Save the changes.
The baseline concentration (during the non-working hours) is still 0.5 g/kg, but during the
working hours from 9 am to 5 pm, the concentration of CO2 is much higher, with a peak
value of 1.7 g/kg. Comparing this to the peak value of 0.78 g/kg in the previous CO2 graph,
there is a steep increase in the concentration due to the increased casual gains.
Click on i mass flow rate. Then select c total entering node, manager_a.
223
Updated CO2 Concentration and Mass Flow Rate in Manager_a
The mass flow rate remains constant, but there is an increase in the concentration levels,
as expected.
224
Electrical Domain
225
21 Exploring an electrical model
This tutorial explores a model with an electrical network in ESP-r.
226
A new window should open with the new model.
cd ~
cd simple
cd cfg
Open the model in esp-r by invoking the application prj using the file parameter to point
to the .cfg of interest.
Add the symbol & at the end of any command to start the process in the background and
keep the terminal usable (otherwise, the terminal will be locked until ESP-r is closed).
To create a backup of the model files, copy the entire folder and paste it. Any modifications
made to the model, whether accidental or purposeful, will not affect the backup files.
228
As seen in the Electrical Network Menu, the network consists of several elements. A
description of the phases, angles and power base value are also given. The network consists
of the following main categories:
1. Nodes
2. Connection components
3. Power only components
4. Connections to other elements
5. Network connections
Exploring each of these elements is important to gain a good understanding of the model.
21.2.1 Nodes
Click on d nodes. The electrical nodes list consists of a PV node, an inverter, corridor lights,
and a construction unit.
The nodes are the elements where energy is injected or extracted from the network. For
example, the lights will extract energy, whereas the PV node will inject energy. It is necessary
to always have one fixed node, which is always present in the network. It describes the
connection of the network with the grid, so it's a fixed voltage. The voltage for the rest of
the model will be calculated on the basis of this voltage and the other boundary conditions.
21.2.2 Connections
Click on e Connect HVAC/PV/Lights etc.
The nodes in the network are connected to other nodes. In this case, the PV array and
corridor lights are connected to the network. This means that when lights are turned on
and off according to schedules, it affects the overall energy calculation of the network. The
same applies to PV arrays as well. The variation in energy delivered from the PV Panel
throughout the day will also affect the network energy.
229
Exit the menu.
There are three connecting components - cable for lights and PV array, and inverter losses.
These components connect the different elements and dissipate energy.
There are the cables for the light and the PV panel and the inverter loss. For each of these
elements, there is a starting node and an end node. These describe how each node is
connected to the network. The nodes are connected using these connections: node 1 goes
to node 2, node 4 to node 3, and node 1 to node 4.
230
Exit the menu.
The definitions for this particular panel are available in BP_Solar_380.pdf in the docs folder
in the model folder. This file is the datasheet from the manufacturer. It describes the
properties of this panel such as maximum power and voltage and the current capacity.
231
PV Panel Specifications
In this case, using integrated simulation is very useful. Since the PV panel will be integrated
into the components, the temperature at each time step will be calculated. The simulation
will then choose the appropriate voltage-current curve for that particular temperature to
calculate the voltage and current output.
232
The properties of the PV panel are pre-defined, as can be seen in the embedded renewables
menu.
Click on a BP380_poly_36cel and select yes to edit the component. Click on 1 crystalline
PV.
Select this BP_saturn_36cell model. The BP380_poly_36cel PV Panel does not exist in the
ESP-r directory anymore.
Since the properties are predefined, there is no need to change anything. The properties
here are according to the data sheets.
233
Select manager_a. The PV panel will be placed in the panel under the window.
234
Now that the surface has been selected, the specific layer of the construction where the
panel will be installed needs to be selected, since the different layers will have different
temperatures. This will affect the output of the panel. Select the layer 2 EVA layer.
If these steps are being reproduced, the model needs to have a similar structure of layers
to allow the placement of the panel in the correct position. In this case, the panel is placed
on the fourth node, as suggested by the software.
235
Return to the Model Management menu and go to b databases, to explore the materials
for the PV panel. Click on e constructions. Select a browse/edit, then g PV_constr (on the
second page).
In the list, there are seven-layer made of different materials. The first layer is a layer of glass
that protects the solar cell underneath it. When placing the panel, the protective glass layer
should be placed on either side of the panel. There is also a gap layer that separates the
panel layers from the rest of the building facade.
This concludes this tutorial. The next tutorial will go over the simulation and result analysis.
236
22 Exploring results of an electrical network
This tutorial describes running a simulation and analysing the results of an electrical
network.
22.1 Simulation
Go to m browse/edit/simulate, then click on s simulation and q integrated simulation.
Select interactive.
The integrated simulator window should open. Click on c initiate simulation, then select
s commence simulation. Select the result fine name and run the simulation. The simulation
is quick since the simulation period is only a week.
237
It can be seen the the graph that on the third and seven day, there is a significant amount
of solar radiation. On these days major energy production from the PV panel can be
expected. On the remaining days, there is no directed radiation, but there is some amount
of diffused radiation. On these days, there is lower energy generation.
Click on a graphs. Change the Focus from Nodes to Whole Networks by clicking on the
option repeatedly.
238
Toggling Focus of Electrical Results
Toggle again and select the focus as nodes. Click on c generation and c pv_node. Plot the
graph.
PV Node: Generation
As expected the highest power generation of 200 W is during the third and seventh days,
which has the highest direct solar radiation. There is minor production on the other days
due to diffused radiation.
Change the focus to the whole network and plot the total loading.
239
Whole network: generation and loads
The graph shows the energy generation and consumption (hence the negative values) -
those are related to the lighting defined in this simulation.
Electrical Domain
240
23 Create electrical network with a PV panel
This tutorial will go over creating an electrical network with a PV Panel.
First, the celluar_pv model (with PV panel embedded in the spandrel) needs to be opened,
using the following command after entering the cfg folder in the terminal window (or
command prompt):
Now, the basic file is to be opened using the same steps as before. The simplest cfg file can
be opened using the following command:
The point of this process is to use the previous model as a reference to include PV panels
in the roof of the current model.
241
23.1.1 PV panel data
The PV Panel data is stored in the manager_pv file in msc folder of the cellular_various
folder. This the spm file, or the special materials file. It contains all the specifications of the
PV used in the model.
It is recommended to maintain a separate file with all the solar panel details for future
reference.
Most of this information is available in the PV Panel datasheet, stored in the doc folder. In
the Electrical Characteristics Table, the maximum current is 4.55A, the same as the figure in
the spm file.
242
Datasheet for BP_Solar_380
So, if some other PV Panel is being used, these values need to be replaced by those
corresponding to the new PV Panel.
Another important file is the cell_office file stored in the nets folder. It is an ENF file and it
describes the electrical network. The file contains all the nodes, connections, components,
and connecting cables in the electrical network that can be seen through the interface (as
done in the previous tutorial).
243
There are two pieces of information that are relevant to this tutorial. First, the properties of
the cable linking the inverter to the PV Panel in the switchboard. The six numbers under the
additional data items for the component cable_pvt are related to the inverter and
determine the performance of the inverter. These numbers can be added to a file to refer
to when making a new PV Panel.
There is another component in the file that accounts for the inverter loss, invert_loss. These
numbers represent a very bad inverter due to the very high losses. These numbers describe
the losses in the inverter itself rather than describing connections.
244
The materials in the roofspace also need to be known before the panel can be installed. In
the basic (working) model, in the Model Management Window, click on m
browse/edit/simulate. Then go to c composition in the Building sub-section of the menu.
Click on b construction materials and c roof_space. Select use it.
If the surface names are not displayed, click on image control (option below the model
image) and click on the option i surface names to display the surface names.
Usually, the x-axis points to the East, the Y-axis to the North. This means that the s_roof
points towards the South.
245
The panel will be installed on the s_roof. As can be seen in the Composition menu, the
s_roof surface uses the material roof_1. This is the material that needs to the changed in
the database on the Basic model.
Return to the Model Management menu and go to b databases. The option e construction
shows <std>, which signifies that the construction files is stored in ESP-r default files, not
the model files. In order to make changes to the files, the files need to be copied to the
model. In order to do this, go to e constructions, and select d copy default file to model.
Select the file name and then exit a few times to return to the Database Management menu.
Now e construction should show the <mod>, indicating that the files have been copied to
the model and can now be edited.
246
Now, click on e constructions, then a browse/edit. From the list, select j legacy
constructions & models and then click on 1 add/delete/copy/invert, select copy, then e
roof_1. Change the name of the surface to roof_1_pv.
Since this surface is a copy of roof_1, new layers can be introduced here without any
changes made to the original model files. The material assignment for the roof can then
simply be changed to the copied file roof_1_pv which contains all the additions.
When adding the layers, it is important to keep in mind that there is a specific order for the
PV layers. Layer 1 is the current outermost layer and all the new layers of the PV Panel must
be added before this layer. When in doubt, click on ? help for further clarification.
247
Click on ! add or delete a layer, select insert, then click on layer 1 roofing felt since it is
the outermost layer. Select yes to change the material reference.
A gap layer can never be the outermost layer; thus, the gap layer must be inserted after the
other layers have been added since simulation software can sometimes return an error
when adding a layer that is not physically possible.
First, the glass layer will be added. Click on m glass and ceramics and select j low iron
glass, same as the one used in the cellular_various model. Change the thickness to 3 mm.
248
Second, the EVA glass layer is to be added. Again, add a new layer after the first layer. Select
m glass and ceramics, then d EVA layer. Change the thickness to 3 mm. Repeat the
process to add another glass layer after the EVA layer.
Now that all three layers have been added, the gap layer can be inserted. Since the gap
layer is between the PV Panel layers and the roof material layers, select roofing felt when
adding the gap layer.
249
Accept all the default R values (resistances) of 0.17 m2 K/W for all orientations. Change the
thickness to 20 mm.
250
Exit and save the construction.
Before editing the composition of the zone, update all materials in the files using # update
all zones. and select via legacy format when prompted.
This is always needed when the material database is modified, to assure ESP-r construction
files are up-to-date.
Select b construction, j legacy constructions & models, and select x roof_1_pv on the
second page of the list. Now, the material of the south roof has been changed to the new
material with the added PV Panel layers.
251
Save the changes and exit.
Return to the Browse/Edit/Simulate menu and select s simulation. For some models, the
time periods may need to be changed. Select g from: and change the dates to 1 1 (1st
January) and 31 12 (31st December).
Select q integrated simulation and select interactively. To avoid problems with the files,
related to the electrical results, do not preserve the results that are available, instead run a
new simulation each time. Select c initiate simulation and s commence simulation.
Specify the name of the result file and save the results.
252
23.5 Results
Select t result analysis. The result analysis window should open.
Ensure that the output period is the same as specified in the previous section.
Dry-bulb Temperature
If the results obtained are as expected, then it can be concluded that the model has not
been damaged in any way while making the changes. If the model is damaged in the future,
a copy of the model can be used instead. It is recommended to store the copy of the model
in a different location from the working model to ensure that any damage to the folder
does not affect the back-up file.
As seen from the Network sub-section, no networks have been defined. Select g
electrical.
253
Select yes to proceed with the network description. From the Electrical Network definition,
it can be seen that no nodes, components or networks have been defined.
Open the cellular_various (reference) model and go to the Electrical Network Definition.
254
In the working model, click on a Network name and specify the name as PV_roof_south.
Select continue and select yes. The name can be changed as per user preference or
requirement. It is a good idea to give a network description as well.
23.6.1 Nodes
In the reference model, there are four nodes. One node should always have a fixed voltage
since it is the one connected to the grid. It balances the whole network such that if there is
an excess or lack of energy, it can draw or return the required amount to the grid.
Since the tutorial is the first attempt at defining the network, only two nodes will be created,
since it is the simplest thing to do.
Select d nodes, + add/delete/copy item and select add node. Select 1-phase(1) node.
Then select Fixed Voltage since it is the first node. Name the node Grid_connect.
255
ESP-r always sets 220V as the base. The simplest way to change this is to change the ENF
file rather than changing it through the interface. Before doing that, the PV Panel node also
needs to be created.
Add another node. It is a one-phase node with a variable voltage. Name the node PV and
specify the phase of the node connected to the grid as 1.
This tutorial will not cover connections to lights, power components or HVAC systems. The
objective of the tutorial is to calculate the amount of energy generated by the PV Panel. It
is possible to connect the components to the network, thus, supplying the energy to run
the components from the PV Panel.
256
Select 2 one_phase_cable.
Since it is the only cable in the problem, the name can be simply cable. The cable definition
can be information regarding diameter, materials, manufacturer, etc. For this tutorial, it can
be left as is.
Next, there are six data items that need to be provided by the user.
The six data items are stored in the Cell_office ENF file of the reference model. The data
need to be added as required. It is a good idea to maintain a separate document with all
the parameters and units so that the numbers can simply be added where necessary.
The data in the file has to be reproduced in the same order in ESP-r.
257
The cable length has been increased to 10 meters since the PV Panel is on the roof (instead
of below the window in the reference model) and seven meters may be inadequate.
Select h network connections and go to + add/delete/copy item and select add. In the
Electrical Nodes menu, select b PV and then a Grid_connect.
258
Then select a cable.
Now, there is a connection with the cable going from node 2 to node 1 on phase one.
The network definition is now complete. The only thing left to do is to change the voltage
from 240V to 120V.
259
Select >Update network. A file will be created in the model folder of the name
PV_roof_south. Save and exit the electrical network.
Go to the cfg folder in the model folder. Open the file PV_roof_south. For some systems,
the file may be stored in a different location. In the file, change the base voltage of the
nodes from 220V to 120V. Save the file.
260
Changes made in the file should reflect in the nodes as well. Update network, save and exit.
Now special file exists, so, select no. Then create a new file. Name the file bp_pv.spm.
Spm is the abbreviation for special material files.
261
Select 2 BP_saturn_36cell.
Leave the name of the panel as is. The data entry values are stored in the manager_pv
SPM file.
Manager_pv File
The data in the fields have to be added in the same order as they appear in the file.
The reference temperature is required since ESP-r will calculate the temperature of this
panel for each time step and based on this temperature, it will calculate the efficiency
using a standard curve.
262
It is a type of load, that's the maximum power, the PV panels usually have controllers that
can track the behaviour and ensure that the panel is operating at the maximum power point
with the optimal voltage and the optimal current. And here load versus voltage - a
resistance type of network is used - and the shading treatment is the default one.
Now, select c roof_space, c s_roof then layer 2: EVA layer. The placement of the node
should be in the middle of the EVA layer and ESP-r should suggest it automatically. The first
three nodes are placed in the glass.
The PV Panel has been created. Update the network. Save and exit.
263
23.7 Integrated simulation
Now that the network has been fully defined and the PV panel has been installed, the
integrated simulation can be run.
Return to the browse/edit/simulate menu. In the Miscellaneous menu, select ! Save model
to save the model. Since several changes have been made, it is a good idea to save the
model so as to not lose the data.
Go to the simulation. In the simulation controller, no electrical results file has been defined.
Click on m elect. results.
264
elr is the proper abbreviation for electrical results so that ESP-r can find the file easily when
required.
Select p save/dereference parameters and select save current sets. This saves the file
names, the simulation presets, the simulation time period, etc.
Select q integrated simulation and select interactive. Select c initiate simulation and
do not preserve the previous result set. Select s commence simulation. Exit the simulation
window.
Go to g electrical results and remove "win" from the name of the results file. Select ok. It
should now read "File read successfully".
Let's see if a graph can be plotted of the generation and the PV panel. Select a graph, c
generation and b PV. Plot the graph. As shown below, the generation is 0, indicating that
something is probably wrong with this model.
265
This error most likely means that something is wrong with our network; the link between
the panels and the network is a likely culprit. From the Browse/edit/simulate menu, navigate
to g electrical (defined) --> e Connect HVAC/PV/Lights/etc. Here, it should be seen that
there is no defined link between the panels and the network (it should look like the image
below, but with no component as option a).
It was already defined the connection above to remedy the error. Let's define this
connection on others model now. Here, a connection between the PV panel and our
network need to be added. Select + add/delete/copy item and choose add and
then renewable source. Choose a 1 BP_saturn_36cell --> b 1-phase --> b PV. Name the
component pv_node_ccn or another arbitrary name of any choice. Now, it should be seen
that a component similar to the image above.
Specifying this connection tells the model that the energy coming from the integrated
renewable - which was previously defined with the data from the PV panel data sheet -
should come to this point in the electrical network. Now that there are two nodes—one
connection between the PV panels in the network and the PV panels under integrated
renewables, and one cable connecting the two nodes—running a simulation should display
some electrical results.
266
Now, navigate to s simulation. Change the name of the electrical results library to
"bld_basic_win.elr" and select ok. Select q integrated simulation and run interactively.
Select c Initiate simulation and, if prompted, choose not to preserve results. Select s
commence simulation and choose to save the results.
Results can now be analyzed using t results analysis. Ignore any warnings about the library
being incomplete or corrupt; functionality should not be impacted. To display the
generation of the PV panels, navigate to g electrical results --> a graph --> c Generation
--> b PV, then exit and plot the graph. This graph should show the results of the electrical
network.
267
defaults are the same ones to accept, except for the number of panels. One was used in the
first tutorial; now, use 10.
Assuming all the defaults are the same as listed here for the rest of the values: using the
roof space, the South roof, and the EVA layer. Update the file so this new information is
written in the bp_PV.spm file or any other name, as it is arbitrary.
With a new file containing these numbers, an integrated simulation can be run to see the
impact on energy production. No results will be kept, keeping the same name for the
results' library for the electrical. Invoke simulation, then exit this, return here, and review
the output.
Bear in mind that as ESP-r calculates energy flow between the thermal and electrical
domains, extracting more energy from the roof to produce electricity and convert solar
radiation to electricity reduces the energy entering the zone, potentially affecting
temperatures and loads in the zone.
Then plot the graph here focusing on node and generation for the PV panels.
The impact of this new number of panels should now be visible. As expected, there is a
tenfold change in the results, with 700 Watts as the peak for this particular setting.
268
So, proceeding with the definition, yes. The file is already available. Now, a new node will
be included here. A node will be added; it is a one-phase node with a variable voltage. It
will be called "inverter."
The node itself is not going to be the inverter, but a trick will be used to describe these
losses. What will be done is the following: now that this new node is available, changes
need to be made in the text file in a minute. A new connecting component will be created.
Rather than the small loss that was used, this small resistance in the actual cable will be
addressed.
A very high resistance will be assigned, which means that lots of energy produced by the
panel will not be available to the rest of the network because it is dissipated in this
inefficient inverter. A new sort of connection will be added here. That's the electrical
conductor, one phase. Now call it losses_inv.
Again, there are six data types, and these are the data that would be used. A very high
resistance means that a lot of energy will be dissipated there: 0.1, 4 again for the resistance
on the neutral, 0.1, 0, and the length of the cable, 1. A longer cable with a smaller resistance
would probably have the same effect in the first phase. Now, there are two connecting
components.
The network will be rewired to establish new connections. A new connection will be added
between the PV and the inverter using this "loss" cable. Now, there is a connection from
the PV to the inverter, and a change is needed for the connection from the inverter to the
network. In this case, it will link the inverter to the network using the normal cable. The PV
panel—that's node 2—is connected to the inverter using this cable that has a high loss, so
the impact of this on the energy available and generated in the network will be observed.
Another connection from the inverter to the network will also be established.
269
Updating this, the file PV_roof_South is being saved. It will be opened in the
basic/cfg/PV_roof_South to change this value. It is easier to change here than through the
interface.
The simulation will be run to see the results of the integrated simulation. This will be
cancelled, and it will run for just a small period of time: from the 1st of June to the 4th of
June. This allows for clearer results in the integrated simulation, interactively.
The simulation will be initiated, and the name of the results file will be accepted. The
available results will not be kept. The name is correct for the electrical network, and the
simulation will be invoked. Continuing, the simulation's results will be saved, which is very
fast because it is just a couple of days in the simulation.
During the result analysis, it will be observed that the energy generated and the energy
transmitted are not the same due to the losses related to the inverter. For instance, a graph
of the generation in the PV panel will be plotted, showing over 700 watts generated in these
four days.
Now, see what the transmission to the grid is. These values are in the order of 500W and
not 700W. Even though 700W was produced, the actual exported value to the grid is lower
because components, cables, and other elements in the network generate losses in the
electrical network. These losses need to be taken into account to provide a more reliable
270
figure for the energy exported to the grid when using this inverter, which has a very high
loss. The literature includes many references on how these losses change depending on the
inverter's configuration and the nature of the inverter itself.
With this tutorial, the process of changing the number of panels in the PV panel network
was covered, which impacts energy production, and how to include an extra node and
connection to represent losses in the system. Now, lighting and other layers of complexity
could be represented in the model. The same procedure could be used to deploy PV panels
on other surfaces of the model to find the best solution. Data can be explored and analyzed
in relation to solar radiation (direct and diffuse), wind speed, and temperature because
these factors affect panel temperature, performance, efficiency, and more.
271
272
Explicit Plant & Systems Domain
273
24 Opening, inspecting and running a HVAC
model
This tutorial is based on information available at:
https://www.esru.strath.ac.uk//Courseware/ESP-r/hvac.htm
This tutorial describes the steps to open, inspect and run simulations using a model with
explicit HVAC plant modelling.
The plant domain solves heat and mass-energy transfer in a network of HVAC components.
While the thermal domain can provide valuable information about the performance of the
HVAC system, it does not provide facilities to evaluate the performance of each component
of the system and assess the interaction of components for the analysis of the impact of
realistic control algorithms implemented in HVAC systems. Explicit plant networks provide
such capabilities, and can be used to describe systems operating with air and/or with water.
Multiple plant networks can co-exist in a model. The plant domain does not calculate
pressures across the HVAC system, but it can be coupled to a fluid flow network for this
purpose.
274
The new model opens automatically in a new ESP-r window. To open the model at a later
time, follow the steps below.
cd ~
cd cellular-various
cd cfg
275
HVAC Systems Model Diagram
The image shows an air handling unit with ducts, mixing boxes, fans, heating and cooling
coils, humidification, and a set of sensor reading temperature and humidity levels in the air
return systems and connected to actuators in the delivery system.
24.3 Components
Select m browse/edit/simulate, e plant & systems under the networks subheading,
then b explicit.
Select the name of the file and select yes. Press yes to modify the file. Press yes to see the
network summary. An extensive summary is provided in the text feedback window, partially
shown in the image below.
276
Partial Plant Summary
The Network definition: edit menu shows options to define HVAC models. Select d
components. The list of components used in the model is shown, matching the schematic
representation.
277
Select l fan1, then name and component data, then select the component name. Select
ok for the volume flow rate.
Data regarding thermal losses and thermal inertia of this component is shown in the menu.
Exit the menu. Select l fan1 again, but now select optional flow data.
The component indicates that the working fluid for this plant network is air. The list of
parameters is tailored to this component. The parameters are related to the performance
of the fan as a function of the pressure difference. Exit the menu.
The menu shows the parameters related to the component thermal losses and thermal
inertia.
278
Note that parameters regarding the energy delivered by the coil are not set here. They are
described in the control loops for the plant model, as shown later in this document. Exit the
menu.
Note that some components are labelled as supply and return. These components are
important to link the plant network to the thermal zones described in the thermal domain,
as described later in the section about controls in this document.
As in other ESP-r domains, the information shown on prj interface is stored in text files. For
the plant model, the file is located in the nets folder and has extension .pnf. The image
below shows part of the pnf file, with information about the components used in the model.
24.4 Connections
Return to the Network definition: edit menu. Select e Connections. Connections describe
how the working fluid flows through the components described in the previous section.
279
Editing these connections by selecting them is cumbersome, as the software (prj) does not
show the currently selected options once the user starts editing the connection. The
connections can be more clearly seen in the .pnf file, as shown below.
Component Connections
The file indicates components connected directly to another component (those with
connection type 3). It also shows components connected through the air nodes of thermal
280
zones (those with connection type 4). The sixth line from bottom to top is reproduced
below. This line shows that extract duct 1 7 is connected to supply duct 7.
Once components and connections are defined, controls need to be set for the plant
network.
The image above shows that three control loops are used in this model, one for each
thermal zone. The corridor uses the first loop, with no heat injection/extraction.
Investigating control settings in the software (prj) can sometimes be cumbersome, as the
current information used in a control loop may not be shown in the interface. In some cases,
it is easier to understand the controls using the .ctl file. Open the file cellular_offices_bc+p
located in the ctl folder of the model.
281
cellular_offices_bc+p - Control File (Zones)
The image below above shows a sample of this file. The lines related to the zone loops
show that this loop only links the zone conditions to the respective plant components for
the air return. The actual control data (setpoints, capacities, schedules) is defined in the
loops for the plant network, described in the same .ctl file.
282
There are six control loops for this plant network covering the key components of the plant
network - heating, cooling, preheating, two fans, and humidification. Details of each control
can be seen in the .ctl file (same file as earlier), as shown below.
283
The Simulation controller menu shows the names of the result file (for the thermal domain)
and for the the plant domain (extension plr). The controller also defines that the time-step
for the zone (for the thermal domain) is 60 minutes, while the time-step for the plant
network is 1 minute. The plant domain often requires smaller time steps, as HVAC
components can inject/extract significant amounts of energy/mass and the working fluid
may have a small thermal capacity.
The next tutorial describes the result analysis for plant networks.
284
25 Analysing the results of a HVAC model
This tutorial is based on information available
at: https://www.esru.strath.ac.uk//Courseware/ESP-r/hvac.htm
25.1 Graphs
Select parameter plot
Select weather
Select building zones > a manager_a > - exit menu (to restrict plots only to this one
zone)
285
The graph shows the evolution of temperature in the zone over time. The temperature
oscillates around the setpoint reproducing the behavior of the HVAC system.
Select i zone RH
The image shows an oscillation in the relative humidity around the setpoint of 50%.
286
Once the conditions in the thermal zone are understood, results for the plant network can
be analysed.
Select plant results and read the plant results file cellular_hvac_winter.plr
ESP-r will display a psychrometric chart for plotting the state of plant components on this.
The x-axis shows the temperature of the air in the HVAC plant and the y-axis shows the
amount of moisture in the air.
Choose select components -> all items. Then choose to display one timestep - look at
timestep 660 (i.e. 11 hours in the graphs above).
287
The chart now shows what is happening inside the HVAC plant. The point on the lower
left corner represents the outdoor air (cold and dry), the point around 16°C and 55% RH
shows the conditions at the mixing box, the point at 14°C and 70% shows the results after
humidification, the point at 25°C shows the conditions after re-heating. The air is then
supplied to the zone, where energy is extracted from the air by the cold surfaces of the
zone, bringing the air to 20°C and 50% RH.
Select output -> psychrometric chart -> generate chart and select components -> all
items. Now display the HVAC system state at timestep 780. There are two processes
occurring - mixing and cooling/dehumidification. Can you identify them from the chart?
Finally clear all previous selections and select output -> summary statistics -> additional
output -> cooling coil and look at the load on the cooling coil.
289
26 Editing a HVAC model
This tutorial is based on material available at
https://www.esru.strath.ac.uk//Courseware/ESP-r/hvac.htm
Run the results analysis and read in /tmp/cellular_hvac_winter.res. Select plant results and
read in the plant results file /tmp/cellular_hvac_winter.plr.
ESP-r displays a psychrometric chart for plotting the state of plant components on this. The
x-axis shows the temperature of the air in the HVAC plant and the y-axis shows the amount
of moisture in the air.
The chart now shows what is happening inside the HVAC plant.
Can you identify mixing; humidification and re-heating processes? Looking at the plant
network schematic diagram - can you identify which components perform these processes?
Finally look at the humidification process - can you describe what is happening to
temperature and moisture content?
Select output -> time series plot -> 2nd phase flow -> humidifier
290
Select draw graph
This shows how the flow of water into the humidifier is controlled to obtain the 70% RH
setpoint.
Select output -> time series plot -> relative humidity% -> ex_duct_1_7
Component ex_duct_1_7 draws air from zone manager_a and so this shows the zone
humidity. How successful is the HVAC system at holding RH to 70%?
This shows the temperature in office manager_a. How successful is the HVAC system at
holding temperature to the set point of 19°C?
Select output -> summary statistics -> relative humidity% -> ex_duct_1_7
Selects and for additional output -> re-heat_coil -> heating output again noting the
values. This shows the amount of heat needed to maintain the room at the desired
temperature.
26.2 Further editing HVAC control settings for the plant system
Repeat the process of editing the humidifier control loop 6. Keep all the control settings
the same as before, except that when prompted set the control values to 0.0 0.0 70.0 10.0.
This effectively closes down the humidifier by setting the maximum allowable water flow
rate to 0 kg/s. Save the new control settings and re-run the simulation. Select the results
analysis and read in the new results file e.g. /tmp/cellular_hvac_winter.res.
Select plant results and read in the new plant results file e.g. /tmp/cellular_hvac_winter.plr.
Select output -> psychrometric chart -> generate chart and plot the state of all of the plant
components as before for timestep 660. Can you see a difference between this and the last
simulation? Which process (humidification, re-heat or mixing) is now missing? Clear this
graph and return to the Psychrometric menu and select output -> time series plot ->
relative humidity% -> ex_duct_1_7 and plot the graph. What is the difference between this
and the humidity plot from the previous example? Select output -> summary statistics ->
additional output -> re-heat_coil -> heating output and then generate the report. What
has happened to the amount of heating energy supplied by the heating coil? Also look at
the space temperature. Select output -> time series plot -> temperature ex_duct_1_7. How
does this compare to the temperature plot from the previous simulation?
291
What conclusions can you draw from changing the humidifier control settings, looking at
the psychrometric plots and the time-series plots of RH and temperature?
Select the mixing box as the receiving component then select option c - from another
component then select fan2 as the sending component. Set the mass diversion ratio to 0.5.
This has the effect of reducing the amount of cool extract air recirculated and mixed with
the incoming supply air from 80% to 50%.
Also edit connection t (the last connection) to change the mass diversion ratio from 0.2 to
0.5. Again choose to edit the connection. In this case the receiving component is
supply_duct1, the connection type is e - from ambient air and the sending component is
fan2. Set the mass diversion ratio to 0.5. This increases the amount of air rejected to outside
from 20% to 50%.
Update the plant configuration file and then return to the main menu and re-run the
simulation, remembering to use the summer simulation pre-sets as before. Analyse the
results from /tmp/cellular_hvac_summer.res and look at plant results
/tmp/cellular_hvac_summer.plr. (If you have changed the results file names for these new
simulations use these new names instead.)
Look at the resulting room temperature by selecting output -> time series plot ->
temperature -> ex_duct_1_7. Is there much difference from the previous simulation? Now
look at the load on the cooling coil. Select output -> summary statistics -> additional
output -> cooling coil -> cooling output and then generate the report. What effect has
reducing the recirculation had?
292
Select Timestep change, all components- humidification, re-heat or mixing
Select output -> summary statistics -> relative humidity% -> ex_duct_1_7 and for
additional output -> re-heat_coil -> heating output
Select 5. 0.0 0.0 70.0 10.0 - output -> psychrometric chart -> generate chart -
humidification, re-heat or mixing
293
Select output -> summary statistics -> additional output -> re-heat_coil -> heating
output
Select output -> psychrometric chart -> generate chart and select components -> all
items.
294
Select output -> summary statistics -> additional output -> cooling coil
Select output -> summary statistics -> additional output -> cooling coil -> cooling
output
295
296
Idealised Plant & Systems Domain
297
27 Opening, inspecting and running a model
with idealised HVAC
In the previous section, ESP-r explicit plant module was used to describe systems
comprising several components, interacting in a network to extract/remove thermal energy,
moisture, and/or air from the building. This is the explicit approach to model plant systems
in ESP-r.
There is an alternative approach, where only a few parameters are required to model a
single component heating and/or cooling system: the idealized approach. This is not a
streamlined interface for explicit plant networks, but rather a different way to model HVAC,
with its own assumptions and solver.
Idealised HVAC was primarily developed to support modelling in line with the methodology
in the HOT3000 software, developed by NRcan. Users should exercise caution when
adopting idealised HVAC modelling in other contexts. More information about this
methodology can be found in ESP-r source code, at src\cetc\hvacsim.F
cd ~
cp -r /opt/esp-r/validation/selftest/idealized_hvac/ ./idealized_hvac
Still using Linux termina, navigate to the cfg folder of this model, and list the files available.
cd idealized_hvac/cfg
ls
There are several cfg files in this folder, representing versions of this model with different
HVAC systems.
298
On the terminal, open the model with an air source heat pump for cooling:
Select m browse/edit/simulate
27.2 Controls
Before exploring the heat pump setting, it is important to check the control applied to the
system.
299
In order to identify the control related to the heat pump, it is necessary to explore them
one by one.
The control is reproduced in the image below. It is a free float control covering the first
hours of the day, therefore it is not directly relevant for the HVAC system,
There are 3 periods, select period b, which operates during daytime (from 8:00 to 20:00
hours).
300
This control defines the setpoints to be used by the air source heat pump defined in the
idealised plant mode.
The value set on item e Maximum cooling capacity (W) is 2000 W, but this value is not used
in the simulation, as the capacity of the heat pump in the idealised model overrides this
setting.
301
27.3 HVAC settings
Select e plant & system to explore the HVAC settings.
The Plant model menu becomes available. It shows the idealised HVAC as defined. Select
a idealised (defined)
The dialog area shows the name of the file with HVAC settings.
Select ok
302
The HVAC Summary menu shows one system defined. Note that this menu does not follow
the convention adopted in other ESP-r menus (each line starting with a letter to facilitate
selection using the keyboard.
The menu shows a summary of information for the heat pump. This menu does not allow
editing these settings. It is noticeable that the capacity of the heat pump is 020E+04 (i.e.
2000W). This is substantially lower than the 6000 W set in the ideal control.
Do not select the option edit to investigate the model, as the Project Manager does not
show the information used in the model. This feature is recurrent in ESP-r functionality that
is restricted to advanced users, such as the idealised HVAC system. To investigate model
features for idealised HVAC, use the .hvac file (see the next section).
Press yes to save the file, and accept the prompt to update the connection file (.cnn) and
the plant file (.hvac).
303
⚠ After saving the file, ESP-r remains in the HVAC Summary. It is necessary to select -exit
menu and select no when prompted about saving the file to leave this menu and return
to the Plant model menu.
The file looks like the image below. The meaning of some of these fields can be found in
https://www.esru.strath.ac.uk/Documents/ESP-r/modeling_hvac_in_HOT3000.pdf
In the file below, it is noticeable the values for the capacity and COP on line 6.
304
28 Exploring results of a model with idealised
HVAC
28.1 Running a simulation
On the browse/edit/simulate menu, select s simulation
⚠ Note that the item d zone timestep/h is set to 1. This is requried when using idealised
HVAC.
Enter 4 and press ok. This will reduce the amount of information saved by the Integrated
Simulator in the result file and avoid problems with this exemplar.
28.2 Results
305
On the Project manager, select t results analisys
The Results Analyser module starts in a new window. Accept the name of the result file.
Select only zone b main_second , as these is the zone affected by the heat pump. Select -
exit the menu. This will facilitate data analysis.
Select b temperatures > a dry bulb (db) temp. > -exit menu
The graph below shows that temperature often exceed the cooling setpoint (25°C),
demonstrating that the heat pump does not have adequate capacity for this building.
306
Select / clear selections
In a simulation with ideal control and no idealised HVAC, the cooling load would show a
flat line at maximum capacity in cases where the cooling system is undersized (like the
present one). However, The graph below does not show this behaviour, as the idealised
model calculates for each timestep the capacity of the heat pump as a function of several
parameters.
307
29 Implementing an idealised HVAC system in a
model
⚠ Idealised HVAC was primarily developed to support modelling in line with the
methodology used in the HOT3000 software, developed by NRcan. Users should exercise
caution when adopting idealised HVAC modelling in other contexts. More information
about this methodology can be found in ESP-r source code, at src\cetc\hvacsim.F
This tutorial implements an air-source heat pump to deliver heating to a thermal zone.
Select m browse/edit/simulate
Before implementing the idealised HVAC system, let's explore the current control and
system capacity used in the model. It is also useful to run a simulation and analyse results
before implementing the idealised system, in order to have a baseline to evaluate the
impact of the changes implemented in the model.
308
Select the loop f, as this model only have heating on weekdays.
Select option c to explore the control used from 9:00 until 18:00.
309
The Zone control period data menu shows a model with no cooling system, and heating
with setpoint of 20 °C and 3000 W of capacity. Take note of the capacity, so the heat pump
implemented in the idealised HVAC system matches it and facilitates comparison.
Select - exit menu (press yes or ok whenever prompted), and run an automated
simulation.
29.1.2 Results
Open the result file, and on the Results Analyser, select a graph > a parameter plot > b
temperatures > a dry bulb (db) temp.
310
The graph below shows that the heating system meets the capacity in all 5 week days,
keeping the temperature at 20°C.
The graph shows that the system reached maximum capacity when it is activated on the
first day of simulation, in order to meet the demand from the thermal zone.
311
Select - exit menu twice to return to the Module options menu.
Text feedback window shows the energy delivered to the model: 84.05 kWh. These graphs
and values provide a baseline for comparison once the idealised system is implemented.
Exit all menus on the Results Analyser and return to the Project Manager.
312
The idealised system also corrects other properties of the heat pump which are not
explored in this tutorial, such as COP and increase in consumption due to part-load
operation (as illustrated in the graphs below).
Select a idealised
313
Select ok to the suggested file name and location.
As the file does not exist yet, select make a new file
Enter the altitude of the site (for atmospheric pressure correction. Press ok.
The HVAC System Type menu becomes available. Select c Air-Source heat Pump.
Select heating.
314
The relation between outdoor temperature and het pump capacity depends on the
quality of the heat pump. ESP-r has curves for 3 representative values, implemented back
in early 2000s. For this tutorial, select ASHP typical.
Press ok to accept the suggested value, and also to accept the suggested number of
zones served by the heat pump.
Enter 1 to indicate that all heating capacity of the heat pump should be delivered to the
reception zone.
Enter 3000 afor the capacity of the heat pump, in such a way that results from the
idealised HVAC model can be compared with the ideal loads model already available in
the exemplar. Press ok.
For the purpose of this tutorial, enter a COP equal to 2 and press ok.
Enter -1 for the flow rate in the next two dialog boxes, as this forces the idealised HVAC
algorithm to set a suitable flow rate automatically.
315
Select no fan.
This dialog is related to the temperature control for the cutoff temeprature. Enter 1 and
press ok
This is the cutoff temperature for the heat pump. Enter -1 and press ok.
The setup is completed. On the HVAC Summary menu, select s save hvac file.
Press ok
316
The Plant model menu now shows the idealised option as defined.
Select h zone results and change the name of the result file to be generated during the
simulation, as indicated below:
29.2.3 Results
On the Results Analyser, press ok to open the results file.
Plot a graph of dry bulb temperature in the zone, as in the image below. The graph shows
significant differences when compared to the case with no idealised HVAC. In the first
and second days, the temperature inside the reception does not reach the setpoint of
20°C.
317
Plot a graph with the heating load, as in the image below.
In order to facilitate the comparison with the case with no idealised HVAC, change the y-
axis scale. Select = axis scale.
Select default.
318
The graph now has the same scale used in the plot with no idealised HVAC. It is noticible
that the load is smaller in the first tow day when compared to the case with no idealised
HVAC. This is related to the reduction in the heat pump capacity due to lower outdoor
temperatures, captured by the idealised model but ignored when only the ideal load control
is used in the simulation.
Use the enquire about function to obtain the heating energy deliver to the zone (see
image below). The value is significantly lower than the one for the simulation with no
idealised HVAC, showing the importance of modeling heat pump performance in energy
modelling.
319
320
Moisture Domain
321
30 Exploring a model with moisture transfer
30.1 Open an exemplar with moisture transfer
Start prj and select open existing.
The image below shows the zones of this model. Note the Enhanced fabric highlighted
in the Features area on the upper right corner.
This will show a menu for the selection of the zone where moisture transfer will take
place. Settings must be done zone by zone.
322
The Project manager shows the name of the file holding moisture transfer settings. Press
ok.
Moisture transfer may be combined with adaptive gridding. This exemplar does not this
feature. Select cancel
This option returns to the Building composition menu. This occur because moisture
transfer settings are not supported by menus in ESP-r. Users must manually set a text file
holding the necessary data, as described in the section below.
• Moisture nodes/layer
• Vapour permeability data for each layer
323
• Sorption isotherm data for each layer
• Thermal vapour diffusion coefficient for each layer
The image below shows this section for the liv_room.mst file.
These three coefficients are described in Eq 5.13 Nakhi's thesis, based on results from IEA
Annex 14:
permeability = 1.89923e-10*(VPRMa+VPRMb*EXP(VPRMc*RH))
or in Otto's thesis:
324
permeability = exp(VPRMa+VPRMb*RH**2+VPRMc*RH**4)
The image below shows part of this section for the liv_room.mst file.
The three coefficients (Uh, CFF, EXPT) are described in Nakhi's thesis:
Moisture content = Uh*(1.0-ALOG(RH)/CFF)**(-1.0/EXPT)
or in Otto's thesis:
Moisture content = 1000.*(exp(Uh*RH+CFF*RH**2+EXPT*RH**3)-1.)
The image below shows part of this section for the liv_room.mst file.
325
The section "# Thermal vapour diffusion coefficient for each layer" follows a similar
structure with subsections per surface, and indexes for equations and in this case one
single coefficient for each layer. Nahki states that the thermal vapour diffusion is the
diffusion caused solely by the temperature gradient and through porous materials. This is
a moisture flow drive rarely used in other moisture transfer models and Nahki indicates
the lack of data regarding this coefficient. All examplars listed above set this coefficient to
zero for all layers.
The image below shows part of this section for the liv_room.mst file.
326
Select integrated simulation
Select interactive
Press ok for the suggested result file names (for buildings, mass flow network, and
moisture flow).
Select continue
Once the simulation is concluded, select Yes to save results. Select -exit menu > - quit
module.
327
This closes the Integrated Simulator and returns to the project Manager.
328
31 Exploring results with moisture transfer
31.1 Results
On the Project manager, select t result analysis
This will open the Results Analyser module. Press ok to accept the result file name
suggested by ESP-r.
This menu has various analysis related to topics not necessarily related, such as thermal
comfort, mould growth risk and lighting.
329
The Mould analysis module opens in a new window.
330
Select a mould species
This file contains the temperature and relative humidity conditions for germination of
different mould species. This file is located in the ESP-r installation folder: \opt\esp-
r\databases\mould.db1
Once the file is loaded, 6 mould types become available for selection:
On the results menu, select 3 Re-draw Chart. The germination curve is shown in the
graphic window.
331
Now that mould growth conditions are loaded, Select 1 Plot points on chart to loaded
moisture content at the walls of the model calculated during the simulation.
The text feedback area shows that information for the zone model 5 is loaded, and 12
surfaces are available. Select the number of the surface for plotting. In this example, enter
1.
332
Results of moisture and temperature for the inner face are plotted, as in the image
below.
The text feedback area shows statistics for these surface, where no point is above the
germination line.
Select surface index 3. Points for this surface are plotted in the graph, combined with the
previous plot for surface 1, as in the image below.
333
334
CFD domain
335
32 Exploring a model with CFD
This tutorial explores a model with a CFD domain ESP-r.
Select d open existing > exemplar . Go to k fluid movement, then choose b ...with
thermally coupled CFD. Copy the model files to the home folder.
336
32.1.1 Opening an ESP-r model via terminal
Open a terminal by pressing ctrl+t keys simultaneously (only for Linus OS).
cd ~
cd CFD_room
cd cfg
Open the model in esp-r by invoking the application prj using the file parameter to point
to the .cfg of interest.
Add the symbol & at the end of any command to start the process in the background and
keep the terminal usable (otherwise, the terminal will be locked until ESP-r is closed).
To create a backup of the model files, copy the entire folder and paste it. Any
modifications made to the model, whether accidental or purposeful, will not affect the
backup files.
To run a CFD simulation, you need at least one thermal zone defined within the
model. Ensure the thermal zone includes all relevant geometry and construction files. (For
detailed guidance, refer to the thermal zone tutorial.)
337
To open the CFD domain definition and setup go to c composition and then to j
computational fluid dynamic and select the zone (room). open the existence .dfd file under
/zones/room1.dfd
To open the CFD domain definition and setup: Go to the c composition section. Navigate
to the j computational Fluid Dynamics (CFD) tab. Select the desired zone (e.g., room).
Open the existing .dfd file located in the corresponding zone folder (e.g.,
/zones/room1.dfd).
338
A new window with the domain will open
From this menu you can edit the gridding to either increase or decrease the mesh.
340
Go to # edit solution parameters, From this menu you can edit the relaxation factors, select
the Turbulence Model, enable the Buoyancy calculation, set the Maximum Iteration Count,
and select the Monitored Cell Coordinates.
341
When selecting a boundary, you can view the cells defining that boundary, along with their
associated properties.
If you choose to edit a boundary's type, you can select from the following options:
342
If you choose to edit the location, select c cells. A menu will pop up asking you to select
the boundary face, which must be one of the six faces of the domain. You will then need to
enter the start and end cell numbers along each of the three axes.
Save any changes you made to the file before exiting the CFD menu. When prompted to
include the domain in the calculation, answer "Yes." This will link the domain file to the
model's configuration file, allowing the CFD simulation to start when you initiate a
simulation.
This concludes this tutorial. The next tutorial will go over the simulation and result
analysis.
343
33 Exploring CFD results
33.1 Simulating a model with CFD domain
This tutorial describes the steps needed to run a simulation with a CFD domain being
included. For this purpose the model opened and described in the previous tutorial is used.
From the last step in the previous tutorial the domain file .dfd is being included for CFD
calculation.
344
Add the library name
In simulations using multiple time steps, for a computationally expensive simulation, these
steps should be chosen carefully. add the start and end time it is a decimal number of an
hour example 11.00 is beginning of 11:00 and 11.99 is the end of the hour in case of 1 time-
step per hour CFD will be conducted at one time-step.
345
From simulation controller menu select q integrate simulation
Simulation progress can be displayed immediately after CFD solver finished if required for
that select yes.
33.1.1 Simulation
After the simulation starts, a window displaying the CFD iteration with the residuals graph
appears. Once the simulation converges, it stops and displays a message indicating the
number of iterations required for convergence.
346
CFD solver presenting the residuals graph and the convergence message
33.2 Results
After the solver finishes, there is an option to view a 3D visualization of the air
temperature distribution in the domain for each time step. This option is only available if
"yes" is selected for the "Display CFD prediction as the simulation progresses" question
mentioned in the simulation setup earlier.
347
Instant visualisation of the results
348
View of a slice within the domain
To process the results similar to any BPS model, go to Browse/edit menu select t results
analysis add the results file name.
349
Select h flow results (CFD) add the library name and path when asked for to load the
CFD results.
From the Flow visualization menu select b Image format to change the output visualization
format.
Check the results with Paraview. Paraview is an open source software it can be downloaded
from the following link www.paraview.org/download follow the instruction on the website
based on the operating system.
350
When Paraview is selected for image format select >create image few files are
automatically created in the model cfg folder. See image below all files with extension .vtk
are the Paraview files.
Start Paraview and select to file>open go to directory and select the .vtk file
351
Once the model is loaded, it is possible to add visualisation and targeted type of results.
The menu ribbon below allows the selection of a glyph or threshold representation.
Once a representation is selected, the user can adjust the setting in the properties menu
adjust the scale and select velocity or temperature results. Figure below show the case of
Glyph properties.
352
Apply any changes to update the results image. on the Pipeline Browser you can view or
hide any representation by selecting the eye.
353
To adjust the legend refer to the ribbon presented in the figure below.
Glyph results
354
Slice from the threshold view
355
356
Lighting Domain
357
34 Lighting domain
This tutorial is based on material available at:
https://www.esru.strath.ac.uk//Courseware/ESP-r/lighting_control.htm
Return to your home folder and start up ESP-r. From the top level menu, choose open
existing and then exemplar options and select the base case cellular model from the
technical features category. Copy the model into your home directory.
3. Run a winter simulation and determine the impact of lights on the heating requirements.
Return to the Browse/Edit/Simulate menu. Run a simulation for a winter week (the default
period).
Run the results analysis. Look graphically at the dry bulb temperatures and heating load in
the two offices over the simulation period. Then find the total heating requirement and
number of heating hours for the two offices by returning to the results analysis menu and
selecting enquire about. The heating load in the manager_a zone should be lower than that
for manager_b - why is this the case?
Repeat the simulation but change the period. In the simulation controller menu, select
simulation presets and choose the summer week and undertake a simulation.
In the results analysis, look graphically at temperatures and cooling loads, and find the total
cooling requirement and number of cooling hours for the two offices by returning to the
results analysis menu and selecting enquire about.
358
Restore the lighting in the manager_b office by editing the file in the operational details
section. Simulate the model again and check that the results are now the same for both
zones. Alternatively, you could reload the original model.
5. Define a lighting control scheme and determine its effect on plant loads
Define a single lighting zone control where the sensed illuminance is calculated by a user
defined daylight factor as follows:
Simulate the model for winter, spring and summer periods and note the effect of lighting
control on the heating and cooling demands in the manager_a compared to the manager_b
office.
Define two lighting zone controls (a core zone and a perimeter zone) where the sensed
illuminance for each zone is calculated by a user defined daylight factor. For the perimeter
zone:
As in task 5 simulate the model for several periods in the year and compare the
performance (in terms of heating and cooling loads) of the manager_a and manager_b
offices.
360
Productivity tools
361
35 Automating tasks in ESP-r
This tutorial will cover the evaluation of options to automate tasks in ESP-r. It is a
transcription of the video: https://www.youtube.com/watch?v=KUg8SGqwOuo
In this tutorial, the model will be rotated several times and each time this action is
performed, performance metrics will be exported. This process can be done manually using
the ESP-r interface, but it can also be performed using scripts.
Download the folder and unzip the files. Save the files in a folder named "Rotate". Open
the folder
Click on the file rotate45. The file contains the sequence of letters that map the commands
needed in ESP-r (in PRJ) to rotate the model.
Open a new examplar model - multi-zone model with convective heating and basic
control or simply open an old unedited model. It should have the name "basic", unless it
was saved using an alternate name.
So, the letter m is for browse/edit/simulate, then c which is composition, * is for global
tasks. Then, b for rotate. 45 specifies the degree of rotation, a represents site origin - the
point about which the rotation happens. * means all items, ie, all the zones will be rotated
362
about the previously defined point. The - option is for exiting the menu. ! is to archive the
model, ie, save the model with the above changes. The empty line represents ok. The next
two dashes are to exit and then quit the model.
To use the text files in the rotate folder, the files need to be present in the CFG folder in the
model folder. Copy the files to the cfg folder. There are codes stored in the rotate files to
use the text file commands.
In the file rotate45, there are letters that correspond to the options to perform the required
action.
363
35.1.2 Text Mode in prj
It is possible to run any ESP-r module in text mode. In this case, there is no graphical
interface and options must be chose using only letter for each menu option.
Enter the command below in the terminal to run ESP-r in text mode.
The command is the same command used in previous tutorials, with the addition of -mode
text, which runs the software in text mode.
As can be seen in the terminal, the option and the corresponding letters are the same as in
the graphical interface. This is a way to map these letters if needed since there is no visual
input.
Enter - to exit.
The first line- prj -mode script -file bld_basic.cfg < rotate45.txt can be understood by
breaking it into parts.
prj indicates that the project manager is being invoked. -mode script is the code for script
mode or text mode. -file bld_basic.cfg indicates the model file that is being used. <
rotate45.txt indicates the file that is being used.
364
ESP-r can be run in three modes - the graphic mode (used in previous tutorials) and the
text mode (explored in this tutorial).
The command carries out all the tasks written in the file and closed the model. Open the
graphical mode as usual. The model should have been rotated by another 45 degrees. This
way, it can be checked whether the command was properly executed.
If there is a need to repeat this process multiple times, the odds of making a mistake
increase. In this tutorial, the model has to be rotated eight times to cover all possible
orientations and the performance metrics have to be measured. This is a rather repetitive
task with multiple steps in each rotation. In such cases, automating certain tasks is a useful
tool.
Now that the model has been rotated, the simulation needs to be run. To do this, another
program in ESP-r called BPS needs to be invoked.
In this some cases after the recent release of the new version of ESP-r, the BSP command
may return a segmentation fault. This issue is being addressed in develepment. For the time
being, the problem can be bypasses by restarting the system.
365
35.1.5 Running a Simulation in Script Mode in bps
The first one was rotate45, which has a sequence of steps to be used when PRJ is invoked,
the project manager, now run_simulator.txt which does exactly the same thing. But for the
building performance simulations (bps) - to the integrated simulator.
Open the file run_simulator. The series of commands for the building performance
simulations (bps) to the integrated simulator is stored in this file.
The first line is an empty line to accept the CFG file. "C" initiates the simulation, followed by
the name of the result file, starting date, ending date, and so on.
Invoking this sequence of steps will produce the result file, so calling this line here will
achieve that.
So BPS in script mode with the CFG file and with these commands. It runs the simulation. A
result file should be generated. Here, the bld_simple.res.
366
Up to this moment, the model has been automated for rotation and simulation. Now, the
last step that needs to be automated is extracting the results. The third line here invokes
the result analysis tool again in script mode using the extract energy text.
So open extract_energy_0.
Again, a sequence of letters is necessary to export a CSV file with the energy consumption
of this building. In this case, RES is called, which is the result analysis tool, followed by -file.
The file, in this case, is the result file that was generated (not the CFG file), which is what
will be analyzed.
As seen, the first line is an enter. Then, D is used for the inquiry. Next, the output is changed
with the greater than sign (>), followed by giving a name to the CSV file. In this case, a zero
is added, indicating that this is with zero rotation. Enter is pressed to accept the description
and the title of the graph. Then, "F" is used for energy delivered. Finally, the option to close
the file is selected. Now it returns to the screen, closing the export; the file has been closed,
and two times "-" are used to quit.
By this, a CSV file with the extension has been exported. This file should be located here:
basic0.csv. This file will be deleted, and the line will be invoked in script mode to ensure
that it runs properly.
It opens the result file, exports the data for the CSV, and then closes it. Here is basic0.csv. If
this file is opened in a text editor, the command used opens all the CSV files. In this case,
there is only one, but it can be used later to open all the files at the same time.
367
Here is the energy delivered for each of the zones. For the whole model, for this particular
orientation, there is 870 kWh per year for this model in terms of heating, with no cooling,
as already known.
There are several versions of this script, the one in the rotate1 file is the simplest.
So by having these three scripts and invoking these three applications on text mode and
script mode, this process can be done. What this whole script does is to do exactly the
same, but it saves the file with different names.
Extract energy 45 is identical to the previous one, but it builds a different CSV file so that
when each of these lines is called, the CSV will be saved with a different name. This is a
rather inelegant way of doing it, but it was done for clarity, making it very transparent what
is being done. At a later stage, a more elegant version of the same script will be created.
Now that it has been understood how to run ESP-r in text mode and in script mode, and
how to build these sorts of files with the commands while understanding them, let's see
how all these things can be called at the same time.
The ones that were just generated will be deleted. This one is not relevant for the moment,
and this one is also not important.
In the file provided for this lecture, there is one text file called "code-improvements," which
documents the different versions of these Python commands that are present here.
368
Pressing enter multiple times is necessary if prompted to do so. Once this is done and
Python is installed on the computer, Python is a high-level computer language that allows
for writing reasonably easy-to-understand scripts as well as very powerful ones.
Here, two libraries are imported, and this library allows issuing commands as if typing in
the terminal. The "os.system" function is calling the operating system and issuing this
command.
Before running the simulation, PRJ is called to remove any result files, ensuring that
previous results do not cause issues. Retaining or deleting them makes it easier to manage
the result files, run the simulation, conduct the results analysis, and extract the desired CSV
files.
If this program is run, a number of CSV files should be generated, showing the energy
consumption for heating for each of these orientations. The model was already rotated a
few times, so the results will be slightly different from those of others.
369
To invoke this program, the Python file and the CFG file should be in the same location. The
program is invoked by typing Python3 followed by the name of the file: rotate_1.py.
This will run the Python code line by line—executing PRJ, deleting the file, executing bps,
and generating the result file for each of these orientations. Energy will be extracted for
each orientation, resulting in CSV files with the correct names.
Each time the file is opened again, an image showing something inside the office will
appear. The terminal displays the simulation being run, and the CSV files being created can
also be seen, such as basic0, basic45, basic90, basic135, and so on.
Although it takes time and knowledge to write this type of code, it is very powerful because
it can be used for other models and allows for much more complex automations than those
demonstrated in this lecture. The idea is not to teach how to rotate models but to illustrate
how powerful automation can be when used properly. Other more theoretical aspects of
automation will be covered in the lecture.
All these images are being closed now. All the CSV files will be opened using the command
issued a couple of minutes ago, allowing access to all of them.
The number of interest, representing the heating energy consumption for the entire year,
is changing substantially, ranging from 900 something to 700, depending on the
orientation of the model. Results will again be slightly different due to the original model
already being rotated.
A spreadsheet can be opened to copy these values manually up to this point, which is what
has been done here.
370
Annual heating demand at different orientations
For each orientation, the energy consumption for the whole year, kWh/a per year, has been
copied, and the orientations and the energy consumption are presented. Some orientations
are significantly worse than others.
This is just a demonstration of how automation can take place. Any other task in ESP-r and
in most simulation tools can be automated. Whatever sort of analysis is being conducted,
if a repeated task is encountered, a way to automate that should be found because it will
be easier to re-run it in case of a change in a feature. It will reduce the odds of error when
clicking and copying, and it particularly opens the door to much more complex analysis.
This is the core element of this lecture, and that will be the focus of the assignment this
afternoon. Another model will be obtained to explore the same workflow.
This file has a problem with repetition in each task, and there is a need to call this line with
all the elements. A few other versions of this Python code may be more interesting and
elegant specifically. The files rotate_2, rotate_3, rotate_model_loop, and code
improvements will also be opened.
In version 1 of the code, which has been used so far in this lecture, the model is rotated 45
degrees, the simulation is run, and the energy consumption is exported. This is the code
that has been used so far. Now, a much more elegant version of the same code that
performs the same functions will be examined, which is the rotate_model_loop.py.
371
Differences between this code and the previous one include the introduction of functions
for each task. There is now a function to rotate that takes a CFG file as an argument, a
function to simulate that takes the names of the CFG and the result file as arguments, and
a function to extract energy.
Instead of the code being copied eight times, it now runs in a loop eight times, using the
CFG file and the desired result file name as inputs. The run number in the loop is used more
elegantly to build the name of the CSV file. Thus, the name of the CSV file used in extract
energy is now derived from this loop number.
A number of lines are replaced by a much smaller, more concise, and elegant description.
Now, these three functions have to be examined for other differences.
Instead of using the os.system call and a text file with commands, a more flexible approach
is now used, where all commands are written using an array like this. PRJ is called as a
subprocess, allowing all these commands to be given as inputs.
The advantage is that, for instance, the result file or the output file here becomes part of
this process, so they can be replaced by the name of the CSV file, for example. Previously,
each text file had to be modified individually.
That's why there are files named extract0, extract45, and extract90—because they contain
a lot of "hard-coded" information. Inside each file, specific information was embedded. For
example, when one of these files is opened, the name is written directly within it. In the
updated version of the code, however, the name used in the extraction is built using the
loop number and passed as an argument to the extract energy function.
372
The out file is used as part of one of the commands, making it look slightly more
complicated, but it actually allows invoking with numbers, strings, and other elements as
input, as long as they are placed in this array in the command.
For those unfamiliar with Python, this might seem a bit more complicated than the previous
approach, but that is not the case.
This is a description of the function, and these are just comments. This array with commands
is the same one that's written in each one of the text files is the M, C, *, B and 45, and so
on. There is a command to join them all in a single element, and this is a way to call PRJ,
just a different syntax and it's in a slightly better way because it allows to handle problems
in a more robust way, so targeting them to files and so on. So this is the end of rotate.
373
First, the result file is removed if it exists. Then, all commands are compiled into an array,
joined, and BPS is called in script mode with the CFG file.
Once these three functions are written, the actual program, when invoked—by running
Python3 with the Python file name—will execute eight times, performing these functions.
374
This approach represents a first attempt at automation.
With these two files, there is a foundation for automating ESP-r. For this exercise, go
through this process with another model or the same one, rotate it, and check if different
results are obtained and if they make sense.
Some useful scripts are available in the scripts folder of ESP-r's installation (bash scripts),
and also in the tester folder of ESP-r source code (bash and Perl).
375
36 Uncertainty analysis
36.1 Exploring a model with uncertainties
36.1.1 Open an exemplar with uncertainties defined
Start prj and select open existing.
In this exemplar, uncertainty is defined in the fie uncertain_ctl.ual, located in the msc
folder. Press ok to open the file.
376
The text feedback shows that two uncertainties are defined. One is related to the control
start, and the other to the heating SetPoint. Both uncertainties have effect over the whole
year.
The text feedback are shows more details about these uncertainties. The start time used in
each simulation may be up to ± 1 hour, while the heating setpoint may change between
simulations up to 1°C.
377
Exit all menus and close the Project manager.
This is only one of the uncertainty cases provided with this exemplar. There are other cfg
and ual files for uncertainty analysis related to climate, materials, and operation, as shown
in the images below.
Once the Integrator Simulator opens, select ok for the cfg file.
The Analysis methods menu appears with options for the uncertainty analysis.
379
Set the number of simulations to 100, and continue with simulations (yes).
cd ../tmp
ls
The Result Analyser module issues a warning about the need for a configuration file.
380
⚠ As results are in the tmp folder, it is necessary to include manually ../cfg/ before the
file name below.
Once results are opened, the text feedback area shows a summary of the simulations.
The Uncertainty Analysis menu shows the options available. Select option c graph
between sets
381
Once this option is selected, the Sensitivity plot menu shows several options. Select b
temperature > a dry bulb (db) temp. > - exit menu
The Result set activation menu shows all runs available for plotting. All are active, so there
is no need to select * activate all sets.
383
Select h heat/cool/humidify > a Sensible heating load. The graph below show the
impact of uncertainties in the power delivered by the heating system.
ESP-r includes formal descriptions of uncertainty for the following topics: 1) thermophysical
properties, 2) layer thickness, 3) weather 4) zone operations, 5) convection coefficients, zone
air volume.
Uncertainties are defined in a three stage process analogous to mass flow.
• One or more distributions are defined. For example, a distribution named might
create if thickness of insulation is of interest [wall_thickness] & [roof thickness] and
identify specific materials to perturb (% or +- absolute increments).
• One or more named physical locations in the model are defined e.g. [facades] &
[roof] each of which are linked to specific zones & surfaces. Thermophysical
properties & layer thickness & zone operations need a zone location. Weather
needs a temporal location.
• Distributions and locations are linked to define one or more uncertainties e.g.
[wall_thickness] + [facades]. The validity of the uncertainty is checked at
simulation time.
When the assessment is run, the following choices become available of: differential,
factorial, Monti-Carlo assessments. For each run a random seed is generated (within the
range +-2.0 and applied to the user defined bounds. The results file includes a base case
plus all of
the separate variants (sets) required.
384
36.2.2 Open an exemplar without uncertainties defined
The next sections describe the implementation of uncertainty in control setpoint.
Select Exemplar, followed by a simple > a zone with convective heating & basic
control
Select m browse/edit/simulate
Select q define
⚠ ESP-r suggests a name (and location) for the uncertainty definition file. The suggested
name above places this file in the cfg folder, not in the ../msc fodler as in the exemplar
explored above. It does not affect the simulation, but this information becomes important
in case the user wish to explore or edit this file manually.
The uncertainty definition menu becomes available. The next sections define the
distribution, location, and link of the uncertainty for control setpoint.
385
Select f ideal controls
Press ok
Press ok
Several sources of uncertainty in controls are available for selection. Select heating SP to
create uncertainty related to the heating setpoint.
386
Give a meaningful name for this distributions. Select ok.
387
Once defined, the new period should be visible in the menu.
Select a heat_setpoin-3C
388
Select a wholeyear
Select yes
Select - exit menu several times and quit the Project manager
Open the file bld_simple.cfg in a text editor and add the line *ual bld_simple.ual as in the
image below.
Models with uncertainty are simulated several times to give ESP-r the chance to test
different input calue combinations. Therefore, they should be called from the Integrated
simulator. Navigate to the folder ~/simple/cfg/ and open the Integrated simulator:
Follow the same steps used to simulate the exemplar and run a Monte Carlo analysis with
100 simulations.
cd ../tmp
⚠ remember to add ../cfg/ in the prompt about the cfg file on the Results Analyser
The graph below shows the heating sensible load in the 3rd day of the simulated period.
A variation around ±10% is seen in the peak load due to uncertainties in the setpoint. This
result can be used to size the heating system taking this uncertainty into account.
390
37 Variants
37.1 Developing multiple models to explore design and operation
alternatives
Users often need to create several versions of a model to investigate particular changes in
input, such as the impact of a new construction for a wall, or the impact of a different
control strategy. One approach is copying the entire model, renaming it, and applying the
required changes. This approach is simple, but it has some drawbacks:
• the whole model is copied to the new folder, while only one or a few files in the
model requires change, and
• if a problem in the original model is identified, copies of the model must be fixed
one by one, leading to a time consuming and error prone process.
Variants in ESP-r provide a straightforward tool to address this problem. Variants create a
new cfg file for each modified version of the model, but the remaining model files are
kept the same whenever changes are not required on them.
The next image shows a comparison of the base file uncertain.cfg (left) and variant
uncertain_clt.cfg (right). It shows that the following differences:
• the uncertainty definition file (extension ual) to be used in the simulation, as the
variant explores a different source of uncertainty,
• the the control file (extension clt), as the base file had no controls, and the variant
requires one,
• the name of the result file to be generated by the simulation, to clearly identify
results from different variants, and
• the connection file (extension cnn) which is always created for each variant, even if
it has no change like in this case.
391
Apart from these changes, base file and variant share all other files and related features,
such as climate file, materials, constructions, casual gains, fluid flow network settings, etc.
In the case of the uncertainty exemplar, a number of uncertainty definition files is
available on the msc folder, as shown below.
All variants share the same model constructions, geometry, and operations, as shown
below.
Select Exemplar, followed by a simple > a zone with convective heating & basic
control
392
Note the name of the cfg file of this model (bld_simple.cfg), in the _Current model_ area
of the menu.
Select j variants
Create a suffix to be appended to the model name. The default text is _xyz, and should be
replaced by text that describes the nature of the variant. This example keeps the default
just for simplicity. Select ok.
Add a description for the variant. In this example, the heating setpoint of the variant will
be changed to 22°C, so enter the text below.
The Model variants menu becomes available. Each option creates dedicated files for that
feature in the model folder.
Select w controls
393
Users may select several options, creating variants that address multiple model features.
In this example, only controls are addressed, so select no.
The variant is created. Note the name of the cfg file in the are _Current model_ of the
menu, indicating the variant created.
394
On the terminal, list the files in the cfg folder (shown below). The newly created variant
(_xyz) is added to the fodler (where other variants already existed).
Users should open the variant of interest from the terminal, not from the Project Manager
interface, such as:
395
396
Source Code
397
38 Exploring the source code
This tutorial explores files available in the ESP-r source code and describes how to find
information within these files.
Open the terminal and move to the Downloads folder and list its contents. There should
be a file such as "ESP-r_V13.3.15_Src.tar.gz" (version number may be different on your
file). Extract the contents of this compressed file.
Folders are organized based on ESP-r applications. Move to the eprj folder to explore the
files related to ESP-r Project Manager.
398
Open the file prj.F containing the start of the Program Manager application.
ESP-r is written in Fortran, a straightforward programming language known for its fast
performance for numerical applications. In Fortran, lines starting with C followed by space
are used for comments in the source code. The first lines show some of these comments.
399
The first lines in the code are dedicated to #include statements, describing other header
files. These files are located in the src/include folder, and list several parameters that are
shared by different ESP-r applications.
This is an example of the contents of the building.h header file, listing the maximum allowed
number of zones, surfaces and others.
Further in the prj.F file, parameters that are relevant only for this program are listed,
followed by their values. Parameters do not change during the program execution.
Common blocks list variables that are shared by several routines in the code.
The source code documentation is uneven, with some points providing more information
than others. For the beginner, navigating this source code can be quite cumbersome. This
is not a major problem, as with some practice, users can easily infer the meaning of most
parameters, variables and common blocks based on their usage in the code.
After many lines with variables' definitions and checks, around line 1200, the menus that
are seen on the prj application start appearing in the source code.
400
401
38.2 Searching the source code
While it is possible to read the source code, line by line, often users are interested in one
particular element regarding one feature of the program (for example, convection
coefficients). The Unix command grep can be used to browse through a number of files
looking for a specific pattern.
402
• -R, use all subfolders and files, and
• ./src/*, to restrict the search to the source code folder.
There are many other flags and patterns that can be used with the grep command, which
are not explored here.
This command lists in the terminal all occurrences of "convection coefficient in the source
code. In many cases, it is useful to store the results of this query into a file (such as convc.txt
in the example below).
After using this command and opening the file using gedit, the list of files and line numbers
where the term appears (as in the example below) can be scrutinized to identify relevant
points. For example, the first line shows that the file convect2.F has a routine called HTCEXT
that calculates convection coefficients for exterior surfaces.
Another way to find relevant parts of the code is by using grep to search for expressions
seen in ESP-r interface, as the interface is directly linked to variables and subroutines related
to the each part of calculations.
For example, grep can be used to identify the file containing the expression "self testing"
seen in the first menu of prj.
403
The results show that this menu item is handled by the file prj.F, in line with the exploration
done at the beginning of this tutorial. It also indicates where the self testing calculations
may take place and where help information is stored (esruprj.help).
Grep is an important command to navigate millions of lines in ESP-r source code and find
relevant entry points to particular topics.
The file convect2.F has three routines, including HTCEXT. Use ctrl+F to navigate to the
part of the file where this routine is described.
This routine calculates convection coefficients for exterior surfaces, and it shows the many
models implemented in ESP-r for external convection. Reading the source code has
significant advantages over having a user manual, as it describes how the calculation is
actually done. In this example, the routine shows indexes pointing to different heat transfer
correlations implemented (15 in total).
404
For each empirical correlation, details of the calculation can be seen in this file. The image
below shows the calculation according to the MoWitt model. In this example, the transfer
coefficient (HC) for windward surfaces is calculated based on the temperature difference
between air and wall (to account for natural convection) and also based on the wind speed
(VF) to account for forced convection.
405
39 Editing the source code
This tutorial shows how to modify and compile the code.
The first one is to see from which location ESP-r is currently running (where it is installed),
and it can be done by using the command 'which'.
This is important because when ESP-r is compiled, what is contained in this location will be
overwritten. The next step is to move to this particular location by using the command
cd /opt/esp-r
By having a look inside this folder it can be seen the whole range of folders with the binary
files, executables, databases, climate files, everything that comes together with ESP-r.
Before doing any new compilation of ESP-r, it is essential to move all of this to a new folder
in such a way that if needed it is possible to delete the new compilation and return to the
previous one.
The command ‘move’ needs to be invoked as a super user ('sudo' command) (so it is
possible to move it), followed by ‘esp-r’ and the file name where it should be moved, in this
example ‘esp-r-original,’ and the user password should be inserted.
ESP-r is not in the starting folder anymore: if tried to open it by typing ‘esp-r’ in the
terminal, it shouldn't open because it will look for opt/esp-r and this folder no longer exist.
406
The compilation is going to take a several minutes, as esp-r will install each one of the
training models.
After the compilation is concluded, the screen should look similar to that showed in the
following picture.
If everything goes right once it's done, type ESP-r and the computer will have ESP-r again.
Check by going to /opt/ and show the folder content (ls) that there are two different
versions of ESP-r, the new one and the original.
First, move to the Downloads folder, then to the folder where the source code is available.
Using grep, search for the CAD tool (probably not many instances of ‘CAD tool’ are written
in ESP-r) by using the command
The interested line is available in the file ‘prj.f’, and to open it type the command
407
gedit ./src/eprj/prj.F &
Use the command ‘ctrl+f’ to look in the file for the word ‘CAD’ and change the line by
adding for example ‘test compilation’.
Attention is needed to be paid because there is a limit on the size of this string.
Since this is an attempt to change the ESP-r source code for the first time, is better not to
change any of the calculations but change something that is cosmetic.
Save the file and in the same folder recompile the code. In this case there is no need to go
through the entire process of compiling all the executables and the libraries and so on. It
can be therefore used the option
which only re-compiles the application prj (should be faster). There is no need for the
databases, nor the training models, but it is important to answer yes to the question about
proceed with the installation.
It will ask again for the password and the question mentioned previously. This time there is
no need to install databases and training models because are already installed.
If everything went right there is a new PRJ now, that's based on the modified file. Write 'prj'
in the terminal to invoke it. As it can be seen, now in the ‘model management’ menu there
is the option 'n cad tool test compilation' just added.
The new executable that is running now is no longer ESP-r as it's distributed, but it is a
modified version. The text added as example can be removed.
408
A more challenging example can now be done. In the previous tutorial it was shown that
ESP-r has a number of heat transfer coefficient equations for external facades and one of
them is the default one. The goal is now to change the default equation of ESP-r. The paper
that is provided recommends some other equations as the default ones; it can be
interesting to check how these can eventually be modified in ESP-r.
To make sure everything results as said, it is better to delete the basic folder and then start
ESP-r. In the program, click option d) open existing, choose exemplar and click simple and
then option f) multi-zone, proceed and copy the model to the basic folder.
Run a simulation of the model as it comes (integrated simulation, automated) and check
the results in terms of energy delivered to have a reference of what is the result at this
moment (42.0 kWh). To keep track of this value, write it in a file.
Open the file created in the last tutorial with the information regarding the convection
coefficient: the calculations of the convection coefficient are done in the file convect2.F,
which is worth a further investigation. To do that, use the command
In order to see who calls this function, it can be used again the command ‘grep’:
Line 6 shows that the subroutine is called by convect1, which is then analysed.
This can be a time-consuming process, but it's rewarding in the sense that it can actually
interact with the way the calculation is done in the source code.
In the file, browse for ‘call HTCEXT’. As written in the text file, these words are in line 134.
409
The line above it gives a very crucial piece of information: ‘icor’ is the name of the
correlation that will be used. There are 15 options and now the default is being used all the
time. The goal is to change the way ‘icor’ is defined. Apparently ‘icor’ is coming from
another variable which is ‘icorexhct’, so it can be used again the function grep and by an
iterative process it is possible to find information about the way the source code works.
By opening the text file, it can be seen that it is called in many locations.
At the location bps.F there is a line that says that icor is equal to 1 and this is very likely the
place that defines that the correlation 1 (MacAdams) is the default correlation in ESP-r.
There are other places where the default icor could be defined, for example simcon.f. Before
opening the bps, open this file to have a look at its contents. Search for ‘icorexhct’ and go
in the position where it is called.
In this part of the file there is a menu with the name of different things and something
about toggles. In ESP-r there is a place for toggles: to see it run in ESP-r an integrated
simulation in interactive mode. Initiate the simulation without preserving results. One of
the options in the menu is the ‘simulation options’, which is what is being mentioned in the
410
code. When opened, many options are presented, and amongst these there is one about
convection methods for external facades (t). By open its link, it can be found exactly the
menu saw in the code, therefore the information for the menu in the program is coming
from the analysed file.
From here it can actually be selected the correlation that will be used; now this is the icor
= 1, the default method of ESP-r which is MacAdams, but another one of those mentioned
in the paper can be used.
The aim of this exercise is to run a simulation with the second expression, that is suitable
for low-rise buildings. Select the option B (icor = 2, which is MoWiTT), accept the
implicitness degree given, exit the menu and commence the simulation, say yes to continue
the simulation and save the results. Now in the results there should be a different energy
output because of the change in the way convection is taken into account (energy delivered
= 42.5 kWh).
The correlation coefficients can therefore be changed by looking at the source code,
browsing through different parts of it and eventually find something in the interface that
will allow to do that. Browsing the source code is composed of: search where there is
interest, find a new keyword and what is the function that's calling this, analyse this other
piece of code and so on. In the beginning, it will take more time, but after getting familiar
with it, it can be navigated through the code reasonably well and find what is wanted.
To impose to always use equation 2 as the default equation, change in the source code file
simcon.F the line regarding icor = 2 ‘MoWiTT low rise hc (default)’, which is the one for high
rise buildings. For the aim of the exercise it will be supposed to have this one as the
recommended one.
411
It is also necessary to change the other line ‘icorexhct = 1’ which is located in the BPS file,
as it can be seen from the previously created file ‘icorexhct.txt’. BPS is the main integrated
simulator which defines this default.
The value assigned to ‘icorexhct’ is then transferred to ‘icor’ in the file convect1.F (shown in
the following picture), where the function calls the other function ‘HTCEXT’ (defined in the
file convect2.F) using the icor provided in the simcon.F file.
By changing that number to 2, this whole sequence instead of leading to one will lead the
icor to 2.
Now in the bps.F file change the default icorexhct from model 1 to model 2, and in the
convect2.F file rewrite the information line by saying that now is icor = 2 the default. The
first one is the change that will actually make a difference, the second is only for the purpose
of documentation.
Save the two modified files and recompile the integrated simulator. This is no longer a
matter of the interface PRJ, but on the simulator BPS that is actually defining this default.
It is needed to recompile BPS, after closing all the files and application from ESP-r, by typing:
The flags used in this command make sure databases and training models are not installed,
and also reuses previous compellation files and adopts all defaults.
412
The command below shows all flags available in the Install script:
sudo ./Install -h
Now BPS is being compiled in such a way that while it runs it will use the variable for the
correlation icor = 2, which is passed in convect1.F and then eventually to the called function
defines which one of the correlations is being used in the file convect2.F.
Another change that can be done is modify the coefficients in the equations presented in
this file, or even replace an entire model or add a new one (would be icor = 16).
Now there is the knowledge and skill to change a small fraction of the code: a very clear
target is needed, and the code will be navigated to find it and define ways to verify if the
change is working properly.
After the BPS installation is completed, the result should always be 42.5 kWh and not
anymore 42.0 (the original one) kWh, for the model taken into account.
Next step will be to go back to the home folder, move to cd basic/cfg, and start PRJ with
the cfg file ‘bld_basic.cfg’.
It might be better to write a note in the text feedback which says that it is a modified version.
As a simulation is run( can be integrated because it uses all the defaults) and check the
results, the energy delivered will be 42.5 kWh. Therefore BPS is running with icor = 2 (The
MoWiTT equation) and the default transfer coefficient equation for external surfaces has
been modified correctly.
If it feels like modifying other elements of the code or understanding in a better way how
this is done in the code, there are the tools to - with proper time, patience and the necessary
understanding - to go through the code and find the places where it is needed to modify
them.
413
Add the text below to the code to print the value of ICOR to the terminal during runtime:
Now there is no ESP-r available in my system, neither of the two would actually run ESP-r;
there is the original one with the original transfer coefficient and the new one with the new
default. The next step is to move ESP-r-original to ESP-r.
At this point ESP-r is as it was at the beginning, and can be used as usual. Is the original
version that will run, not the modified one with a different transfer coefficient.
There are other ways to do this management, but to keep things reasonably simple it can
be done by just managing the folders.
414
40 Debugging
When ESP-r crashes or shows unexpected behavior, it becomes necessary to find the line(s)
of code responsible for the problem.
This page describes some tools that can help new ESP-r users/developers in this task.
40.1 Errors
40.1.1 Reproduce the error
It is not unusual that problems reported by users are not in fact bugs, but issues in the way
ESP-r is used in a particular problem. Therefore, before trying to solve a bug, make sure it
can be reproduced using one or more exemplars.
Also, check the ESP-r Community Discord page to see if the error has not been reported
before (Join us on Discord).
415
To reproduce this error, use this sequence of commands:
40.2 Debugging
40.2.1 Identify the area of the code where the error occur
The following steps may be used to identify the problem in the code.
One way to locate the part of the code responsible for the error is to use grep and search
the source code for strings in the user-interface close to the occurrence of the error. In the
example below, the last line of the user interface is used in the search:
The image below shows grep results. It is clear that the file edgeo.F in the eprj folder of
the source code is a good starting point to identify the cause of the error.
416
The image below shows the part of the code identified in the grep command (line numbers
are provided in green in the grep result above). It is a large piece of code, and the error
may be in any part of this if statement, of in one of the subroutines called. THe next section
uses the debug option to identify the line where code fails.
After the compilation, reproduce the error. The terminal should show additional
information about the error, as in the image below.
417
The debug option shows the files of the code involved in the error, as well as the lines of
the code where the error occurred. Notice that the edgeo.F file is in the list, and the error
is listed on line 1499. The image below shows the line, indicating that it calls the subroutine
EDOBS, so the bug is not in edgeo.F itself. The image above also shows that the error in
edgeo is followed by an error in the file edobs.F (line 231).
Open the file edobs.F. The image below shows the part of the code around line 231.
In the image above, the line indicated in the debug message is related to the subroutine
redraw.
Up to this point the procedure for the identification of bugs described above can be
reproduced for any bug. However, each bug is unique and understanding the nature of the
418
bug helps identifying the actual problem in the code. In this particular example, it is very
likely that this is the cause of the bug, as the code is able to redraw when ESP-r is on graphic
mode, but it crashes if there is an attempt to redraw when in text mode.
Save the file, recompile the code, and reproduce the error. the image below shows the
terminal response, indicating that the problem does occur in the line with the call to the
subroutine redraw.
A more elegant solution would be placing an if statement before the redraw call, only
executing it if ESP-r is in graphic mode. This would, of course, require further research to
identify which variable in the code holds the graphic-text-mode status. As solving the bug
is a case dependent problem, there is little gain on demonstrating it here. hence these
solutions are not addressed in this tutorial.
The next section of this page describes a way the quick_rebuild flag, which can facilitate
the work during code development.
419
When debugging, it is often necessary to recompile the code several times to test
different solutions, and in this conditions the compilation process can become time-
consuming. During compilation, the Install script produces a number of object files, where
compile code for each fortran file is stored. The Install script deletes all these files at the
end of compilation to save space, but it is possible to keep them and reuse them in future
compilations, greatly increasing the compilations speed.
Before recompiling the code, look at the contents of the source code folder eprj (see
image below). There are only Fortran files in this folder.
After compilation, the eprj folder should show a number of object files (O File type). From
now on, any recompilation of prj becomes much faster, reducing debugging time when
multiple successive compilations are needed.
⚠ In the debugging process, some fortran files are certainly modified. When using the --
quick_rebuild flag, it is essential to delete the object files for the modified fortran
files. This forces the Install script to recreate the object files using the modified version of
the source code.
420
Once the debugging process is completed, remove the flags:
• --quick_rebuild, and
• --extra-debug.
Rebuild the executable with no debugging instructions and removing all object files after
compilation.
421
41 Validation
41.1 Self testing
ESP- has gone through extensive validation (e.g. Strachan et all 2008). Part of the
validation models is available for testing on the first menu of Project Manager.
41.2 BESTEST
This menu shows two options, the first dedicated to simpler tests related to conduction,
and second covering models of the International Energy Agency building energy
simulation test (BESTEST) and diagnostic method.
Select b BESTEST.
422
BESTEST results were incorporated into standards such as ASHRAE 140, and while this
validation exercise took place decades ago it is still considered one of the most relevant
and comprehensible ones in the field.. There are several tests covering different elements
of energy modelling.
423
The simulation is then carried out and a summary of the test is shown in the text feedback
window, indicating the results obtained for annual energy demand heating and cooling
(first lines), and for peak power for heating and cooling. Four values are provided for each
metric: the first column shows results obtained by ESP-r , the second and third columns
show the minimum and maximum values accepted by the BESTEST, and the last column
shows results obtained by ESP-r when the BESTEST was developed in 1993.
424
PART 2
res - the result analysis
application for ESP-r
ESP-r is a suite comprising several applications, and res is the one dedicated
to result analysis. It provide several tools to analyse results and export parts
of the data set to analysis by other tools. This document aims at providing a
detailed account of all res functionalities.
425
426
Starting res
427
42 ESP-r result files
42.1 ESP-r result files' names
Understanding how result files are generated and named is essential to use res. ESP-r
models may include one or more calculation domain (e.g. thermal, airflow, electrical),
therefore some capabilities of res are only available if the model used in the simulation
addressed that particular domain. For example, fluid flow network results, such as pressures
and calculated flow rates, will not be shown on res unless the model used in the simulation
includes a flow network.
Each calculation domain generates a separate result set that is stored in a dedicated file.
The name of this result files is shown on prj before the simulation, as part of the Simulation
Controller menu, in the simulation presets area, as shown in the image below.
The example on this image shows that only the thermal domain will be calculated in this
simulation, indicated by the option h zone results: Results for the thermal domain will be
stored in a file named bld_basic_win.res. Other domains are marked as N/A, indicating
they are not available for calculations.
428
File extension .res usually is associated with thermal domain results, but users can adopt
any arbitrary extension or even have a file with no extension and res will still work properly.
Other extensions are associated with each domain, and prj automatically suggests
adequate extensions when these domains are available in the model.
ESP-r simulator, bps, has functionalities to generate some result files in XML format. These
XML files can be directly opened in a text editor and are not meant for use with res. See
note on result save level 5 in the next section for more information on XML result files.
On prj, the result save level is indicated in the Simulation controller on the simulation
presets (as shown in the figure below).
429
The following levels are available:
430
In the following pages/chapters of this guide, each section indicates which exemplar
model and result saving level were used to generate results shown in the figures.
If the users chooses to preserve the results, a second prompt is presented (see image
below). It stresses that multiple results sets can only be stored in a single .res file if they are
based on the same model cfg file (as indicated in the help window).
In res, result files with multiple result sets will have the option 2 in the Module menu
available (see image below). Using this option users can select which result set will be
shown. For most functionalities on res, only one result set can be visualised at a time.
431
Files with multiple datasets will also prompt the user to select one of them when res opens
the file (see image below). In this example the first set (a) has results for the base model,
while the second set (b) has results for a model variant 1 (the name of both variants are
defined by the user when he invokes each simulation.
Example of result file with 2 datasets (note options in the menu as well as summary in the
text feedback area)
432
43 Starting res using the command line
43.1 Different ways to start res
As other application in the ESP-r suite, there are several ways to invoke res. This section
describes the ways to start res using the Ubuntu terminal.
res
Starting res with no arguments is not advisable, as the user will need to type the name of
the result file on the interface as soon as the program starts. ESP-r does not offer
functionalities to browse through folders, so the user needs to know in advance the exact
name (case sensitive) of the result file to be used in the analysis. res assume the file is
located on the same folder from where it was invoked. It is possible to use relative paths
from this folder to indicate files located elsewhere.
All res screens have a help function indicated by ? (as in the image above) or by ? help (in
most menus of res). This help is contextual, offering information concerning the options
available to the user at that particular moment. The help function opens a window over the
feedback area of res, and it may offer valuable information for users. The image below
shows the help for the first res screen, indicating the existence of sample result file. Click
Dismiss to return the dialogue area.
433
example of res help function
The option d in the images above indicates the default option for a res prompt. Pressing
this button leads to the prompt shown in the image below. The default option in this case
points to a sample file located in the ESP-r installation folder. Users can accept this file if
they wish to explore some typical results for the thermal domain. There are no default
results for other calculation domains.
• identify the folder holding the model (in the example below is the ~/basic folder)
• navigate to the folder where result file(s) are located (usually the cfg folder of the
model),
• list the result files available and choose the adequate file (in the example in the
image below is the bld_basic_win1.res), and
• start res using the option -file as shown in the figure below.
ls *.res
434
res -file <name of the result file>
Pressing ENTER on the keyboard corresponds to clicking on the button ok on res graphic
interface; however, the key ESC has no effect and does not correspond to the cancel
option.
⚠ The message "Error opening session log!" in the text feedback area of res can be
ignored, as it does not affect res functionalities.
Using the -file option has clear advantages, as it brings the name of the result file to the
first screen of res and the user only needs to press ok to proceed with the result analysis
using that file (as shown in the image above). The -file option is the recommended way to
invoke applications in ESP-r.
Press ok to proceed.
The image below shows the first screen of res with the module options.
435
res Module option screen
• the number of data sets in the result file (in the case above there is only one);
• the control file used in the simulation (bld_simple.ctl, where the last two
characters of the file name are omitted by res for brevity);
• The start (day 9 month 1) and end (day 15 month 1) of the simulation;
• The number of time steps per hours (in this case, 2, i.e. each time step has 30
minutes);
• The value for a "average flag", where the default 0 (as in the image above)
indicates results are averaged over the hour;
• The number of the simulation preset used on prj to invoke the simulation (in the
example, preset number 2 was used);
• A flag if solar radiation data in weather file hour-centered (0 as in the example
above: this is the default) or half-hour centered (1);
• And a note provided by the user who performed the simulation (in the example
"Result bld_simple").
The text feedback area will also show if all zones are considered for output. The user can at
any point select particular zones for output on res.
436
The simulation period ( output period: 00:15 on 09/01/67 to 23:45 on 15/01/67). ESP-r
considered time 00:00 of the first day of simulation results as part of the initialization and
data for this time-step is not included in the result file. As the time-step in this example is
30 minutes, and the average flag is ON, ESP-r shows results for the first time-step at 00:15
(i.e. the average of results on 00:00 and 00:30). The next results in this dataset will be for
time 00:45, 01:15, 01:45, successively. Averaging results smooths the results and reduces
the impact of spurious results in the simulation. Averaging results is also useful in some
comparisons with experimental data, as some sensors take readings at high frequency, but
only store an average value at longer intervals. If the average flag were OFF when the
simulation was carried out, the simulator bps would have written a different set of results
in the res file, and the output period in this example would be 00:30 on 09/01/67 to 24:00
on 15/01/67, with results reported for the exact time of each time-step.
The last field in the feedback area when a file is open indicates the number of time-steps
reported in the output shown by res. If this number is greater than 1, res skips some time-
steps when generating graphs and reports (the larger the number, the more time-steps are
skipped by res). Displaying results in simulations with short time-steps (e.g. one minute)
requires considerable computational power, and users may choose on res to display only
one out of each n time-step results available in the file to speed-up res execution.
res prompt the user to provide the result file name (image below), similarly to the
behaviour seen in graphic mode.
437
invoking res on graphic mode with no arguments
In text mode there are no options to cancel or use a default file when res is invoked. If the
user wants to terminate res at this stage it must do so by killing the process pressing:
ctrl + c
⚠ Do not use ctrl + z as it stops the process but keeps the process paused and using
computer memory.
In this case the user only needs to press ENTER to proceed using the currently used result
file.
438
Press ENTER to continue.
The image below shows the first text menu of res in text mode, with the same module
options seen in the graphic mode.
res -help
The image below shows the options available, where the arguments -mode (text, and the
default mode graphic) and -file were covered above. The other options will be covered in
other sections of this document.
439
res options in the command line
440
44 Starting res using ESP-r Project Manager prj
44.1 Running a simulation with simulation presets on prj
Before running a simulation, make sure simulation presets are enable in the simulation
controller menu, and make sure the name of the result file is specified (see image below).
This facilitates calling res from prj as the name of the result file will be passed by prj to res.
When a simulation is started from prj using option q integrated simulation, the user is
asked to select between interactive or automated simulations (see image below).
Automated simulations adopt default settings for all settings available in ESP-r Simulator
bps, and produce result files for thermal and air flow domains (but not for other domains,
even if they are enabled in the model).
Result files from automated simulations are placed on the cfg folder.
Result files from interactive simulations are placed on the tmp folder.
441
44.2 Start res on graphic mode
From the Browse/edit/simulate menu on prj, use the option t result analysis to start res.
res will open on a separate window, and prj will remain open as well (see image below).
prj and res can still be open independently from this point.
442
res assumes the file is on the cfg folder, so if an automated simulation was carried out
from prj the user can click ok (or press ENTER) to start the result analysis.
The user can prevent this problem by adding ../tmp/ before the name of the file (as in
the image below).
443
multiple simultaneous res sessions on Ubuntu
On Ubuntu, invoking res from prj on text mode opens a new window for res (see image
below).
444
starting res from prj on text mode on Ubuntu
On Ubuntu running on WSL, the OS has no means to open a new terminal window and an
error message is presented:
Starting res
445
45 Main elements of res graphic interface
45.1 ESP-r Result Analyser areas
res has four main areas on its interface (see image below).
446
example of dialog with no text input
The dialogue area may also show a field for text input, such as a file name or the value for
a parameter (see example below). In this case, any character pressed on the keyboard will
be included in the text field. The option ok is usually mapped to the ENTER key, Copy and
paste functions, as well as keys DEL and ESC do not work on input text box in the dialog
area.
✔ In most text input dialog boxes, blank characters before and/or after the text entry are
ignored by res.
447
example of output in the graphical area of the interface
It is possible to control the aspect ratio of plots by resizing the main res window, as in the
two examples below.
448
example resizing res window to plot narrow graphs
The text feedback area has a scroll bar on its left side (click on the bar or drag and drop
the slider). The mouse scroll button and the Page Up and Page Down keyboard options
do not work in the text feedback area.
449
45.2 res interface buttons
There are 5 buttons always visible on res interface on graphic mode (see image below).
Once the user presses ok, the capture button is highlighted (see image below). The user
must click on any point of the interface (the red rectangle in the image below) to
450
conclude the capture process and write the image to the gif file. If a file with the chosen
name already exists, res will overwrite the file, erasing its previous contents (no warning is
given by res).
capture image button activated - click on any point of the interface to complete capture
process
User can also capture parts of res interface using OS print screen capabilities available on
Ubuntu and Windows.
451
The font button opens a window with functionalities to increase or reduce the text size in
menus, text feedback and dialogues (see image below). Options need to be selected
using the mouse (no keyboard input is allowed for font sizes).
Once an option is selected, the change in text size is implemented and the window
disappear. It is possible to repeat the operation to further increase text size one more
time (see before and after example in the image below).
452
menu text size example
Dialogue text size must be modified before a dialogue option is shown. Do not attempt to
resize dialog text when there is text shown in the dialogue area, as the text will disappear.
Starting res
453
46 Module Options
46.1 Main res menu
The two images below show the options in the first menu of res in graphic and text mode.
res menus are usually divided in three sections. In this particular case, they are:
This page covers in detail the upper and lower sections. The middle part is addressed in
the following chapters and pages of this document.
454
Module menu in text mode
When the define output period option is chosen, the users is prompted with a number of
successive dialogs in the dialog area. Firstly, the user should provide the starting time for
plotting (see image below). Hour 1 is defined as the period 0h00 to 1h00, and hour 2 is
defined as the period 1h00 to 2h00, etc.
⚠ This dialog, as many in ESP-r, do not have a cancel option. If the user no longer wants
to set the output period, it is often possible to go through the sequence of dialogs
accepting the suggested values (just pressing ENTER until return to the original menu
option selection). It is also possible to close res and start it again.
Values should be integers and separated by one or more blank characters. Commas can
also be used to separate day, month, hour values.
455
res will check if values are valid and will show an error message for values with decimal
places, or unrealistic values such as the ones in the image below.
res will not check in the output period dialog if the chosen start and end periods are
within the time covered in the result file. If the user selects a starting time not covered by
the results, res will only show an error message (like the example in the image below)
when the user tries to plot graphs of generate reports based on that output period.
error when trying to generate a graph for an output period not covered in the results data
set
If the error shown in the image above occurs, res may behave inappropriately as in the
example of the image below, where an endless loop is presented and the user can only
press continue multiple times, generating new errors at each attempt. In this cases, it is
better to close res window and start res again. The result file(s) will not be corrupted by
this operation.
456
error in user input leads to a loop in res - closing the application is advisable
Once the user defines the start time, res shows a similar dialog for the end time selection
(as in the image below).
In case the user selects an end time falling before the start time, the following error
message is presented:
The default option d for start and end time does not offer reliable suggestions (see image
below) and should not be used.
Once the user defines the start and end time, res shows a dialog for the selection of the
output time-step increment (discussed in a previous session). This value indicates the
457
number of time-steps reported in the output shown by res. If this number is greater than
1, res skips some time-steps when generating graphs and reports (the larger the number,
the more time-steps are skipped by res). Displaying results in simulations with short time-
steps (e.g. one minute) requires considerable computational power, and users may
choose on res to display only one out of each n time-step results available in the file to
speed-up res execution.
⚠ Sometimes, the output period option does not respond correctly. Closing and
restarting res will fix this problem.
In the example below, the result file has data for three thermal zones.
When a zone is selected by the user, this will be indicated by an asterisk after the zone
name, as in the image below.
458
Clicking again (or pressing the corresponding menu letter) in a zone previously selected
will remove the zone from the selection. The text feedback window provides an update on
the addition and removal of zones from the selection (see image below). The dialog area
brings instructions about what the task, indicating that one or more zones may be
selected.
✔ In ESP-r, the option "- exit menu" is often used to accept the selection and return to the
previous menu.
Text feedback and dialog for the building zone selection option
• Silence (default)
• Summary
• Detailed (very comprehensive, see image below for a partial display of the report
generated)
If the report level is changed, it is possible to reload the result file and force res to show
the requested information in the feedback text area.
459
Example of detailed report about the model, shown by res when a result file is opened
46.1.6 * preferences
The preference option gives access to 3 distinct functionalities.
460
a Display format for date. The following options are available:
• 10/01/21
• DOY 10 (Day Of Year)
• 10 Jan
• Fri 10 Jan
• 10h00
• 10.00
• 0.41666 (i.e. 10/24).
d Recording-of-picks. This option opens a dialog to enable the recording of user actions
on res, to facilitate scripting tasks. This option does not seem to be working properly at
the moment, as no file is generated.
46.1.7 ? help
This help is shown here just to show the pagination used in ESP-r help functions. The
buttons with arrows in the lower part of the image below allow users to navigate through
long help messages.
461
res main menu help - page 1
462
Graph: Parameter plot
463
47 Graph types
The option a graphs in the Module option menu opens the Graphing options menu. The
upper section shows the same functions seen in the Module options menu, apart from the
result file option that is no longer available in this menu level. In ESP-r, menus are nested,
so each option of one menu leads to a deeper new level of menus with new options.. Users
can always return to the previous level using the last option in each menu (- exit menu).
The following pages/chapters cover each one of the graphing tools provided by res
(options a to f in the menu).
464
48 Parameter plot menu
The image below shows the Parameter plot menu. The upper section shows the same
functions seen in the previous menu.
The middle section of the menu (from a to p) shows a number of variables and input
parameters that are available for plotting. Note that options will only work if the
corresponding domain was included in the simulation. For example, res will not produce
plots using the option o CFD metrics unless the model has a CFD domain set-up and
enabled in the simulations. In general, options a weather to j casual gains are available in
most ESP-r exemplar models. This page will use these more common options to
demonstrate how res generates graphs, and how the options in the lower section (from >
Display to - exit menu) affect plot generation and the appearance of plots. Each of the
middle section options will be described in detail in the following chapters and pages.
465
48.1 Plot generation method
The graphing tool of res has a particular workflow to generate a plot, where the user:
The process to select variables for plotting is explored below using some variables as
examples. Each variable available for selection is treated in detailed in the next pages of
this chapter.
Left menu has no variables selected (see blank space above > Display to, while right menu
has variables selected for plotting
466
For demonstrations purposes, select the outdoor temperature for plotting using the
commands below.
a weather (to select climate variables for plotting. a new menu will open and show these
variables, see image below)
a dry bulb temperature (in the clm menu, where clm is the abbreviation used for climate
used in ESP-r. An asterisk appears on the left of the select variable)
- exit menu (to exit the clm menu and return to the parameter plot menu)
Once this variable has been selected, the q edit selection becomes available. Click on this
option (or press q) to open the Metric selection menu (see image below). This menu shows
the currently selected variables. and users can unselect variables by clicking on them (or
pressing the corresponding key on the keyboard). Select - exit and activate changes to
leave this menu and return to the parameter plot menu,
Menu showing selected variables for plotting - click on the variable to unselect it
Once a variable is selected, it is possible to plot the graph using the option ! draw graph.
The figure below is plotted.
467
Example of parameter plot - outdoor air temperature (°C)
One more time, for demonstration purposes, select the air temperature inside the thermal
zones of this model using the following commands:
b temperatures (a new menu will open and show several options of temperature for
plotting, see image below)
a dry bulb (db) temp. (to select the indoor air temperature for all available thermal zones
. An asterisk appears on the left of the select variable)
- exit menu (to exit the temperature metrics menu and return to the parameter plot
menu)
468
Use the option q edit selection to inspect the updated list of available f selected for
plotting. (see image below with 3 new variables corresponding to the thermal zones in the
result dataset). Select - exit and activate changes to leave this menu and return to the
parameter plot menu.
Menu showing selected variables for plotting after new variable was added to the selection
Use the option ! draw graph redraw the graph and figure below is plotted.
469
Example of parameter plot - outdoor air temperature and indoor temperature in three
thermal zones (°C)
The vertical axis range is automatically updated by res to handle the new dataset. Line styles
and colours (for lines and labels) are automatically assigned by res and cannot be modified
by the user.
It is possible to plot variables with different units in a single graph. For demonstration
purposes, select the energy demand for heating required by the thermal zones of this
model using the commands below:
⚠ Upon selection of option a, the Load choice menu closes automatically instead of
showing the selected choice with an asterisk. The option - exit menu is not used in this
menu. The behaviour of menus in ESP-r is not always consistent, but it does not affect the
use of the program.
470
Energy demand variables available for plotting
Refresh the graphical area to account for the new selected variable using ! draw graph.
The image now shows a secondary axis on the right side dedicated to the power values
related to the heating demand.
Example of parameter plot - various air temperatures (°C) and energy demand for heating
in three thermal zones (kW)
471
Menu showing selected variables for plotting after some variable were unselected
Use the option ! draw graph to refresh the graph, producing the image below.
Example of parameter plot after some variables were removed from the selection
✔ you can also use the option 4 building zones to only display results to a few particular
zones.
Use the option / clear selection to remove all variables from the selection. The option q
edit selection is no longer available on the menu, indicating that no variable is selected
for plotting. Leaving the parameter plot menu and returning to it has a similar effect.
472
Regular res users should not use this option. It is available for developers of res, as it writes
a text file with the instructions used by the graphic library to plot the graph.
If > Display to >> is changed to file, the dialog box below is presented.
Once the user inputs a file name (or accepts the suggested one), the text feedback window
will indicate that the file has been open. The file is located in the cfg folder of the model.
Feedback text indicating the file was opened and graphics are now channelled to the file
From this point on, every time the option ! draw graph is used, res will produce the
requested graph in the graphical area of res, but it will also write the instructions for this
graph in the text file indicated by the user (the image below reproduces a sample of part
of this file).
473
Fragment of a sample text file with plot instructions exported by res
When the option >Display to >> is used again, the file is closed (as indicated in the text
feedback area - see image below).
474
The default option indicates data will be plotted as they are in the result file, i.e. as time-
series of temperatures, energy demand, humidity, etc (see example below with heating
energy demand plotted using the option parameter).
Integrated is meant to provide results for energy over time. ESP-r does not calculate energy
(kWh), but instead it calculated the power (kW) required to keep the thermal zone at a
certain set-point. Energy results are calculated by res by multiplying power data available
in the result file by the length of the time step. This option, however, does not produce
clear graphs in res and it will not be exemplified here with an image.
Parameter rate of change plots the difference between values for consecutive time-steps
divided by the length of the time-step. This type of plot is exemplified in the second image
below where the times of maximum increase or decrease in power can be easily identified.
Note that the unit is kW/h, i.e. the variation in power (kW) per unit of time (h).
475
Plot using the rate of change option for % data as
476
⚠ This function does not seem to be working correctly and may freeze res when
activated, so its use is not recommended.
48.3.5 * label
This option allows:
When invoked, it will prompt the user to define a title for the plot (see image below).
Blank titles are not allowed.
477
The user can choose cancel to return to the parameter plot menu; the plot title will be
automatically updated (see image below).
If the user selects add/edit in the previous dialog (Graph label options), a new dialog is
shown allowing the crating of custom text labels in the plot (see image below). The user
should enter the text, press ok, and then pick the point in the plot where the label should
be introduced. Blank labels are not allowed.
In the example below, the custom label was placed close to the highest temperature
value.
478
Graph with user-defined label and dialog for additional labels
It is possible to edit the text and position of previously created labels, and it is also
possible to clear all custom labels. In this case, it is necessary to force res to redraw the
graph (using ! draw graph).
This concludes the general functionalities of the parameter plot menu. The next pages
cover the variables available for plotting.
479
49 Assessment period and display period
ESP-r is able to run simulation for multiple years in a single run, but most often it is
configured to run simulations with assessment period up to one calendar year, and in many
examples a much smaller period is used.
The section Module Options described how to control the output period for display on the
results Analyser. It is important to stress that the period covered in the simulation
(assessment period) is defined on the Project Manager or in the Integrated Simulator before
running the simulation. The figure below show the Project Manager Simulation controller
menu for the exemplar model (a simple > e ... multizone with convective heating &
basic control). This model is configured to simulate only one week in February (option g).
Using these settings produces results such as the figure below. This is the setting used in
most of the next sections to present the Results Analyser capabilities, as it makes easier to
observe daily patterns and discuss result analysis alternatives.
480
It is possible, however, to change the assessment period in the Project Manager Simulation
controller menu, to produce graphs for the whole year, as illustrated below. These graphs
are useful to observer seasonal patterns, and while they are not extensively used in the next
sections, all capabilities illustrated for a shorter time frame (a week) are also valid for a
whole year simulation.
481
50 Parameter plot: a weather
This menu shows options for plotting climate data used as boundary condition in the
simulation. The availability of each of these variables depends on the climate file.
Figures in this page were generated using the exemplar model a simple > a zone with
convective... and saving results level 4.
482
50.1.2 b diffuse horizontal solar (radiation)
483
✔ This and some other climatic parameters available on the clm metrics menu were
introduced in recent versions of res to handle new climatic files with more information
available than in traditional ESP-r models and climate files. The absence of data for some
climatic parameters does not compromise the quality of results.
484
example of wind direction plot
When in doubt about ESP-r units, the contextual help may provide valuable information.
The help window show below, for example, is available on prj in the weather menu in
databases.
The source code has also comments addressing this topic. The image below shows a
fragment of a file based on a search in the source code for the expression "wind
direction".
485
fragment of the file data/climate/README available on the source code
486
message indicating this not available in the climate file
487
51 Parameter plot: b temperature
This menu shows options for plotting various temperature metrics available in ESP-r
results (or post-processed based on available results). The availability of each of these
variables depends on the settings of the model used in the simulation.
Figures in this page were generated using the exemplar model a simple > f ... multizone
with convective heating & basic control and saving results level 4, unless stated
differently for a given entry.
51.1.1
51.2 Options in the temperature plot menu
51.2.1 a dry bulb (db) temp.
Dry bulb temperature (often referred as db temperature) is the average air temperature
inside the zone. If the zone is filled with another fluid than as (such as water), the db
temperature will show the fluid temperature.
488
The term dry bulb makes reference to a time where people would a second thermometer
in contact a piece of fabric saturated with water to estimate the air relative humidity, based
on the so called "wet bulb". Wet bulb temperature is rarely used nowadays, but the dry
bulb term remains in use in energy simulation.
489
example of temperature difference between zone and outdoor air temperature plot
example of temperature plot showing the difference between air temperature in each zone
and reference zone (in this case, the roof space)
490
51.2.4 d control point temp.
This option plots the temperature of the node defined in the control for each zone.
491
example of resultant temperature plot (i.e. operative temperature with equal weights for
convection and radiation)
492
example of mean radiant temperature plot
The exemplar model used in the examples in this section was adapted to include a MRT
sensor. MRT sensors can be created prior to or after the simulation, as they are not used in
the simulation itself. res reads the information available about MRT sensors from the model
configuration files when it loads the result file. You can force res to reload the result using
option 1 of the Module menu on res.
The image below shows a MRT sensor representing a person standing close to the south
window.
493
The following message is displayed in the lower left corner or res:
The menu area will show the available MRT sensors in the model. In the case below, the
model has only one sensor.
The image below shows the MRT for the selected sensor.
The graph below shows a comparison of the area-weighted MRT (f zone mean radiant
temp.) and the MRT for the user-defined sensor. The sensor shows a spike in the hour 70
494
due to solar gains heating up the window and heating up the window panel. The last hours
of the simulation show that the sensor readings are lower, due to long-wave radiation
losses to the sky during the night reducing the temperature of the window panel.
MRT sensors in ESP-r do not take into account solar radiation reaching the sensor.
495
example of dew point temperature plot
The image below shows the dew point temperature in relation to the air temperature and
relative humidity (plotted on the secondary axis). It shows that as the relative humidity
increases at periods of constant temperature, the dew point increases as well.
example of dew point temperature compared to dry bulb temperature and RH plot
The image below shows the indoor surface temperature for the south wall and for the
south-facing glazing panel. Glass temperature is mostly lower due to the higher thermal
transmission, but it shows a peak in hour 35 due to solar radiation.
497
example of indoor surface temperature plot
The image below shows the same surface temperatures in comparison to the indoor air
temperature. Air temperature is higher most times, as the zone heat injection is in the air
node. In the night, air temperature drops close to the south wall temperature due to heat
losses.
The image below shows the same surface temperatures in comparison to the indoor air
temperature and MRT. MRT is similar to the temperature of the south wall.
498
example of indoor surface temperature plot, MRT and dry bulb temperature plot
The image below shows mostly positive values, indicating that the surface temperature is
in general above the dew point.
499
example of difference between surface temperature and dew point plot
The graph below shows the surface temperature and the calculated dew point, where values
around hour 16 show that the surface temperature is below the dew point (i.e. the negative
values in the plot above). This indicates the likely occurrence of surface condensation at
this hour.
500
51.2.11 k outside surface temp.
This option plots the temperature of one or more surfaces, considering the face outside the
zone.
While this option is named "outside", the face may be exposed to the outdoor environment,
it may be facing another zone, or it may have other settings, depending on the boundary
conditions defined in the model. Outside should not be consider equal to outdoor in this
context.
In the example below, two surfaces were selected for plotting. In the model, both surfaces
have EXTERIOR as boundary condition.
In the example below, glazing temperatures are often higher due to the heat escaping easily
from the building through the glass panel and heating it up in the process. When solar
radiation warms both surfaces (around hour 35), the opaque wall absorbs more radiation
than the transparent glazing panel, and consequently the wall temperature reaches higher
values.
501
example of external surface temperature plot
The plot below compares surface temperatures with outdoor air temperature. It shows how
solar radiation increases outdoor surface temperatures at levels much higher than the
outdoor air.
502
The graph below shows weather data for this period, where the spike in direct solar
radiation reaching around 700 W.m-2 is noticeable.
example of external air temperature and direct solar radiation weather data plot
The image below shows the menu for zone selection when l constructions note temp. is
invoked. The reception is selected.
503
menu for zone selection
Select the option a south extern_wall. Once you click/select one of the surface, the menu
disappears, i.e. the option - exit menu is not used in this menu.
A dialog is shown for the selection of the node inside the component to be plotted. The
following paragraphs and images provide information on how to select the node number
for this dialog.
504
dialog for node selection for plotting
The help function provides valuable information to understand how nodes are numbered
in ESP-r. In a nutshell, each component has 3 nodes, one in the middle and one in the
interface with each surface.
It is useful to check the construction name in the surface attributes on prj, as shown in the
image below. The option b in the image shows that this surface used the construction
extern_wall.
Using this name, it is possible to check on the construction database the composition of
this construction, as shown in the image below. In this example, node 2 is located in the
505
middle of the brick layer, and node 3 in the interface between the brick and the glass
wool insulation.
Enter the number 2 in the dialog to plot temperature values for the node in the middle of
the brick layer. Exit the menu and draw the graph (see image below).
506
The image below shows the comparison between the outdoor surface temperature (i.e.
node 1) and the node number 2 placed in the middle of the brick. Both values are similar,
as expected. The surface temperature is higher when solar radiation reaches the wall, but it
is lower in most time-steps as the surface looses energy by convection and longwave
radiation.
example of temperature plot for two nodes, one on the surface and one inside a building
component
This option plots operative temperatures and can utilize local values for air temperature
from CFD if available. If not, the following warning is shown and air temperature values
for the zone are used in the calculation of operative temperatures.
507
warning about lack of CFD data for local air temperature
The image below shows the operative temperature for the available sensor.
508
52 Parameter plot: c comfort metrics
This menu provides options to plot thermal comfort metrics based on post-processing
ESP-r results. Metrics are defined in international standards such as ISO 7730 and EN
15251.
Most options required additional elements in the model, such as mean radiant
temperature (MRT) sensors of CFD for air speed. In case CFD is available in the model, the
local air temperature is used in the analysis of a given point rather than the average air
temperature of the zone.
Figures illustrating most options of this menu were generated using the model created
using the tutorial Create MRT Sensor.
Additional information on clothing levels is provided using the help option [?].
509
The following dialog is dedicated to the metabolic rate of occupants to be used in the
analysis of PMV. Select MET in the dialog below.
Additional information on clothing levels is provided using the help option [?].
Accept the default value of 1.546 MET corresponding to an activity level similar to
standing activity or cooking.
510
The following dialog is dedicated to the air velocity to be used in the analysis of PMV. If
CFD data is available, ESP-r adopts the local air velocity calculated by CFD, otherwise the
user must provide a value manually. Accept the default value of 0.1 corresponding to still
air.
The following dialog allows the selection of periods of the day for analysis. In spite of the
dialog, this option is not used in ESP-r graph plotting for PVM. Select any option.
The user is presented with a list of MRT sensors available in the model to be used in PMV
calculation. Select option a reception :sen_01 and select - exit menu.
The PMV selection is concluded, returning to the main Parameter plot menu with data
ready for plotting.
The graph shows values from -1.4 to -1.1 in the start of working hours. PMV improves and
reaches -0.5 once the heating system manages, after several hours, to warm-up the room.
The most comfortable weekday is the 3rd day of the simulation, where significant solar
gains raise the air and mean radiant temperature of the zone. As the heating system turns
off, the comfort level inside drops quickly.
511
Select / clear selection to reset the data set for plotting.
If the user has already defined the comfort parameters (clothing and metabolic levels, and
air speed) for a previous plot, ESP-r prompts the user to accept the existing values (yes) or
redefine them (no). Select yes.
The plot of PMV using SET, shown in the figure below, is very similar to the previous one.
512
52.1.3 c PPD
The predicted Percentage of People Dissatisfied (PPD) in this option is related to the PVM
values calculated and shown in option a of the menu. the PPD concept is used to assess
other comfort aspects in the following options of the menu, and this one is dedicated to
the overall thermal balance level represented by PMV. The graph shows high PPD in the
start of working hours (between 30 and 50%). Comfort improves during the morning and
reaches the minimum value for PPD (5%) remaining stable until the heating system is turned
off at the end of the working-hours period. PPD increases in the evening/night (as the
heating system is off and the office is not occupied).
513
52.1.4 d heat-foot delta temperature
This option assess the air temperature difference between head and foot heights to
estimate local thermal discomfort due to temperature stratification. It requires CFD results
for the analysis.
The figure below shows PPD results for thermal discomfort due to floor temperature. As in
previous graphs, PPD is higher in the beginning of the working-hours period and reduces
gradually during the day. The floor of this thermal zone has significant thermal mass and is
not heavily insolated, so its temperature does not reach quick and PPD never rarely reaches
lower levels (apart from the 3rd day of the simulation).
514
52.1.6 f warm/ cool ceiling (PPD)
This option assess local thermal discomfort related to radiant asymmetry due to ceiling
temperature warmed or colder than the surrounding environment. Once the option is
invoked, the user is prompt to select the MRT sensor to be used in the analysis.
The figure below shows results (only for occupied hours) with low percentage of
dissatisfaction.
The figure below shows the ceiling and floor temperatures, which have often just a few
degrees of difference, hence the absence of discomfort due to the ceiling temperature.
515
52.1.7 g radiant asymmetry (PPD)
This option provides tools to calculate local thermal discomfort due to radiant asymmetry
for each face of the MRT sensor. Once invoked, the user must define the surface of interest
for the analysis.
This nomenclature assumes that the MRT sensor was not rotated, so the South face of the
sensor is the one originally facing south when the sensor was created.
The figure below shows the percentage of dissatisfaction (between 0 and 1) for the south
of the sensor. This side of the sensor faces the window, and the MRT sensor is close to the
window, so higher values of local discomfort were expected.
516
The figure below shows the temperature of the window compared to the mean radiant
temperature of the zone, where it is noticeable that the window is consistently colder
(around 5°C) than the surrounding surfaces.
The figure below shows percentage of dissatisfaction due to radiant asymmetry the east
facing side of the MRT sensor. This side faces a insulated wall, with surface temperature
closer to surrounding temperatures, leading to a lower level of local thermal discomfort
when compared to the south facing side of the sensor.
517
52.1.8 h draught (PPD)
This option assess the thermal discomfort due air movement when particular combinations
of air speed and temperature are present. It requires CFD results for the analysis.
518
53 Parameter plot: d solar processes
The solar metric menu has 3 options:
In order to best explore these options, consider a model with 2 adjacent zones divided by
a glass panel, as shown in the image below. All exterior surfaces are opaque, apart from the
surface facing west in Zone1. Interior surfaces in Zone 2 have absorptivity equal to 0.22 (i.e.
they are painted white). Simulation is conducted for a summer week.
None that Zone 1 also has a small amount of solar radiation coming from an adjacent zone.
This is due to the fact that white surfaces in Zone 2 reflect part of the incoming solar
radiation and these reflections cross the partition bring radiation back to Zone 1.
520
Example of solar radiation entering from adjacent zone plot
For demonstration purposes, consider the same model with the indoor surface absorptivity
of opaque surfaces in Zone 2 changed to 0.99 (i.e. a black and almost perfect absorber).
The image below shows the simulation results where there is no solar radiation coming
from adjacent zones into Zone 1.
521
53.1.3 c absorbed in the zone
Option c in the solar metric menu shows the amount of solar radiation that is actually
absorbed by transparent and interior surfaces in the zone. The image below shows that the
absorbed radiation in Zone 1 is equal to the energy entering the zone, minus the radiation
transmitted to Zone 2, plus the energy returning from Zone 2. The energy absorbed in Zone
2 is equal to the energy entering from adjacent zone, minus the energy reflected by the
white surfaces that returns to Zone 1.
522
54 Parameter plot: f zone flux
This menu shows options for plotting various zone fluxes available in ESP-r results (or
post-processed based on available results). Zone fluxes account for heat gains/losses
related to the fluid node inside the zone.
Figures in this page were generated using the exemplar model a simple > f ... multizone
with convective heating & basic control and saving results level 4, unless stated
differently for a given entry.
523
54.2.2 b ventilation
Ventilation fluxes are related to imposed flow rates of air coming from outside or from
another zone. In this model, the Office and Reception zones have ventilation air flow
related to air movement through the door. The Office shows gains (up to 50W) as it is
colder than the Reception during the simulated period, while the Reception shows losses
varying from 0 to 100W during most of the simulation. Losses by ventilation are higher
when the Reception temperature increases during the day due to solar gains. There is no
imposed air flow in the Roof zone.
524
54.2.3 c occupant casual gain
Occupant casual gains are imposed using schedules. In this model, the Reception is
significantly bigger than the Office, and the imposed occupancy is consequently higher
(gains up to 500W in the Reception and 150W in the Office). There are no occupants in
the Roof zone.
525
54.2.4 d lighting casual gain
Lighting gains are substantially higher in the Roof zone (up to 700W), due to the use of
suspended ceiling and lighting fixtures rejecting heat into the attic space. This model has
an old lighting system with high energy consumption (and heat gains) for lighting. A
small portion of gains is imposed in the Reception and Office zones.
526
54.2.5 e small power casual gain
Small power is imposed in the Reception to account for electric devices used in the zone.
Gains from 600 to 1000W are imposed 24h in this zone, even during weekends.
527
54.2.6 f other casual gain
There are no other casual gains in this model.
528
the fact the Roof is unheated, so heat will flow from warm zones (Reception and Office) to
the colder Roof through the internal partition (ceiling).
Peaks of gains around hours 60 and 160 are related to incoming solar radiation being
absorbed by the glass and released to the indoor environment by convection.
529
54.2.11 k tran surf. conv. @partns
There are no transparent partitions in this model.
530
531
55 Parameter plot: g surface flux
Surface fluxes provide details about energy flow paths for every surface of every zone in
the model.
All images were generated for the zone Reception, using the surface a south.
532
55.3 Options in the surface flux plot menu
55.3.1 a conduction (inside)
The figure below show heat conduction between the surface node facing the indoor
environment and the next node inside the construction. This simulation shows results for
winter conditions, so the inside node loses energy by conduction to the next node (as
energy is flowing from the inside to the outside environment). Losses are higher during the
day when the heating system is in operation. During the night the temperature inside the
zone drops quickly, reducing the temperature of the inside face node in this construction,
reducing losses. In some points in time, the fluxes is positive, indicating that the inside face
node is drawing energy from inside the construction by conduction.
⚠ Results are shown in W/m2 (in spite of the legend in the graph showing W in some
cases, as in the example below).
533
55.3.2 b convection (inside)
This figure shows the convective flux between the inside node of the construction and the
fluid (usually air) inside the zone. The positive flux during the day indicates the node gains
energy by convection (as expected, as the air is warmer than the wall due to the heat
injection in the air node by the heating system). During the night air and surface node
quickly reach equilibrium and the convective losses are much reduced.
534
The figure below shows surface and air temperatures, where it is noticeable that the air is
most times warmer than the surface, hence the positive convection flux shown in the
previous figure. There are two brief windows of time, around hour 72 and at the end of the
simulation, where the air is colder than the surface; these periods are see in the figure below
where the convective flux becomes negative and comes close to -0.5 W.
535
55.3.3 c LW radiation (inside)
The figure below shows the flux by longwave radiation between the inside node of the
construction and the inside nodes of surrounding surfaces in the thermal zone. The flux is
positive most of the time, as internal partitions and the floor will usually have higher surface
temperatures than this external wall. The flux is only negative during the periods indicated
in the convection graph around hour 72 and at the end of the simulation, as higher surface
temperatures will likely increase losses by convection and also by long wave radiation. The
emissivity of the internal surface, as defined in the Project Manager, will affect all longwave
radiation fluxes.
The image below shows the surface temperature of the inside node compared to the Mean
Radiant Temperature (MRT) of the zone. The MRT shows the area-weighted surface
temperature values of all surfaces in the zone (including the south wall used in all plots of
this section). The difference between these lines is proportional to the flux shown above, as
expected, with peaks around hours 60 and 160.
536
55.3.4 d SW radiation (inside)
The figure below shows the Shortwave (SW) radiation, i.e. solar radiation, absorbed by the
inside node of the surface. This is due to solar radiation coming through the windows and
being redistributed to the inside nodes of several surfaces of the zone. There are peaks in
solar radiation gains around hours 60 and 160, which explain the increase in surface
temperature at these points in time, consequently leading to an increase in convection and
longwave radiation losses.
537
The way ESP-r distributes solar radiation entering the zone varies depending on model
settings. In this model, there is no detailed calculation regarding which surface will receive
solar radiation based on solar position and incidence angle, and the incoming radiation is
usually the same per unit of area, as shown in the figure below with identical SW fluxes for
inside nodes of four different walls. The use of insolation calculations can be enabled on
the Project Manager if more detailed calculation is required.
538
55.3.6 f radiant casual light
The figure below shows casual gains due to lighting at the inside node of the surface.
539
55.3.7 g radiant causal other
The figure below shows radiant fluxes due to casual gains described in the model using
the field "other".
540
The previous figure should show variation of stored energy in line with changes in the
node temperature, as shown in the next figure.
In the figure below the conduction losses/gains between the external node and its adjacent
node towards the inner part of the wall (the grey line at load 0.00 was not plotted by ESP-
r and is provided here for clarity). The flux shows mostly positive fluxes, as the interior part
of the building is being heated and energy is flowing from the node inside the wall to the
node facing the external environment. There are short internals were the flux is negative,
as the wall gains energy sue to solar radiation, leading to an increase in temperature that
is propagated to the inner parts of the wall. In the periods around hours 60 and 160, solar
gains at the external node of the wall will lead to rapid temperature increase, which drives
losses by conduction (negative values) from the outer node to the inner parts of the wall.
In the following hours, as solar radiation drops, the warmer inner node of the wall starts
releasing energy by conduction back to the outer node, leading to the positive spikes in
the flux seen in the figure.
542
Two peaks in losses are seen in the figure above at the points in time where solar radiation
heats up the outer node of the wall, increasing the temperature gradient between wall
surface and air, consequently leading to higher convective losses. The figure below shows
the temperature of the external node of the surface compared to the outdoor (ambient)
air, where the temperature difference (figure below) can be directly correlated to the
increase in convective losses (figure above).
543
55.3.13 n long wave > buildings
The figure below shows longwave radiation fluxes between the external node of the wall
and surrounding buildings. These surrounding buildings are not explicitly described in the
model. Their temperature is inferred by ESP-r, and the view factor between surface and
surrounding buildings is defined in the context menu of the Project Manager. The emissivity
of the external surface, as defined in the Project Manager, will affect all longwave radiation
fluxes. Results below indicate negligible flux, apart from a surge in losses when there is an
increase in the temperature of the external node of the surface.
544
55.3.15 p long wave > ground
The figure below shows longwave radiation fluxes between the external node of the wall
and ground, Ground temperature is estimated by ESP-r and the view factor and the view
factor between surface and the ground is defined in the context menu of the Project
Manager. The figure shows small losses by radiation to the ground during most of the
simulated period, apart from the increase in losses similar to the ones seen in previous
graphs.
545
55.3.16 q SW rad abs (other fc)
The figure below shows the amount of shortwave (solar) radiation absorbed by the
external node of the wall. The peak in solar gains matches the timing seen in previous
graphs.
546
55.3.18 s heat storage (other fc)
Heat storage results for the South surface of the Reception are shown below for the
external node. This node shows significant fluctuation in the thermal energy stored in the
layer at the points where solar radiation enters the node. Results, however, show an
unexpected pattern, with a reduction of energy stored in the node when solar radiation
reaches it. The graph below is heavily influenced by a feature of ESP-r called time-step
averaging. This feature is suitable for most calculations and results, but it shows
inadequate behavior when the quantity of interest is the energy stored in a given node at
a particular point in time.
547
In order to assess the energy stored in the outer node of the wall, it is necessary to run a
simulation disabling time-step average (see tutorial).
The image below shows results for the same node without time-step averaging. Results
are in line with expectations, with an increase in energy stored as solar radiation reaches
the node, followed by a decrease when longwave radiation losses reduce the node
temperature.
548
56 Parameter plot: h heat/cool/humidity
The Load choice menu is dedicated to the energy injected or extracted from the thermal
zone, base on controls defined in the Project Manager. It provides several types of plot
related to heating, cooling (sensible and latent), as well as energy demand related to
humidity control in the zone. These options do not consider the efficiency of the heating,
cooling, dehumidification, and humidification systems.
549
Most images were generated for the zone Reception, and in a few cases the plot also
includes values for the Office zone.
The figure below shows the heat injection plotted with the air temperature of the zone. The
increase in temperature is seeing over the first working hours of the day, where energy is
injected until the air node reaches 20C. Temperature remains stable around 20C in most
working days apart from the 3rd day where the temperature is constant at 22C (the cooling
setpoint used in this model). This indicates that solar gains pushed the temperature above
the cooling setpoint and this system was activated to extract energy from the node,
therefore there is no heating load at the end of the working day.
550
56.2.2 b Sensible cooling load
The figure below shows energy extracted (negative values) from the air node by the cooling
system. The cooling system is only active during a few hours of the 3rd day of the simulation,
as expected based on the graph above. The cooling system never reaches the maximum
capacity of 1 kW, only reaching a peak of 0.46 kW.
551
The figure below shows the cooling load in combination with the air node temperature and
solar gains in the zone. The graph shows small solar gains in all working days (likely due to
overcast sky). On the day where cooling is needed, there is a significant increase in solar
gains.
552
The actual dehumidification load can be plotted using an alternative approach. Select for
plotting only the thermal zone of interest, and use option j Aggregate dehumidification
load, of the load choice menu produces results as shown in the figure below. The graph
shows that as humidity reaches the set-point of 60% (due to latent casual gains for
occupancy - see tutorial) the dehumidification system is activated, extracting moisture from
the air node, i.e. extracting energy from the node, hence the negative values. This occurs in
most days during the afternoon period, as the air starts the working-hours period quite dry,
and only reaches higher values due to moisture release over several hours.
553
56.2.4 d Humidification load
The humidification load option presents the same issues discussed in the previous section
(flat line at 0 kW even if the system is active). The figure below was plotted using the k
Aggregate humidification load option. The air node starts the working-hours period with
low relative humidity (as air infiltration during the night removes the moist air from the
zone replacing it by dry outdoor air). This triggers the humidification system in the first
hours of the day, injecting moisture until the RH set-point is reached. Moisture injection
increases the energy in the air node, hence the positive values.
554
56.2.6 f Latent H + C loads
The figure below shows the combined latent heating and cooling loads for the zone. It is
the superimposition of graphs generated using options c and d of the load menu described
in the beginning of this section.
555
56.2.7 g All Sensible + latent loads
The figure below shows the combined sensible and latent loads for heating and cooling
for the zone. It is the superimposition of graphs generated using options a, b c, and d of
the load menu described in the beginning of this section.
556
In the figure below, the heating load for the Office and Reception are plotted to indicate
that in this tutorial how the aggregated load is the combination of the two curves. Each
curve has peak at 1kW, while in the previous graph the peak is 2kW.
557
56.2.9 i Aggregate cooling load
The figure below shows the combined sensible cooling of all zone. It is the superimposition
of graphs generated using options b for each zone of the model. In the figure, loads for the
Office and Reception are included.
558
56.2.11 k Aggregate humidification load
The figure below shows the combined humidification load of all zone. It is the
superimposition of graphs generated using options d for each zone of the model. In the
figure, loads for the Office and Reception are included.
559
57 Parameter plot: i zone RH
This option plots graphs with relative humidity values of the air node of the zone. The
example below was generated using the exemplar model a simple > f ... multizone with
convective heating & basic control and saving results level 4 (the default saving
level). The figure shows the variation on relative humidity for the Reception, with daily
cycles between 30 and 70%.
The increase in relative humidity is due to the latent casual gain due to occupancy defined
in the model and shown in the figure below. During the first working hours of the day, the
relative humidity drops as the air is warmed up by the heating system. As the air reaches a
constant temperature around 20C, moisture gradually builds-up increasing the relative
humidity of the air node.
560
561
58 Parameter plot: j casual gains
The Casual gain metric options menu plots casual gains in similar to plots created using
the zone flux menu.
562
58.1.2 b convective portion
The figure below shows the convective fraction of casual gains added to the air node of
each zone.
563
58.1.4 d occupants
The figure below shows occupants gains for each zone.
564
58.1.5 e lighting
The figure below shows lighting gains for each zone.
565
58.1.7 g controlled gains
There are no controlled gains in this exemplar model.
566
59 Parameter plot: m renewable/adv. comp.
This option produces graphs related to embedded renewable energy generation in the
thermal model.
Figures illustrating this section were produced using the exemplar model b technical
features >l ... with PV cells embedded in spandrel, where PV cells placed under the
window of the zone manager_a convert part of the incoming solar radiation into
electricity.
When the option m renewable/adv. comp. is used, the following prompt will be
presented. Select heat/power output.
The figure below shows the energy produced by the PV panel, with peaks on the 3rd and
last days of the simulation. This is consistent with the solar radiation data for this location,
which shows mostly overcast days with no direct solar radiation.
567
568
Other types of graphs
569
60 Graph: Intra-construction temperature
These functionalities are dedicated to plot cross sections with temperature of constructions
used in the surfaces of the ESP-r model. Figures in this page were generated using the
exemplar model a simple > f ... multizone with convective heating & basic control
and saving results level 3,
The image below shows the main menu for intra-construction temperature.
570
surface selection menu
As in other menus on res, the surface selection menu closes as soon as one surface is
selected. In the examples below, surface a south extern_wall is used. Note that this menu
also shows the composition of the wall, as this information is relevant to understand the
plots generated.
Once a surface is selected, a dialog presents the two plotting modes: cumulative and
animated.
For either mode, the user should then select the speed for plotting.
The example below shows the cumulative section plot in normal speed. The graph
indicates the indoor side of the plot (reception, on the right) and the conditions on the
other side of the component (outside, on the left). Each grey rectangle represents one layer
in the construction, while the white space between rectangles represents an air gap. Values
571
in the x-axis are in millimeters. In the example below, the layers are: brick (on the left),
insulation, air gap, and concrete block (on the right). The plot shows the temperature across
the component in each time step.
res does not capture the animation (examples here were done using a screen recorder
app). res does not show the plot in loop, as shown on this page. Once the plot is concluded,
res will show the image below.
572
plotting of cumulative temperature cross plot
The example below shows the animate data display mode in normal speed. These graphs
demonstrate the dynamic nature of heat flow in complex energy systems, and the severe
limitation of steady-state calculations based on U-values.
573
plotting of animated temperature cross plot
Once the option b graph interstitial is selected, the user is prompted to confirm values of
vapour resistivity for the materials of each layer in the construction. Values are suggested
in mega Newton seconds per gram metre (MNsg-1m-1 ), and res retrieves these values from
the model material database, as in the example below.
After confirming the suggested material properties, the user should select the time-step for
plotting, as in the image below.
574
dialog for time selection for plotting
The example below shows resulting plot, indicating that the vapour pressure across the
component is always below the saturation for this time-step, and interstitial condensation
is, according to this assessment method, unlikely at this time.
The user can select other conditions for new plots (see dialog options in the image above).
Previous plots of time series temperature indicate more sensitive times for analysis, where
external surface temperature is below the dew point, for example.
The example below shows a significative condensation risk in the brick and insulation layers.
575
glaser method plot for a particular time-step with severe interstitial condensation risk
576
61 Graph: 3D profile
3D profiles are dedicated to plots of of parameter variation (z-axis) in different days of the
year (y-axis) and in different time-steps (x-axis). The 3D profile menu allows the selection
of variables.
This tutorial uses the exemplar model a simple > f ... multizone with convective
heating & basic control. The example below shows a 3D profile of the Reception dry
bulb temperature over the simulated period of one week. The duration of the simulation
greatly impact on the size of the y-axis of 3D profiles.
577
The example below shows a 3D profile of the outdoor temperature.
The example below shows the 3D profile of heating fluxes. This profile is not readable on
this form, but this can be adjusted to a extent.
578
Select the option 2 scale data. Enter a scale factor of 0.02 in the dialog.
Select ! draw 3d plot. The image is adjusted to a more readable plot, as exemplified
below.
The image below shows a 3D profile of heat flux due to infiltration. the plot shows
negative values on the z-axis, as infiltration leads to energy losses in this particular
simulation.
579
580
62 Graph: frequency histogram
The Results Analyser is able to plot histograms and cumulative frequency plots of most
variables discussed in previous section, and listed in the Frequency histogram menu.
These capabilities are demonstrated in this tutorial for one particular variable.
This tutorial uses the exemplar model a simple > f ... multizone with convective
heating & basic control.
Select a weather
The sub-menu with weather variables becomes available for variable selection.
581
Select yes when prompted regarding the bin width to be used in plot.
The plot below is generated, with absolute frequencies on the primary y-axis and relative
frequencies on the secondary y-axis.
582
62.2.2 b cumulative graph
Select the variable for plot again, and then select for plotting b cumulative graph. Select
standard order.
583
62.2.3 c summary table
This option is generate frequency tables in the text feedback area, as the one below
exemplifying external dry bulb temperature frequencies. No plot is generated.
584
62.2.4 d frequency graph+table and e cumulative frequency graph+table
These options combines frequency table and plots (in the example below, option d was
used to produce a table and histogram).
585
63 Graph: variable v. variable
This option generates scatter plots where points represent values of two variables for
each given time step. The variables for selection are available in the Var.vs.Var menu.
The example below shows results for g mean radiant tempr (on the x-axis) versus 5
direct solar (reception floor) (on the y-axis).
586
587
64 Graph: network flows
This section addresses results of fluid flow networks, and contaminant. These results are
available only in models where these features were enabled and configured. The presence
of a fluid network is indicated by the in the Project Manager (see image below) by:
• highlighted text in the Features field, on the upper right corner of the graphic
window, and by
• the word "defined" after option "f network flows", in the Browse/edit/simulate
menu.
This tutorial uses results from the model b technical features > g ... with CO2 tracking
(open windows), using the simulation pre-sets included in the exemplar (see image below).
The name and location of the result file for the thermal domain is defined in option "h zone
results" of the Simulation controller of the Project Manager (in the image, the name is not
fully display as it is too long to fit in the menu width). Name and location of the fluid flow
result file is defined in option "i flow results" (also not fully shown in the image below). If
contaminant modelling is defined, its results are stored in the same file used for fluid flow
results.
588
64.1 Opening fluid flow results
On the Result Analyser, under the menu Graphing options, select f network flows.
The dialog area requests the name of the fluid flow result file. If simulation pre-set were
defined in the Project Manager, the name file will be retrieved and filled automatically by
the Results Analyser. Press ok.
589
If the file is successfully opened, the time series plot should become available.
590
64.3.2 b wind speed
This option plots the wind speed, as provided by the weather file.
591
64.3.4 d ambient RH
This option plots the external air relative humidity, as provided by the weather file.
592
This option plots the pressure at any node of the network. This is the mean pressure at the
node, and does not include pressure variation at a given component due to stack effect.
Upon selection this option, the Result Analyser shows the Node select menu (see image
below). This network has six nodes. Select nodes a manager_a and corridor for plotting
and press - exit menu.
Select ! draw graph to generate the image below. These are the pressures calculated for
the two nodes, based on the boundary conditions and features of the network defined for
this model. The pressure difference is quite small, so it may be useful to change the scale
of the Pressure axis.
Select = set axis scale. Enter the values as in the image below.
593
For the horizontal axis, select default.
The fluctuation in the graph shows the impact of wind speed and direction variations
resulting in variation in indoor nodes of the network. In many points, pressure is similar in
both nodes, so it is expected that the flow rate will be small at these points in time. Flow
rates are explored in several sections below. The graph shows pressure higher in
magnitude at the corridor around hours 27 to 37, when compared to the manager, hence
the flow rate is likely to be from the manager to the corridor.
Select e press @ node, and select the three boundary nodes, as in the image below.
594
The plot below shows significantly higher suction (negative pressure) at the south
boundary node (in yellow) when compared to the other nodes. This is consistent with the
previous graph which indicated air moving from the corridor (linked to west and east
boundaries) to the manager (linked to the south boundary).
595
The plot below shows the pressure difference across the selected components, with nearly
identical curves, indicating both connections are strongly linked and pressures variations
propagate from one to the other. The pressure drop across the large connection between
manager_a and corridor shows a small pressure difference. By conservation of mass the
same amount of air passes through the opening from manager_a to the externa south node
shows (flow through cracks is negligible in this model). The smaller opening to the outside
is counterbalanced by a much higher pressure difference to achieve the same flow rate.
596
Select f press diff @ conn, and select the three main boundary node connections, as in
the image below.
As in the previous section, the south connection shows higher magnitude negative
pressure, likely driving the flow from other connections.
Adjust the graph scale by selecting = set axis scale and entering the values suggested
below.
597
The graph is updated using the new scale. The peak in the east boundary from hours 27
to 37 becomes more noticeable.
598
The graph shows a high pressure difference when compared to previous graphs,
highlighting the importance of stack effects on flow rates for this particular simulation.
The image below shows the dry bulb air temperature of selected nodes, which mirrors the
outdoor temperature variation, as this model does not have heating controls.
599
64.3.9 i mass flow rate
This option provides facilities to plot mass flow rates at several points of the network.
upon selection, The image below shows the five available options for mass flow rate
plotting.
Select a individual connections. Different from other menus, there is no need to select
"exit menu", and the Result Analyser reacts as soon as an option is selected in the menu
below.
600
The image below shows the rapid fluctuation of mass flow rate through the selected
crack. Values on the y-axis show values of small magnitude.
Select:
601
The graph with both lines put into perspective the fluctuations seen in the previous plot.
As flow rate through the window is substantially higher, the flow rate through the crack
appears now as a flat line. As expected, based on previous graphs, most of the flow rate
through the window is negative, i.e. air leaves the manager_a zone through this opening.
This pattern is only modified during brief periods, such as between hours 27 and 37.
Select:
602
.
603
The option shows the same plots described in i mass flow rate and plot results in air changes
per hour (i.e. volume flow rate divided by the zone volume as defined in the model
description in the Project Manager). The name of the y-axis is plotted as Misc.
(miscellaneous, a term used in ESP-r whenever the unit and axis name has not been
specified in the source code).
604
64.3.13 m contaminant @ node
This option is available when one or more contaminants were included in the fluid flow
network. Once invoked, the Node selection menu is displayed. Select a manager_a.
The contaminant menu shows the available contaminants for plotting in the model. This
model has only one contaminant. Select a CO 2.
605
The plot below shows the calculated CO2 concentration based on sources and sinks defined
on the model, and flow rates calculated by the fluid flow network. The pattern shows results
at 0.48 g of CO2 per kg of air during periods with no sources, while there is an increase in
concentration once the indoor sources become active.
606
Time-series export and post-
processing
607
65 Tabular Output
ESP-r results are stored in a binary file, so it is not possible to use the data in other
applications on its native format. For this reason, the Results Analyser has functionalities to
export selected results to a text file. This section is primarily dedicated to this
functionality. The Tabular Output menu provides three main options:
• g performance metrics,
• h special materials data, and
• i network air/wtr flow.
The next section describes, dedicated to performance metric reports, explains the
mechanism to export data and manage export formats. It is followed by a section on i
network air/wtr flow. The option h special materials data is not covered in this page.
608
65.1.2 Exporting results to a text file
From the first menu on res, select:
> display to to toggle between the options screen and file, and select "file",
Set the file name. In this example, the file is called bld_basic.csv.
This file is created by ESP-r in the model cfg folder of the model. You should see a
warning in the text feedback area that the file was opened.
609
The display toggle should indicate file rather than screen.
Select one or more metrics to be exported, such as temperatures, weather data, comfort
metrics. In this tutorial, select:
b temperature
a dry bulb (db) temp.
-exit menu
Once this variables is selected, option p edit selection becomes available, similarly to the
facility available for variables in graphs.
610
Select p edit selection to check the variables selected so far (as in the image
below). Press - exit and activate changes.
65.1.3 ^ delim
Select ^ delim >> normal to display the available options for data delimiter. Select
comma.
611
65.1.4 & labels
Select & labels >> multiline to toggle between available options for the style of text
heading used to identify each column of exported data. The default label option
(multiline) is ideal for text feedback on the Result Analyser, but for data export the label
option on one line is preferable as it can be parsed with the corresponding data when
imported to another program.
65.1.5 * time
Select * time >> 10h30 to toggle between options for the time stamp added in the
beginning of each line in the exported file. The default option adds a time stamp (hours-
minutes) to every entry, repeating the pattern every 24 hours. Days are not indicated.
Results are indicated for the point in time between two time steps. Assuming an one-hour
time-step was used, by default ESP-r calculate values representative for the hour as a
whole, and not for a particular discreet point in time, hence the time-stamp indicating the
middle of the hour.
The option 0.4375 provides a time stamp where the integer part indicate the day (1, 2,
3,...) and the decimal part indicates the time as fraction of the day, as in the example
below.
612
The option mm-dd 10:30:30 provides a stamp with month, day, hour, minute and
second, as in the example below.
Select the * time >> toggle until you reach mm-dd 10:30:30.
613
65.1.6 ! list data
Once all variables of interested were selects use ! list data to write them to the
bld_basic.csv file. The text feedback area informs that the selected variable (Zone db
temperature) was written to the file.
Use the option > display to to toggle back to the screen option. You should see a
warning in the feedback window that the file was closed.
The image below shows an example of exported data from ESP-r. It uses a thorough time-
stamp, and "comma" as a field separator, and shows dry bulb temperature at the three
thermal zones of the model.
⚠ The functionality described above does not overwrite data already written in the file.
Exported data is appended at the end of the document, so if the document is not empty
it becomes necessary to scroll until the end of the document to see the exported data.
614
65.2 Additional options
The option +filter provides means to filter exported values based on casual gains.
The option *unit provides means to change some of the units used when exporting data.
615
66 Enquire about
The enquire about facility of the Results Analyser provides tools to post-process time-step
results into aggregated values, such as minimums, maximums, averages, hours above or
below user-defined thresholds, and sums. Sums, in particular, are useful to access the
energy delivered to the model, as ESP-r results are in terms of power, and delivered must
be assessed by the integration of power over time. Sums are also useful to evaluate the
energy balance of the model, by integrating gains and losses over the simulation (for
surfaces and zones). The image below shows the Esquire about menu, and its options are
described in the following sections.
This tutorial starts by discussing the last fields of this menu, as their are general and affect
the way other options ot the menu are displayed.
616
66.1.2 : output
There are two formats available for data display/export in the Enquire about menu: ASCII
or Markdown. ASCII is the default option and it will suit most users, as markdown
documents require specific readers.
66.1.3 ^ delim
Similar to the Report functionality, data can be displayed/exported using several
separators, as listed in the image below.
The option multiline is the default and shows data as in the image below. Note that "Zone
name" is showed in two lines, and words are left-aligned to facilitate reading. This option
is ideal to read data on the Result Analyser interface.
The option on one line shows results as in the image below. The header of each column is
represented by a single word. This is ideal when data is exported and parsed in another
program (such as a spreadsheet application).
617
The following sections address the Enquire about menu post-processing functionalities.
The temperature metrics menu is displayed, and user should select the metric of interest.
For this tutorial, select a dry bulb (db) temp.
618
The image below shows the results produced by the summary statistics option, with values
for the selected metric for the three thermal zones in the model.
619
The temperature menu is shown. Select a dry bulb (DB) temp.
Enter the threshold to be used in the "hours above" calculation. For this tutorial, enter 20.
620
In many cases, it is desirable to filter results based on occupancy or other criterion.
Select Occupants
The image belows show results of hours above 20C, considering only occupied hours.
For demonstration purposes, invoke this option, select b temperature, and select e
resultant temp.
The image below shows results for this request. Note that previously selected filters
remain active.
621
66.1.10 g casual gain distribution
This option shows total casual gains, integrated over the simulated period.
622
This option provides a break down of energy gains/losses for whole zones, as snapshots
or integrated over time.
Select snapshot.
Enter the date and time for the snapshot. In this example, use 6 2 1.00.
Select gain/loss, as the examplar model does not have a HVAC plant defined.
The text feedback window displays the results. In this example considering the Office
zone, energy losses are mainly due to infiltration and convection on external partitions,
while gains are due to ventilation (warm air coming from the Reception through the
door), and by conduction through internal partitions (as the Reception is warmer and heat
flows through the partition walls).
In this case, the summary includes integrated values for the whole output period. In this
example considering the Office zone, the main loss is due to convection at opaque
internal partitions (likely the ceiling partition to the Roof zone). Casual gains and
623
ventilation gains have a larger impact while the vast majority of the heat injection is due
to the control defined for this zone keeping the air temperature at 20°C.
Select the option snapshot and enter the same date of the previous example. Then select
surface (Surface a south, at the Reception zone).
The text feedback window shows a massive loss by shortwave radiation to the sky at the
outside face, while the same face is mostly heated up by conduction extracting thermal
energy from nodes inside the wall accumulated during the day (when the heating system
624
was in operation). The inner surface has significantly lower values of energy flux as at 0:30
hours the heating system is off and the indoor air node is close to thermal equilibrium with
the inner face of the wall.
Glazing panels and an external door with low thermal resistance are listed as surfaces
where condensation is likely to occur.
625
66.1.14 k intrstl condensation
This option is only available if internal wall temperatures are provided, otherwise the
following message is displayed.
In order to use this option, see Save temperature of nodes inside constructions
The text feedback window shows energy breakdown for the whole zone for the month of
February (as this simulation only covers a few days of this month).
626
66.1.16 m monthly temp. stats
This option provides minimum, maximum, and average dry bulb air temperature values
on monthly basis for each zone.
627
628
PART 3
Tutorials
Stand-alone tutorials aims at providing guidance about self-contained tasks
that are not addressed in other parts of the ESP-r documentation. Each
tutorial describes a unique task or data structure in ESP-r. Users are invited
to improve existing tutorials and/or create new ones expanding the
documentation.
629
67 Create MRT sensors
This tutorial describes the main steps to create MRT sensors in ESP-r.
The calculation of MRT viewfactors is done using the app mrt which is part of the ESP-r
suite.
m browse/edit...
c compositions
h view factors & radiant sensors
prj will show the zones available in the model. Zone names may be followed by the word
(defined) indicating that a viewfactor file is already available, or undefined.
And press ENTER accept suggested name. FIles with viewfactors are stores in the folder
zones, and have extension vwf.
630
Select + Add a MRT sensor
A small sensor is placed in the middle of the zone, and its properties (size, position and
rotation) are listed in the menu in a new entry: j sen_01 5.0 5.0 1.5 0.10 0.10 0.10 0
Select the option to edit sensor properties: j sen_01 5.0 5.0 1.5 0.10 0.10 0.10 0
631
✔ If necessary, return to the model composition and enquire about the coordinates of
vertices of the zone to decide which coordinates should be used for the MRT sensor.
Select the button edit sensor origin or press a on the keyboard to activate the first button
in the dialog. The dialog in the image below is presented. Change this value to 1.5 to bring
the sensor close to the window, in order to, for example, check how lower glass
temperatures may affect thermal comfort.
Change this value to 1.5 to bring the sensor close to the window, in order to, for example,
check how lower glass temperatures may affect thermal comfort.
632
Edit the properties one by one as showed in the image below.
633
Press - Exit to MRT menu
Save the new MRT sensor data before continuing: > Save MRT sensor & viewfactor
If the sensor data is not saved, ESP-r will show an error message when the user invokes
the calculation of viewfactors. In this case, the user should cancel the calculation, and save
the MRT sensor data.
The first option does not take into account the position and orientation of the sensor. The
second option ray-tracing provides more accurate viewfactor values. Select ray-tracing.
The View Factor app opens (see image below).
634
⚠ prj will remain opened in the original window, showing a warning message (see image
below) and waiting for the completion of viewfactor calculations:
Press:
635
Proceed with the viewfactor calculation:
Calculation is performed and feedback is provided in the text feedback window., indicating
the view factor for each face of the sensor in relation to each surface of the zone (see image
below). Note that cube face 1 (back) is the one facing the window, and, as expected, the
higher view factors correspond to the surfaces 1 south and 10 glz_s, the south wall and
window respectively.
636
⚠ The calculation percentage in the lower left corner may stop before reaching 100%
even when the calculation is complete. Users may attempt to proceed using the
application even though before.
Save results > update file and overwrite the file when prompted.
The View Factor application closes and the user can resume using prj.
637
Press ENTER on prj to dismiss the warning shown when the viewfactor calculation was
invoked.
The menu should show that the reception now has view factors (see image below).
638
68 Save temperature of nodes inside
constructions
ESP-r has different result saving levels so users can find the best compromise between file
size and information needed for a given analysis. By default, ESP-r uses result save level 4,
where intra-construction temperatures are not stored. This is visible in the default
simulation presets on prj for the exemplar model a simple > f ... multizone with
convective heating & basic control.
Choose option f and use the dialog to change the result save level to 3, where intra-
construction values are saved.
639
It is also possible to change the result save level on bps when the simulation is run
interactively or if bps is invoked from the terminal.
640
69 Import weather data to ESP-r
This tutorial describes some tools available for importing climate files in ESP-r
This database may provide files based on different data sources for a single location. The
image below show 4 data sets available for Ahmedabad, in India. These sources (ISHRAE
and TMYx in this example) may show significant variation, as some are based on weather
station monitoring data, while others may use satellite data (see list of acronyms).
69.2 Move files to the adequate folder and extract files in WSL
Depending on the operating system you are using, downloaded files will be located in
different folders. Move them to the adequate folder for importing.
In Windows WSL, for example, move downloaded files to the Ubuntu mapped drive and
extract compressed files.
641
move zip file to the ubuntu folder on WSL
In the folder with extracted files, identify the file with extension epw.
Rename the model using a short name and bear in mind file names are case-sensitive in
ESP-r.
642
move epw file to dbs model folder and rename it
b databases
a annual weather
Type the name of the file you want to import (case sensitive).
Type a name for the new file to be created by ESP-r using the imported data.
643
If the import process occurs as expected, prj will show the name of the imported file on
option a of the in the Database management menu.
b databases
a annual weather
a analysis tool
The Weather module of ESP-r (clm) starts. On this module, press <ENTER> to accept the
suggested file name.
Use the options below to plot a graph and check that data was imported properly:
d graphical
a dry bulb temperature
! draw graph
644
example of plot for testing imported data
Use other functionalities of this tool to explore the imported data and assess if its is
adequate for your simulation.
Troubleshooting notes
If it does not go as expected when trying to import your own climate data, pay attention
to the dialog box. The longitude and latitude in the project and file might be
mismatched.
It is also possible that the weather file you are trying to import is corrupted. In this case, it
is useful to tests other files for locations nearby.
645
70 Use a fan curve in a fluid network
This tutorial describes how to implement a fan performance curve in a fluid network.
Open the following model: exemplar > b technical feature > i ... with CO2 control of
mechanical ventilation
By running this exemplar and opening the fluid flow network results, it is possible to see
the fan in operation to control the CO2 level in the Manager A zone. A sample of CO2
concentration results for the model using the constant flow are shown below.
646
70.2 Fan performance curve - Sample performance data
In reality, the flow provided by a fan or pump is based on the pressure loss in the system
as a whole, based on duct type/diameter/length, connections, pressure loss on openings,
filters, grills, etc. ESP-r calculates this pressure loss, but is a constant flow fan, as in the
exemplar, this information is ignored. The most adequate approach is to provide to ESP-r
the fan performance curve provided by the manufacturer, such as the one exemplified
below.
647
In order to use this curve in ESP-r, the user must extract manually a few data points from
the curve (Volume in m3/s and pressure in Pa). The table below shows approximate data
extracted from the curve above.
0 0 43
15 0.015 41
25 0.025 20
29 0.029 0
The data above can be entered directly into ESP-r, but is also possible to derive a 3rd-order
polynomial equation using another software (such as Excel) and provided the curve
coefficients to ESP-r .
648
The table below shows the curve coefficients with the nomenclature used in ESP-r:
a3 -5000293
a2 117203
a1 -691.07
a0 43.174
649
70.4 Replacing the constant flow component
Open the exemplar and select f network flow
650
Select exisiting network
651
Select component d fan_30lps
652
Select u 310: General flow inducer component
The image below shows the help message provided for this component. It is always useful
to check the information available on the help for a given component.
653
Enter the lower flow rate limit of validity for the performance curve equal to 0.0011:
Enter the upper flow rate limit of validity for the performance curve equal to 0.0289:
Select the option coefficients to enter the values obtained by curve fitting in Excel:
Enter the coefficients (note that a0 is the first one, this is the opposite order provided by
Excel). Values are separated by one or more space characters.
The component has been replaced. The image below shows the updated list of
components, with type 310 used for the fan_30lps.
654
Press - Exit to return to the Fluid Flow Network main menu.
655
⚠ Do not use the Save option, and if you do so, do not save a 3D network file if you
receive the prompt below.
Select interactive
The simulation should run in a few seconds. The image below shows the new results for the
CO2 concentration in the Manager A zone. Results are particularly different on around hour
109 in the graph, where the CO2 level does not show the spikes seen on the other days
(and during this day in the flow rate results). On most days, the fan turns on and off in
alternating 5 minutes time-steps, as the CO2 lower setpoint concentration of 2 g/kg
reached. On one time step the fan is active and brings the CO2 level below 2 g/kg, while
656
on the next time step the fan is off and the CO2 level reaches around 2.4 g/kg triggering
the fan on the next time step. This does not happen in the forth day of this simulation.
The alternating flow rate pattern is seen in most days in the flow rate graph below. Note
that the flow rate on the fourth day of simulation is constant and it is also slightly lower
than in other days.
The graph below shows the pressure difference across the fan, where hour 109 has the
highest pressure difference to be handled by the fan. As the pressure difference increases,
the flow reduces (following the fan curve). The reduced flow rate never managed to bring
the CO2 concentration below the 2 g/kg setpoint, therefore the fan did not turn off.
657
The increase in pressure around the hour 109 is related to a peak in wind speed, creating
pressure in the building envelope acting against the fan, as seen in the graph below.
This is just an example of how a fan curve can be implemented in fluid flow networks in
ESP-r. The impact of using a fan curve depends on the network setting and boundary
conditions applied to the nodes.
658
In the example above, Excel was used to derive the coefficients for the polynomial equation
describing the fan curve. It is also possible to enter data points from the performance curve
directly in ESP-r, and the program will create the regression equation automatically.
This is done by selecting perf curve instead of coefficients in the dialog below.
The user should then inform the number of data points to be provided to ESP-r.
And then provide the volume flow rate and pressure for each point, in consecutive dialogs
as below:
ESP-r calculates the coefficients and report them in the text feedback area, as below:
Note that this coefficients are only slightly different from the ones obtained using Excel.
Both approaches (coefficients or perf curve) provide equivalent results
659
71 Understanding fluid flow network control
files
This tutorial uses the exemplar b technical features > c ... with natural ventilation
660
The summary of this network is reproduced in the image below, indicating that two large
windows are available in each room, one low and another high, Each room also has cracks
around windows, and a door undercut connecting it to the corridor. The corridor has a grill
taking air to/from the outside.
661
Control file for the fluid network
Exit the fluid network menu, returning to the Browse/edit/simulate menu. Select k
network flow (4 loops).
Take note of the name of the control file and do not press ok yet.
Before pressing ok, use a text editor (such as NotePad++) to open this file and see its
contents. It useful to open the control file in a text editor as well as on prj. A sample of this
file, regarding the first control loop is reproduced below. In ESP-r, a single control file is
used for several model domains. The mass flow part starts at line 29 in this file, marked by
*mass flow. During the tutorial, whenever changes are implemented and saved using prj,
it is possible to also see the updates being loaded in the text editor.
71.2 Results
662
This is a sample of results for this model, just to illustrate that the model is currently
functional. This tutorial does not explore these results and does not discuss the impact of
control strategies on these results, focusing on presenting the different options available
for control of fluid networks.
663
71.3 Controls menu
The controls of this fluid network show 4 loops, one for which window.
664
At this point, the text feedback menu describes the control settings for this loop, as
exemplified below. In this loop, the sensor is placed in a node on manager_a, and the
actuators is located in a flow network connection. The period data indicates that
This feedback is very important to understand the control, as the options provided in the
menu use codes instead of a human-readable options, as in the Editing Options menu
reproduced below.
As in the thermal domain, controls are based on the location of sensors (b) and actuators
(c), and period data (d) where control rule and setpoints are defined.
665
Select a manager_a
The sensor definition is complete. Select option a for all questions related to the actuator
until you return to the Editing Options menu. The menu should look like the image below
on the left. Positive numbers indicate that a point in a thermal zone was selected for the
sensor. The number indicates the zone. In the images below, the sensors are placed on
zones 1 (on the left, based on the options described above) and 2 (on the right, in case the
zone manager_b was selected - zone number follows the same order they appear on
menus).
666
71.4.2 Placing the sensor in a construction node
It is also possible to place a sensor on the surface of a building component, or inside the
component. Following the example in the previous section, proceed until the dialog
Location, as in the image below. Select surface
Select c door
667
Enter 2 to use the node in the middle of this layer.
Sensor selection is complete. The menu is now dedicated to the actuator selection. Select
option a for all questions related to the actuator until you return to the Editing Options
menu. The menu should look like the image below After selecting the actuator, the menu
reflects on line b the new sensor, as in the image below
668
Select network node.
When the option j senses flow at a node or connection is selected in the previous menu,
the menu workflow takes a counterintuitive structure, as the actuator must be defined
before the sensed node is selected.
Select any actuator, as for example, a single flow connection and a man_alow in the
next two menus.
669
Once the actuator is selected, the node for the sensor placement can be selected using the
menu below. Select a manager_a.
This will return the same control currently used in the model, as seen in the image below.
670
Where: -4 indicates that the control senses flow at a node or connection, 1 indicates the
fluid network node id (in this case, the manager_a), and 0 control based on the dry bulb
temperature at node. In principle, it will have the same effect of having a sensor with values
1 0 0 (selecting the air node of the first zone).
After selecting the actuator, the control menu reflects the new sensor.
671
Where: -3 indicates a weather variable is used for this sensor, and 2 indicates the variable
(following the same other shown in the menu, i.e. c dry bulb = 1, e wind speed = 2, ...).
Select b manager_b
672
There may be several casual gains defined for this zone. The index field is described in the
help available for this dialog, reproduced below.
Sensor definition is complete. After selecting the actuator the menu should look like the
image below, where -7 indicates the use of casual gains and 1 indicates the casual gains
index.
673
Select network node.
Select the actuator, as in the previous example using sensor on fluid flow network nodes.
674
Select the 2nd node d man_alow
Where -4 indicates a node of the fluid network is used for sensing, and the next two values
indicate the index of the two zones used for the temperature difference calculation. The
fact that the temperature difference was selected for this sensor is not represented in the
sensor details. The fragment of the control file below shows the value 24 at line 37,
indicating that the type of control is based on the temperature difference between nodes.
This line, related to the period data, is modified when the sensor for delta T is selected,
even if no change in the period data was carried out. Note, however, that the rest of the
675
period data is not adjusted automatically and must be addressed before attempting to run
a simulation with the new sensor position.
Select a
Select a on/off
Enter the values as in the image below, indicating that the connection will be fully
(fraction of 1) open (on above the setpoint) if the setpoint (temperature difference) was
above 0 (i.e., if the temperature of the first sensed node is higher than the second),
676
The image below shows the new period data in the control file.
71.5 Actuators
The most common actuator in fluid flow network controls is a connection in the network.
This option is represented by the values -3 in the control file line for actuators.
The following value indicates the index of the connection where the actuator is placed.
677
72 Define solar obstructions
72.1 Role of solar obstructions
Solar obstructions can be used to represent the reduction in solar radiation due to
neighbors, trees, topographic elements and even parts of the building that shade other
ones.
Carry out a simulation and plot the solar gains on the Reception zone(see image below).
Solar gains in clear sky days are up to 3000 W.
m browse/edit/simulate
c composition
a geometry & attribution
Select the zone that will be obstructed (obstructions are defined separately for each zone).
In this example, let's consider the reception of the multizone exemplar.
h solar obstruction
678
The Obstruction menu is now available, as in the images below:
The block menu is now available, as in the image below. In this menu, it is possible to set
its properties.
679
Select a origin X Y Z
Choose edit origin and enter the following values: 3.0 -4.0 0.0
Select b block W D H
The size of the obstruction is updated as in the image below, showing a large obstruction
on the south of the building.
680
Other options in this menu can be used to rotate and tilt the model. It is also possible to
control the opacity of the obstruction.
This option opens the menu dedicated to shading (external elements blocking a fraction of
the solar radiation that would reach the thermal zone) and insolation (fraction of solar
radiation absorbed by each internal surface of the zone). These factions are calculated by a
separate ESP-r module.
681
Note that in calculated shading was "not requested for this zone" yet.
Select b calculated shading, and select all applicable surfaces in the following dialog.
In the Zoning shading and insolation menu, select e invoke shade/insol analysis
Select do now
ESP-r asks you for the name of the file where the fractions for shading and insolation will
be stored. Accept the suggested name pressing ok.
The module for shading and insolation calculations is opened in a new window
682
The image below reproduces the main menu of this module. Select g calculate shading.
Select update
683
And the end month:
ESP-r will show warnings indicating that data for shading is already available, however these
data does not consider the obstruction added in this tutorial, so press Yes to overwrite the
existing data whenever prompted.
ESP-r will not show any message when the calculation is concluded. You can check the
results of the calculation by choosing h shading synopsis in the main menu of the module.
The module will ask you for the month of interest (as in the image below), press ok.
Results for the first surface will be displayed in the text feedback area. The user can use
options in the dialog are to see results for other surfaces of interrupt the process. Press no
to return to the main menu.
684
Select - exit Shading/Insolation
This closes the shading and insolation module and return to the Project Manager.
685
Exit the menus and run the simulation to see the impact of shading on the results. The
image below shows solar gain results much smaller in the office due to the obstruction
72.5 Self-shading
In this exemplar model, there are overhangs on the south and west facades. These
overhangs will not be considered in the solar calculation of the reception and office unless
it is also represented by a obstruction.
686
687
73 Disable time-step averaging of results
For some applications, it is necessary to disable a feature of ESP-r called time-step
averaging. This feature reduces numerical instability, and will by default average
consecutive time-steps. This averaging is not suitable, for example, in cases where
detailed information about each time-step is essential to an energy assessment, or when
energy stored in the outer node of the walls is investigated.
⚠ This is not the same of the "average hourly results flag" defined in the simulation pre-
sets of prj. The average flag addresses multiple time-steps in a hour, and average their
results in a single hourly value.
Once ESP-r simulator starts (bps), use options c initiate simulation, and then g
simulation option, followed by a timestep averaging >> ON.
Use the option s commence simulation. The simulation runs and results are saved
without averaging values for every time-step.
688
74 Create operation file from scratch
74.1 Set internal load
In this section, you can define the internal gains that come from occupants, lighting, and
equipment.
689
Afterward, you will be directed to a menu to select the targeted zone. Below is a
screenshot from the "casual_gain_ctl" an example model in ESP-r. These twin chambers
each have a different internal load schedule.
At this stage, you should already know how many people will be in your zone, and you
can define their presence based on an hourly schedule. The activity of people can give
you an indication of the energy emitted from people (remember that people emit
sensible and latent heat load). You can also specify the type of lighting and its heat
emission, as well as the heat emitted from the equipment. Any load that is active for less
than one hour can be modeled as a fraction of the full hour's internal load.
After selecting the zone, give your operation file a name. A file with the .op extension will
be generated, usually in the \zones directory.
When defining the file for the first time, a menu will appear for you to either create a load
schedule from scratch or use pre-defined schedules. select "a define from scratch"
690
In the following section, we will go through the process of defining an internal load from
scratch, using the example of people's heat load. First give you load a name in our
example we refer it to people.
Then, select the type. We will go with the basic occupant, which gives us the possibility to
define the load in either Watts or Watts/m². select "b people basic occupant W & m2/p"
691
The interface will guide you through a loop of four day types: weekdays, Saturdays,
Sundays, and holidays. For each of these, you need to specify how many periods you
require within the day.
For example, if you choose to have three periods on weekdays, you can set the starting
hours as follows:
In this case, you can specify that the period between 8 and 17 hours has internal loads
from people, while the other two periods have no loads.
692
You can change between the day type by clicking on the highlighted "3 loads >>"
693
To define the loads for each period, you will need to adjust the following inputs:
• People Heat Load: Specify the amount of heat emitted by people during this
period. You can enter this value in either Watts or Watts per square meter,
depending on your preference.
• Lighting Heat Load: If you want to include the heat generated by lighting during
this period, you can enter the amount in Watts or Watts per square meter.
• Equipment Heat Load: Similarly, you can specify the heat generated by
equipment in Watts or Watts per square meter.
These inputs will allow you to tailor the internal loads for each defined period based on
your specific requirements.
74.2
694
75 Understanding the impact of latent casual
gains in the RH of the zone
This section describes the close relation between latent casual gains and the relative
humidity inside thermal zones.
Latent gains, such as the 300W due to occupancy between hours 9 and 17, are considered
as moisture sources, increasing the amount of energy in the model by adding water vapour
to the air node.
695
Relative humidity results for the exemplar model show values as low as 30% in the middle
of the day, as moisture released by occupants is added into the warm air inside the zone
(as the heating systems keeps the temperature at 20C). The graph shows peaks around
70% in the evening, when the warm and moist air inside the zone cools down and is no
longer able to hold the same amount of moisture. The air node temperature reduction
reduces the saturation pressure and leads to a higher relative humidity.
696
75.2 Remove latent gains from the model
The figures below show the modified casual gain menus for the Reception and Office of
the exemplar model, with no latent gains.
Results of relative humidity for the Reception using the updated casual gains are shown in
the figure below. During the middle of the day, RH drops to 20% in some days, and it never
reaches values above 50% in other days. This demonstrates the role of latent casual gains
in the zone RH.
697
698
76 Change the emissivity or absorptivity of a
component
76.1 Material and construction databases
It is possible to change the absorptivity or emissivity of each individual construction using
the composition > construction menus (illustrated below). This change is local and only
affects the selected surface.
It is also possible to change these values on the database and automatically apply
changes to all surfaces that use the modified component.
Absorptivity and emissivity are properties of materials, which are retrieved by ESP-r when
that material is used in the external or internal layer of a component.
Select b databases
Select e constructions
Select a browse/edit
699
Select j legacy constructions & models (it may be necessary to explore other classes to
find the component of interest)
Select a extern_wall
The properties for this construction are displayed in the menu area (reproduced in the
figure below). Note that the outer layer uses the material LT brown brick. This is the
material that needs to be target if changes in absorptivity and emissivity are expected to
impact in all surfaces of the model using this component.
Select b databases
Select d copy default file to model (this step is essential to limit changes only to the
model, and not to all models in ESP-r)
Select a browse/edit
700
Select a Bricks (15)
Select option g, which holds the properties of the Lt brown brick used in the external
walls of the multizone exemplar model
Enter 0.05
The value above is arbitrary and used only this tutorial to represent the extreme scenario
where all external wall are covered by a low-e coating or foil)
Select - Exit
In the "Accept changes" prompt, press yes (and to the same in all subsequent similar
prompts)
Press yes to "Save materials changes" and too "Overwrite file" prompts.
Press yes to accept subsequent prompts regarding update and save relevant files.
⚠ Note that this change will affect all component using the LT brown brick so there may
be unintended consequences in the model. It is recommended to make a copy of the
material and apply the copy of the material to the construction component.
Select m browse/edit/simulate
Select c composition
Select # update all zones (and accept subsequent prompts to update and save relevant
files)
701
The updated value should now be visible for every external wall which uses the Lt brown
brick at the external layer.
702
77 Link controls loops to thermal zones
Whenever controls are created of modified in ESP-r, it becomes necessary to link them to
zones (or other applicable entities). If the link is not defined, the user receives the
message below when attempting to exit the Control menu.
m browse/edit...
i zones (1 loop)
This model has 1 control loop (as indicated in the line between options c and d.
The different days types used in this control are listed after the field cntl loop.
703
On the dialog below, select loop through all zones
The following dialogs will request the loop number to be used in each zone of the model.
The first dialog asks for the control loop to be used for the reception. Press ok to accept
control loop number 1.
The next dialog is dedicated to the office zone. Press ok to accept control loop number 1.
The next dialog is dedicated to the roof zone. The roof in this model has no control, i.e.
there is no injection or extraction of thermal energy and ESP-r will calculate temperature
fluctuations just base on the properties of the model and boundary conditions applied to
the zone. This is indicated using the control loop number zero. Press ok to accept control
loop number 0.
Now used the following options to save these controls and exit the menu:
Select - exit
m browse/edit...
704
i zones (2 loops)
The menu shows two loops, named: zn_compling_pc_6 and zn_compling_pc_8. In this
model, it is possible to link zones to one of them, or to enter loop number 0 if the zone
has no controls.
705
78 Use custom fixed convective transfer
coefficients
Convection is an important heat transfer mechanism in most energy systems. When
modelling unusual systems or validation/theoretical cases, users may need to replace
ESP-r default convective heat transfer coefficients (hc) by custom values.
Use this model to plot the external temperature of the South surface of the Reception
zone, as in the image below:
m browse/edit...
c compositions
q integrated simulation
automated
After the simulation is concluded. Invoke the Result Analyser using t result analysis
On the Result Analyser, plot the graph using the following options.
a graph
a parameter plot
a weather
b dry bulb temperature
- exit
b temperature
k outside surface temp.
-exit
a south
-exit
-exit
-exit
! draw
The graph shows surface temperatures up to 28°C, while the air temperature is much lower.
This graph will be used as reference for comparison to the case with custom hc. If
convection increases (higher hc), the surface temperature should come closer to the air
706
temperature, and a reduction in convection (hc) should increase the surface temperature
by reducing convection losses.
m browse/edit/simulate
c composition
g convection coefficients
The menu indicates that none of the zones uses a custom hc file.
Select a reception
The dialog area suggests a name and location for the new file. Press ok to accept it.
707
The dialog provide the option to define hc based on day types (such as weekday and
weekend). Press All days treated the same.
The Heat transfer coefficient/correlation menu is presented. While this tutorial only
covers fixed hc values, this menu offers several options for empirical equations (most of
them focus on the inside surface).
This option supports the definition of fixed hc values for the inside and outside surfaces.
These two fizxd value are applied to all surfaces of all zones.
Press ok to accept only one control period, so the same hc value will be applied to the
whole day.
708
Press ok to accept the start and end time of this period.
The User defined or CEN values menu now display the custom set of hc defined by the
user under option b.
709
ESP-r asks for the confirmation of file names and warns about overwriting files. Press ok
whenever prompted.
The menu now shows that the hc file for the Reception is defined.
Exit this menu, run a simulation and plot the temperature of the South surface of the
Reception, as in the image below. The reduction of convection losses leads to a significant
increase in the surface temperature, which now reaches more than 37°C.
710
78.3 Edit the fixed hc value
On the Project Manager, select:
m browse/edit/simulate
c composition
g convection coefficients
a reception
711
As in the first part of this tutorial, press ok to accept start and end times, select fixed
coefficients, and select user inside and outside.
When custom hc values are edited, Program Manager shows a menu with all surfaces in
the zone and their respective hc values. Users can edit values per surface using this menu.
Press - exit, and then save the new values and exit the Heat transfer coeff menu.
Exit this menu, run a simulation and plot the temperature of the South surface of the
Reception, as in the image below. The increase of convection losses leads to a significant
reduction in the surface temperature, which now is close to the external air temperature.
712
713
79 Create a weather file based on custom data
This tutorial describes the steps to import weather data to ESP-r when data is in an
unconventional format. For information on regular weather files, please see the tutorial
Import weather data to ESP-r.
Note that both dry bulb temperature and wind speed are in tenths of °C and m/s, so
values such as 2.3°C and 4.7 m/s will be expressed as 23 and 47, respectively. This avoids
the use of decimal values, simplifying the import process.
The file name should be as simple as possible, as the user needs to type this name in the
dialog box during the import process. No headers are needed, and the file should look
like the image below.
714
79.2 Custom data example
For this tutorial, the following data file is provided: customdata.csv
This data shows data where the following values are equal to zero throughout the year:
dry bulb temperature, diffuse horizontal solar, wind speed, and wind direction. Direct
normal solar shows a pattern of 12 hours equal to zero, followed by 12 hours with
constant radiation close to 1400W/m2.
715
79.3 Exemplar model and custom data file location
This tutorial uses the exemplar model a simple > f ... multizone with convective
heating & basic control
After opening the exemplar, place the CSV file containing the weather data to be
imported in the dbs folder of the model, as in the image below.
b databases
a annual weather
Select e copy to model to copy the current weather file from the central ESP-r database
to the model where it can be modified.
716
Press ok to accept the suggested name. The extension is arbitrary and ESP-r will accept
any extension defined by the user.
Select k import
717
Select ASCII ESP-r.
Select yes. This will override the whole dataset in the current file by data from the
imported file.
The dialog box requests the name of the file to be imported. It is important to know the
name and path of this file, as the user must type it in the field. Name and path are case-
sensitive, and copy/paste is not enable in these dialogs in ESP-r.
As the file was placed in the dbs folder, and the default location of ESP-r is the cfg folder,
the relative path to the file is: ../dbs/customdata.csv
Press no, as the imported file has no information about site info. This must be done
manually after importing the file.
718
Press no, as the file does not have lines indicating the beginning of each day.
The text feedback area shows a message indicating the new data was save to the file. This
means that the bld_basic.climate file now holds the data imported from the CSV file.
d graphical
1 set period
b January
c direct normal radiation
! draw graph
The graph below is plotted by the Weather module, showing the expected pattern and
values for the direct solar radiation.
Select:
- exit
- exit weather analysis
The Weather module is closed and the Project Manager becomes active again.
719
Select - exit menu to leave the database management facility. Whenever asked by ESP-r
to confirm changes in the database, press yes or ok to accept the suggested option.
m browse/edit/simulate
b context
a latitude
In this tutorial, the latitude was set to 0, to represent a model at the Equator.
It is also possible to adjust the longitude difference between center of the local time
meridian, but this parameter has minor impact in simulation results. The local time is
defined by weather data, as each line indicates one hours in local time.
720
80 Modelling blinds activated as a function of
temperature
This tutorial describes the steps to model internal blinds controlled by the external air
temperature. Other blind positions and other types of control can be implemented using
a similar approach.
b databases
a annual weather
b select another
f Egypt, Aswan, 1986
- exit menu
The Weather module will start. Close it, as there is no need check the weather data in this
file.
The Database management menu should indicate the new weather file on option a.
721
Select - exit menu and accept the prompts shown by the Project Manager related to
model updates.
Run a simulation:
m browse/edit/simulate
s simulation
g from...
And enter:
5 8
8 8
Run a simulation:
q integrated simulation
automated
Once the simulation is complete, select t results analysis on the Project Manager to
open the Results Analyser module of ESp-r.
Once the result file is open, select 4 building zones on the Module options menu.
722
Select a reception followed by - exit menu to confirm the selection.
a graph
a parameter plot
b temperature
a dry bulb (db) temp.
-exit menu
! draw graph
The graph shows that the indoor temperature reaches values above 45C.
Select:
d solar processes
a entering from outside
! draw graph
723
Select:
a weather
a dry bulb temperature
-exit menu
! draw graph
The graph indicates the external air temperature (bold line marked as Ambient) varies
from 27 to 43 C. Note that the indoor temperature is always higher than the external one.
⚠ For this tutorial, let's assume that the blinds should close when the external air
temperature is above 31C, which would allow users to enjoy the window view in the
morning, and close the blinds as the day gets hotter. This value is not a recommendation
and it is just used here to demonstrate how optics controls wor.
724
Close the Results Analyser and return to the Project Manager.
725
80.4 Investigating optical properties used in the model
On prj, select:
m browse/edit/simulate
c composition
b construction material
a reception
Select use it
Select continue
Select j glz_s
The menu shows attributes to the surface. Take note of the name of the optical property:
DCF7671_06nb. This is the set of optical properties that will be modify to account for
blinds.
726
Exit all menus and return to the first menu of the Project Manager. Select b databases.
727
Select d copy default to model ../dbs to create a copy of the database in the model
folder, as we may need to modify it to include optical properties accounting for blinds.
The first page of the Optica Properties db menu is shown, as in the image below. Note
that option q corresponds to the properties used in the model, and at the end of the line
it is described as a set of 6mm glass panels with no blinds. Select q.
728
ESP-r shows a graph with the transmittance, reflectance and absorptance of the assembly
for different angles of incidence of solar radiation. The menu shows the direct
transmittance for the whole assembly option f) for different angles of incidence. The
menu also shows the absorptance of each layer of the assembly (glass_air_glass). These
values are typical of glazing with no blinds. Press - exit menu to return to the Optical
Properties database.
729
In order to model blinds using optical properties, it is necessary to have two sets of
properties, one with and one without blinds. In some particular cases, such as the present
one, ESP-r database already includes an option of the properties with blinds (option r
DCF7671_06ib for this particular assembly), therefore, there is no need to modify the
database. Select option r. to explore the properties with blinds.
The curves in the graph show a dominant role for absorption, and small transmission and
reflection. The first layer of glazing (option h) has very high absorptance, emulating the
effect of blinds.
Now that two sets of optical properties are available (with and without blinds), the tutorial
concentrates on linking this properties (to allow one to be replaced by the other
whenever blinds are activated), and on creating a control that specifies which zones have
blinds and that they should be activated based on the criterion previously defined, i.e.
outdoor temperature above 31C.
Exit this and other database menus, and return to the first menu of the Project Manager.
730
In cases where ESP-r does not provide an option with blinds, it is necessary to create a
copy of the relevant optical properties, by using the item * import/add/delete/copy
element at the end of the menu.
m browse/edit/simulate
c composition
b construction material
a reception
Select use it
Select continue
731
Select define alternative optical property
732
Select > save construction data and accept the prompts to save files.
These steps will be saved in the construction file of this zone, located in the folder
zones. The file now has a second set of properties, as shown below.
The Controls menu opens with the control focus on optics (first line).
Press ok to accept the default value of one period for the control
734
Select b sensor details: 0 0 0 0
Select c dry bulb temperature to use the external air temperature as sensed variable.
735
In the Editing Options menu, select c actuator details: 0 0 0
Select a reception
After defining sensors and actuators, the Editing options menu should loo like in the
image below.
The Optical control periods menu opens. Select the only period available a 1 0.00
standard optics use standard optic.
736
Select a control tmc optics.
Enter the setpoint for the external temperature where optical properties should be
switched by ESP-r.
737
Exit all control menus and save/overwrite files whenever asked.
The control file, located on the ctl folder, should now have lines related to the optics
control.
The graph below shows a significant reduction in solar energy entering the zone, with a
clear drop when the external temperature reaches the setpoint of 31C. The impact in the
zone air temperature is noticeable, particularly on the first two days the the indoor
temperature stays below the outdoor during the day.
738
81 Modelling adjacent zones
This tutorial describes the modelling of zones which are side-by-side (sharing a wall) or
are one on the top of the other (sharing a construction for floor of the upper zone and
ceiling of the lower one). In these cases, both zones have to be defined separately, and
the wall (or any other surface) separating the zones must be defined in both zones
following certain rules.
The image below shows a Storage zone, to be added to the original exemplar. Storage
and Reception share a wall and a door, and the tutorial describes the process to create
this new zone (with matching surfaces).
739
In cases like this, the best approach is to define the surface in one zone, and then copy it
to the new zone. The procedure is described in this tutorial.
This order is important because is assists ESP-r on understanding which side of the surface
points outwards. It is possible to visualize these normal vectors pointing outwards for each
surface in a zone using the image control button (position between the graphic and the
text windows). Select option n surface normals >> hidden. It will toggle this field to show,
and plot the arrows as in the image below.
740
This indicates that, when a surface is copied between zones, the order of the vertices must
be inverted to make sure the new surface normal points outwards (as expected by ESP-r).
741
Select - exit menu
742
The surfaces of interest are c passg and k door_p.
Leave this menu and return to the first menu of the Project Manager. Navigate to the
construction database to check the properties of the constructions of interest. Select b
database > e construction > a browse/edit > b internal partitions > f gyp_blk_ptn.
The menu below shows the layers of the wall construction, indicating a central block with
one gap and one finishing gypsum board on each side. Option g indicates that the layers
in this construction as SYMETRICAL. This information is relevant when a construction is used
in a surface shared by two zones, as a symmetrical composition can be assigned to the
matching surfaces in each zone.
743
Press exit twice to return to the Construction Classes menu, Select c inside and outside
doors > a door. This construction is also SYMETRICAL, so it can be directly used in the
shared surfaces.
Press - exit menu five times to return to the main Model management menu.
744
81.3 Creating the new zone
81.3.1 Adding a zone
Select m browse/edit/simulate > c composition > a geometry & attribution > *
add/delete/copy
Enter a description:
Enter the origin for the new zone, matching the position of vertex 3 in the Reception
zone.
Accept the default values for orientation, elevation, and accept to overwrite the ctl file.
745
81.3.2 Deleting the unnecessary surface in the new zone
Select e surface list & edges
746
81.3.3 Copying surfaces from the Reception into the Storage
Select + add/insert/copy/extrude from
On the new surface option menu, select e copy surface(s) from another zone
Select accept tolerance to use the default ESP-r value for small discrepancies between
vertices positions.
Select a reception
747
Select the two surfaces to be copied from the reception into the new Storage zone. The
selection is indicated by *. Press - exit menu.
When surfaces are copied from another zone, they can be modified (e.g. rotated, moved).
In this case, the surfaces will remain in the same position, so it is only necessary to invert
the surfaces. By selecting this option, the Project Manager changes the order of the nodes,
and this assures that the copied surface will have its normal point outwards (as expected).
Select invert
Select yes to make the connection between the original and the copied door surface.
748
Press ok to update the connection file.
Press yes to repeat the operation to the passg surface, followed by yes to link surfaces
and yes to update the cnn file.
ESP-r identifies that the surfaces in the reception have now the Storage room as
boundary condition. press yes to accept the update of properties in the reception
surfaces.
The Storage zone now has a shared wall with the reception.
The image below shows the normal for the surfaces of the new zone,
749
Remember that before running a simulation, the other surfaces of the new zone must be
configured (constructions and boundary conditions), and new construction and operation
files must be created for the zone.
750
82 Calculate reverberation time
82.1 Calculate reverberation time
ESP-r is primarily used for energy simulation, but there were initiatives to extend its
capabilities to other domains.
This tutorial provides a brief example of the Acoustic Module of ESP-r, called aco.
cp -R /opt/esp-r/training/acoustics/ ~/
cd ~/acoustics/cfg
ls
The model comprises a cfg file, and two other file types dedicated to acoustic properties
(extensions bcf and aco).
The Acoustic module opens and shows an image of the model geometry and a range of
options on its main menu.
751
82.3 Simulation parameters
Acoustic simulations require material and occupancy properties that are fundamentally
different from the ones available in a typical ESP-r model and databases. These properties
are listed in two separate files, described below.
752
These files (BCF and ACO) are ASCII and can be opened/edited using any text editor.
Select Yes to display the properties of surfaces on the text feedback area.
The calculation using the selected method (Sabine, in the case of this example) is carried
out. Results are shown as a function of the frequency.
754
83 Life-cycle analysis
ESP-r is primarily used for energy simulation, but there were initiatives to extend its
capabilities to other domains.
This tutorial provides a brief example of the Ecobalance Module of ESP-r, called eco,
dedicated to Life-cycle analysis.
cp -R /opt/esp-r/training/acoustics/ ~/
cd ~/acoustics/cfg
ls
The model comprises a cfg file, and two other file types dedicated to acoustic properties
(extensions bcf and aco).
The Acoustic module opens and shows an image of the model geometry and a range of
options on its main menu.
755
83.1.3 Open the material properties file
Select b BCF
756
Press ? to obtain a description of each analysis type, as reproduced below. Press dismiss
to close the help windows.
Results for each surface are provided in the text feedback area.
757
84 Computing the thermal effect of reflections
from obstructions via Radiance
This tutorial explains using the Modish facility to calculate the thermal effects of reflections
from obstructions using Radiance. This is achieved by modifying files generated by ESP-r’s
ISH (insulation and shading) module. The facility enables high-resolution ray tracing
computations to be integrated with ESP-r’s energy calculations, providing realistic
modelling of reflective obstructions. It allows users to specify the ratios of diffuse versus
direct reflectivities without relying on pre-calculated or empirically determined bidirectional
scattering distribution functions (BSDF).
Each option modifies the configuration file governing the application module, named
modish_defaults.pl. This module currently operates externally to ESP-r and is installed in a
dedicated modish folder within the bin directory of the ESP-r installation. The underlying
rationale for the application is discussed in detail in the paper available here.
Each menu selection modifies the configuration file instantly and silently—no additional
confirmations are needed. Modifications are applied one at a time as you click each option.
Here are the menu options available under “Update shading for reflections”:
758
1- compute reflections from obstructions'
2- do not compute reflections from obstructions'
These options toggle the activation of the reflections procedure. Selecting option 1
enables the process.
5- shd.f.cor+dif.pip.+grnd refl'
Similar to option 4, but includes the shading effect of obstructions concerning ground
reflections. However, this option approximately doubles computation time.
This section defines the number of diffuse ray "bounces" considered in Radiance’s
calculation of diffuse reflections. This setting significantly affects computation times.
For simple problems, 1 bounce is sufficient. For moderately complex scenarios with some
interreflections, 2 bounces are usually adequate. For highly complex interreflections, 3
bounces may be necessary.
For even more interreflections, manual modifications to the configuration files are required.
Direct bounces, on the other hand, are much faster to compute. The default is 7 direct
bounces, which can only be adjusted by editing the configuration file directly.
To modify the number of diffuse bounces via the menu, the following options are available:
760
This option allows you to define the number of sensors for diffuse and direct radiation on
the receiving surfaces. Since diffuse calculations take significantly longer, the resolution for
diffuse sensors is usually set much lower than that for direct radiation sensors.
(1) The first strategy is creating a file named “modish_request.pl” manually to target
specific zones and surfaces.
(2) Calling Modish from the command line with the desired parameters, one zone at a
time.
As regards (1), in the first line of the “modish_request.pl” file one has to write the
following things:
For example:
1 1 7 and 3 5,
761
would mean: take into account the reflection from obstruction for zone 1, surfaces 1 and
7, and zone 3, surface 5.
If the file "modish_request.pl" is absent, all the existing transparent surfaces in all the
existing zones of the model, will be taken into account in the calculation of reflections from
obstructions.
In the second row, one should write the name of the model configuration file in the “cfg”
model folder.
As regards (2), calling Modish from the command line one zone at a time, works only
when the shading computations are in monthly mode, not in embedded mode.
To use the command line, Modish refers to the configuration file but processes only the
specified zones and surfaces. Use the following syntax (see
https://metacpan.org/pod/Sim::OPT::Modish):
perl ./Modish.pm
PATH_TO_THE_model_CONFIGURATION_FILE.cfg zone_number surface_1_number surfac
e_2_number surface_n_number
For example:
perl ./Modish.pm/home/x/model/cfg/model.cfg 1 7 9
Select this option in monthly mode to activate Modish recomputations. This step is
unnecessary both when Modish is launched from the command line and when the shading
calculations are set to be performed in embedded (non-monthly) mode.
762
Appendix 1
Additional resources
763
85 Tips for new Linux users
Most users reading this chapter will have no previous experience using Linux, and this
section intends to provide the basic skills needed to use ESP-r properly. Some tips rely on
Ubuntu GUI and, therefore, are only suitable for some users, while most command line tips
are useful for Ubuntu and WSL users. Many tutorials are available on video on the internet,
so if you prefer, you can rely on them to get familiar with Linux instead of reading this
section.
This command opens a terminal that may occupy the entire desktop (see the next figure,
on the left). You can resize it to better use your desktop space.
764
Ubuntu desktop with a terminal opened (left) and showing the terminal resized (right)
To see the full path of your home folder, use the command “pwd,” which stands for
present work directory.
The File Manager allows you to see the content of the Home folder. The figure below shows
a Terminal window and a File Manager window open on the desktop. This configuration is
ideal for practising terminal commands related to file and folder management, as you can
type commands in the Terminal and compare the response with the folders and files you
see in the File Manager.
765
Terminal and file manager open side by side
You can list the files and subfolders in the current folder using the list command given
below.
ls
This will give you the following response, listing the folders in your home folder.
Output of the “ls” command on the terminal compared to the folders in the File
Manager
The terminal is case-sensitive, so pay attention to upper- and lowercase letters. The
command below will not work because it uses uppercase characters incorrectly.
⚠ LS
All commands have a user manual that can be accessed by typing man before the
command:
766
man ls
This will return the text in the figure below, with all possible flags that can be used when
invoking the “ls” command. Use the key ENTER to move to the next lines of the manual, or
type “q” and press ENTER to quit this manual and return to the prompt.
For example, the flag “-a” forces “ls” to list all files, including the hidden ones. Quit the
manual, return to the prompt, and issue the following command:
ls -a
You will see a much longer list when compared to the one you got the first time you
issued the command due to the inclusion of hidden files in the listing (shown in the image
below).
767
The point here is that you should get used to reading and using the Linux commands
manual to improve your skills on this OS and terminal. Numerous examples on internet
forums show how to use flags to perform particular operations with a given command.
Moving on, we will now address how to navigate the folders using commands. This is an
important skill in any OS, and it is essential knowledge for the automation of repetitive
tasks you may encounter by using custom programs. You will learn how to write them in
the section dedicated to Automating ESP-r).
In Ubuntu, you can use the command “cd” to change your current folder in the prompt.
Assuming you are in the home folder, you can use the following command to change to
the sub-folder “Documents” (remember, all commands are case-sensitive):
cd Documents
As a response, you will see that your current folder is indicated below.
If you use the command “ls,” you will see that the Document folder is empty. You can return
to the folder one level higher by typing:
cd ..
The expression “..” always indicates a level higher in the folder structure. You can keep
issuing this command to move up in the folder structure.
After a few times using “cd ..”, the current folder will remain unaltered, indicating that you
are at the highest level, also referred to as root. Listing the folders on root will show:
768
Sub-folder structure of the root directory
There are a few important sub-folders in the root:
• bin and usr hold many of the programs installed in the system
• etc holds some new programs added to the system, and this is the default
location to place ESP-r executable files and databases
• mnt is the location to find external disks and USB pen drives
• home is the place where you will have your user home folder
To return to your home directory, you can use the following two commands issues one
after another:
cd /home
cd user
This will bring you back to the point where we started, the “~” folder, where we will
preferably place our own files.
You can use the shortcut “/” to point directly to the root folder:
cd /
You can also use the shortcut “~” to point directly to your home folder:
cd ~
You can have complex paths in the command “cd”. Assuming you are in the home folder,
you can use the following command to move to the folder mnt in the root:
cd ../../mnt
The command above moved twice up in the folder structure to reach the root directory
and then moved to mnt.
769
Until this point, we used the command “cd” to move to relative paths (up or down in the
folder structure). We can also use absolute paths. The command below, for example, moves
the prompt to the Documents folder regardless of where it is used:
cd ~/Documents
The same applies to the command below, which moves us to the mnt folder, regardless of
the place it was issued from:
cd /mnt
In the last two commands, the folders “~” and “/” were used to define absolute paths.
mkdir <directory_name>
where <directory_name> should be replaced by the name of the new directory you want
to create. The command below creates a sub-folder named “mymodels” in the user home
folder:
mkdir ~/mymodels
You can use the commands “cd ~” and “ls” to go to the user home folder and list the
directories, showing you the new folder you just created.
Some useful commands for file management to copy, move and delete files are:
cp <original_file_name> <copy_file_name>
mv <file_name> <destination_folder>
rm <file_name>
The next figure shows the operations to copy a file in the home folder, move this copy to
a folder called “mymodels” and then delete this file.
770
Example of using the commands to copy, move and delete files
85.4 Productive tips when using the terminal
You can recover previous commands by using the key ↑. This is particularly useful if you
want to reuse a recently typed command.
If you are typing the name of a file or folder within the command line, you can type the first
letters of its name and press the ESC key. This will autocomplete the name, saving you the
effort of typing it all. You can test it by going to your home folder, typing “cd T” and pressing
ESC. You should see the terminal complete the command as “cd Templates”. You should
try this command with other folders and directories in your Ubuntu folder if the above
example is not available in your case.
If you want to copy some text from the terminal (e.g. a name file to include in a command
you are writing), you may copy it as usual and then right-click on the terminal to paste it in
the position you need. You can use this function to copy any text in the terminal, such as
parts of previous commands, paths, files and folder names, to facilitate typing a new
command. You can also use the mouse scroll button to paste into the terminal information
you copied from another Ubuntu application (or copied from Windows if you are running
Ubuntu using VMWare).
“sudo” gives administrative rights when you issue a command, so you are asked to type
your password after using this option. Many commands on Ubuntu will only work if you
place sudo before them. The update will install patches to your system, but it will not
upgrade it to the most recent stable version of Ubuntu. To upgrade the system you should
use the command:
771
85.6 Text editing
Using ESP-r often involves editing plain text files with no formatting. You can invoke a
text editor using the terminal command (not applicable for WSL):
gedit
You may need to install the update necessary to run this command using the command
(you will be prompted):
Using this editor, create a text file named testtext.txt and place it in your user home
folder. Quit the application. Now, move the working directory to the user's home folder
and use the list command, 'ls', to check if your new file is placed there. You can now open
this file by including it as a parameter when you start the editor:
gedit testtext.txt
This will be able to use the terminal while gedit is still running. You can start ESP-r or any
other application in background mode, and this is very useful in many situations.
ps
This will produce a list like the one in the figure below.
You can terminate any process using the command kill, followed by the process's PID. In
the example below, this command would terminate ESP-r Project Manager, prj running on
process id 6167 (as an example).
772
kill -9 6167
clear
773
86 WSL tips and troubleshooting
86.1 Installing VcXsrv Windows X-server
⚠ VcXsrv is necessary on older Windows versions, prior to Windows 10 Build 19044+.
Download and install VcXsrv from SourceForge (VcXsrv Windows X Server download |
SourceForge.net).
Choose ‘Multiple windows’ as the display settings and set the display number to 0.
774
775
⚠ XLaunch needs to be restarted manually every time the computer restarts.
It is possible to check if XLaunch is active on a computer in the area at the bottom right
corner of the screen. ESP-r only works in graphical mode if XLaunch is active.
86.1.1 Configuring VcXsrv X-server on Ubuntu (only for Windows 10 prior to Build
19044+)
Assign the display number to Ubuntu:
source ~/.bashrc
The computer is ready to install ESP-r following the steps described in Compiling from
source code section.
Ubuntu:
776
Windows:
Windows disks are mounted on Ubuntu as /mnt/<disk letter>. For example, the
Download folder on Windows can be accessed from Ubuntu using this command:
cd /mnt/c/Users/<username>/Downloads
For some users, downloading Ubuntu automatically creates a separate folder named
'Linux', as shown below. All the Ubuntu and ESP-r files are stored in this folder.
777
86.2.2 Ubuntu Terminal Colours (Windows 11)
The default text/background colours can be changed by right-clicking at the top of the
window, selecting Settings in the drop-down menu, and selecting Appearance,
Application Theme Light.
778
In the Layout Tab, adjust the field Screen Buffer Size—Height to 1000 so users can scroll
up and see previous commands issued in the terminal.
Even if colours are changed on the terminal, when listing files and folders, a green
background is added to folder names, like in the image below:
To avoid this issue, use the following commands (on the terminal).
source ~/.bashrc
779
Advanced users may want to call WSL from Windows applications or scripts using the
Windows command line.
In this case, it is useful to access the Ubuntu file structure from the Windows prompt by
mapping a drive to the Ubuntu folder. In the example below, drive N on Windows is
mapped to the network drive where Ubuntu files are stored (this folder may change
depending on the Ubuntu version and installation).
Calling WSL Linux from Windows Command Prompt can be done using the wsl.exe
command, followed by the distribution and the commands to be executed on Linux. In
the example below, the distribution is Ubuntu-20.04. Concatenate all necessary
commands using ";" (in this example, the first command moves to the model folder
before invoking ESP-r's Project Manager in script mode as described in the Automation
session on this Introduction to ESP-r.
wsl.exe -d Ubuntu-20.04 cd ~/basic/cfg; prj -mode script -file bld_basic.cfg < rotate45.txt
86.3 Troubleshooting
86.3.1 Segmentation Fault Error (Core Dumped) - Windows 10 with XLaunch
This error is usually due to XLauncher not being installed or active.
Start ‘XLaunch’ from the Start menu, and set Display as described at the beginning of this
page.
Sometimes, bashrc does not set the display, and the following command should be issued
in every new Ubuntu session.
export DISPLAY=:0
780
86.3.2 Segmentation Fault Error (Core Dumped) - Windows 11 or Windows 10 with
recent updates
Windows support for GUI applications should be enabled in the Optional Features tab of
the Windows Subsystems for Linux Settings.
If the files are not there, the installation was unsuccessful and must be repeated.
If the files are in the folder, the problem is on the symbolic link (or in the PATH if the user
used this alternative approach). Check the instructions for creating symbolic links in the
ESP-r installation.
781
WslRegisterDistribution failed with error: 0x80370102
Error: 0x80370102 The virtual machine could not be started because a required feature is
not installed.
BIOS settings vary depending on the computer and model, so it is beneficial to look
online for information about enabling virtualisation options for a particular machine.
Use this command (on PowerShell as Administrator) to restart the computer and gain
access to the BIOS
shutdown /r /fw
The computer restarts after a minute, and options related to Virtualization become
available for selection. Enable them, save the new configuration, and exit the BIOS.
782
86.3.9 Error: cannot create /tmp/foundit
The error below can be ignored and does not impact ESP-r functionality.
Install Ubuntu:
Add-AppxPackage .\Ubuntu.appx
783
784
Appendix 2
Alternative approaches to
compile ESP-r
785
87 Run Ubuntu on a VM (alternative approach
for Windows)
It is recommended for Windows users who want a complete Linux system with a user
interface.
This section will use VMWare to create a Ubuntu client inside a Windows 10 computer.
Depending on your computer settings, creating a VM may require additional steps not
described here. This will become evident when you try one of the steps described below
and an error message appears. In these cases, read carefully the error message and look
for solutions on the internet. Other VMware users have often faced similar problems and
reported the solution in a forum. A brief list of common issues is available at the end of this
section.
Ubuntu 20.04 (Focal Fossa) is the recommended Linux Operating System (LOS) for use with
ESP-r. Download Ubuntu Desktop 20.04 from: http://releases.ubuntu.com/20.04/
https://www.vmware.com/uk/products/workstation-player/workstation-player-
evaluation.html
Install VMware Player on your computer and open it. You should see the window shown in
the figure below.
786
Let’s use the option “Create a New Virtual Machine“. In the “New Virtual Machine
Wizard”, select “Installed disc image file (iso)” and choose the Ubuntu file from the
Download folder. Click “Next”, and provide your details, and choosing your username and
password for the VM. Then, you will be prompted about the VM name and location (see
next figure). The location is very important, as this is where all your virtual machine files will
be placed.
Click “Next”, and you will then be asked to define the hard disk space to be used by your
VM. VMware recommends an adequate size, and you can increase it at any point in the
future if necessary (see Managing your VM). Choose “Store virtual machine as a single file”
to improve your VM's performance (in terms of computational speed).
787
Click “Next” to access the final screen of the VM creation (see next figure). You may
customise some hardware options now, but as with the hard disk space, these settings can
be changed in the future if needed, so accept the default values and click “Finish”.
The creation of the VM may take a while. If you receive error messages, please consult the
dedicated section or look for a solution online (often found in forums or videos). You may
be prompted to install VMWare tools for your host system; please do so. If the creation of
your VM is successful, you will see the login screen of Ubuntu, and after providing your
username and password you will see the Ubuntu desktop (see next figure). You may now
navigate on the internet using Firefox and explore the folders and files in the system using
the File Manager (amongst other applications deployed by default with Ubuntu). If you are
unfamiliar with Linux systems, check the Introduction to Linux section.
788
We can now close the VM using the menu options “Player > Power” in the VMware
window (see figure below). There are two different ways of doing so. You may “Suspend
guest”, which will freeze the VM on its current state (which is equivalent to the option
“Sleep” on a computer running Windows). This is often the preferred option, as the VM will
be loaded fast and be ready to use the next time you need it. You may also “Shut down
guest”, which will close all files and application in your VM (equivalent to “Shut down” a
computer running Windows). Shutting down is useful when you need to back-up, move,
share or manage your VM, as described in the next two sections.
https://www.techcrumble.net/2018/05/vmware-workstation-and-device-credential-
guard-are-not-compatible/
789
Several solutions are reported for the case above, with slightly different approaches. If the
suggested links do not work for your machine, search online and try alternative methods.
It may be a bit frustrating in the beginning, but this is the sort of experience that helps you
build up your skills and gain confidence that you can solve whatever problems you face
regarding setting up and using a less user-friendly system.
systeminfo.exe
If the result shows "no", enabling it in the computer BIOS will be necessary.
Use this command to restart the computer and gain access to the BIOS
shutdown /r /fw
790
The computer will restart after a minute, and options related to Virtualization will be
available for selection. Enable them, save the new configuration, and exit the BIOS.
https://www.howtogeek.com/213795/how-to-enable-intel-vt-x-in-your-computers-
bios-or-uefi-firmware/
791
88 Install using the pre-compiled installer
(alternative approach for Linux)
⚠ This procedure works on Ubuntu 20.04, and it is not suitable for
WSL
If you are using another Ubuntu version, you should compile ESP-r from the source code.
88.1 Download
The pre-compiled installer can be downloaded from:
https://www.esru.strath.ac.uk/applications/esp-r/
88.2 Install
Open a terminal and go to the Downloads folder:
cd ~/Downloads
You can list the files in this folder to make sure you have downloaded the installer:
ls
gzip -d ESP-r_<version>.deb.gz
Where <version> must be substituted by the number of the version you downloaded,
such as:
gzip -d ESP-r_13.3.14.deb.gz
If you recheck the folder contents, you should now see a file like gzip -d ESP-
r_<version>.deb
Where <version> must be substituted by the number of the version you downloaded,
such as:
792
sudo apt install ./ESP-r_13.3.14.deb
cd /opt
ls
List the contents of this folder, and you should see a folder named esp-r. You can check
the content of this folder where all ESP-r files are located.
cd /usr/local/bin
cd ~
Some users prefer to modify the system PATH instead of creating symbolic links in
the /usr/local/bin folder.
This will open the file. Include the following new line in the end of the document:
793
PATH="$PATH:/opt/esp-r/bin"
794
89 macOS: Compile from source on Intel
processor
89.1 Installing on Intel machines
This text is based on information available on the docs folder of ESP-r source code. from
2017 and have not been tested in recent ESP-r releases.
An alternative to the instructions below is creating a virtual machine using Virtualbox and
installing Ubuntu on it.
89.2 Introduction
This section is dedicated to installing dependencies and compiling on Apple computers.
Apple computers can run ESP-r and are also great computers for doing development work
on ESP-r. OSX includes the scripting, security and multi-tasking features of Linux/Unix
computers which ESP-r requires. For development work the compiler 'tool-chain' is almost
identical to that on Linux.
There are several tasks that are required before you can embark on creating or using the
virtual physics of ESP-r. If you only want to use ESP-r and have no need for a development
environment see the INSTALL from DMG below. If you want to INSTALL ESP-r from scratch
then jump to that section. section.
There is a video which shows the steps involved. Inside the DMG file are instructions. Read
them before invoking the script.
89.5 MACPORTS
The MacPorts environment (see useful links below) is designed to assist OSX users in
installing open source software. It supports getting the necessary utilities as well as the GCC
compiler collections (gcc g++ gfortran). MacPorts will place newly installed software in
795
/opt/local (so that they do not clash with other software). MacPorts package manages
dependencies so the hassles of acquiring related software packages and/or libraries are
reduced. With very few commands the dependencies needed for ESP-r development and
use can be installed on your computer.
Go to the folder /opt/local. Check if a port exists use commands in the form:
And to install a package and its dependencies issue commands in the form:
You will want to install the following port packages along with their dependencies:
The pure-text version needs none of the graphic libraries and will almost always compile.
The GTK version uses a utility called pkg-config to locate libraries and will compile with few
questions being asked.
89.6 Compiling
By default OS X will place user accounts under the folder /Users. The default location for
ESP-r is /opt/esru. To create /opt/esru folder use a sudo command to create the new folder
and to gain ownership of the new folder so that you can install ESP-r there.
cd /opt
When compiling esp-r use Install script in the ESP-r source code distribution. A typical
command would be:
or if you are using homebrew the compiler name is a bit different so use:
796
./Install_o1 -d /opt/esru --gcc4 --debug --compiler_version -6
You can find out more about the source code compile process by giving the command:
./Install --help
There are a few responses you need to provide during the Install process (refer to the Linux
install instructions for more details).
cd
cd bin
./link_to /opt/esru/esp-r/bin
This will create links to the ESP-r executables. If your .profile or your .cshrc environment
files include $HOME/bin in the PATH definition when you login in the next time you should
be able to issue the command:
which prj
/Users/fred/bin/prj
If this does not work you may need to issue the following commands first:
cd
source .profile
which prj
When creating new models a good habit is to start from your Models folder:
cd
cd Models
797
prj
This will start up the ESP-r Project Manager and if you ask for a new model it will be located
in a subfolder of Models.
89.8 Fonts
On OSX sometimes the GTK version of ESP-r will crash when attempting to display a pop-
up message or display such as the wire-frame control proforma. This is usually resolved by
re-freshing the font cache via the following command:
sudo fc-cache -f -v
89.10 Dependencies
If you are running the X11 version of esp-r there are only a few libraries that the executables
will be looking for (the version numbers may be different on your machine):
otool -L ./clm
./clm:
/usr/X11/lib/libX11.6.dylib (compatibility version 10.0.0, current version 10.0.0)
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version
7.18.0)
/usr/lib/libxslt.1.dylib (compatibility version 3.0.0, current version 3.24.0)
/usr/lib/libxml2.2.dylib (compatibility version 10.0.0, current version 10.3.0)
/opt/local/lib/libgcc/libgfortran.3.dylib (compatibility version 4.0.0, current version
4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/opt/local/lib/libgcc/libquadmath.0.dylib (compatibility version 1.0.0, current version
1.0.0)
These libraries will typically be installed with the X11 environment on Apple computers.
798
89.11 Additional notes
The developer kit XCode is only available via the Apple App Store and comes with GCC. The
command line tools needed for compiling ESP-r are an additional install which is accessed
via the Xcode -> Open developer tool -> More developer tools options. It is likely that you
can do development work by only downloading the command line tools for XCode
<developer.apple.com/support/development/>
799