API reference#
GUI#
|
Graphical user interface- just type bifacial_radiance.gui() to get started! |
Classes#
This is a collection of classes used by bifacial_radiance for users that prefer object-oriented programming.
|
Meteorological data from EPW file. |
|
The RadianceObj top level class is used to work on radiance objects, keep track of filenames, sky values, PV module configuration, etc. |
|
Class to set and return details for the ground surface materials and reflectance. |
|
Module object to store module & torque tube details. |
|
Scene information including PV module type, bifaciality, array info pv module orientation defaults: Azimuth = 180 (south) pv module origin: z = 0 bottom of frame. |
|
Analysis class for performing raytrace to obtain irradiance measurements at the array, as well plotting and reporting results. |
Sky#
Functions and methods for dealing with weather, calculating solar position and generating the skies for the raytrace simulations.
Weather#
|
Subroutine to download nearest epw files to latitude and longitude provided, into the directory EPWs based on github/aahoo. |
|
Read either a EPW or a TMY file, calls the functions |
Sky Dome#
Functions and methods for establishing the sources or sky domes for the simulation
|
Generate Skydome using gencumsky. |
|
1-axis tracking implementation of gencumulativesky. |
|
Sets and returns sky information using gendaylit. |
|
Sets and returns sky information using gendaylit. |
|
1-axis tracking implementation of gendaylit. |
Geometry#
Modules#
Functions and methods to generate modules
|
pass module generation details into ModuleObj(). |
|
For adding torque tubes to the module simulation. |
|
Create a cell-level module, with individually defined cells and gaps |
|
Add a metal frame geometry around the module. |
|
Add the racking structure element omega, which connects the frame to the torque tube. |
Method to call objview and render the module object (visualize it). |
|
|
Read in available modules in module.json. |
|
Generate the text for the module .rad file based on ModuleObj attributes. |
|
Return files in the Materials directory with .rad extension appends materials files to the oconv file list |
Scene#
Functions and methods to generate the scene.
|
Use GroundObj constructor class and return a ground object |
|
Set up geometry for 1-axis tracking. |
|
Create a SceneObj which contains details of the PV system configuration including tilt, row pitch, height, nMods per row, nRows in the system... |
|
Creates a SceneObj for each tracking angle which contains details of the PV system configuration including row pitch, hub_height, nMods per row, nRows in the system... |
|
Combine everything together into a .oct file |
|
Combine files listed in trackerdict into multiple .oct files |
Support methods for scene
Method to call objview on the scene included in self |
|
|
Function for development and experimenting with extraneous objects in the scene. |
|
Appends to the Scene radfile in folder objects the text command in Radiance lingo created by the user. |
Analysis#
Methods for irradiance calculations#
|
Handler function that decides how to handle different number of front and back sensors. |
|
General analysis function, where linepts are passed in for calling the raytrace routine |
|
Loop through trackerdict and runs linescans for each scene and scan in there. |
Mismatch#
Use this when sensorsy calculated with bifacial_radiance > cellsy |
Support#
Input / Output#
Module providing routines for loading and cleaning results from bifacial_radiance. |
|
|
Load the pickled radiance object for further use Usage (once you're in the correct local directory). |
|
Load a trackerdict by reading all files in the results directory. |
|
Use |
|
Loads in a bifacial_radiance results file |
|
Replace irradiance values with NaN's when the scan intersects ground, sky, or anything in matchers. |
|
Cleans results file read by read1Result. |
|
Use |
|
Pickle the radiance object for further use. |
Visualization#
Functions for visualizing irradiance results
|
Makes a false-color plot of octfile, viewfile |
|
Makes a visible image (rendering) of octfile, viewfile |
Method to call objview on the scene included in self |
|
|
Save an image of the scene to /images/. |
|
Duplicate objview process to save an image of the module in /images/ |
Others#
Return concat of matfiles, radfiles and skyfiles |
|
Helper function to calculate a tracker's angle for use with the fixed tilt routines of bifacial_radiance. |
|
Return files in the root directory with .oct extension |
ModelChain#
|
Function to read configurationinput file for a bifacial_radiance simulation. |
|
This calls config.py values, which are arranged into dictionaries, and runs all the respective processes based on the variables in the config.py. |
Saves dictionaries from working memory into a Configuration File with extension format .ini. |
Spectral Analysis#
|
generate spectral curve for particular material. |