Chapter 3: Model validation
3.5 Computational efficiency
This section examines the computational efficiency of the proposed method in a programming environment Python 2.7. The computer hardware platform was a laptop with an i7 8700 CPU, running on 32G DDR4-2666 Ram in a Windows 10 operating system. Using the study case and the settings described previously, the computational process was decomposed into several key steps and the calculation time of key steps was recorded in terms of their shares of the total calculation time, as shown in Table 13. Calculating view angles for obstruction detection took up the highest portion of 60%, followed by calculating first received irradiance, and calculating the first-bounce reflection. The rest of the steps in the process took very little time in comparison to the three steps.
CHAPTER3: MODEL VALIDATION
- 75 -
Table 13. Shares of key steps in total computational time.
Reading geometry <0.01%
Geometry subdivision 0.11%
Calculation of view angles 59.97%
Reading weather file <0.01%
Creating sky radiance 0.17%
Calculation of first received irradiance 36.10% Calculation of the first-bounce reflection 3.65%
This section also tested the computational cost of the method in calculating view angles for two different numbers of viewpoints in the same studied urban area to compute obstructed skylines. Table 14 shows the total run time, run time per viewpoint for two cases with a different number of viewpoints. The total calculation time is in linear relation to the number of viewpoints. With 100,000 viewpoints, the method completed the calculation for around 8 minutes. It is worth mentioning that Python is not necessarily the most efficient programming language in terms of computational cost, especially compared to C languages. The computational cost of the method can be improved further by using a more efficient programming language in the future.
Table 14. Run time of the proposed edge angle detection obstruction model Number of viewpoints Total runtime (s) Runtime per viewpoint (s) 1,000 5.49 0.0055 100,000 532.02 0.0053
For comparison against ray-trace/ray interception, a ray tracer was implemented in Python 2.7 on the basis of the Möller-Trumbore ray interception algorithm (Möller and Trumbore, 2005). It is a fast and popular method for calculating the intersection of a ray and a triangle in three dimensions without needing precomputation of the plane equation of the plane containing the triangle. Standard codes for implementation can be found in (Scratchpixel, 2018). Using the case study area and settings described in Section 3.3, first the average time cost was obtained per elementary operation for obstruction detection. As the proposed method and ray interception fundamentally have a different approach for obstruction detection, an elementary
CHAPTER3: MODEL VALIDATION
- 76 -
operation in the proposed method is calculations between a viewpoint and BES points on a surface edge whereas an elementary operation in the ray interception method is ray interception between a viewpoint and a sky patch where the Tregenza 145 sky was used in this comparison. Second, the number of required iterations (elementary operations) for one viewpoint against the entire case area was compared for both the methods. In the view angle method, the total number of iterations for one viewpoint is the number of surfaces, and in the ray interception method it is the product of the number of sky patches and that of the urban surfaces. Table 15 shows that the proposed method has a slightly lower time cost per iteration and a much lower number of required iterations for detecting obstruction than the ray interception method. Furthermore, the proposed method uses a very simplified approach for reflection calculation that only takes up less than 5% of total calculation time, overall the computational efficiency of the proposed method cost is considered to be improved for large-scale urban applications. However, it needs to be pointed out that computational cost depends on not only the algorithm, but the nature of programming environments, programmer’s proficiency in addition to the complexity and scale of a testing urban area. None the less, the comparison provides evidence of a better computational efficiency offered by the proposed method against the ray interception approach.
Table 15. Elementary time cost for obstruction determination for one viewpoint. View angle method Ray interception Time cost per elementary operation (s) 3.03E-06 3.81E-06 Number of elementary
operations(iterations) 1691 245195
Total time cost for one viewpoint (s) 0.0051 0.9330
3.6 Summary
This chapter examined the hypothesis: Simplified, vector-based model, tailored to urban applications, predicts accurate solar radiation on urban surfaces to effectively support urban- scale analysis.
The developed simplified vector-based model is texted in sets of comparisons using the case study of an urban case in Wuhan, China. The comparison study proved that the new method provides reasonably accurate predictions with flexible control settings and fewer model inputs
CHAPTER3: MODEL VALIDATION
- 77 -
to effectively support large-scale solar analyses. In comparison to RADIANCE, the new method yielded predictions with the average differences of 3%, 4%, and 6%, for the low-, medium-, and high-density areas, respectively. The second comparison against measurements revealed that the method tended to overpredict the irradiance received on surfaces with a high sky view factor such as roofs and underpredict that on vertical surfaces with a low sky view factor. However, the average absolute differences between predictions and measurements were relatively small and of the order of 6% and 5% for horizontal and vertical surfaces, respectively. The computational efficiency of the new model was proven to be sufficiently improved in comparison to the current ray interception algorithms. The new model greatly reduced the iterations required for obstruction calculation that consumes most of the computational load and, therefore, greatly reduced the computational cost for large-scale solar simulation.
CHAPTER 4: RELEVANCE OF THE NEW MODEL