LM-83-12 Three-phase Daylight Simulation Script

Annual simulation of dynamic/complex fenestration systems under LM-83 guidelines. This script will generate its own folder structure beyond the starting directories required, which are outlined below.

Version 1.2.0 (August 25, 2017)

Author: Alen Mahic, Ery Djunaedy (Energy Studies in Buildings Laboratory University of Oregon; Integrated Design Lab University of Idaho) This work is licensed under the Creative Commons Attribution 3.0 Unported License. To view a copy of this license, visit GPL v.3

In plain English: you are free to use this script, distribute it, make changes to it, as long as (1) you acknowledge Alen Mahic, Ery Djunaedy and the Integrated Design Lab as the original authors, and (2) you acknowledge that the script is provided as-is with absolutely no warranty, and that the authors and the University of Idaho are not liable to anything that happens or does not happen in relation to the use of this script.

Radiance 5.0+ is required.
(Compressed ZIP)

A tutorial on the usage of this script is planned for the near future.

Usage: ./lm83c.sh -i [file] -m N -rz+/-N -clean -rtrace

-i [file]The main .rad file for the model, which pulls its geometry elements from the ./objects/ directory and its windows from the ./objects/windows/ directory. Each window group is broken down into a .rad file of its own with the filename matching the modifier name used for each defined polygon. These two must match. Required input.
-m NSpecifies the number of subdivisions of the sky. The Reinhart MF: setting where "N" is 1, 2, 3, or 4. Optional input, the default value is 4.
-rz+/-NSpecifies the orientation of the building in degrees. Make sure that there is no space between the "-rz" argument and the +/- "N" value. Optional input, the default value is 0.
-cleanThis switch will clean the directory and delete all directories and files that were generated in any previous runs. This includes the contents of the "results" folder.
-rtraceThis switch will enable the use of rcontrib for the direct sun analysis, otherwise it will use rtrace with continuous skies generated by gendaylit (or gensky if gendaylit should fail) to determine the direct sun exposure for the solar disc analysis. This method is much more time consuming and takes ~10-15 times as long.
-addInclusion of non-operated glazing/skylight openings.
Assumed folder structure:
./The main directory contains this script file and the primary .rad file of the model.
./data/Contains the point analysis files.
./materials/Contains the "materials.rad" file with the relevant material definitions for the model. The "glazing" and "wall_mat" material identifiers are used in the script and assigned to the glazings and walls respectively. These two must be defined in the "materials.rad" file. This directory also includes the .xml BSDF input files.
./objects/Contains the geometry .rad files referenced by the primary model file in the main directory.
./objetcs/windows/Contains the window group definitions, each in an individual .rad file with the filename matching the modifier name used for each defined polygon. These two must match. The modifier convention requires that each modifier include one of the following suffixes:
"_s" for a south-facing window group
"_w" for a west-facing window group
"_n" for a north-facing window group
"_e" for an east-facing window group
File example:./objects/windows/windows_s.rad
Definition example:windows_s polygon window_name
    0 0 0
    2 0 0
    2 0 2
    0 0 2
./wea/Contains the TMY3 weather files in .epw format.
Assumed input files:
./[filename].radPrimary model file.
./data/*.ptsAll desired analysis point files.
./materials/materials.radMaterials file.
./materials/singleclear.xmlBSDF file for the open condition. The "singleclear" name is also assigned to the $bsdf_open variable in the script.
./materials/venetian_75.xmlBSDF file for the closed condition. The "venetian_75" name is also assigned to the $bsdf_closed variable in the script.
./objects/*.radAll relevant geometry files referenced by the primary model file.
./objects/windows/*.radAll desired window groups separated into .rad files, taking their filenames from the modifiers used in each one.
./wea/*.epwAll desired weather files.
The outputs will be deposited in the ./results/ directory. The naming conventions for the operated annual illuminance matrix, the operation schedule files, and the LM-83 metric calculations are as follows:
Non-operated glazing and/or skylight material assignments:
The following modifier names are to be assigned to geometries that are windows or skylights, but not part of any operated window groups:
"nonoperated_glaz" (Glazing)
"nonoperated_sky" (Skylight)
Currently this script supports one material assignment for each, but can be modified to accommodate more variables for both types.