**3. Methods and Materials**

Numerical simulations were performed using the electrical and gas energy consumptions from four real dwellings in the east coast (Mediterranean area) of Spain. Weather in this region can be classified as a "Csa climate" with hot, dry summers and cool, wet winters, according to Köppen climate international classification [33].

Using the information from actual energy invoices, four daily consumption datasets have been created. Four 10-apartment building consumption profiles were determined considering simultaneously factors from the single dwelling datasets. The selected dwellings are described as follows:


Data obtained from the gas and electrical utility invoices are one-month aggregated information that must be statistically treated to create the useful datasets to simulate the daily energy demand of the users. The numerical treatment has consisted of normal randomized daily energy consumption estimation using the daily seasonal average consumption values and its seasonal data standard deviation (Figure 2). This process was applied to both energy invoices (electricity and gas), taking the billing date into account to correct the consumption data of the different energy suppliers.

**Figure 2.** Statistical analysis from the annual energy invoices to randomize a daily energy consumption dataset for each building using seasonal values (average and standard deviation).

The results of the treatment of the numerical data can be observed in Figure 3, where the vertical axis is the daily electrical consumption and the horizontal one represents the daily thermal energy one. Darker dots are the daily consumption calculated from the utility invoices and the "*x*" markers are the randomized values obtained from the numerical treatment.

**Figure 3.** Result of the numerical treatment of the utility invoices to create an energy consumption dataset for each dwelling.

Electrical and thermal data in Figure 3 are correlated values, where two main tendencies can be observed. Dwellings with gas-powered heating facilities (Id 1 and Id 3) show a greater thermal energy demand for heating seasons. This results in two different "x-clouds": one energy demand cloud at the right-top side of the chart (Id 1: from 30 to 50 kWhth., Id 3: from 15 to 30kWhth.), where the heating demand can be detected; and a second cloud below 15 kWhth. that is overlapped with the two less-thermal demanding dwellings (Id 2 and Id 4). In the case of dwellings Id 2 and Id 4, the seasonal variation is notorious in the vertical axis due to the increase in the electrical energy demand during the heating season caused by the use of electrical heaters. When the thermal demand is limited to hot water, the energy consumption is function of the number of inhabitants as can be observed for the daily energy thermal values for Id 2 and Id 4, respectively. Heat-to-power (HtP) is calculated as the thermal demand over the electrical demand. This ratio is a season-dependent value, and normally a year-based calculation is provided. The results obtained with the datasets sorted in decreasing order are 3.4 (Id 1), 2.3 (Id 3), 1.5 (Id 2) and 0.7 (Id 4).

Considering each dwelling dataset, four 10-dwelling buildings were created using a randomized factor to simulate a centralized CHP. Heat-to-power ratios for the building datasets are similar in value and order.
