Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

512 cec performance #543

Merged
merged 21 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
557146f
initial refactor with module.calculatePerformance
cdeline May 20, 2024
28e2d60
rename to demo.calculateResults1axis. Fix modelchains
cdeline May 21, 2024
93e0ec5
Fix pytests
cdeline May 22, 2024
2e7fbf2
Merge branch 'development' into 512_CEC_performance
cdeline Aug 30, 2024
a33f7fc
Tutorial 21 functional
cdeline Sep 3, 2024
5c3ab08
Add CECModule class to module.py. Add initial pytest
cdeline Sep 3, 2024
e1ac5a3
check for weird CECMod DataFrame orientation; more pytests
cdeline Sep 3, 2024
2caeb8a
get bifacialityfactor from scene in call to calculateResultsGencumsky…
cdeline Sep 3, 2024
b5cac04
Rename performance functions to match calculatePerformance name conve…
cdeline Sep 6, 2024
9f44c54
Merge remote-tracking branch 'remotes/NREL/development' into 512_CEC_…
cdeline Sep 6, 2024
1e945f5
Merge branch 'development' into 512_CEC_performance
cdeline Sep 6, 2024
251da4b
Replace analysisObj.getResults() with `results` property
cdeline Sep 9, 2024
9d1791e
add `results` property to RadianceObj. rename demo.CompiledResults t…
cdeline Sep 9, 2024
912fb60
Make sure to remove duplicate columns from results, which was causing…
cdeline Sep 9, 2024
d3c403a
remove `agriPV` key from calculatePerformance; for groundscans, inste…
cdeline Sep 10, 2024
050e363
Expand pytest Pout passing range to 1W
cdeline Sep 10, 2024
979f476
pytest fix. update float of single element future warning
cdeline Sep 10, 2024
78d2352
minor pytest fix
cdeline Sep 10, 2024
013fa7c
Big changes to performance._cleanDataFrameResults and performance.cal…
cdeline Sep 11, 2024
4b9e321
Update tests, autoAPI and sphinx edits
cdeline Sep 11, 2024
ee85aaf
Todo notes for future pytests
cdeline Sep 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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