Skip to content

Commit

Permalink
moduleParamsDict module information
Browse files Browse the repository at this point in the history
Saves module name, efficiency, peak power and temp coefficient into module parameters and .ini; not used for performance calculation but information that users might want to keep track of.
  • Loading branch information
shirubana committed Oct 11, 2022
1 parent d5e67e3 commit 147d60d
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 3 deletions.
24 changes: 24 additions & 0 deletions bifacial_radiance/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,30 @@ def boolConvert(d):
moduleParamsDict['customObject'] = moduleParamsDict2['customObject']
except:
moduleParamsDict['customObject'] = ''

if 'Efficiency' in moduleParamsDict2:
moduleParamsDict['Efficiency'] = moduleParamsDict2['Efficiency']
print("'Efficiency' input found in moduleParamsDict. This value "+
"will be propagated but is not currently used in "+
"bifacial_radiance\n.")

if 'Temp_coeff' in moduleParamsDict2:
moduleParamsDict['Temp_coeff'] = moduleParamsDict2['Temp_coeff']
print("'Temp_coeff' input found in moduleParamsDict. This value "+
"will be propagated but is not currently used in "+
"bifacial_radiance\n.")

if 'Peak_Power' in moduleParamsDict2:
moduleParamsDict['Peak_Power'] = moduleParamsDict2['Peak_Power']
print("'Peak_Power' input found in moduleParamsDict. This value "+
"will be propagated but is not currently used in "+
"bifacial_radiance\n.")

if 'Module_name' in moduleParamsDict2:
moduleParamsDict['Module_name'] = moduleParamsDict2['Module_name']
print("'Module_name' input found in moduleParamsDict. This value "+
"will be propagated but is not currently used in "+
"bifacial_radiance\n.")

if simulationParamsDict['cellLevelModule']:
if config.has_section("cellLevelModuleParamsDict"):
Expand Down
26 changes: 23 additions & 3 deletions bifacial_radiance/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
text=None, customtext='', customObject='', xgap=0.01, ygap=0.0, zgap=0.1,
numpanels=1, rewriteModulefile=True, cellModule=None,
glass=False, modulematerial='black', tubeParams=None,
frameParams=None, omegaParams=None, hpc=False):
frameParams=None, omegaParams=None, hpc=False, Efficiency=None,
Temp_coeff=None, Peak_Power=None, Module_name=None):
"""
Add module details to the .JSON module config file module.json
Expand Down Expand Up @@ -100,9 +101,19 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
calling e.g. addTorquetube() after this will tend to write to the
module.json so pass all geometry parameters at once in to makeModule
for best response.
Efficiency : float (default None)
Information about module efficiency in percentage. Not currently
used to calculate performance.
Temp_coeff : float (default None)
Information about module temperature coefficient in %. Not
currently used to calculate performance.
Peak_Power : float (default None)
Information about module Peak Power in Watts. Not currently used to
calculate performance.
Module name : string (default None)
Information about module's name.
'"""

self.keys = ['x', 'y', 'z', 'modulematerial', 'scenex','sceney',
'scenez','numpanels','bifi','text','modulefile', 'glass',
'offsetfromaxis','xgap','ygap','zgap' ]
Expand All @@ -114,6 +125,15 @@ def __init__(self, name=None, x=None, y=None, z=None, bifi=1, modulefile=None,
self.customObject = customObject
self._manual_text = text

if Efficiency is not None:
self.Efficiency = Efficiency
if Temp_coeff is not None:
self.Temp_coeff = Temp_coeff
if Peak_Power is not None:
self.Peak_Power = Peak_Power
if Module_name is not None:
self.Module_name = Module_name

# are we writing to JSON with passed data or just reading existing?
if (x is None) & (y is None) & (cellModule is None) & (text is None):
#just read in file. If .rad file doesn't exist, make it.
Expand Down

0 comments on commit 147d60d

Please sign in to comment.