Subhourly clipping fixes#1077
Conversation
preceding or following
| dcNameplate = cm->as_double("system_capacity"); | ||
| //numberOfInvertersClipping = cm->as_integer("num_inverter_subhourly_clipping"); | ||
| numberOfInvertersClipping = dcNameplate / (Inverter->ratedACOutput / 1000); | ||
| if (numberOfInvertersClipping == 0.0) numberOfInvertersClipping += 1; |
There was a problem hiding this comment.
Purely a semantics thing, but I think here you'd usually want to specify =1 rather than +=1, because it makes your intention clearer.
| double dni_clearness_index = PVSystem->p_DNIIndex[0][idx]; | ||
| //Calculate Clipping Potential ((P_dc,dryclean - P_ac,0) / P_ac,0) (time step basis) | ||
| sharedInverter->calculateACPower(dcPower_kW_csky, dcVoltagePerMppt[0], Irradiance->weatherRecord.tdry, as_boolean("enable_subhourly_clipping")); //DC batteries not allowed with multiple MPPT, so can just use MPPT 1's voltage | ||
| //sharedInverter->calculateACPower(dcPower_kW_csky, dcVoltagePerMppt[0], Irradiance->weatherRecord.tdry, as_boolean("enable_subhourly_clipping")); //DC batteries not allowed with multiple MPPT, so can just use MPPT 1's voltage |
There was a problem hiding this comment.
When the PR is set to your liking, please remove commented out lines to help keep code a bit cleaner
| double clip_pot = (dcPower_kW_csky - paco ) / (paco); | ||
|
|
||
| PVSystem->p_ClippingPotential[idx] = clip_pot; | ||
| //PVSystem->p_DNIIndex[idx] = dni_clearness_index; |
There was a problem hiding this comment.
When the PR is set to your liking, please remove commented out lines to help keep code a bit cleaner
janinefreeman
left a comment
There was a problem hiding this comment.
Changes look ok, but subhourly clipping correction model tests are failing on my machine. Can you please double check that they pass on yours? Looks like a minimal difference, but if the tests pass on your machine and fail on mine I'm concerned about an initialization issue. Thanks!
janinefreeman
left a comment
There was a problem hiding this comment.
Thanks for fixing the tests!
-Update nominal annual scaling output to be based on regular irradiance not clearsky
-Convert inverter sizing for nominal (ILR = 1) to be double rather than integer
-Carry clearsky irradiance calculations through shading and DC losses
-Eliminate sunrise and sunset hours and adjacent hours from clipping corrections
-Fix divide by zero errors for system with one inverter
-Update nominal calculations to use all inverter models
-Carry clearsky irradiance through rear-side irradiance calculations for bifacial panels
-Run separate module temperature calculation for clearsky outputs.
-Updates #1050