Skip to content

Commit

Permalink
Add checks for sunrise and sunset, don't apply corrections in hour
Browse files Browse the repository at this point in the history
preceding or following
  • Loading branch information
mjprilliman committed Oct 18, 2023
1 parent d774469 commit a3c0cae
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ssc/cmod_pvsamv1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2756,7 +2756,12 @@ void cm_pvsamv1::exec()

//acpwr_gross *= (1 - sub_clipping_matrix.at(dni_row, clip_pot_col));
if (dcPower_kW > 0.0) {
ac_subhourlyclipping_loss = sub_clipping_matrix.at(dni_row, clip_pot_col) * nominal_annual_clipping_output;
//Sunrise + hour after, sunset + hour preceding are excluding from correction
//check if sunrise happens in hour, or if sunrise was last hour, exclude those hours
if (Irradiance->p_sunUpOverHorizon[idx] == 2 || Irradiance->p_sunUpOverHorizon[idx - 1] == 2) ac_subhourlyclipping_loss = 0.0;
//check if sunset happens in hour, or in next hour, exclude both from correction
else if (Irradiance->p_sunUpOverHorizon[idx] == 3 || Irradiance->p_sunUpOverHorizon[idx + 1] == 3) ac_subhourlyclipping_loss = 0.0;
else ac_subhourlyclipping_loss = sub_clipping_matrix.at(dni_row, clip_pot_col) * nominal_annual_clipping_output;
//ac_subhourlyclipping_loss = sub_clipping_matrix.at(dni_row, clip_pot_col) * sharedInverter->powerAC_kW_clipping;
}
else { //No inverter clipping at night time, skip checks?
Expand Down

0 comments on commit a3c0cae

Please sign in to comment.