Skip to content

Commit

Permalink
workaround #460
Browse files Browse the repository at this point in the history
Workaround so I can finish AgriPV simulations.
Tips:
-Instead of using Gfront for scanning ground, use Gback
-Pass agriPV=True to calculateResults. then RadObj.CompiledResults['Wm2Back'] will show the ground irradiance.

-Bugs found: Cumulative 1axis--  If you run analysis twice (i.e. for model the PV module AND the ground irradiances), whatever is the last simulation overwrites the stored trackerdict Analysis results, so the calculateResults only then compiles 1 row of results.
For the time being this means I have to calculate Results and save the compiled results between each Analysis.
-Also 'custom' name for the analysis does not get saved as part of the indexing in the trackerdict object and might be necessary for sampling ground, for example.
  • Loading branch information
shirubana committed Mar 21, 2023
1 parent f02bce5 commit f8576f2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions bifacial_radiance/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2752,7 +2752,7 @@ def analysis1axis(self, trackerdict=None, singleindex=None, accuracy='low',


def calculateResults(self, CECMod=None, glassglass=False, bifacialityfactor=None,
CECMod2=None):
CECMod2=None, agriPV=False):
'''
Loops through all results in trackerdict and calculates performance,
considering electrical mismatch, using
Expand Down Expand Up @@ -2866,7 +2866,8 @@ def calculateResults(self, CECMod=None, glassglass=False, bifacialityfactor=None
wind_speed = data['wind_speed'],
temp_air=data['temp_air'],
bifacialityfactor=bifacialityfactor,
CECMod2=CECMod2, **kwargs)
CECMod2=CECMod2, agriPV=agriPV
**kwargs)

ii = 0
# Update tracker dict now!
Expand All @@ -2884,7 +2885,8 @@ def calculateResults(self, CECMod=None, glassglass=False, bifacialityfactor=None
else:
# TODO HERE: SUM all keys for rows that have the same rowWanted/modWanted

results = performance.calculateResultsGencumsky1axis(results=data)
results = performance.calculateResultsGencumsky1axis(results=data,
agriPV=agriPV)
results.to_csv(os.path.join('results', 'Cumulative_Results.csv'))

self.CompiledResults = results
Expand Down

0 comments on commit f8576f2

Please sign in to comment.