## 2 Materials and Methods
### Computational Fluid Dynamics (CFD) Simulation  
As has been previously stated, CFD simulations have been extensively employed in the investigation of airflow within courtyards and the natural ventilation of buildings. However, studies about cross-ventilation in ancient buildings with courtyards are very scarce, and those studies that do address the potential of courtyards in the wind-driven cross-ventilation of rooms, particularly residential rooms, tend to present qualitative information about airflow streamlines, while numerical results regarding airflow mass rate or temperature dissipation efficiency are scarce. This paper presents a study of the ventilation performance of an ancient building with a courtyard, utilising two-dimensional geometry models. Although this is a significant simplification, the proposed method and selected conditions mitigate the inaccuracies induced by this. Furthermore, a subsequent validation with experimental data is conducted to ensure the acceptability of this process. The CFD software selected is Fluent [44], due to its numerous benefits, including versatility, parallel processing, and the extensive information available for its configuration. The simulation is performed with a decoupled method, as described in the introduction. Firstly, a 2D simplification of the house layout is performed. When looking at the surroundings of the dwelling, it is seen that in the predominant direction of the wind, there is a three-floor building higher than our house, causing a significant perturbance in the airflow around the house, so this must be included in the model. With this, the complete geometry model (Figures 11 and 12) is composed of the building and the street, the two sides of the house and the courtyard. The length of the upstream and downstream walls and the height of the geometry model have been chosen following advice of other authors [45; 46]. These must be long enough to allow the flow to develop completely but it should not be too long because it would highly increase the computational cost of the problem and it would rise the total simulation time. With that in mind, the upstream wall length is 5H, the downstream length is 15H and the domain heigh is 5H, where H is the height of the three-floor building, which causes the highest perturbance on the flow. Figure 10: Example of validation of the simulation model for room GF_R3. It is evident that, thus far, no apertures have been taken into account. Consequently, this model provides the pressure coefficients of the facades and information about the air movement inside the courtyard. It is of great importance to refine the grid sizing when defining the meshing, particularly in the zone of interest where recirculation will be formed and the airflow is most disturbed, which is in the vicinity of the house. For this reason, the complete geometry is divided into two sections: one corresponding to the vicinity of the dwelling and the other representing the external zone where high precision on the flow state is not required. The initial mesh is of a smaller cell size than the subsequent one, in order to optimise the capture of the flow behaviour within the courtyard. Thus, a face sizing of 0.5 m has been applied to the external part, while a 0.1 m face sizing has been used for the internal part. The final meshing is presented in Figure 13.  
The next thing to do is to define the boundary conditions for each component. The velocity inlet may be the most important thing to pay attention because it affects greatly the airflow pattern in this problem. To obtain good-quality realistic results, the modelling of the velocity profile is performed resembling the urban boundary layer [47]. For that  
Figure 11: Full model dimensions. Figure 12: Zoom on the surroundings of the house. Figure 13: Meshing of the full geometry model. purpose, an exponential law is used, which can be used to model the UBL as some authors have undertaken when researching the urban canopy layer effect on street canyons [48; 49].