Skip to content

Commit

Permalink
Merge pull request #543 from NREL/512_CEC_performance
Browse files Browse the repository at this point in the history
512 cec performance
  • Loading branch information
cdeline authored Sep 18, 2024
2 parents 62d3396 + ee85aaf commit f3e5878
Show file tree
Hide file tree
Showing 26 changed files with 2,136 additions and 687 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ tests/simulation.ini

# bifacial_radiance temp folder
bifacial_radiance/TEMP/
TEMP/

# bifacial_radiance other
bifacial_radiance/data/source/
Expand Down
65 changes: 26 additions & 39 deletions bifacial_radiance/data/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,51 +62,38 @@
"z": 0.02,
"zgap": 0.1
},
"test": {
"bifi": 1,
"glass": false,
"modulefile": "objects\\test.rad",
"modulematerial": "black",
"numpanels": 1,
"offsetfromaxis": 0,
"scenex": 1.6,
"sceney": 0.95,
"scenez": 0.1,
"text": "! genbox black test 1.59 0.95 0.02 | xform -t -0.795 -0.475 0 -a 1 -t 0 0.95 0",
"x": 1.59,
"xgap": 0.01,
"y": 0.95,
"ygap": 0.0,
"z": 0.02,
"zgap": 0.1
},
"test-module": {
"bifi": 1,
"cellModule": {
"centerJB": null,
"numcellsx": 6,
"numcellsy": 10,
"xcell": 0.156,
"xcellgap": 0.02,
"ycell": 0.156,
"ycellgap": 0.02
},
"frameParams": {
"frame_material": "Metal_Grey",
"frame_thickness": 0.003,
"frame_width": 0.05,
"frame_z": 0.03,
"nSides_frame": 4
},
"glass": true,
"glass": false,
"modulefile": "objects\\test-module.rad",
"modulematerial": "black",
"numpanels": 1,
"offsetfromaxis": 0.18,
"omegaParams": {
"inverted": true,
"mod_overlap": 0.003,
"omega_material": "Metal_Grey",
"omega_thickness": 0.004,
"x_omega1": 0.005,
"x_omega3": 0.0015,
"y_omega": 0.5
},
"scenex": 1.046,
"sceney": 1.74,
"scenez": 0.15,
"text": "! genbox black cellPVmodule 0.156 0.156 0.02 | xform -t -0.44 -0.87 0.18 -a 6 -t 0.176 0 0 -a 10 -t 0 0.176 0 -a 1 -t 0 1.74 0\r\n! genrev Metal_Grey tube1 t*1.046 0.05 32 | xform -ry 90 -t -0.445 0 0\r\n! genbox stock_glass test-module_Glass 1.046 1.75 0.01 | xform -t -0.445 -0.875 0.175 -a 1 -t 0 1.74 0\r\n! genbox Metal_Grey frameside 0.003 1.74 0.03 | xform -t -0.518 -0.87 0.145 -a 1 -t 0 1.74 0 | xform -rz 0\r\n! genbox Metal_Grey frameleg 0.047 1.74 0.003 | xform -t -0.515 -0.87 0.145 -a 1 -t 0 1.74 0 | xform -rz 0\r\n! genbox Metal_Grey frameside 0.003 1.74 0.03 | xform -t 0.515 -0.87 0.145 -a 1 -t 0 1.74 0 | xform -rz 0\r\n! genbox Metal_Grey frameleg 0.047 1.74 0.003 | xform -t 0.468 -0.87 0.145 -a 1 -t 0 1.74 0 | xform -rz 0\r\n! genbox Metal_Grey frameside 1.03 0.003 0.027 | xform -t -0.515 0.867 0.148 -a 1 -t 0 1.74 0\r\n! genbox Metal_Grey frameleg 0.936 0.05 0.003 | xform -t -0.468 0.82 0.145 -a 1 -t 0 1.74 0\r\n! genbox Metal_Grey frameside 1.03 0.003 0.027 | xform -t -0.515 -0.87 0.148 -a 1 -t 0 1.74 0\r\n! genbox Metal_Grey frameleg 0.936 0.05 0.003 | xform -t -0.468 -0.87 0.145 -a 1 -t 0 1.74 0\r\n! genbox Metal_Grey mod_adj 0.005 0.5 0.004 | xform -t 0.515 -0.25 0.141\r\n! genbox Metal_Grey verti 0.004 0.5 0.1 | xform -t 0.5150000000000001 -0.25 0.04499999999999999\r\n! genbox Metal_Grey tt_adj 0.0015 0.5 0.004 | xform -t 0.5135000000000002 -0.25 0.04499999999999999\r\n! genbox Metal_Grey mod_adj 0.005 0.5 0.004 | xform -t -0.52 -0.25 0.141\r\n! genbox Metal_Grey verti 0.004 0.5 0.1 | xform -t -0.5190000000000001 -0.25 0.04499999999999999\r\n! genbox Metal_Grey tt_adj 0.0015 0.5 0.004 | xform -t -0.5150000000000001 -0.25 0.04499999999999999",
"torquetube": {
"diameter": 0.1,
"material": "Metal_Grey",
"tubetype": "Round",
"visible": true
},
"x": 1.036,
"offsetfromaxis": 0,
"scenex": 1.01,
"sceney": 2.0,
"scenez": 0.1,
"text": "! genbox black test-module 1 2 0.02 | xform -t -0.5 -1.0 0 -a 1 -t 0 2.0 0",
"x": 1,
"xgap": 0.01,
"y": 1.74,
"y": 2,
"ygap": 0.0,
"z": 0.02,
"zgap": 0.1
Expand Down
4 changes: 1 addition & 3 deletions bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,9 +319,7 @@ def _printRow(analysisobj, key):
else:
keyname = 'timestamp'
return pd.concat([pd.DataFrame({keyname:key},index=[0]),
analysisobj.getResults(),
analysisobj.power_data
], axis=1)
analysisobj.results], axis=1)

for key in trackerdict:
try:
Expand Down
267 changes: 127 additions & 140 deletions bifacial_radiance/main.py

Large diffs are not rendered by default.

14 changes: 6 additions & 8 deletions bifacial_radiance/modelchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def runModelChain(simulationParamsDict, sceneParamsDict, timeControlParamsDict=N
import bifacial_radiance
import os
import numpy as np
import pandas as pd

print("\nNew bifacial_radiance simulation starting. ")
print("Version: ", bifacial_radiance.__version__)
Expand Down Expand Up @@ -147,6 +148,10 @@ def runModelChain(simulationParamsDict, sceneParamsDict, timeControlParamsDict=N
omegaParams=omegaParamsDict,
cellModule=cellModule, **kwargs)

# module CEC params
if CECModParamsDict:
module.addCEC(pd.DataFrame(CECModParamsDict, index=[0]))

customObject = None

if "customObject" in sceneParamsDict:
Expand Down Expand Up @@ -236,14 +241,7 @@ def runModelChain(simulationParamsDict, sceneParamsDict, timeControlParamsDict=N

print("\n--> Calculating Performance values")

#CEC Module
import pandas as pd

if CECModParamsDict:
CECMod = pd.DataFrame(CECModParamsDict, index=[0])
else:
CECMod = None
demo.calculateResults(CECMod = CECMod)
demo.calculatePerformance1axis()
demo.exportTrackerDict(savefile=os.path.join('results','Final_Results.csv'),reindex=False)

# Save example image files
Expand Down
Loading

0 comments on commit f3e5878

Please sign in to comment.