[1]:
# This information helps with debugging and getting support :)
import sys, platform
import pandas as pd
import bifacial_radiance as br
print("Working on a ", platform.system(), platform.release())
print("Python version ", sys.version)
print("Pandas version ", pd.__version__)
print("bifacial_radiance version ", br.__version__)
Working on a  Windows 10
Python version  3.11.8 | packaged by conda-forge | (main, Feb 16 2024, 20:40:50) [MSC v.1937 64 bit (AMD64)]
Pandas version  2.2.3
bifacial_radiance version  0.5.0b2.dev4+gedb973d.d20250924

9 - Torquetube Shading#

Recreating JPV 2019 / PVSC 2018 Fig. 13#

Calculating and plotting shading from torque tube on 1-axis tracking for 1 day, which is figure 13 in:

Ayala Pelaez S, Deline C, Greenberg P, Stein JS, Kostuk RK. Model and validation of single-axis tracking with bifacial PV. IEEE J Photovoltaics. 2019;9(3):715–21. https://ieeexplore.ieee.org/document/8644027 and https://www.nlr.gov/docs/fy19osti/72039.pdf (pre-print, conference version)

This is what we will re-create: Ayala JPV-2

Use bifacial_radiance minimum v. 0.3.1 or higher. Many things have been updated since this paper, simplifying the generation of this plot:

  • Sensor position is now always generated E to W on N-S tracking systems, so same sensor positions can just be added for this calculation at the end without needing to flip the sensors.

  • Torquetubes get automatically generated in makeModule. Following PVSC 2018 paper, rotation is around the modules and not around the torque tube axis (which is a new feature)

  • Simulating only 1 day on single-axis tracking easier with cumulativesky = False and gendaylit1axis(startdate=’06/24’, enddate=’06/24’

  • Sensors get generated very close to surface, so all results are from the module surface and not the torquetube for this 1-UP case.

Steps:#

  1. Running the simulations for all the cases:

  2. Baseline Case: No Torque Tube

  3. Zgap = 0.1

  4. Zgap = 0.2

  5. Zgap = 0.3

  6. Read-back the values and tabulate average values for unshaded, 10cm gap and 30cm gap

  7. Plot spatial loss values for 10cm and 30cm data

  8. Overall Shading Factor (for 1 day)

1. Running the simulations for all the cases#

[2]:
import os
from pathlib import Path

testfolder = str(Path().resolve().parent.parent / 'bifacial_radiance' / 'TEMP' / 'Tutorial_09')
if not os.path.exists(testfolder):
    os.makedirs(testfolder)

print ("Your simulation will be stored in %s" % testfolder)
Your simulation will be stored in C:\Users\cdeline\Documents\Python Scripts\Bifacial_Radiance\bifacial_radiance\TEMP\Tutorial_09
[3]:
# VARIABLES of the simulation:
lat = 35.1 # ABQ
lon = -106.7 # ABQ
x=1
y = 2
numpanels=1
limit_angle = 45 # tracker rotation limit angle
backtrack = True
albedo = 'concrete'     # ground albedo
hub_height = y*0.75   # H = 0.75
gcr = 0.35
pitch = y/gcr
#pitch = 1.0/gcr # Check from 1Axis_Shading_PVSC2018 file
cumulativesky = False # needed for set1axis and makeScene1axis so simulation is done hourly not with gencumsky.
limit_angle = 45 # tracker rotation limit angle
nMods=10
nRows=3
sensorsy = 200
module_type='test-module'
datewanted='06_24' # sunny day 6/24/1972 (index 4180 - 4195). Valid formats starting version 0.4.0 for full day sim: mm_dd

## Torque tube info
tubetype='round'
material = 'Metal_Grey'
diameter = 0.1
axisofrotationTorqueTube = False   # Original PVSC version rotated around the modules like most other software.
# Variables that will get defined on each iteration below:
zgap = 0 # 0.2, 0.3 values tested. Re-defined on each simulation.
visible = False # baseline is no torque tube.

[4]:
# Simulation Start.
import bifacial_radiance
import numpy as np

print(bifacial_radiance.__version__)

demo = bifacial_radiance.RadianceObj(path = testfolder)
demo.setGround(albedo)
epwfile = demo.getEPW(lat, lon)
metdata = demo.readWeatherFile(epwfile, starttime=datewanted, endtime=datewanted)
trackerdict = demo.set1axis(metdata, limit_angle = limit_angle, backtrack = backtrack, gcr = gcr, cumulativesky = cumulativesky)
trackerdict = demo.gendaylit1axis()
sceneDict = {'pitch':pitch,'hub_height':hub_height, 'nMods': nMods, 'nRows': nRows}
0.5.0b2.dev4+gedb973d.d20250924
path = C:\Users\cdeline\Documents\Python Scripts\Bifacial_Radiance\bifacial_radiance\TEMP\Tutorial_09
Making path: images
Making path: objects
Making path: results
Making path: skies
Making path: EPWs
Making path: materials
Loading albedo, 1 value(s), 0.281 avg
1 nonzero albedo values.
Getting weather file: USA_NM_Albuquerque.723650_TMY2.epw
 ... OK!
8760 line in WeatherFile. Assuming this is a standard hourly WeatherFile for the year for purposes of saving Gencumulativesky temporary weather files in EPW folder.
Coercing year to 2021
Filtering dates
Saving file EPWs\metdata_temp.csv, # points: 8760
Calculating Sun position for Metdata that is right-labeled  with a delta of -30 mins. i.e. 12 is 11:30 sunpos
Creating ~14 skyfiles.
Created 14 skyfiles in /skies/

A. Baseline Case: No Torque Tube#

When torquetube is False, zgap is the distance from axis of torque tube to module surface, but since we are rotating from the module’s axis, this Zgap doesn’t matter for this baseline case.

[5]:
#CASE 0 No torque tube
# When torquetube is False, zgap is the distance from axis of torque tube to module surface, but since we are rotating from the module's axis, this Zgap doesn't matter.
# zgap = 0.1 + diameter/2.0
torquetube = False
customname = '_NoTT'
module_NoTT = demo.makeModule(name=customname,x=x,y=y, numpanels=numpanels)
module_NoTT.addTorquetube(visible=False, axisofrotation=False, diameter=0)
trackerdict = demo.makeScene1axis(trackerdict, module_NoTT, sceneDict, cumulativesky = cumulativesky)
trackerdict = demo.makeOct1axis(trackerdict)
trackerdict = demo.analysis1axis(trackerdict, sensorsy = sensorsy, customname = customname)


Module Name: _NoTT
Module _NoTT updated in module.json
Module _NoTT updated in module.json
Pre-existing .rad file objects\_NoTT.rad will be overwritten


Making ~14 .rad files for gendaylit 1-axis workflow (this takes a minute..)
14 Radfiles created in /objects/

Making 14 octfiles in root directory.
Created 1axis_2021-06-24_0600.oct
Created 1axis_2021-06-24_0700.oct
Created 1axis_2021-06-24_0800.oct
Created 1axis_2021-06-24_0900.oct
Created 1axis_2021-06-24_1000.oct
Created 1axis_2021-06-24_1100.oct
Created 1axis_2021-06-24_1200.oct
Created 1axis_2021-06-24_1300.oct
Created 1axis_2021-06-24_1400.oct
Created 1axis_2021-06-24_1500.oct
Created 1axis_2021-06-24_1600.oct
Created 1axis_2021-06-24_1700.oct
Created 1axis_2021-06-24_1800.oct
Created 1axis_2021-06-24_1900.oct
Linescan in process: 1axis_2021-06-24_0600_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0600_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0600_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_0600. Wm2Front: 160.61333133333335. Wm2Back: 17.108433666666667
Linescan in process: 1axis_2021-06-24_0700_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0700_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0700_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_0700. Wm2Front: 711.8865435. Wm2Back: 15.716010416666666
Linescan in process: 1axis_2021-06-24_0800_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0800_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0800_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_0800. Wm2Front: 924.6059534999999. Wm2Back: 69.45826663333334
Linescan in process: 1axis_2021-06-24_0900_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0900_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0900_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_0900. Wm2Front: 1038.910115. Wm2Back: 84.86849265000001
Linescan in process: 1axis_2021-06-24_1000_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1000_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1000_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1000. Wm2Front: 1077.66266. Wm2Back: 107.6461374
Linescan in process: 1axis_2021-06-24_1100_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1100_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1100_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1100. Wm2Front: 1083.7125216666666. Wm2Back: 133.4556714
Linescan in process: 1axis_2021-06-24_1200_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1200_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1200_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1200. Wm2Front: 1085.3191166666668. Wm2Back: 150.71347516666665
Linescan in process: 1axis_2021-06-24_1300_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1300_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1300_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1300. Wm2Front: 1083.4486733333335. Wm2Back: 152.49291916666667
Linescan in process: 1axis_2021-06-24_1400_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1400_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1400_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1400. Wm2Front: 1090.0625216666667. Wm2Back: 139.56060100000002
Linescan in process: 1axis_2021-06-24_1500_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1500_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1500_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1500. Wm2Front: 1089.5583033333335. Wm2Back: 115.80682831666665
Linescan in process: 1axis_2021-06-24_1600_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1600_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1600_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1600. Wm2Front: 1063.31393. Wm2Back: 88.37872263333333
Linescan in process: 1axis_2021-06-24_1700_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1700_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1700_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1700. Wm2Front: 973.9297876666667. Wm2Back: 74.25426416666667
Linescan in process: 1axis_2021-06-24_1800_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1800_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1800_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1800. Wm2Front: 795.2664161666667. Wm2Back: 29.030996633333334
Linescan in process: 1axis_2021-06-24_1900_NoTT_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1900_NoTT_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1900_NoTT_Scene0_Row2_Module5.csv
Index: 2021-06-24_1900. Wm2Front: 309.2898725. Wm2Back: 17.900574133333336

B. ZGAP = 0.1#

[6]:
#ZGAP 0.1
zgap = 0.1
customname = '_zgap0.1'
tubeParams = {'tubetype':tubetype,
              'diameter':diameter,
              'material':material,
              'axisofrotation':False,
              'visible':True} # either pass this into makeModule, or separately into module.addTorquetube()
module_zgap01 = demo.makeModule(name=customname, x=x,y=y, numpanels=numpanels, zgap=zgap, tubeParams=tubeParams)
trackerdict = demo.makeScene1axis(trackerdict, module_zgap01, sceneDict, cumulativesky = cumulativesky)
trackerdict = demo.makeOct1axis(trackerdict)
trackerdict = demo.analysis1axis(trackerdict, sensorsy = sensorsy, customname = customname)

Module Name: _zgap0.1
Module _zgap0.1 updated in module.json

Making ~14 .rad files for gendaylit 1-axis workflow (this takes a minute..)
14 Radfiles created in /objects/

Making 14 octfiles in root directory.
Created 1axis_2021-06-24_0600.oct
Created 1axis_2021-06-24_0700.oct
Created 1axis_2021-06-24_0800.oct
Created 1axis_2021-06-24_0900.oct
Created 1axis_2021-06-24_1000.oct
Created 1axis_2021-06-24_1100.oct
Created 1axis_2021-06-24_1200.oct
Created 1axis_2021-06-24_1300.oct
Created 1axis_2021-06-24_1400.oct
Created 1axis_2021-06-24_1500.oct
Created 1axis_2021-06-24_1600.oct
Created 1axis_2021-06-24_1700.oct
Created 1axis_2021-06-24_1800.oct
Created 1axis_2021-06-24_1900.oct
Linescan in process: 1axis_2021-06-24_0600_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_0600. Wm2Front: 160.79456283333332. Wm2Back: 16.149412396666666
Linescan in process: 1axis_2021-06-24_0700_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_0700. Wm2Front: 714.142931. Wm2Back: 16.990744218333333
Linescan in process: 1axis_2021-06-24_0800_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_0800. Wm2Front: 927.6359336666667. Wm2Back: 67.13198245
Linescan in process: 1axis_2021-06-24_0900_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_0900. Wm2Front: 1039.9753983333333. Wm2Back: 95.34997313333334
Linescan in process: 1axis_2021-06-24_1000_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1000. Wm2Front: 1077.69022. Wm2Back: 114.38867850000001
Linescan in process: 1axis_2021-06-24_1100_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1100. Wm2Front: 1084.0945733333333. Wm2Back: 129.43752946666666
Linescan in process: 1axis_2021-06-24_1200_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1200. Wm2Front: 1085.3231933333334. Wm2Back: 132.16437158333335
Linescan in process: 1axis_2021-06-24_1300_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1300. Wm2Front: 1083.5638116666669. Wm2Back: 130.74440076666667
Linescan in process: 1axis_2021-06-24_1400_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1400. Wm2Front: 1090.2652516666667. Wm2Back: 132.6973246833333
Linescan in process: 1axis_2021-06-24_1500_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1500. Wm2Front: 1089.9819400000001. Wm2Back: 120.36316593333333
Linescan in process: 1axis_2021-06-24_1600_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1600. Wm2Front: 1064.56622. Wm2Back: 99.018636
Linescan in process: 1axis_2021-06-24_1700_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1700. Wm2Front: 977.1144816666667. Wm2Back: 79.30465405
Linescan in process: 1axis_2021-06-24_1800_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1800. Wm2Front: 797.9707716666666. Wm2Back: 25.663987683333335
Linescan in process: 1axis_2021-06-24_1900_zgap0.1_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1900_zgap0.1_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1900_zgap0.1_Scene0_Row2_Module5.csv
Index: 2021-06-24_1900. Wm2Front: 309.3469401666667. Wm2Back: 16.957719663333332

C. ZGAP = 0.2#

[7]:
#ZGAP 0.2
zgap = 0.2
customname = '_zgap0.2'
tubeParams = {'tubetype':tubetype,
              'diameter':diameter,
              'material':material,
              'axisofrotation':False,
              'visible':True} # either pass this into makeModule, or separately into module.addTorquetube()
module_zgap02 = demo.makeModule(name=customname, x=x,y=y, numpanels=numpanels,zgap=zgap, tubeParams=tubeParams)
trackerdict = demo.makeScene1axis(trackerdict, module_zgap02, sceneDict, cumulativesky = cumulativesky)
trackerdict = demo.makeOct1axis(trackerdict)
trackerdict = demo.analysis1axis(trackerdict, sensorsy = sensorsy, customname = customname)

Module Name: _zgap0.2
Module _zgap0.2 updated in module.json

Making ~14 .rad files for gendaylit 1-axis workflow (this takes a minute..)
14 Radfiles created in /objects/

Making 14 octfiles in root directory.
Created 1axis_2021-06-24_0600.oct
Created 1axis_2021-06-24_0700.oct
Created 1axis_2021-06-24_0800.oct
Created 1axis_2021-06-24_0900.oct
Created 1axis_2021-06-24_1000.oct
Created 1axis_2021-06-24_1100.oct
Created 1axis_2021-06-24_1200.oct
Created 1axis_2021-06-24_1300.oct
Created 1axis_2021-06-24_1400.oct
Created 1axis_2021-06-24_1500.oct
Created 1axis_2021-06-24_1600.oct
Created 1axis_2021-06-24_1700.oct
Created 1axis_2021-06-24_1800.oct
Created 1axis_2021-06-24_1900.oct
Linescan in process: 1axis_2021-06-24_0600_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_0600. Wm2Front: 160.69127733333335. Wm2Back: 16.13198465
Linescan in process: 1axis_2021-06-24_0700_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_0700. Wm2Front: 714.0970468333333. Wm2Back: 17.00923173333333
Linescan in process: 1axis_2021-06-24_0800_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_0800. Wm2Front: 927.6200985. Wm2Back: 67.34797225
Linescan in process: 1axis_2021-06-24_0900_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_0900. Wm2Front: 1039.569765. Wm2Back: 96.1848546
Linescan in process: 1axis_2021-06-24_1000_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1000. Wm2Front: 1077.65024. Wm2Back: 115.02018179999999
Linescan in process: 1axis_2021-06-24_1100_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1100. Wm2Front: 1083.6396583333333. Wm2Back: 130.65506715
Linescan in process: 1axis_2021-06-24_1200_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1200. Wm2Front: 1085.16057. Wm2Back: 132.77163008333332
Linescan in process: 1axis_2021-06-24_1300_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1300. Wm2Front: 1083.6495366666666. Wm2Back: 131.3902534
Linescan in process: 1axis_2021-06-24_1400_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1400. Wm2Front: 1089.5272816666666. Wm2Back: 134.13126923333334
Linescan in process: 1axis_2021-06-24_1500_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1500. Wm2Front: 1089.5370016666666. Wm2Back: 122.10894130000001
Linescan in process: 1axis_2021-06-24_1600_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1600. Wm2Front: 1064.522875. Wm2Back: 100.99782898333335
Linescan in process: 1axis_2021-06-24_1700_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1700. Wm2Front: 977.2259275000001. Wm2Back: 80.06400821666666
Linescan in process: 1axis_2021-06-24_1800_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1800. Wm2Front: 797.9606495. Wm2Back: 25.91583303333333
Linescan in process: 1axis_2021-06-24_1900_zgap0.2_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1900_zgap0.2_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1900_zgap0.2_Scene0_Row2_Module5.csv
Index: 2021-06-24_1900. Wm2Front: 309.21895966666665. Wm2Back: 17.228730433333336

D. ZGAP = 0.3#

[8]:
#ZGAP 0.3
zgap = 0.3
customname = '_zgap0.3'
tubeParams = {'tubetype':tubetype,
              'diameter':diameter,
              'material':material,
              'axisofrotation':False,
              'visible':True} # either pass this into makeModule, or separately into module.addTorquetube()
module_zgap03 = demo.makeModule(name=customname,x=x,y=y, numpanels=numpanels, zgap=zgap, tubeParams=tubeParams)
trackerdict = demo.makeScene1axis(trackerdict, module_zgap03, sceneDict, cumulativesky = cumulativesky)
trackerdict = demo.makeOct1axis(trackerdict)
trackerdict = demo.analysis1axis(trackerdict, sensorsy = sensorsy, customname = customname)

Module Name: _zgap0.3
Module _zgap0.3 updated in module.json

Making ~14 .rad files for gendaylit 1-axis workflow (this takes a minute..)
14 Radfiles created in /objects/

Making 14 octfiles in root directory.
Created 1axis_2021-06-24_0600.oct
Created 1axis_2021-06-24_0700.oct
Created 1axis_2021-06-24_0800.oct
Created 1axis_2021-06-24_0900.oct
Created 1axis_2021-06-24_1000.oct
Created 1axis_2021-06-24_1100.oct
Created 1axis_2021-06-24_1200.oct
Created 1axis_2021-06-24_1300.oct
Created 1axis_2021-06-24_1400.oct
Created 1axis_2021-06-24_1500.oct
Created 1axis_2021-06-24_1600.oct
Created 1axis_2021-06-24_1700.oct
Created 1axis_2021-06-24_1800.oct
Created 1axis_2021-06-24_1900.oct
Linescan in process: 1axis_2021-06-24_0600_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_0600. Wm2Front: 160.6142815. Wm2Back: 16.04715678333333
Linescan in process: 1axis_2021-06-24_0700_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_0700. Wm2Front: 713.9713545. Wm2Back: 17.162669100000002
Linescan in process: 1axis_2021-06-24_0800_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_0800. Wm2Front: 927.5181026666667. Wm2Back: 66.89136905
Linescan in process: 1axis_2021-06-24_0900_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_0900. Wm2Front: 1039.88624. Wm2Back: 96.3735126
Linescan in process: 1axis_2021-06-24_1000_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1000. Wm2Front: 1077.8121083333333. Wm2Back: 115.48856386666667
Linescan in process: 1axis_2021-06-24_1100_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1100. Wm2Front: 1083.3721716666666. Wm2Back: 131.75425473333334
Linescan in process: 1axis_2021-06-24_1200_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1200. Wm2Front: 1085.2130849999999. Wm2Back: 135.79956271666666
Linescan in process: 1axis_2021-06-24_1300_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1300. Wm2Front: 1084.0047533333332. Wm2Back: 133.21333536666668
Linescan in process: 1axis_2021-06-24_1400_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1400. Wm2Front: 1089.2621783333334. Wm2Back: 135.17987356666669
Linescan in process: 1axis_2021-06-24_1500_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1500. Wm2Front: 1090.0221333333332. Wm2Back: 122.11487441666667
Linescan in process: 1axis_2021-06-24_1600_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1600. Wm2Front: 1064.680476666667. Wm2Back: 100.8071343
Linescan in process: 1axis_2021-06-24_1700_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1700. Wm2Front: 977.4757143333333. Wm2Back: 80.27294976666668
Linescan in process: 1axis_2021-06-24_1800_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1800. Wm2Front: 797.9280076666666. Wm2Back: 26.184755483333333
Linescan in process: 1axis_2021-06-24_1900_zgap0.3_Scene0_Row2_Module5_Front
Linescan in process: 1axis_2021-06-24_1900_zgap0.3_Scene0_Row2_Module5_Back
Saved: results\irr_1axis_2021-06-24_1900_zgap0.3_Scene0_Row2_Module5.csv
Index: 2021-06-24_1900. Wm2Front: 309.27536466666663. Wm2Back: 17.48443143333333

2. Read-back the values and tabulate average values for unshaded, 10cm gap and 30cm gap#

[9]:
import glob
import pandas as pd

resultsfolder = os.path.join(testfolder, 'results')
print (resultsfolder)
filenames = glob.glob(os.path.join(resultsfolder,'*.csv'))
noTTlist = [k for k in filenames if 'NoTT' in k]
zgap10cmlist = [k for k in filenames if 'zgap0.1' in k]
zgap20cmlist = [k for k in filenames if 'zgap0.2' in k]
zgap30cmlist = [k for k in filenames if 'zgap0.3' in k]

# sum across all hours for each case
unsh_front = np.array([pd.read_csv(f, engine='python')['Wm2Front'] for f in noTTlist]).sum(axis = 0)
cm10_front = np.array([pd.read_csv(f, engine='python')['Wm2Front'] for f in zgap10cmlist]).sum(axis = 0)
cm20_front = np.array([pd.read_csv(f, engine='python')['Wm2Front'] for f in zgap20cmlist]).sum(axis = 0)
cm30_front = np.array([pd.read_csv(f, engine='python')['Wm2Front'] for f in zgap30cmlist]).sum(axis = 0)
unsh_back = np.array([pd.read_csv(f, engine='python')['Wm2Back'] for f in noTTlist]).sum(axis = 0)
cm10_back = np.array([pd.read_csv(f, engine='python')['Wm2Back'] for f in zgap10cmlist]).sum(axis = 0)
cm20_back = np.array([pd.read_csv(f, engine='python')['Wm2Back'] for f in zgap20cmlist]).sum(axis = 0)
cm30_back = np.array([pd.read_csv(f, engine='python')['Wm2Back'] for f in zgap30cmlist]).sum(axis = 0)
C:\Users\cdeline\Documents\Python Scripts\Bifacial_Radiance\bifacial_radiance\TEMP\Tutorial_09\results

3. plot spatial loss values for 10cm and 30cm data#

[12]:
import matplotlib.pyplot as plt
#plt.rcParams['font.family'] = 'sans-serif'
#plt.rcParams['font.sans-serif'] = ['Arial']
plt.rcParams['axes.linewidth'] = 0.2 #set the value globally

fig = plt.figure()
fig.set_size_inches(4, 2.5)
ax = fig.add_axes((0.15,0.15,0.78,0.75))
#plt.rc('font', family='sans-serif')
plt.rc('xtick',labelsize=8)
plt.rc('ytick',labelsize=8)
plt.rc('axes',labelsize=8)
plt.plot(np.linspace(-1,1,unsh_back.__len__()),(cm30_back - unsh_back)/unsh_back*100, label = '30cm gap',color = 'black')  #steelblue
plt.plot(np.linspace(-1,1,unsh_back.__len__()),(cm20_back - unsh_back)/unsh_back*100, label = '20cm gap',color = 'steelblue', linestyle = '--')  #steelblue
plt.plot(np.linspace(-1,1,unsh_back.__len__()),(cm10_back - unsh_back)/unsh_back*100, label = '10cm gap',color = 'darkorange')  #steelblue
#plt.ylabel('$G_{rear}$ vs unshaded [Wm-2]')#(r'$BG_E$ [%]')
plt.ylabel('$G_{rear}$ / $G_{rear,tubeless}$ -1 [%]')
plt.xlabel('Module X position [m]')
plt.legend(fontsize = 8,frameon = False,loc='best')
#plt.ylim([0, 15])
plt.title('Torque tube shading loss',fontsize=9)
#plt.annotate('South',xy=(-10,9.5),fontsize = 8); plt.annotate('North',xy=(8,9.5),fontsize = 8)
plt.show()
../_images/tutorials_9_-_Torquetube_Shading_24_0.png

4. Overall Shading Loss Factor#

To calculate shading loss factor, we can use the following equation:

f58e9b70cc33422d80ba318558284e79

[15]:
ShadingFactor = (1 - cm30_back.sum() / unsh_back.sum())*100
print(ShadingFactor)
0.13514724136018952