Development of a Daylight Simulation Software for Early Design Stage: A Case Study of a Container House

Daylight simulation software play a significant role in decision-making during the architectural design process. These software enable architects to make informed decisions about daylight performance in the early phases of the project. Radiance as a simulation engine provides a physically accurate model of the lighting conditions in the scene, thus capable of achieving a high degree of accuracy and validity. However, with a command line interface, it requires a large number of input parameters, which complicates modelling and restricts flexibility. When integrated in the early design process, this approach becomes less efficient, or requires enormous computation time. This paper introduces a daylight simulation software named DaylightX that uses the backward raytracing algorithm implemented on the GPU to calculate the spatial distribution of daylight across the space. The tool aims to enhance the capabilities of the simulation environments through a user-friendly interface and thus allow for flexibility in the design process. An individual residential unit a shipping container was used as a base case for evaluation. The modular design of shipping containers allows for flexibility in window placement and orientation, but requires careful design and implementation from daylight performance perspective. The results of the study can serve to improve the daylight performance of container housing units.


Introduction
The advancements in lighting technology resulted in a greater dependence on a more controlled visual environment where primary illumination was provided by artificial light. Since the energy crisis of the 1970s, however, the tendency to use artificial lighting has increasingly been criticized for its being one of the major contributors to energy consumption in buildings (Fontenelle, 2008;Leslie, 2003;Reinhart, 2006;Ruck et al., 2000). Given the widespread increased sensitivity to the environment, currently broadened to the concept of 'sustainability', recent efforts are directed by designers towards increasing the use of daylight in buildings since it is recognized as being one of the passive design tools that could significantly reduce dependence on electricity for illumination, thereby reducing the overall building energy consumption.
Given that people in industrialized countries spend a majority of their time indoors (Klepeis et al., 2001;Wiley et al., 1991), the provision of sufficient daylight is important. By providing a visual link with the natural outdoor environment, daylight can potentially improve health, awareness and feelings of wellbeing in a space, while also contributing job satisfaction and productivity (Heschong, 2002;Rangi and Osterhaus, 1999;Veitch and Gifford, 1996;Veitch et al., 2007). Such benefits of daylight are supported by the Workplace Regulations 1992 (Health, Safety and Welfare), which require access to daylight for all workers where reasonably practicable (Health and Safety Executive, 1992). The increased awareness of its benefits coupled with the desire to improve the energy efficiency of buildings has generated the need to incorporate daylight into the architectural design process. The assessment of the design decisions taken in this process will directly determine whether daylight is used effectively or not.
Daylight performance of buildings can be assessed either through field measurements or through the use of computer modeling and simulation software. The former method involves simple rules of thumb, graphical tools such as Waldram diagrams (is used to calculate the percentage of sky exposure that a building's profile allows through to the street below), and the use of scale models under real or artificial skies (Baker et al., 1993;Hopkinson et al., 1963). The latter method involves computer simulation and relies on the use of a mathematical model which is essentially simplified descriptions of complex paths of light rays in building interiors. The advances in computational techniques have resulted in increased demand for simulation in daylight design. This has been reflected in the vast increase in the number of lighting simulation tools over the last few decades (Galasiu and Reinhart, 2008;Ibarra and Reinhart, 2009;Reinhart and Fitz, 2006).
One of the most fundamental characteristics of the early stage of design is the need to develop a simulation model accurate enough to represent conceptual design and refine it as the design progresses, until the desired performance output is reached. It is important to understand how daylight is distributed across the architectural space, ensuring that the most effective design solutions are prioritized. There have been research efforts directed toward improving the efficiency of simulation tools for daylight performance predictions in the early design stage. Some researchers have tended to develop simulation algorithms in a new graphical user interface, while others have added to existing simulation models. The two methods most widely employed for the simulation of daylight are radiosity and raytracing. The radiosity method divides room surfaces into a set of patches and each patch is assumed to have constant luminance, independent of the viewing direction (Watt, 2000). Each patch absorbs some of the light it receives and reflects the remaining light back into the environment. This process repeats iteratively until the total amount of light remaining in the environment is below a given threshold (Carrol, 1999;Müller et al., 1995). One limitation of this method is that all the surfaces in the simulation model are assumed to be ideal diffuse reflectors (Goral et al., 1984;Greenberg et al., 1986). The surface division algorithm is of importance for the radiosity method, since the complexity of the algorithm and the computation times are directly related to the number of patches. Simulation tools such as AGI32, Superlite and DeLight employs the algorithm of the radiosity method.
Raytracing method is based on tracing the paths of light rays through the scene as they are reflected or refracted by the surfaces in the scene (Larson and Shakespeare, 1998). The method is based on the calculation of the distribution of light rays emitted from a point source, either from a light source (forward raytracing), or a viewpoint (backward raytracing). Raytracing method enables the simulation of material optical properties such as reflection, transmission and refraction. Unlike radiosity, raytracing is view dependent, meaning that a change in the view position requires recomputing. The major drawback of this method is that it requires large processing times (Carrol, 1999). Some simulation programs such as Relux and Dialux use a mixed method approach that combines raytracing and radiosity.
The most widely used and validated simulation program is Radiance (Ward and Rubinstein, 1988;Mardaljevic, 1995;Reinhart and Andersen, 2006). The calculation algorithm uses backward raytracing method, where rays are emitted from the point of interest and traced backwardly until they either hit a light source or another object. This method enables accurate and physically valid daylighting simulations (Ward, 1994). Yet, Radiance is a command-line driven system that requires a large amount of input data, and there is no Graphical User Interface (GUI) except the rvu program which generates Radiance images interactively. The program consists of a set of subprograms each of which requires different input data. The command line interface requires designers to create specialized scripts or syntaxes for the input data. It could be argued that using command-line tools is a matter of necessity, as designers integrate multiple sources of information when performing daylight simulation. From a practical point of view, however, there are many challenges designers face when they perform simulations at early design stages (Mardaljevic, 2001). These include time-consuming simulation models, uncertainties in modelling inputs and rapid design changes. This is particularly the case for the conceptual stages of the design process where a vast amount of data is generated. It is therefore important to process and reduce the simulation data for end-users.
The simulation engine of Radiance has recently been incorporated into other software to provide a user-friendly interface to it. One such program is Daysim, developed by Reinhart as an interface for the Radiance simulation engine (Reinhart and Walkenhorst, 2001). In its original form, Radiance simulates indoor illuminance under one sky condition and at one point in time. Daysim uses the Radiance algorithm coupled with the daylight coefficient approach to perform dynamic simulations in a reasonable amount of time. Dynamic simulation is essentially a process of constructing a mathematical model at every given time interval. For this type of simulation, Daysim includes a more sophisticated sky model -the Perez sky model -and considers variation of daylight over the course of a year. Radiance/Daysim simulation method has recently been incorporated into DIVA-for Rhino to provide a more user-friendly interface (Jakubiec and Reinhart, 2011). Another promising method is that used by Lightsolve, a dynamic daylighting simulation program to support the early design process through an interactive analysis interface (Andersen et al., 2008). A time-segmentation method was developed for pre-processing of annual data and linking the resulting dataset with spatial renderings. The method consisted of dividing the year into a number of time periods during which weather conditions are similar. The resulting simplified annual dataset was then used to produce temporal maps, which are interactively linked to spatial renderings. The real-time rendering capability of the program provides instant updating as the user moves through the virtual space. The program employs the algorithm of the raytracing method, accelerated by the use of Graphics Processing Unit (GPU) and NVIDIA's acceleration engine OptiX.
Recent developments in lighting simulation techniques have led to more efficient graphical user interfaces, and usability barriers has been considerably reduced, as indicated by numerous modelling and simulation studies. This paper proposes a preliminary workflow to integrate Radiance simulation engine into DaylightX (2020), an interactive software specifically developed for early-stage daylighting design support. The software utilizes backward raytracing algorithm to calculate the spatial distribution of daylight within the space and updates it in real-time as the user interactively manipulates input variables. Within the scope of this study, a case study is presented that shows how simulation can be applied to the daylight analysis of a building. An individual residential unit -a shipping container -was considered as the physical setting for the investigation. The application example is an attempt to illustrate the usefulness of the proposed simulation method by evaluating how the simulation framework performs in a real-world setting.

Method 2.1 Simulation software
ArchiDynamics is a sustainable design platform developed in 2020, still under continuing improvement, aims at supporting decision-making during the early design phases. The platform provides a user-friendly graphical interface to a variety of analysis software such as wind, fire and daylight analysis; and integrates these separate analysis software into a single platform. The daylight analysis software named DaylightX has been developed recently to predict the distribution of daylight in architectural spaces, with Radiance being the underlying simulation engine. The overall approach taken within the daylighting algorithms is to pre-calculate a set of parameters for each of a predefined series of sun positions and sky conditions. The approach of using default parameter values and simplifying the management of input variables greatly reduces the computation time for simulations. The proposed method allows the rapid visualization of the distribution of daylight from a building model where designers can test design considerations without manually running a script or exporting to another software. The simulation model also offers the opportunity to analyze and compare multiple design alternatives at the early design stage for example to assess the impact of building configuration on the potential daylighting design. The program aims to provide greater ease of use through its graphical user interface and create an easy workflow from building model to data visualization.
Simulations in DaylightX are controlled from a toolbar integrated into the graphical user interface. The toolbar allows the user to import 3D model data from external sources and specify the geographic location of the building by gathering the longitude and latitude coordinates along with the corresponding time zone automatically from the embedded Google Maps API. DaylightX creates an interactive visualization of sun path throughout the day at different times of the year (Fig. 1). Given that the variations in daylight are primarily due to the change in the relative position of the sun in the sky, it is important to get an idea of this variety of circumstances during building design. The movement of the sun is an important consideration when orienting a building on a site. The interactive sun path and shadow tools within DaylightX allow the user to visualize the sun path across the sky and perform shadow analysis. This offers the opportunity to undertake shadow studies for example to assess the impact of the buildings proposed within the site. The program is also capable of calculating daylight levels for complex building geometries with internal partitions or external obstructions such as nearby buildings. Users are also given the option to import material properties from an external database. Alpha channels are used to store material information, where a value of 0 means fully transparent and a value of 1 means fully opaque. The simulation is executed for a single point in time using theoretical sky conditions for the site location and the sun position, without using a weather data file as input. This allows a simulation to be conducted for the date, time and sky conditions specified. In the present stage of development, DaylightX can model three CIE standard sky conditions: overcast, uniform and clear. The choice is given as to which kind of render quality setting is preferable to use in the model, including low, medium and high-quality settings. Upon running the simulation, daylighting profiles are automatically generated based on the quality setting chosen. There are two types of output data files generated by DaylightX, illuminance and luminance. The illuminance and luminance distribution plots can be presented as false color maps, contour plots or rendered perspective views.

The structure of the software
The application programming interface involves a single function call to the Radiance simulation engine from within the program. It has a set of parameters that identify input to the simulation engine and control the execution of the simulation model. The obj2rad module acts as converter and scene compiler, converting the 3D geometry into a Radiance scene description. The program creates a project directory that contains scene description files, these include scene geometry, surface materials and sky files. The oconv module then creates an octree file from these scene description files. From the Radiance scene description and the specified view in octree, rtrace module performs raytracing calculations and rpict produces two-dimensional or three-dimensional images. The diagram in Fig. 2 shows the flow between components during a single iteration of the simulation. The process can be broken into three major stage, the first stage is the scene input, followed by the simulation, and finally post-processing analysis of data.
DaylightX uses backward raytracing method as discussed in Subsection 2.1 to calculate inter-reflections between surfaces in the scene and thus offers the additional capability of raytracing to compute contributions from specular surfaces. The simulation time depends on the complexity of building model and Radiance ambient parameters. A higher set of ambient parameters in Radiance gives higher prediction accuracy but can lead to longer simulation times. The proposed simulation method avoids this step by specifying constant ambient values, aiming to provide reliable results in a reasonable time frame. The program runs rtrace on the octree with the specified ambient parameters incorporated into the program, based on recommended values from earlier validation studies. Table 1 displays the parameters used when employing the rtrace module.

Parameters of the simulation
The material of the study is a side lit container housing unit composed of a bedroom, living, kitchen and a bathroom, located in the high desert of Joshua Tree, California, USA (latitude 34°N, longitude 116°W) (Fig. 3). The container has a rectangular plan measuring 12 meters long and 2.45 meters wide, with rooms linearly arranged (Fig. 4). The space has a ceiling height of 2.55 meters and receives light primarily through sliding glass doors positioned directly opposite each other (Fig. 5). A three-dimensional model of the test space was generated in SketchUp. The model contained information on the geometry of the building with immediate surroundings as well as the surface material properties. The rooms had a ceiling reflectance of 0.8, a wall reflectance of 0.5 and a floor reflectance of 0.25. When all    required data have been assembled, the input files are created according to the input format of the software. The next step of the analysis was to specify the date, time and the sky condition for the analysis. The CIE clear sky condition was specified for June 21 at 2 pm daylight savings time. The program then produced illuminance values for the surfaces defined in the model. The resolution of each image was rendered at 'medium quality'. The graphical output of the simulation was automatically compiled and stored in the project directory. Fig. 6 displays the variations of daylight illuminance in the form of illuminance contours and false-color image.
The results show an increasing illuminance distribution varying from 100 lux to 3000 lux, whilst in the area near glass doors the values exceed 3000 lux. The illuminance levels appear to be fairly high near glass doors compared to those found in the areas that do not have direct access to daylight due to the long and narrow room layout. It is evident from the data that with increasing distance from the windows, illuminance values decrease rapidly to 500 lux over a short distance from the doors, then more gradually reaching a minimum at around 100 lux. Fig. 7 illustrates a plan view showing the distribution of illuminance across the entire space.

Validation of the simulation method
Previous validation studies demonstrate that the Radiancebased simulation methods achieve a high accuracy (Mardaljevic, 1995;Mardaljevic, 2001;Reinhart and Herkel, 2000;Reinhart and Walkenhorst, 2001;Reinhart and Andersen, 2006). The approach taken by these studies is to compare computer predictions with measurements taken simultaneously in a full-scale test room under real sky conditions. The two of the validation metrics employed by these studies are Mean Bias Error (MBE) and Root Mean Square Error (RMSE). These metrics provide a quantitative estimate of the differences between two data series. The former measures the tendency of one data series to be larger or smaller than the other, and the latter represents the standard deviation of the differences between the two data series (Burkholder, 1978;Marriott, 1990;Steiger and Lind, 1980). It is shown by comparing simulated and measured data that the Radiance-based simulation methods provide valid results that accurately replicate real-world conditions with a relative MBE below 9 % and a relative RMSE below 19 %, and these values were considered sufficient to produce reliable simulation results (Reinhart and Andersen, 2006).
Given that the Radiance is the underlying simulation engine of DaylightX, the tool is expected to achieve  internal daylighting values to similar degree of accuracy. The simulation parameters that determine the accuracy and precision of the predictions were chosen based on recommended values from earlier Radiance validation studies. One potential source of error could come from the inaccurate input parameters in the simulation model (e.g., sky conditions, material properties, building geometry). It is also worth noting that there is some uncertainty inherent in any daylight prediction, as they are data samples taken from a field of energy which varies continuously over time and space (Tregenza, 2017).
One criticism is that as the study relied on computer simulation rather than physical measurements, it is not known whether the daylight performance predictions are related to real conditions. Future research efforts could be directed at providing evidence to support the reliability of data produced by the simulation. A more precise approach might be to compare daylight performance predictions with physical measurements taken in the test space. This may ultimately provide insights into what degree the simulated dataset is representative of the naturally occurring daylight conditions in the test space.

Discussion
This paper has introduced DaylightX, a stand-alone daylight simulation tool developed for decision support in the early stage of building design. The internal structure of the modules and functionalities have been presented. The evaluation of daylight performance in Radiance is a complex task which requires expert knowledge of script syntax and data structures as well as the setting of a large number of simulation parameters. This makes it a challenge to apply the Radiance simulation methods in early-phase design explorations. This type of evaluation method is mostly limited to being applicable to the later stages of the design process when more precise assumptions about daylighting design can be made. DaylightX simulation engine builds on the Radiance algorithms with the purpose of tailoring the simulations to the needs of designers during the early design stage.
The capabilities of DaylightX have been investigated through simulation of a container housing unit in California. A simulation workflow within DaylightX is presented that enables users to import scene geometries and material properties into the software and determine the distribution of daylight across the space at any particular time. The modelling and rendering workflows have been specifically developed with design flexibility in mind, aiming to provide designers with immediate visual feedback on a given daylighting concept. The case study exemplified the introduced concepts and the workflow prototype. Using a combination of modules and sub-modules, the program performs lighting calculations for the specified date, time and sky condition.
While the data flow in assembling module structure supports the generation of an efficient simulation tool, there exist limitations such as lack of interoperability between different simulation tools and the inability to predict daylight performance under varying sky conditions. The current version of DaylightX is capable of simulating indoor illuminance under one sky condition and at one point in time. The current findings are therefore a snapshot particular to one point in time. When time-series of indoor daylight levels over a whole year is considered, this approach becomes inefficient. Daylighting research is directed towards evaluating climate-based metrics as they are based on a dynamic analysis of the daylighting conditions under all appearing sky conditions in a year. The use of static metrics is restricted in practice due to their lack of flexibility to estimate the dynamic variations in daylight as the solar position and sky conditions change. One step towards addressing the limitations with static metrics is to incorporate dynamic daylighting analysis using advanced sky models, such as Perez all weather sky model.).

Conclusion
This paper has provided an overview in which a daylight simulation framework is explained and illustrated with an analysis of a container housing unit in California. DaylightX uses Radiance, a previously established platform that performs point-in-time simulations using a backward raytracing approach. Still in development, DaylightX aims to enhance the Radiance simulation process through a user-friendly interface in order to more effectively support the design process. The development of the simulation tool has successfully demonstrated the ability to simplify the process of daylighting analysis, automate the calculations, and provide efficient workflows. The use of an existing case study building offers future opportunities of measuring the actual daylighting conditions in the building for comparison with the daylighting predicted by the software. What deserves attention in the future is the extent to which the proposed simulation algorithms can be refined for climate-based daylight predictions. The proposed approach has also opened avenues in the development of a better-integrated data analysis and visualization tool for simulation studies.