bifacial_radiance.ModuleObj#

class bifacial_radiance.ModuleObj(name=None, x=None, y=None, z=None, bifi=1, modulefile=None, text=None, customtext='', xgap=0.01, ygap=0.0, zgap=0.1, numpanels=1, rewriteModulefile=True, cellModule=None, glass=False, modulematerial='black', tubeParams=None, frameParams=None, omegaParams=None, hpc=False)[source]#

Module object to store module & torque tube details. Does the heavy lifting of demo.makeModule() Module details are passed in and stored in module.json. Pass this object into makeScene or makeScene1axis.

__init__(name=None, x=None, y=None, z=None, bifi=1, modulefile=None, text=None, customtext='', xgap=0.01, ygap=0.0, zgap=0.1, numpanels=1, rewriteModulefile=True, cellModule=None, glass=False, modulematerial='black', tubeParams=None, frameParams=None, omegaParams=None, hpc=False)[source]#

Add module details to the .JSON module config file module.json

Module definitions assume that the module .rad file is defined with zero tilt, centered along the x-axis and y-axis for the center of rotation of the module (+X/2, -X/2, +Y/2, -Y/2 on each side). Tip: to define a module that is in ‘portrait’ mode, y > x.

Parameters
  • name (str) – Input to name the module type

  • x (numeric) – Width of module along the axis of the torque tube or rack. (meters)

  • y (numeric) – Length of module (meters)

  • bifi (numeric) – Bifaciality of the panel (not currently used). Between 0 (monofacial) and 1, default 1.

  • modulefile (str) – Existing radfile location in objects. Otherwise a default value is used

  • text (str) – Text used in the radfile to generate the module. Manually passing this value will overwrite module definition

  • customtext (str) – Added-text used in the radfile to generate any extra details in the racking/module. Does not overwrite generated module (unlike “text”), but adds to it at the end.

  • rewriteModulefile (bool) – Default True. Will rewrite module file each time makeModule is run.

  • numpanels (int) – Number of modules arrayed in the Y-direction. e.g. 1-up or 2-up, etc. (supports any number for carport/Mesa simulations)

  • xgap (float) – Panel space in X direction. Separation between modules in a row.

  • ygap (float) – Gap between modules arrayed in the Y-direction if any.

  • zgap (float) – Distance behind the modules in the z-direction to the edge of the tube (m)

  • glass (bool) –

    Add 5mm front and back glass to the module (glass/glass). Warning:

    glass increases the analysis variability. Recommend setting accuracy=’high’ in AnalysisObj.analysis()

  • cellModule (dict) – Dictionary with input parameters for creating a cell-level module. Shortcut for ModuleObj.addCellModule()

  • tubeParams (dict) – Dictionary with input parameters for creating a torque tube as part of the module. Shortcut for ModuleObj.addTorquetube()

  • frameParams (dict) – Dictionary with input parameters for creating a frame as part of the module. Shortcut for ModuleObj.addFrame()

  • omegaParams (dict) – Dictionary with input parameters for creating a omega or module support structure. Shortcut for ModuleObj.addOmega()

  • hpc (bool (default False)) – Set up module in HPC mode. Namely turn off read/write to module.json and just pass along the details in the module object. Note that calling e.g. addTorquetube() after this will tend to write to the module.json so pass all geometry parameters at once in to makeModule for best response.

Methods

__init__([name, x, y, z, bifi, modulefile, ...])

Add module details to the .JSON module config file module.json

addCellModule(numcellsx, numcellsy, xcell, ycell)

Create a cell-level module, with individually defined cells and gaps

addFrame([frame_material, frame_thickness, ...])

Add a metal frame geometry around the module.

addOmega([omega_material, omega_thickness, ...])

Add the racking structure element omega, which connects the frame to the torque tube.

addTorquetube([diameter, tubetype, ...])

For adding torque tubes to the module simulation.

compileText([rewriteModulefile, json])

Generate the text for the module .rad file based on ModuleObj attributes.

getDataDict()

return dictionary values from self.

readModule([name])

Read in available modules in module.json.

saveImage([filename])

Duplicate objview process to save an image of the module in /images/

showModule()

Method to call objview and render the module object (visualize it).