1 Introduction The document demonstrates using EnergyPlus to estimate a building’s energy consumption, and based on the estimation, to optimize the building’s design parameters to improve its energy efficiency. For demonstration purpose we study a single-zone welding shop’s building, aiming at optimizing its envelope design parameters to minimize its annual energy consumption. First we will give a formulation of the envelope design problem, and then we will give a tutorial on estimating a given design’s energy consumption (using EnergyPlus), which is the emphasis of this demonstration. Finally optimization method will briefly be introduced. For reference of the motivation of our study and why we choose a welding shop as our case, please see Ref. [1] (note that in this demonstration we only consider building energy consumption but not overall energy consumption cost as in Ref. [1]). 2 A single-zone welding shop’s envelope design problem Key features that significantly impact a building’s energy consumption include building orientation, shape coefficient (the ratio between the external skin surfaces and the inner volume of the building), window-to-wall ratio, heat transfer properties of the envelope surfaces (walls, ground, roof and doors), and window glazing properties, etc. Here we only consider the first three features, and other features are assumed to be known with given values. This corresponds to the scenario of determining the building envelope layout with building construction materials been selected. We also assume that building’s shape being cuboid with a given height (decided by the production requirement); building’s location, welding activities related configuration and the setpoints of inner environmental conditions are all given; two doors with same fixed size are located on the one set of opposite walls; and windows with same fixed size are located, in pairs, on the other set of opposite walls (number of windows is to be determined), as shown in Fig. 1. The building orientation can be represented by the building azimuth, α, the building shape coefficient is denoted as cshape l w 2H l 2H w 1 2 2 -1 m , H l w H w l and the window-to-wall ratio is defined by rwin / wall 2n Awin A n win 2H l 2H w H lw . where H is the height of the building, Awin is the area of each window, and both of them are given; l and w are the length and width of the building, respectively, and n is the number of windows in pair. Hence, to achieve an envelope design we should determine the values of the following four variables: α, l, w, n The constraints include: 1) bound constraint on azimuth (considering the envelope symmetry) 0° ≤ α ≤ 90°. 2) bound constraints on length and width Llower ≤ l ≤ Lupper, max(Wlower, Wdoor) ≤ w ≤ Wupper, where Llower and Lupper (Wlower and Wdoor, respectively) are the lower and upper bound of l (w, respectively), and Wdoor is the width of the doors. 3) constraint on the number of windows n·Wwin ≤ l – M, n ∈N where Wwin is the width of each window and M is summation of pre-determined margin for windows and necessary spaces between windows. N is the set of non-negative integers. 4) constraint on zone area l·w ≥ Azone, where Azone is the given low bound of zone area. N H α Awin l Hdoor Wdoor w Fig. 1 Schematic of building design problem example 3 Simulation-based building energy consumption estimation The above envelop design problem is not analytical and needs to be solved by simulationbased optimization methods. The precondition is we can estimate a given design’s “performance” as the objective function value, i.e., a design’s resulted annual energy consumption. Once we can do that, simulation-based optimization algorithms would help to find good designs. Here we give firstly an energy consumption estimation framework, and then a tutorial on estimating the welding shop’s energy consumption with a given envelop design. 3.1 Energy consumption estimation framework Based on EnergyPlus simulation, we can estimate the welding shop’s building energy consumption following the framework shown in Fig. 2. The framework applies to a class of plants where the environmental conditions would not affect the production processes energy consumption. The framework includes two steps: (1) Calculate the schedules of the effects of the production processes on the environment (internal gains of heat, moisture and contamination, etc.); (2) Use EnergyPlus to estimate the building energy consumption with inputs including the building design parameters, the weather information, the environmental conditions set-points and the schedules calculated in Step (1). Outer environmental condition data Building’s design parameters Inner environmental condition requirements Production schedule and shift pattern Production process parameters (workers’ parameters included) Schedule of inner environmental conditions (temperature, humidity, light level, air quality, etc.) setpoints 2 EnergyPlus simulation 1 Schedule of dissipation of heat, moisture, air pollutant, etc. from production process (worker’s activities included) Building energy consumption Fig. 2 Energy consumption estimation framework 3.2 Estimating the welding shop’s energy consumption EnergyPlus uses an .idf file, which actually is a text file, as its input. With a text format and good modularity, .idf file is easy to read and configure. Here we only mention the steps of getting an estimation through but will not cover the file configuration details. For details of configuring an .idf file and further information about applying EnergyPlus, please see Ref [2]. 3.2.1 Preparing basic configuration input Below is an .idf file containing necessary inputs except those related to the four design variables listed in Section 2. WeldingShop_BasicConfig.idf This file contains basic configuration including the building’s location, constructions and materials, inner activity related parameters, and simulation output requirements. The single-zone welding shop is assumed to be located in Beijing (39.93°N, 116.28°E). Welding activities related configuration and the set-points of inner environmental conditions are given as the same as the numerical example used in Ref. [1]. The heating and cooling loads are assumed to be satisfied at all time (an ideal loads air system is adopted in EnergyPlus simulation). The walls consist of (listed from outside to inside) 2cm mortar, 20cm concrete and 3cm insulation. The floor consists of 20cm concrete. The roof consists of 18cm concrete, 10cm insulation. The doors consist of 0.5mm iron, 6cm insulation, and 0.5cm iron. The windows are 6mm + 3mm + 6mm low-emissivity double pane windows. The zone has day-lighting controls with two illuminance set-points of 500lx on the median line along the length and at a distance of length/3 from each door, and at a height of 1m. Other envelope related parameters are: H = 4m, Wdoor = 2m, Hdoor = 2m, Awin = 1.5m2, Wwin = 1m, Azone = 100m2, Llower = Wlower = 7m, Lupper = Wupper = 15m, and M = 5m. 3.2.2 Generating variable-related configuration input For different designs of variables, different variable-related input configuration can be generated. Below is a sample of the variables-related configuration: WeldingShop_VariableConfig.idf This file contains information of the building orientation, the size of the building walls, doors and windows, and the location of the doors and windows on the walls. Also daylight control configuration is included in this file because the position of its reference points are related to the layout the building envelop. 3.2.3 Obtain a complete input file Merging the above two parts of configuration information we can obtain a complete input .idf file as WeldingShop.idf Note that in a common EnergyPlus simulation we don’t have to obtain an .idf file by merging two parts. Here, because we may want to fix part of the whole configuration and to change only the variables-related configuration, maintaining a basic configuration file and just generating variablerelated configuration files may be a good way for programming. 3.2.4 Preparing weather data file To run an EnergyPlus simulation for certain weather condition, a weather file corresponding to the building location is needed. Weather files for different locations can be downloaded on EnergyPlus website (Ref. [2]). Here we paste Beijing’s CTYW (Chinese Typical Year Weather) weather data, which is used in Ref. [1] case study. CHN_Beijing.Beijing.545110_CTYW.epw 3.2.5 Running EnergyPlus Now we can run EnergyPlus simulation with the .idf file and the weather file. There are two ways of running the simulation. The first way is by EnergyPlus’ simulation launch user interface EPLaunch. For tutorial please see EnergyPlus’ Getting Started document (in the Documentation directory of EnergyPlus installation). While, here we recommend the second way of executing EnergyPlus with a command. In this way we can automatically run simulations if we have a number of different .idf files (corresponding to different designs) to evaluate. The command is: RunEplus.bat WeldingShop CHN_Beijing.Beijing.545110_CTYW where RunEplus.bat is a batch file in the installation directory of EnergyPlus, which calls EnergyPlus to run simulation with the files specified by its following arguments (the two file names without suffix) as its inputs; the .idf file should be in the same directory with RunEplus.bat; the weather data file should be in the WeatherData directory in the same directory with RunEplus.bat. The argument strings “WeldingShop” and “CHN_Beijing.Beijing.545110_CTYW” should correspondingly be changed if an .idf or weather data file with a different name is used. 3.2.6 Checking the results After a successful run (the generated WeldingShop.err file says no error), one can check the simulation results saved in the WeldingShop.eso or WeldingShop.csv file generated (same data but different format). We paste here the results from the .csv file below, from which we could calculate the overall annual energy consumption is: 2.15*109J + 3.57*109J + 7.00*109J = 12.73*109J = 3536.09kWh WELDINGZONE Date/Time LIGHTS:Lights Electric Consumption [J](RunPeriod) simdays=365 2154626758 WELDINGZONE:Zone/Sys WELDINGZONE:Zone/Sys Sensible Heating Energy Sensible Cooling Energy [J](RunPeriod) [J](RunPeriod) 3574474913 7000822197 4 Building energy efficiency optimization Now that we can run EnergyPlus to evaluate different designs automatically (by a command line manner). With the EnergyPlus-based simulation as an objective function value estimation tool, simulation-based optimization algorithms can be applied to search for optimal or approximate optimal designs. Such algorithms include Genetic Algorithm, Simulated Annealing or Ordinal Optimation, etc. For further information please see Ref. [1]. Reference [1] Liu H, Zhao Q C, Huang N J, Zhao X. A simulation based tool for energy efficient building design for a class of manufacturing plants[J]. IEEE Transactions on Automation Science and Engineering, 2013,10(1):117-123. [2] EnergyPlus website. http://apps1.eere.energy.gov/buildings/EnergyPlus/.