1. Introduction
In recent years, housing design has been shifting from traditional models towards more modern and sustainable approaches. Growing environmental awareness has driven the development of houses with a strong emphasis on energy efficiency and the use of sustainable materials. Modular and prefabricated constructions have emerged as efficient and fast alternatives, allowing for considerably reduced manufacturing times [
1].
Sales of prefabricated buildings have grown notably, with an expected annual increase of 6.6% in coming years [
2]. Their short construction periods, compactness and reduced labour and materials costs make this kind of housing unit a very interesting alternative both for customers and producers from an economic and a practical point of view.
An emerging trend, aligned with environmental sustainability goals, involves repurposing shipping containers to construct modular buildings. This innovative approach, which leverages existing materials and reduces the need for natural resources, is gaining traction in multiple applications. Demonstrating the high versatility of the modular design, these units are viable for a wide range of general uses, such as office buildings, commercial spaces, and emergency shelters. Their main advantages compared with conventional permanent buildings include rapid deployment, modularity, the possibility of relocation, the reuse of an end-of-life shipping container as structural material, reduced construction time, and the possibility of integrating renewable energy systems in compact sites. Particularly within the tourism sector, this approach is highly useful as the modules can be deployed in campsites, glamping facilities, rural lodges, seasonal accommodation, remote tourist sites, and as temporary low-impact accommodation. One example is the Versatile Cabin [
3], a modular building made by a Spanish firm that utilises end-of-life shipping containers. Once the container has reached the end of its useful life, it undergoes a recycling process consisting of a comprehensive treatment of exterior surfaces (removal of rust and painting, among other things). On the interior, the refurbishment involves installing rock wool insulation to improve thermal performance and covering the walls with wood panels to enhance comfort and aesthetics. This process transforms the container into a modular structure suitable for various uses, including as a sustainable housing solution. Although the initial design of the Versatile Cabin does not include heating, ventilation, and air conditioning (HVAC) equipment, such systems can be installed to maintain comfortable conditions inside the dwelling. This solution offers an environmentally friendly and flexible alternative to traditional enclosures, in line with current environmental policies. Ensuring that comfortable indoor conditions can be maintained in such modular enclosures without compromising energy efficiency is of paramount importance.
Building Energy Simulations (BESs) are used to model buildings and their facilities, allowing the estimation of their thermal demands [
4]. Some examples of applications of BESs are examining renewable energy systems such as solar panels [
5]; exploring combinations of various sources such as wind, solar, hydrogen, and geothermal, along with their storage [
6]; optimising consumption reduction and savings in dwellings [
7,
8]; or ensuring compliance with energy codes and regulations [
9].
TRNSYS (Transient System Simulation Program) is a widely used BES software, due to its versatility [
10,
11,
12]. It specialises in the transient simulation of systems such as multi-zone buildings, solar thermal or photovoltaic (PV) panels or other renewable energy technologies [
13]. Its structure is based on different modules named types that can be assembled to describe the different parameters that make up a system.
Different authors have examined thermal demands through BESs and how to satisfy them for different kinds of buildings, such as Cacabelos et al. [
14] which evaluated a public library. Akgüç and Yasar [
15] assessed the technical performance and long-term economic sustainability of a solar domestic hot water system in a university dormitory in Northern Cyprus. Kristiansen et al. [
16] analysed the viability of making a zero-energy building based on a container home in some Chinese locations. Vassiliades et al. [
17] studied the use of solar panels in a prefabricated house. Ahamed et al. [
18] modelled the thermal demands of a Chinese-style solar greenhouse. Ning et al. [
19] investigated the performance of a solar ground source heat pump system as an efficient and sustainable heating solution for rural buildings. Košir et al. [
20] analysed the energy efficiency of a modular building across various locations in Europe and Asia, assessing different strategies to reduce energy consumption in each city. Qu et al. [
21] investigated different heating modes of a radiant air conditioning system to improve both energy efficiency and thermal comfort.
As observed, scarce literature was found on the thermal behaviour and self-sufficiency of modular buildings, especially in tourism housing applications. Europe is the most visited region around the world, with almost 62% of 2022 world tourism [
22]. Spain is the second most visited country in Europe, and the number of tourists is considerably increasing year by year. For this reason, implementing a modular dwelling as a holiday house in Spain appears to be an attractive alternative to enhance a more sustainable tourism model.
A special feature of Spain is its diverse climate, as, depending on the location, a dry, temperate or continental climate can be found, according to the Köppen–Geiger climate classification [
23,
24]. The climate diversity implies that the energy required to maintain comfortable conditions within a building will largely depend on its location. Therefore, it is a factor to consider from the perspective of the design and sizing of housing facilities.
Despite the growing body of literature on the thermal performance of modular construction [
25,
26] and the implementation of PV–battery systems for building self-sufficiency [
27,
28], a significant research gap remains. Most existing studies tend to focus on theoretical, uncalibrated models or restrict their evaluation to one or two specific local climates. There is a noticeable lack of research that evaluates the dynamic energy self-sufficiency of a real, commercially available repurposed shipping container equipped with a fully integrated HVAC and DHW system, under nationwide climatic variability.
Considering the growing interest in housing solutions that promote sustainability and energy efficiency, this study aims to assess the feasibility of maintaining thermal comfort and achieving energy self-sufficiency in a modular dwelling across Spanish territory. Utilising a Building Energy Simulation with TRNSYS software, the specific contributions of this work are: (1) the comprehensive assessment of heating and cooling demands across 45 distinct Spanish locations, mapping the building’s thermal performance against national climatic variability; (2) the integration of a HVAC system into the modular building, comprising heat recovery ventilation, a heat pump, a fan coil, and domestic hot water generation; (3) the implementation of a photovoltaic installation coupled with a battery storage system to optimise electricity flows; and (4) the detailed hourly evaluation of the home’s self-sufficiency, providing a mechanistic analysis of PV coverage, grid reliance, and surplus energy depending on the location. Through this analysis, the study seeks not only to contribute to the development of more sustainable and energy-efficient modular homes, but also to align our findings with the Sustainable Development Goals of the 2030 Agenda, thus offering a viable and ecological alternative to the traditional construction model.
This work is organised as follows:
Section 2 describes the analysed modular building.
Section 3 presents the methodology of the study, providing the different parameters of the building model made in TRNSYS, the air conditioning model and the PV system. In
Section 4, the obtained results from validation, thermal demands and electricity consumption throughout Spain are shown and discussed, as well as the self-sufficiency of the dwelling. Finally, the main conclusions and future lines of research are explored in
Section 5.
3. Methodology
The study is divided into three phases: (1) the development of the initial model, the aim of which is to validate the building envelope using monitored data; (2) the calculation of the building’s thermal demands, so the installations can be dimensioned and the influence of heat recovery in the ventilation system and internal gains are studied; (3) the incorporation of HVAC equipment and the PV system to analyse electricity consumption required to maintain comfortable conditions and the building’s self-sufficiency. The methodology is illustrated in the flowchart presented in
Figure 2.
3.1. Phase 1: Initial Building Model
To validate the accuracy of the thermal enclosure, temperature monitoring was conducted inside a real Versatile Cabin (Versa Real Projects, Vigo, Spain) located in the northwest of Spain. The data was collected during two periods in 2023 that provide highly valuable data for model validation due to their significant diurnal temperature variations: from 15 March to 3 April, and from 13 April to 3 May.
The virtual model of this dwelling, shown in
Figure 1b, was created using SketchUp 2019 (Trimble Inc., Westminster, CO, USA). As there are no internal partitions, the structure was considered a single thermal zone. TRNSYS 18 (Thermal Energy System Specialists LLC, Madison, WI, USA) was used to simulate its energy performance. An initial simulation was carried out under weather and operational conditions identical to the monitored periods to verify the accuracy of the model against the experimental temperature measurements.
The operating diagram of the simulation, depicted in
Figure 3, illustrates the dwelling’s scheme through different TRNSYS modules named types. The types representing the Versatile Cabin model can be categorised into three blocks: weather data, building data and results plotter.
Regarding weather data, the recorded measurements from a MeteoGalicia station located 4 km away from the building’s site have been employed. MeteoGalicia [
30] is a regional meteorological agency that provides reliable and up-to-date weather information, ensuring an accurate representation of the outdoor climate during the thermal envelope validation process.
Building data and its loads are determined through three TRNSYS types: infiltration calculation, ground temperature calculation and dwelling properties definition by means of TRNSYS Building Environment (TRNBuild).
The infiltration rate is computed using type 571 (Infiltration to a Conditioned Zone), which employs the semi-empirical model by ASHRAE (K1, K2, K3 method). The necessary constants for the model (K1, K2, and K3) are sourced from the ASHRAE Handbook of Fundamentals [
31], assuming a loose construction, considering the presence of ventilation grids on the west and east walls.
Ground temperature for each hour of the year is calculated using type 501 (Soil Temperature Profile), which considers various parameters associated with the soil surface temperature, including its amplitude and mean, as well as soil properties such as thermal conductivity, density, and specific heat.
The dwelling’s enclosure and its systems are specified using type 56 (Multi-Zone Building), operated through TRNBuild. At this initial stage, internal gains and ventilation are not considered, allowing for the validation of the thermal enclosure using monitored temperature. However, both loads will be incorporated subsequently to evaluate the building’s thermal demand across different locations.
The operating diagram is supplemented with the results plotter block, composed of four units of type 65 (Online Plotter) to streamline the exportation of simulation results for subsequent analysis.
To evaluate the accuracy of the TRNSYS model, two complementary statistical metrics were selected: the Normalised Mean Bias Error (NMBE) and the Coefficient of Variation of the Root Mean Square Error (CV(RMSE)). The NMBE provides an indication of the overall bias in the model, whereas the CV(RMSE) measures the variance of the errors. To determine the acceptability of the calibrated model, this study adopts the criteria established by ASHRAE Guideline 14 [
32], which dictates that for hourly calibrations the NMBE must fall within ±10% and the CV(RMSE) must not exceed 30%.
3.2. Phase 2: Thermal Demands
Once the initial model is validated, the estimation of the thermal demands of the modular building in different Spanish locations is carried out, considering ideal HVAC equipment to quantify the energy required to maintain comfortable indoor conditions. In this context, thermal demands refer to ideal sensible heating and cooling loads required by the building envelope to maintain the setpoint temperatures, prior to accounting for the efficiency of the HVAC systems.
Indoor temperature setpoints were regulated according to the thresholds established by the Spanish Technical Building Code [
29]. A thermostat represented by type 108 is used to keep the temperature within specific limits depending on the time of day, as shown in
Figure 4. Between 07:00 and 23:00, the temperature is regulated between 20 °C and 25 °C, while during the rest of the day it is maintained between 17 °C and 27 °C.
A ventilation system, defined through type 56 (Multi-Zone Building), has been incorporated into the model to assess the impact of including a heat recovery unit within the ventilation system. To analyse the effect of ventilation on energy consumption, an occupancy of two people was considered, representing the most unfavourable scenario: a higher number of occupants increases ventilation requirements [
29], leading to greater energy demand to maintain indoor thermal comfort. In this case, considering more than two occupants is not realistic, given the size of the dwelling. Internal gains were also incorporated into the model according to the Spanish Technical Building Code [
29].
As Spain exhibits significant climatic variability, the energy performance of the modular dwelling was evaluated across 45 distinct Spanish provincial capitals. These specific locations constitute the representative cities utilised to define and characterise the climate zones established in the Spanish Technical Building Code (CTE). Therefore, conducting the TRNSYS simulations using the Typical Meteorological Year (TMY) data of these 45 capitals, sourced from EnergyPlus [
33], provides the most accurate approach to evaluate the building’s performance across the entire national climatic variability.
Note that the Canary Islands have a climate more similar to African regions than to mainland Spain. This, combined with their different electrical grid setup and minimal heating demands, led to their exclusion from this study.
3.3. Phase 3: Installations
3.3.1. HVAC Equipment
To study the electric consumption associated with the thermal demands, a HVAC system is included in the building model to cover the heating, cooling and ventilation requirements. Note that this system was explicitly incorporated into the Phase 3 simulation model to evaluate the system’s capability to cover the building’s thermal demands and achieve self-sufficiency depending on the geographical location, but they are not included in the original Versatile Cabin (shown in
Figure 1) simulated during Phase 1.
The heating and cooling system comprised an air–water heat pump (HP) unit (MD 04, Kosner, Bilbao, Spain) connected to a 35 L buffer tank, which supplies a fan coil (Jolly Plus 2, Ferroli, San Bonifacio, Italy). The selected heat pump had a heating capacity of 4.2 kW and cooling capacity of 4.7 kW, sufficient to meet the thermal demands of the modular building across all Spanish locations. This approach reflects the standardised “plug-and-play” nature of prefabricated modular buildings, providing a consistent comparative baseline to evaluate the performance of a fixed unit under varying climatic conditions. The fan coil is modelled through type 928, which estimates the heat transfer to the zone based on the inlet water temperature and flow rate. The buffer tank is simulated using type 1534, being heated or cooled by the heat pump. The HP operation is described by means of four blocks of type 42c: two for heating mode and two for cooling mode, as illustrated in
Figure 5, where the elements that make up the HVAC system are represented.
Type 42c interpolates the data extracted from the heat pump datasheet to determine performance values and the required heat transfer to the buffer tank. Instead of using static parameters, the equipment’s efficiency metrics (Coefficient of Performance (COP) and Energy Efficiency Ratio (EER)) are dynamically evaluated at each simulation timestep, so the mechanistic coupling between the heat pump’s performance and the fluctuating outdoor ambient temperature is captured. This continuous adjustment ensures an outlet temperature of 40 °C during heating mode and 10 °C during cooling mode for each hour of the year. The electricity consumption of both the heat pump and the fan coil is calculated using the same approach.
At the beginning of the year, the HVAC system is configured to operate in heating mode. The decision to switch between heating and cooling modes is based on the thermal demand results obtained in Phase 2. This analysis is performed for each location, so the switching point varies depending on the local climate conditions. Indoor temperature regulation is carried out according to the Spanish Technical Building Code [
29], as was previously done in Phase 2.
The consumption of domestic hot water (DHW) is also taken into account by means of an electric storage tank with a capacity of 0.1 m
3, which maintains the water at 60 °C. The electricity consumption of the DHW system is calculated based on the thermal energy required to heat the water from the municipal mains temperature to the 60 °C setpoint, assuming a 100% thermal efficiency for the electric heater. To ensure geographical accuracy, the mains water temperature is modelled using the specific monthly average values for each of the 45 evaluated locations, based on data provided by the Spanish Institute for the Diversification and Saving of Energy (IDAE) [
34]. The electricity consumption of the water heater is included in the building’s self-sufficiency analysis.
3.3.2. Photovoltaic System Model
A photovoltaic system was incorporated into the TRNSYS model to power the HVAC, so the feasibility of making the building independent of the electricity grid can be estimated. To maximise the available roof area, five Vertex TSM-580 (Trina Solar, Changzhou, China) solar panels of 580 W peak power are represented through type 94a. This component dynamically calculates the PV power generation by accounting for the incident solar radiation, the ambient conditions, and the operating temperature of the panels themselves. Solar panels are installed coplanar on the roof to avoid self-shading and maximise the available PV collection area. The inverter employed for converting DC to AC has an efficiency of 97.3%.
An energy management algorithm, implemented in Python 3.10 (Python Software Foundation, Wilmington, DE, USA), governs the power flow between the solar panels, the battery storage, the HVAC and DHW systems, and the electricity grid. The control strategy operates under a priority logic: first, the electricity generated by the PV panels is directly allocated to satisfy the instantaneous demand of the HVAC and DHW systems. Second, if PV generation exceeds this thermal demand, the surplus energy is directed to charge the battery. Conversely, during periods where the HVAC or DHW load exceeds solar production, the system draws the required energy from the battery. Finally, if the HVAC and DHW systems require power while there is no PV generation and the battery is fully discharged, the energy deficit is covered by importing electricity from the grid. Based on previous studies [
35,
36], the Pylontech Force H1 (Pylontech, Shanghai, China) lithium battery, which has a capacity of 7.1 kWh, was chosen because it aligns with the peak power demand of the building’s heat pump and optimises the cost–benefit ratio. This fixed PV and storage configuration is maintained across all locations to evaluate the baseline self-sufficiency of a standardised modular unit.
Figure 6 illustrates the proposed placement of the simulated systems (i.e., heat pump, solar panels, batteries, fan coil and ventilation fan).
4. Results and Discussion
4.1. Initial Model Validation
Figure 7 shows the comparison between the measured and estimated temperature inside the building, as well as the outdoor temperature, for the two data collection periods: (a) represents a period with mild weather, and (b) represents a period with more extreme outdoor temperatures.
As depicted, the simulated indoor temperatures closely follow the empirical data profile, confirming that there are no significant systematic deviations, indicating that the thermal dynamics are properly captured across the evaluated temperature ranges.
Simulated temperatures closely matched monitored data, indicating high model accuracy. Two error metrics were used to evaluate the difference between estimated and actual temperatures, so a CV (RMSE) of 15.8% and an NMBE of 0.6% are obtained. According to the validation criteria used by Cacabelos et al. [
37] and the acceptance thresholds established by ASHRAE Guideline 14 [
32], these values confirm that the model is suitable for estimating the building’s thermal demands.
4.2. Thermal Demands
Figure 8 illustrates the results of the thermal demands for the 45 Spanish locations, depicted as points in
Figure 8a,c. In those figures, two heatmaps represent the heating and cooling demands throughout all the Spanish territory. Spain is divided into heating and cooling climate zones according to the Spanish Technical Building Code [
29]. The cities with the highest thermal demand for each winter and summer climate zone are highlighted with pins in
Figure 8a,c, respectively. The annual heating and cooling demands on those cities are shown in
Figure 8b,d, which also illustrate the variations observed when using the ventilation system with and without a heat recovery system.
Results revealed that introducing heat recovery in the ventilation system reduced heating demand by an average of 32.7%. In contrast, its impact on cooling demand is less pronounced due to the lower magnitude of cooling needs, so its effect can be considered negligible. Therefore, the primary benefit of the heat recovery system is its impact on heating demand, achieving reductions ranging from 34.6% in Granada to 29.8% in Bilbao. As the integration of a heat recovery unit into the ventilation system enhances the building’s energy efficiency, thermal demands and self-sufficiency are analysed under this assumption.
As expected, northern Spanish locations experience lower temperatures compared to the south [
34], resulting in higher energy demands for heating in the north during winter and higher cooling demands in the south during summer. For example, Burgos requires 201.9 kWh/m
2 annually for heating, while Almería requires 39.8 kWh/m
2, approximately 5.1 times less. Regarding cooling demands, a southern city like Sevilla, with an annual consumption of 54.4 kWh/m
2, contrasts with Oviedo’s low energy consumption, with a cooling demand of 1.76 kWh/m
2 (30.9 times lower). The heating and cooling demand over the year for all the simulated locations, as well as the maximum consumption reached, are detailed in
Table S1 of the
Supplementary Material, providing the values for all 45 locations to facilitate future comparative studies.
The analysis of the maximum heating power required to maintain comfortable conditions inside the building across each location shows a range from 0.96 kW in Málaga to 1.42 kW in Ávila. Regarding cooling, the maximum cooling power ranges from 0.28 kW to 0.97 kW in Oviedo and Córdoba, respectively.
A strong correlation between the cooling demand map (
Figure 8c) and the solar radiation distribution across Spain [
38] was also observed. This aligns with expectations, as southern regions with higher irradiance experience more intense solar exposure and thus higher cooling requirements.
4.3. Electricity Consumption
The regional disparity in solar irradiance and thermal demand directly influences the electricity consumption profile of the building. In northern locations, lower solar potential coincides with higher heating needs, making it more difficult to achieve energy self-sufficiency. In contrast, southern locations have a remarkable photovoltaic potential to ensure energy supply to maintain comfortable conditions, especially during summer.
Figure 9 represents the total annual electricity consumption (including the HVAC system and DHW generation) at the locations previously mentioned in
Figure 8, as well as the percentage of that electricity supplied by the solar panels. The electricity consumption for all the simulated locations, along with the portion of electricity consumption covered by the PV system, is detailed in
Table S1 in the
Supplementary Material.
Results revealed a direct relationship between the locations with lower heating demand and the proportion of electricity consumption supplied by the PV system. Burgos, characterised by the highest heating demand, also exhibits the highest annual electricity consumption at 2.1 MWh. It is also the location with a lower portion of electricity covered by the solar panels (88.5%). On the other hand, Málaga has the lowest electricity consumption, at 1.6 MWh, of which 99.7% is covered by solar panels. Note that the average self-sufficiency across Spain is 96.1%, a value that demonstrates the potential of the dwelling to operate with high self-sufficiency.
A variation in the heat pump’s performance across the different locations was also observed. During the heating season, Almería shows the highest COP at 5.2, while Soria presents the lowest, with a COP of 4.1. In the cooling season, the best performance was observed in Oviedo, with an EER of 6.1, whereas Sevilla exhibits the lowest efficiency, with an EER of 4.3. On average, both the COP and EER across the simulated locations are 4.6.
Figure 10 illustrates the hourly energy balance during two representative periods: a winter week and a summer week. Alicante and Burgos are represented, as they are the locations with the highest and the lowest percentage of electricity consumption covered by the PV system, respectively. These profiles display the real-time interaction between PV generation, building electricity consumption, battery state of charge (SOC), and grid exchange.
As observed, the system effectively utilises stored energy to meet the electrical demand when PV generation is insufficient. During winter, in Burgos (
Figure 10c) the high electricity consumption due to heating demands often exceeds the PV generation. Consequently, the battery SOC fluctuates significantly, discharging during the electricity consumption peaks to cover the demand. The red bars indicate the specific hours where the battery is depleted, and grid imports become necessary. Conversely, Alicante shows a more stable behaviour in winter (
Figure 10a), with the battery successfully bridging the supply–demand gap when PV generation is not enough. This demonstrates that the self-sufficiency metric is not a static annual ratio, but a dynamic result based on the continuous balance between PV self-sufficiency and necessary grid withdrawals.
During summer, both locations exhibit a substantial surplus (
Figure 10b,d). The PV generation far exceeds the electricity consumption required for cooling, allowing the battery to remain near 100% SOC for extended periods while exporting the excess energy to the grid.
Figure 11 shows the imbalances between the electrical demand of the modular housing installations and the PV production for these same locations. Yellow indicates surplus electricity, while red shows the electricity sourced from the grid.
Figure 11 highlights a challenge in achieving total grid independence for the Versatile Cabin, especially due to heating demands. During the winter season, Burgos experiences a substantial reliance on grid electricity to power the HVAC system (237.5 kWh annually), significantly more than Alicante (1.5 kWh per year). On the other hand, neither Alicante nor Burgos requires grid electricity for satisfying cooling demand during the summer season.
Over the year, Alicante has a surplus of 5.9 MWh, while Burgos has 4.2 MWh, exceeding their respective annual electricity requirements. In winter, solar production is often insufficient to meet demand, particularly in colder regions like Burgos. In contrast, southern locations with higher cooling needs tend to align their peak electricity consumption with periods of high solar availability, making them more capable of achieving self-sufficiency.
Techno-Economic Analysis
The analysis of grid dependence reveals a significant contrast between locations: Burgos requires grid electricity for 608 h annually, whereas Alicante requires it for only 4 h. This indicates that near-total self-sufficiency is feasible in southern locations with favourable climatic conditions.
To evaluate the economic performance, the annual electricity costs for each city were calculated using the average monthly market prices in Spain for 2023 [
39]. Note that this economic assessment serves as an indicative reference for comparative purposes across the studied locations, providing a baseline to evaluate the relative financial viability of the standardised modular unit across the diverse Spanish climates, rather than a comprehensive life-cycle cost analysis. The electricity costs for the PV-integrated system, along with the corresponding savings compared to the baseline scenario and simple payback period, are presented in
Table S2 of the
Supplementary Material, providing economic results for all 45 locations to serve as a reference for future techno-economic studies.
The potential economic savings were determined by comparing the operational costs of the PV system against a baseline scenario without renewable generation. The results indicate average annual savings of 148 €, ranging from a maximum of 162 € in Ávila to a minimum of 131 € in Bilbao.
The estimated investment for the PV system is 2072 €, with the battery accounting for approximately 45% of the total cost. Consequently, the calculated simple payback period varies between 12.8 years in Ávila and 15.8 years in Bilbao, with a national average of 14.0 years.
5. Conclusions and Future Lines of Research
In this paper, a TRNSYS model of the Versatile Cabin modular building was developed to assess its thermal requirements across 45 distinct Spanish locations. The study evaluates the performance of a standardised configuration to investigate the viability of powering the system independently from the grid using a PV system. This approach was chosen to establish a baseline for a standardised modular solution across diverse climates. For the initial model validation, data collected during two periods in 2023 were utilised, providing valuable information for model validation due to their significant diurnal temperature variations. While these spring periods allow for a robust base validation, results for extreme seasonal scenarios should be interpreted with appropriate caution.
The study has revealed a significant disparity in thermal demands between northern and southern locations, primarily due to the greater need for heating in the north. On average, heating consumption in Spain reaches 115.6 kWh/m2, while cooling demand is almost five times lower, at 23.6 kWh/m2. The highest heating power was observed in Ávila with 1.42 kW, whereas Córdoba showed the highest cooling power at 0.97 kW.
Regarding energy self-sufficiency, reliance on the electricity grid is unnecessary during summer months at any location. However, during winter, the insufficient electricity generation from solar panels requires support from the grid in northern locations. The average electricity consumption covered by the PV system throughout Spain is 96.1%, ranging from 88.5% in the north of Spain to 99.9% in the south. Finally, the economic analysis reveals an average payback period of 14 years based on direct savings.
In view of the results, investigating enhanced building insulation offers a highly viable research path. Future studies could focus on optimising the thermal envelope according to specific geographical locations. This could involve increasing the insulation thickness or employing alternative materials with lower thermal conductivity, allowing for a detailed evaluation of the trade-off between maximising energy self-sufficiency and maintaining the liveable area.
While this study evaluated a standardised configuration to establish a baseline across different climates, future work will focus on tailoring the PV array and battery storage capacities to specific locations through cost–benefit and sensitivity analyses. Future research could also explore strategies to increase the profitability of the PV system, e.g., by selling the surplus electricity generated in summer to the grid.
Furthermore, the integration of alternative HVAC technologies and more advanced control strategies could be investigated to enhance efficiency in the most demanding climate zones. Finally, extending this methodology to other international regions would allow for a broader assessment of modular housing as a global sustainable solution.
The results demonstrate that the integration of heat pump and solar energy technologies in modular homes is technically feasible and enhances energy performance in residential design. This approach contributes to reducing the environmental impact of the housing sector by increasing self-sufficiency through renewable energy integration.