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.nrel.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#

[1]:
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\sayala\Documents\GitHub\bifacial_radiance\bifacial_radiance\TEMP\Tutorial_09
[2]:
# 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.

[3]:
# 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.3.4+387.g07a8343.dirty
path = C:\Users\sayala\Documents\GitHub\bifacial_radiance\bifacial_radiance\TEMP\Tutorial_09
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 13 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.

[4]:
#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
Pre-existing .rad file objects\_NoTT.rad will be overwritten
Module _NoTT updated in module.json
Pre-existing .rad file objects\_NoTT.rad will be overwritten

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

Making 13 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
Linescan in process: 1axis_2021-06-24_0600_NoTT_Front
Linescan in process: 1axis_2021-06-24_0600_NoTT_Back
Saved: results\irr_1axis_2021-06-24_0600_NoTT.csv
Index: 2021-06-24_0600. Wm2Front: 160.73402666666667. Wm2Back: 17.121764033333335
Linescan in process: 1axis_2021-06-24_0700_NoTT_Front
Linescan in process: 1axis_2021-06-24_0700_NoTT_Back
Saved: results\irr_1axis_2021-06-24_0700_NoTT.csv
Index: 2021-06-24_0700. Wm2Front: 711.7897250000001. Wm2Back: 15.662987166666667
Linescan in process: 1axis_2021-06-24_0800_NoTT_Front
Linescan in process: 1axis_2021-06-24_0800_NoTT_Back
Saved: results\irr_1axis_2021-06-24_0800_NoTT.csv
Index: 2021-06-24_0800. Wm2Front: 924.5799430000001. Wm2Back: 69.3365472
Linescan in process: 1axis_2021-06-24_0900_NoTT_Front
Linescan in process: 1axis_2021-06-24_0900_NoTT_Back
Saved: results\irr_1axis_2021-06-24_0900_NoTT.csv
Index: 2021-06-24_0900. Wm2Front: 1039.2877216666666. Wm2Back: 84.73331776666666
Linescan in process: 1axis_2021-06-24_1000_NoTT_Front
Linescan in process: 1axis_2021-06-24_1000_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1000_NoTT.csv
Index: 2021-06-24_1000. Wm2Front: 1077.4515266666667. Wm2Back: 107.66131883333334
Linescan in process: 1axis_2021-06-24_1100_NoTT_Front
Linescan in process: 1axis_2021-06-24_1100_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1100_NoTT.csv
Index: 2021-06-24_1100. Wm2Front: 1083.8388816666668. Wm2Back: 133.7681057
Linescan in process: 1axis_2021-06-24_1200_NoTT_Front
Linescan in process: 1axis_2021-06-24_1200_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1200_NoTT.csv
Index: 2021-06-24_1200. Wm2Front: 1085.4498483333332. Wm2Back: 150.34431866666668
Linescan in process: 1axis_2021-06-24_1300_NoTT_Front
Linescan in process: 1axis_2021-06-24_1300_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1300_NoTT.csv
Index: 2021-06-24_1300. Wm2Front: 1083.580191666667. Wm2Back: 152.35295416666665
Linescan in process: 1axis_2021-06-24_1400_NoTT_Front
Linescan in process: 1axis_2021-06-24_1400_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1400_NoTT.csv
Index: 2021-06-24_1400. Wm2Front: 1090.0554633333334. Wm2Back: 139.71770083333334
Linescan in process: 1axis_2021-06-24_1500_NoTT_Front
Linescan in process: 1axis_2021-06-24_1500_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1500_NoTT.csv
Index: 2021-06-24_1500. Wm2Front: 1088.7448499999998. Wm2Back: 115.78704476666665
Linescan in process: 1axis_2021-06-24_1600_NoTT_Front
Linescan in process: 1axis_2021-06-24_1600_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1600_NoTT.csv
Index: 2021-06-24_1600. Wm2Front: 1063.6545199999998. Wm2Back: 88.75401606666667
Linescan in process: 1axis_2021-06-24_1700_NoTT_Front
Linescan in process: 1axis_2021-06-24_1700_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1700_NoTT.csv
Index: 2021-06-24_1700. Wm2Front: 973.7315478333334. Wm2Back: 74.38548493333333
Linescan in process: 1axis_2021-06-24_1800_NoTT_Front
Linescan in process: 1axis_2021-06-24_1800_NoTT_Back
Saved: results\irr_1axis_2021-06-24_1800_NoTT.csv
Index: 2021-06-24_1800. Wm2Front: 795.1581940000001. Wm2Back: 29.155385466666665
Saving a cumulative-results file in the main simulation folder.This adds up by sensor location the irradiance over all hours or configurations considered.
Warning: This file saving routine does not clean results, so if your setup has ygaps, or 2+modules or torque tubes, doing a deeper cleaning and working with the individual results files in the results folder is highly suggested.

Saving Cumulative results
Saved: cumulative_results__NoTT.csv

B. ZGAP = 0.1#

[5]:
#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 ~13 .rad files for gendaylit 1-axis workflow (this takes a minute..)
13 Radfiles created in /objects/

Making 13 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
Linescan in process: 1axis_2021-06-24_0600_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.1.csv
Index: 2021-06-24_0600. Wm2Front: 160.58522366666668. Wm2Back: 16.314374041666664
Linescan in process: 1axis_2021-06-24_0700_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.1.csv
Index: 2021-06-24_0700. Wm2Front: 711.8783271666666. Wm2Back: 14.72640245
Linescan in process: 1axis_2021-06-24_0800_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.1.csv
Index: 2021-06-24_0800. Wm2Front: 924.6545375000001. Wm2Back: 65.33095958333334
Linescan in process: 1axis_2021-06-24_0900_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.1.csv
Index: 2021-06-24_0900. Wm2Front: 1039.1562083333333. Wm2Back: 80.46069813333334
Linescan in process: 1axis_2021-06-24_1000_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.1.csv
Index: 2021-06-24_1000. Wm2Front: 1078.4097983333334. Wm2Back: 102.5569975
Linescan in process: 1axis_2021-06-24_1100_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.1.csv
Index: 2021-06-24_1100. Wm2Front: 1083.4543766666666. Wm2Back: 126.3588816
Linescan in process: 1axis_2021-06-24_1200_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.1.csv
Index: 2021-06-24_1200. Wm2Front: 1085.5948533333335. Wm2Back: 143.09100388333331
Linescan in process: 1axis_2021-06-24_1300_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.1.csv
Index: 2021-06-24_1300. Wm2Front: 1083.3561866666669. Wm2Back: 143.74302033333333
Linescan in process: 1axis_2021-06-24_1400_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.1.csv
Index: 2021-06-24_1400. Wm2Front: 1089.9818416666667. Wm2Back: 133.16825973333334
Linescan in process: 1axis_2021-06-24_1500_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.1.csv
Index: 2021-06-24_1500. Wm2Front: 1089.1320249999999. Wm2Back: 110.99724395000001
Linescan in process: 1axis_2021-06-24_1600_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.1.csv
Index: 2021-06-24_1600. Wm2Front: 1063.6464533333333. Wm2Back: 84.98364443333334
Linescan in process: 1axis_2021-06-24_1700_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.1.csv
Index: 2021-06-24_1700. Wm2Front: 974.0719039999999. Wm2Back: 71.22193366666666
Linescan in process: 1axis_2021-06-24_1800_zgap0.1_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.1_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.1.csv
Index: 2021-06-24_1800. Wm2Front: 795.5270095. Wm2Back: 27.774535033333333
Saving a cumulative-results file in the main simulation folder.This adds up by sensor location the irradiance over all hours or configurations considered.
Warning: This file saving routine does not clean results, so if your setup has ygaps, or 2+modules or torque tubes, doing a deeper cleaning and working with the individual results files in the results folder is highly suggested.

Saving Cumulative results
Saved: cumulative_results__zgap0.1.csv

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
Pre-existing .rad file objects\_zgap0.2.rad will be overwritten

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

Making 13 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
Linescan in process: 1axis_2021-06-24_0600_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.2.csv
Index: 2021-06-24_0600. Wm2Front: 160.6793395. Wm2Back: 16.308693233333333
Linescan in process: 1axis_2021-06-24_0700_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.2.csv
Index: 2021-06-24_0700. Wm2Front: 711.6508748333333. Wm2Back: 14.997858851666665
Linescan in process: 1axis_2021-06-24_0800_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.2.csv
Index: 2021-06-24_0800. Wm2Front: 924.6050766666667. Wm2Back: 65.85995245000001
Linescan in process: 1axis_2021-06-24_0900_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.2.csv
Index: 2021-06-24_0900. Wm2Front: 1039.106215. Wm2Back: 81.24756816666667
Linescan in process: 1axis_2021-06-24_1000_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.2.csv
Index: 2021-06-24_1000. Wm2Front: 1078.0332999999998. Wm2Back: 103.389067
Linescan in process: 1axis_2021-06-24_1100_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.2.csv
Index: 2021-06-24_1100. Wm2Front: 1083.9385066666666. Wm2Back: 127.08079916666668
Linescan in process: 1axis_2021-06-24_1200_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.2.csv
Index: 2021-06-24_1200. Wm2Front: 1085.1381666666668. Wm2Back: 144.71764443333333
Linescan in process: 1axis_2021-06-24_1300_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.2.csv
Index: 2021-06-24_1300. Wm2Front: 1083.1195133333333. Wm2Back: 146.28812258333335
Linescan in process: 1axis_2021-06-24_1400_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.2.csv
Index: 2021-06-24_1400. Wm2Front: 1089.849945. Wm2Back: 135.0038261166667
Linescan in process: 1axis_2021-06-24_1500_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.2.csv
Index: 2021-06-24_1500. Wm2Front: 1090.1313516666667. Wm2Back: 111.87352368333333
Linescan in process: 1axis_2021-06-24_1600_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.2.csv
Index: 2021-06-24_1600. Wm2Front: 1064.4160566666667. Wm2Back: 86.25420585
Linescan in process: 1axis_2021-06-24_1700_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.2.csv
Index: 2021-06-24_1700. Wm2Front: 974.0041676666666. Wm2Back: 72.31188941666667
Linescan in process: 1axis_2021-06-24_1800_zgap0.2_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.2_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.2.csv
Index: 2021-06-24_1800. Wm2Front: 795.1022419999999. Wm2Back: 27.072133116666663
Saving a cumulative-results file in the main simulation folder.This adds up by sensor location the irradiance over all hours or configurations considered.
Warning: This file saving routine does not clean results, so if your setup has ygaps, or 2+modules or torque tubes, doing a deeper cleaning and working with the individual results files in the results folder is highly suggested.

Saving Cumulative results
Saved: cumulative_results__zgap0.2.csv

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 ~13 .rad files for gendaylit 1-axis workflow (this takes a minute..)
13 Radfiles created in /objects/

Making 13 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
Linescan in process: 1axis_2021-06-24_0600_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_0600_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_0600_zgap0.3.csv
Index: 2021-06-24_0600. Wm2Front: 160.71439716666666. Wm2Back: 16.402217866666664
Linescan in process: 1axis_2021-06-24_0700_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_0700_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_0700_zgap0.3.csv
Index: 2021-06-24_0700. Wm2Front: 711.8272646666668. Wm2Back: 14.969952549999999
Linescan in process: 1axis_2021-06-24_0800_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_0800_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_0800_zgap0.3.csv
Index: 2021-06-24_0800. Wm2Front: 924.5672013333332. Wm2Back: 70.4617007
Linescan in process: 1axis_2021-06-24_0900_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_0900_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_0900_zgap0.3.csv
Index: 2021-06-24_0900. Wm2Front: 1039.4952816666666. Wm2Back: 82.29257826666668
Linescan in process: 1axis_2021-06-24_1000_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1000_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1000_zgap0.3.csv
Index: 2021-06-24_1000. Wm2Front: 1077.7083666666667. Wm2Back: 104.50355728333332
Linescan in process: 1axis_2021-06-24_1100_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1100_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1100_zgap0.3.csv
Index: 2021-06-24_1100. Wm2Front: 1083.7942533333332. Wm2Back: 130.08286796666667
Linescan in process: 1axis_2021-06-24_1200_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1200_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1200_zgap0.3.csv
Index: 2021-06-24_1200. Wm2Front: 1085.1777233333335. Wm2Back: 145.488044
Linescan in process: 1axis_2021-06-24_1300_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1300_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1300_zgap0.3.csv
Index: 2021-06-24_1300. Wm2Front: 1083.5996499999999. Wm2Back: 147.47137110000003
Linescan in process: 1axis_2021-06-24_1400_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1400_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1400_zgap0.3.csv
Index: 2021-06-24_1400. Wm2Front: 1089.7519816666668. Wm2Back: 136.00649253333333
Linescan in process: 1axis_2021-06-24_1500_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1500_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1500_zgap0.3.csv
Index: 2021-06-24_1500. Wm2Front: 1090.3138166666668. Wm2Back: 112.7980408
Linescan in process: 1axis_2021-06-24_1600_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1600_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1600_zgap0.3.csv
Index: 2021-06-24_1600. Wm2Front: 1063.9477266666668. Wm2Back: 87.05726741666668
Linescan in process: 1axis_2021-06-24_1700_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1700_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1700_zgap0.3.csv
Index: 2021-06-24_1700. Wm2Front: 973.9965698333332. Wm2Back: 72.18619936666667
Linescan in process: 1axis_2021-06-24_1800_zgap0.3_Front
Linescan in process: 1axis_2021-06-24_1800_zgap0.3_Back
Saved: results\irr_1axis_2021-06-24_1800_zgap0.3.csv
Index: 2021-06-24_1800. Wm2Front: 795.2513158333334. Wm2Back: 27.609950083333334
Saving a cumulative-results file in the main simulation folder.This adds up by sensor location the irradiance over all hours or configurations considered.
Warning: This file saving routine does not clean results, so if your setup has ygaps, or 2+modules or torque tubes, doing a deeper cleaning and working with the individual results files in the results folder is highly suggested.

Saving Cumulative results
Saved: cumulative_results__zgap0.3.csv

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\sayala\Documents\GitHub\bifacial_radiance\bifacial_radiance\TEMP\Tutorial_09\results

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

[10]:
import matplotlib.pyplot as plt
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Helvetica']
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()
WARNING:matplotlib.font_manager:findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'sans-serif' not found because none of the following families were found: Helvetica
WARNING:matplotlib.font_manager:findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'sans-serif' not found because none of the following families were found: Helvetica
WARNING:matplotlib.font_manager:findfont: Font family ['sans-serif'] not found. Falling back to DejaVu Sans.
WARNING:matplotlib.font_manager:findfont: Generic family 'sans-serif' not found because none of the following families were found: Helvetica
../_images/tutorials_9_-_Torquetube_Shading_23_1.png

4. Overall Shading Loss Factor#

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

19720b2f395e4ba4873fecc74a4180cb

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