Skip to content

Subhourly clipping fixes#1077

Merged
mjprilliman merged 19 commits into
developfrom
subhourly-clipping-fixes
Oct 30, 2023
Merged

Subhourly clipping fixes#1077
mjprilliman merged 19 commits into
developfrom
subhourly-clipping-fixes

Conversation

@mjprilliman

Copy link
Copy Markdown
Collaborator

-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

@mjprilliman mjprilliman added the pv photovoltaic, pvsam, pvwatts label Oct 28, 2023
@mjprilliman mjprilliman added this to the SAM Fall 2023 Release milestone Oct 28, 2023
@mjprilliman mjprilliman self-assigned this Oct 28, 2023
@mjprilliman mjprilliman requested a review from brtietz October 30, 2023 15:56
Comment thread shared/lib_pv_io_manager.cpp Outdated
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;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Purely a semantics thing, but I think here you'd usually want to specify =1 rather than +=1, because it makes your intention clearer.

Comment thread ssc/cmod_pvsamv1.cpp Outdated
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

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the PR is set to your liking, please remove commented out lines to help keep code a bit cleaner

Comment thread ssc/cmod_pvsamv1.cpp Outdated
double clip_pot = (dcPower_kW_csky - paco ) / (paco);

PVSystem->p_ClippingPotential[idx] = clip_pot;
//PVSystem->p_DNIIndex[idx] = dni_clearness_index;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the PR is set to your liking, please remove commented out lines to help keep code a bit cleaner

@janinefreeman janinefreeman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 janinefreeman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing the tests!

@mjprilliman mjprilliman merged commit 55ba5ac into develop Oct 30, 2023
@mjprilliman mjprilliman deleted the subhourly-clipping-fixes branch October 30, 2023 22:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

added to release notes pv photovoltaic, pvsam, pvwatts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants