## 2 Methodology
### Annual Simulations  
#### 2.3.1 Glare Simulations  
The magnitude of glare can only be accurately estimated with user assessments and characterizations together with the physical factors (e.g., solid angle and luminance of the glare source, background luminance, etc.). Several experimental studies were conducted to determine the subjective magnitude of glare discomfort especially with high values such as for intolerable or uncomfortable levels. The daylight glare probability or DGP [13] measures glare caused by daylight. It conveys the fraction of people disturbed by the given daylight situation. It is given by the following equation  
\[DGP=5.87*10^{-5}*E_{v}+9.18*10^{-2}*log(1+\sum_{i}\frac{L_{s,i}^{2}\;\omega_{ s,i}}{E_{v}^{1.87}\;P_{i}^{2}})+0.16 \tag{1}\]  
where \(E_{v}(lux)\) is the vertical eye illuminance. The other parameters are  
* \(L_{s,i}\) (cd/m\({}^{2}\)), the luminance of the glare source \(i\). Usually, the luminance of the sky seen through the window is considered here. * \(\omega_{s,i}(sr)\), solid angle of the glare source \(i\). Here the apparent size of the visible area of the sky w.r.t to observer's eye through the window is considered. * \(P_{i}\), [PERSON]'s position index of the glare source \(i\). It is calculated relative to the position of the observer's line of sight which includes azimuth and elevation of the source. DGP in contrast to other glare metrics has shown a better correlation (about 0.97) with the observer's responses to the glare perception. DGP is computed based on the evaluation of a 180-degree fisheye HDR image, which contains the full luminance distribution from all the light sources in the viewing direction. It is implemented in a tool called _Evalglare_ which is part of Radiance [10]. DGP generates values between 0 and 1 but the valid values are between 0.2 and 0.8. DGP values less than 0.2 are due to low light and are thus ignored. Table 1 gives the significance of the DGP values concerning user perception of the light source. Since it is not practical to collect the glare ratings from the subjects at each of the work spaces for a whole year, simulations [14] can help solve this issue as they can closely represent reality. In this case, we consider the Mannheim climate and its weather file, which represents standardized weather data of this climate. A sky condition can also be defined based on the type of cloud cover but an accurate representation is possible when there is the availability of the diffuse and direct components of radiation values. The weather file usually provides us with this data for every hour else it can be obtained using predictive models from a local or nearby weather station data. The main part of these simulations involves creating a fisheye HDR from the viewpoint of the occupant in a workspace and evaluating the glare. Such simulations are only possible with Radiance due to its ecosystem of daylighting simulation tools which can create photorealistic images. Some of the important tools in Radiance used in this simulations are _gendaylit_, _oconv_, _prict_, _evalglare_. Radiance usually needs its own specifically formatted geometric model of the entity, to be simulated. Usually, this model can be obtained by transforming the SketchUp model or similar geometric modelling tool to radiance format using its built-in tools. The workflow in radiance is as follows :  
* A _sky_ file is created based on the solar direct and diffuse components along with the time, latitude, and longitude. This can be achieved with the tool _gendaylit_. * The tool _oconv_ uses the created sky file and other geometric files of the test room and creates a binary file in _octree_ format to be further processed by other radiance tools. An _octree_ file is created for each of the viewpoints of the occupant, each time step, and for every combination of EC glass. * The tool _rpict_ is the one that creates the photorealistic simulation of the entity based on given parameters. It can output several different image formats, but the one suitable is an HDR image in fisheye format.