# Calculation of View Factors for Building Simulations with an Open-Source Raytracing Tool
## 1 Introduction  
Longwave radiative heat transfer is a key determinant of energy consumption in buildings. The radiative heat exchange between the outer surfaces of the building envelope and the surroundings account for a significant portion of the overall heat loss of a building, e.g., under clear sky conditions during night time. Additionally, the longwave radiative processes in rooms when, e.g., using radiant cooling or heating, influence the temperature distribution on floor, walls, and ceiling. Radiant heat exchange between two surfaces is a function of their relative orientation and distance from one another, surface properties and absolute temperatures. The effect of relative orientation and spacing on radiant heat exchange between two surfaces can be quantified by a purely geometric parameter called view factor [1]. The knowledge of view factors is required whenever the longwave radiative heat transfer of building surfaces needs to be calculated in detail. Analyses such as energy simulations, photovoltaic simulations, lighting simulations and thermal comfort simulations employ view factor calculations to assess the radiative exchange between surfaces of buildings, urban contexts, and the human body. Additionally, view factors are also required in the design of several engineering applications like satellite temperature control devices, solar collectors, advanced engines with high operating temperatures, and cryogenic fuel storage tanks [2]. View factor is independent of surface properties and temperatures, and is also referred to as shape factor, configuration factor, or angle factor. View factors calculated by assumingsurfaces to be either diffuse emitters or diffuse reflectors are known as diffuse view factors. In this paper, the term view factor is intended to imply diffuse view factors. For two arbitrarily oriented surfaces \(A_{1}\) and \(A_{2}\) in space as shown in Figure 1, assuming the surfaces to be of equal radiance, the view factor \(F_{12}\) from \(A_{1}\) to \(A_{2}\) is the fraction of radiation leaving surface one that reaches surface two directly [1]. Likewise, the view factor \(F_{21}\) is the fraction of radiation leaving surface two that reaches surface one directly. In this paper, the term \"radiance\" when used with proper capitalization (as \"radiance\" or \"Radiance\"), refers to the radiant flux per unit solid angle per unit projected area (\(\text{W}/(\text{sr}^{\star}\text{m}^{2})\)). In instances where the term is capitalized in uppercase as \"RADIANCE\", it refers to the raytracing software that will be discussed in the subsequent sections. A generalized expression for \(F_{12}\) can be derived by considering differential surface elements \(dA_{1}\) and \(dA_{2}\) on \(A_{1}\) and \(A_{2}\) respectively. For the two area elements, the view factor is:  
\[F_{dA_{1}-dA_{2}}=\frac{\cos\theta_{1}\cos\theta_{2}}{\pi r^{2}}dA_{2} \tag{1}\]  
where \(r\) is the distance between \(dA_{1}\) and \(dA_{2}\), \(\theta_{1}\) is the angle between the surface-normal of \(dA_{1}\) and the line connecting \(dA_{1}\) and \(dA_{2}\), and \(\theta_{2}\) is the angle between the surface-normal of \(dA_{2}\) and the line connecting \(dA_{1}\) and \(dA_{2}\). The view factor between \(dA_{1}\) and the entire area \(A_{2}\) can be calculated as:  
\[F_{dA_{1}-A_{2}}=\int\limits_{A_{2}}\frac{\cos\theta_{1}\cos\theta_{2}}{\pi r^ {2}}dA_{2} \tag{2}\]  
View factors between two finite areas \(A_{1}\) and \(A_{2}\) obey the following relation:  
\[A_{1}F_{12}=\int\limits_{A_{1}}\int\limits_{A_{2}}\frac{\cos\theta_{1}\cos \theta_{2}}{\pi r^{2}}dA_{2}dA_{1}=A_{2}F_{21} \tag{3}\]  
Computational algorithms specifically addressed towards view factor calculations have existed for over seven decades [3]. Such algorithms employ either analytical or probabilistic techniques, broadly referred to as Radiosity and Monte Carlo methods, respectively [4].