Skip to content

Commit 3daac95

Browse files
authored
Merge pull request #44 from cse-sim/pv-power-electronics
Add ability to model PV Power Electronics
2 parents d67da92 + 356d170 commit 3daac95

File tree

23 files changed

+38023
-20194
lines changed

23 files changed

+38023
-20194
lines changed

CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
1414

1515
add_subdirectory(vendor)
1616
add_subdirectory(src)
17-
add_subdirectory(bin)
1817

1918
include(ctest)
2019

21-
add_subdirectory(test)
20+
add_subdirectory(test)

bin/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

bin/LICENSE.txt

Lines changed: 0 additions & 25 deletions
This file was deleted.

bin/ssc.dll

-6.16 MB
Binary file not shown.

doc/src/records/pvarray.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,6 @@ The type of array describes mounting and tracking options. Roof mounted arrays h
9191
OneAxisTracking,
9292
TwoAxisTracking
9393

94-
<!-- Hide OneAxisBacktracking \ -->
95-
9694
**pvTilt=*float***
9795

9896
The tilt of the photovoltaic array from horizontal. Values outside the range 0 to 360 are first normalized to that range. For one-axis tracking, defines the tilt of the rotation axis. Not used for two-axis tracking arrays. Should be omitted if pvVertices is given.
@@ -135,7 +133,24 @@ Photovoltaic array azimuth (0 = north, 90 = east, etc.). If a value outside the
135133
values
136134
------------------------------------------------------------------
137135

138-
**pvMounting=*choice***
136+
**pvSIF=*float***
137+
138+
Shading Impact Factor (SIF) of the array used to represent the disproportionate impact on array output of partially shaded modules at the sub-array level. This impact is applied to the effective beam irradiance on the array:
139+
140+
\[I_{poa,beam,eff} = \max\left(I_{poa,beam}\cdot\left(1-SIF\cdot f_{sh}\right),0\right)\]
141+
142+
where $f_{sh}$ is the fraction of the array that is shaded.
143+
144+
Default value is 1.2, which is representative of PV systems with sub-array microinverters or DC power optimizers. For systems without sub-array power electronics, values are closer to 2.0.
145+
146+
<%= member_table(
147+
legal_range: "*x* $\\geq$ 1.0",
148+
default: "1.2",
149+
required: "No",
150+
variability: "constant") %>
151+
152+
153+
**pvMounting=*choice***
139154

140155
Specified mounting location of this PVARRAY. pvMounting=Site indicates the array position is not altered by building rotation via [TOP bldgAzm](#top-general-data-items), while PVARRAYs with pvMounting=Building are assumed to rotate with the building.
141156

@@ -200,17 +215,19 @@ Fraction of total DC energy lost. The total loss from a system is aggregated fro
200215
**Loss Type** **Default Assumption**
201216
------------------------- ----------------------
202217
Soiling 0.02
203-
Shading 0.03
218+
*Shading* *0 (handled explicitly)*
204219
Snow 0
205-
Mismatch 0.02
220+
*Mismatch* *0 (shading mismatch handled explicitly [see pvSIF])*
206221
Wiring 0.02
207222
Connections 0.005
208223
Light-induced degradation 0.015
209224
Nameplate rating 0.01
210-
Age 0
225+
*Age* *0.05 (estimated 0.5% degradation over 20 years)*
211226
Availability 0.03
212227
**Total** **0.14**
213228

229+
*Italic* lines indicate differences from PVWatts assumptions.
230+
214231
------------------------------------------------------------
215232
**Units** **Legal** **Default** **Required** **Variability**
216233
**Range**

src/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,6 @@ set(headers
181181
PGPAK.H
182182
PP.H
183183
PSYCHRO.H
184-
PVCalc.h
185184
RCCN.H
186185
RMKERR.H
187186
SLPAK.H

src/CNCULT.CPP

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2026,8 +2026,8 @@ CULT( "pvGrndRefl", DAT, PVARRAY_GRNDREFL, 0, 0, VHRLY, TYFL, 0,
20262026
CULT( "pvGCR", DAT, PVARRAY_GCR, 0, 0, VEOI, TYFL, 0, 0.4f, N, N),
20272027
CULT( "pvDCtoACRatio", DAT, PVARRAY_DCACRAT, 0, 0, VEOI, TYFL, 0, 1.1f, N, N),
20282028
CULT( "pvInverterEff", DAT, PVARRAY_INVEFF, 0, 0, VEOI, TYFL, 0, 0.96f, N, N),
2029+
CULT( "pvSIF", DAT, PVARRAY_SIF, 0, 0, VEOI, TYFL, 0, 1.2f, N, N),
20292030
CULT( "pvSysLosses", DAT, PVARRAY_SYSLOSS, 0, 0, VHRLY, TYFL, 0, 0.14f, N, N),
2030-
CULT( "pvUsePVWatts", DAT, PVARRAY_USEPVWATTSDLL, 0, 0, VEOI, TYCH, 0, C_NOYESCH_NO, N, N),
20312031
CULT( "pvMounting", DAT, PVG( MOUNTING), 0, 0, VEOI, TYCH, 0, C_MOUNTCH_BLDG, N, N),
20322032
CULT( "pvVertices", DAT, PVG( VRTINP), ARRAY, 0, VEOI, TYFL, 0, 0.f, v DIM_POLYGONXYZ, N),
20332033
CULT( "endPVARRAY", ENDER, 0, 0, 0, 0, 0, 0, 0.f, N, N),

src/CNDTYPES.DEF

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ DUCTSEGP -- "class DUCTSEG*" 4 none
419419
FXDOR "FixedOpenRack"
420420
FXDRF "FixedRoofMount"
421421
1AXT "OneAxisTracking"
422-
1AXBT "OneAxisBacktracking"
423422
2AXT "TwoAxisTracking"
424423
}
425424

src/CNRECS.DEF

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,6 @@ RECORD DHWUSE "DHWUse" *RAT // input / runtime DHW single draw
37533753
RECORD PVARRAY "PVArray" *RAT // input / runtime photovoltaics array
37543754
*prefix pv_
37553755
*excon
3756-
*exdes // define destructor in pvwatts.cpp to free SSC data container
37573756
*ovrcopy
37583757
*declare "virtual PVARRAY& CopyFrom( record* src, int copyName=1, int dupPtrs=0);"
37593758
*declare "void FixUp();" // virtual fixup after basAnc reAl
@@ -3781,7 +3780,6 @@ RECORD PVARRAY "PVArray" *RAT // input / runtime photovoltaics array
37813780
*i TI pv_elecMtri; // meter for system electricity production
37823781
*f ENDUSECH pv_endUse // end use of energy. defataults to "PV"
37833782
*i FLOAT_GEZ pv_dcCap // system capacity/size (DC nameplate), kW
3784-
*i NOYESCH pv_usePVWattsDLL // use PVWatts DLL instead of CSE calculations
37853783
*i PVMODCH pv_moduleType // type of module (Standard, Premium, ThinFilm)
37863784
*i FLOAT pv_tempCoeff // temperature coefficient, 1/F
37873785
*i FLOAT_GE1 pv_covRefrInd // refraction index for coating applied to cover
@@ -3791,14 +3789,20 @@ RECORD PVARRAY "PVArray" *RAT // input / runtime photovoltaics array
37913789
*h FRAC pv_grndRefl // ground reflectance
37923790
*i FRAC pv_gcr // ground coverage ratio (what fraction of the ground is covered by the array). 1.0 implies no spacing.
37933791
*i FLOAT_GZ pv_dcacRat // DC to AC ratio
3792+
*h FLOAT_GE1 pv_sif // Shading Impact Factor
37943793
*i FRAC pv_invEff // inverter efficiency at rated power
37953794
*h FRAC pv_sysLoss // system losses
37963795
*h *e FLOAT pv_tCell // cell temperature, F
37973796
*h *e FLOAT pv_aoi // angle of incidence (radians)
37983797
*h *e ANGLE pv_panelTilt // tilt of pv panel (different from array tilt for tracking systems), radians
37993798
*h *e ANGLE pv_panelAzm // azimuth of pv panel (different from array tilt for tracking systems), radians
3800-
*h *e FLOAT pv_poa // plane of array incidence, Btu/h-ft2
3801-
*h *e FLOAT pv_poaT // transmitted plane of array incidence, Btu/h-ft2
3799+
*h *e FLOAT pv_poa // plane of array incidence (before shading), Btu/h-ft2
3800+
*h *e FLOAT pv_poaBeam // plane of array beam incidence (before shading), Btu/h-ft2
3801+
*h *e FLOAT pv_radIBeam // beam radiation incident on array, Btu/h-ft2
3802+
*h *e FLOAT pv_radIBeamEff // effective beam radiation incident on array (accounts for shading impact factor), Btu/h-ft2
3803+
*h *e FLOAT pv_radI // total radiation incident on array, Btu/h-ft2
3804+
*h *e FLOAT pv_radIEff // effective total radiation incident on array (accounts for shading impact factor), Btu/h-ft2
3805+
*h *e FLOAT pv_radTrans // transmitted radiation (after accounting for shading impact), Btu/h-ft2
38023806
*h *e FLOAT pv_dcOut // DC power output, Btu
38033807
*h *e FLOAT pv_acOut // AC power output, Btu
38043808

@@ -3807,8 +3811,8 @@ RECORD PVARRAY "PVArray" *RAT // input / runtime photovoltaics array
38073811
*r FLOAT pv_convRatio // ratio of back convection to front convection
38083812
*r FLOAT pv_tGrndRatio // ratio of ground-cell temperature diff. to air-cell temperature diff.
38093813
*r *hide FLOAT_GEZ pv_thermCap // thermal capacitance of the array, J/kg-m2
3810-
*h *e FLOAT pv_poaPv // previous timestep plane of array incidence, Btu/h-ft2
3811-
*h *e FLOAT pv_tCellPv // previous timestep cell temperature, F
3814+
*h *e FLOAT pv_radILs // last step (curently hour) total radiation incident on array, Btu/h-ft2
3815+
*h *e FLOAT pv_tCellLs // last step (curently hour) cell temperature, F
38123816
*r *hide SI pv_modMap // map to PVWatts module type input
38133817
*r *hide SI pv_arrMap // map to PVWatts array type input
38143818

src/CSE.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484

8585
#include "cse.h" // decls for this file
8686

87+
#include <penumbra/penumbra.h> // penumbraInit penumbraTerminate for GPU calculations
88+
89+
8790
// configuration defined on compiler command line (or inferred, see cnglob.h)
8891
#include "cseface.h"
8992

@@ -644,6 +647,7 @@ LOCAL INT cse1( INT argc, const char* argv[])
644647
}
645648
while (argci < argc); // repeat til all input args used
646649

650+
Pumbra::penumbraTerminate(); // Clean up GPU calculation memory
647651
return errlvl; // 0 ok, nz error, 255 if ^C, 1-95.
648652
} // cse1run
649653
//------------------------------------------------------------------------

0 commit comments

Comments
 (0)