diff --git a/shared/lib_irradproc.cpp b/shared/lib_irradproc.cpp index a9357c22d..90d8b2758 100644 --- a/shared/lib_irradproc.cpp +++ b/shared/lib_irradproc.cpp @@ -1226,7 +1226,12 @@ void incidence(int mode, double tilt, double sazm, double rlim, double zen, /*Check if custom tilt angles enabled, apply timeseries value*/ if (useCustomAngle) { - rot = customAngle * DTOR; //overwrite rotation angle with input from array + if (rot < -rlim) /* Do not let rotation exceed physical constraints */ + rot = -rlim; + else if (rot > rlim) + rot = rlim; + else + rot = customAngle * DTOR; //overwrite rotation angle with input from array } /* Find tilt angle for the tracking surface */ @@ -1756,7 +1761,7 @@ void irrad::setup() { poaRearDirectDiffuse = 0.; poaRearRowReflections = 0.; poaRearSelfShaded = 0.; - useCustomTiltAngles = 0.; + useCustomRotAngles = 0.; } @@ -1772,7 +1777,7 @@ irrad::irrad(weather_record wf, weather_header hdr, double groundCoverageRatioIn, double slopeTiltIn, double slopeAzmIn, std::vector monthlyTiltDegrees, std::vector userSpecifiedAlbedo, poaDecompReq *poaAllIn, - bool useSpatialAlbedos, const util::matrix_t* userSpecifiedSpatialAlbedos, bool enableSubhourlyClipping, bool useCustomTiltAngles, double customTiltAngle) : + bool useSpatialAlbedos, const util::matrix_t* userSpecifiedSpatialAlbedos, bool enableSubhourlyClipping, bool useCustomRotAngles, double customRotAngle) : skyModel(skyModelIn), radiationMode(radiationModeIn), trackingMode(trackModeIn), enableBacktrack(backtrackingEnabled), forceToStow(forceToStowIn), delt(dtHour), tiltDegrees(tiltDegreesIn), surfaceAzimuthDegrees(azimuthDegreesIn), @@ -1801,7 +1806,7 @@ irrad::irrad(weather_record wf, weather_header hdr, set_subhourly_clipping(enableSubhourlyClipping); - set_custom_tilt_angles(useCustomTiltAngles, customTiltAngle); + set_custom_rot_angles(useCustomRotAngles, customRotAngle); if (radiationMode == irrad::DN_DF) set_beam_diffuse(wf.dn, wf.df); else if (radiationMode == irrad::DN_GH) set_global_beam(wf.gh, wf.dn); @@ -1996,10 +2001,10 @@ void irrad::set_subhourly_clipping(bool enable) if (enable) this->enableSubhourlyClipping = true; } -void irrad::set_custom_tilt_angles(bool enable, double angle) +void irrad::set_custom_rot_angles(bool enable, double angle) { - this->useCustomTiltAngles = enable; - this->customTiltAngle = angle; + this->useCustomRotAngles = enable; + this->customRotAngle = angle; } void irrad::set_sky_model(int sm, double alb, const std::vector &albSpatial) { @@ -2190,7 +2195,7 @@ int irrad::calc() { // compute incidence angles onto fixed or tracking surface incidence(trackingMode, tiltDegrees, surfaceAzimuthDegrees, rotationLimitDegrees, sunAnglesRadians[1], sunAnglesRadians[0], - enableBacktrack, groundCoverageRatio, slopeTilt, slopeAzm, forceToStow, stowAngleDegrees, useCustomTiltAngles, customTiltAngle, surfaceAnglesRadians); + enableBacktrack, groundCoverageRatio, slopeTilt, slopeAzm, forceToStow, stowAngleDegrees, useCustomRotAngles, customRotAngle, surfaceAnglesRadians); if (radiationMode < irrad::POA_R) { double hextra = sunAnglesRadians[8]; double hbeam = directNormal * @@ -2590,7 +2595,7 @@ void irrad::getFrontSurfaceIrradiances(double pvFrontShadeFraction, double rowTo // Calculate irradiance components for a 90 degree tilt to get horizon brightening double angleTmp[5] = {0, 0, 0, 0, 0}; // ([0] = incidence angle, [1] = tilt) incidence(0, 90.0, 180.0, 45.0, solarZenithRadians, solarAzimuthRadians, this->enableBacktrack, - this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomTiltAngles, this->customTiltAngle, angleTmp); + this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomRotAngles, this->customRotAngle, angleTmp); perez(0, calculatedDirectNormal, calculatedDiffuseHorizontal, albedo, angleTmp[0], angleTmp[1], solarZenithRadians, poa, diffc); double horizonDiffuse = diffc[2]; @@ -2726,7 +2731,7 @@ void irrad::getFrontSurfaceIrradiances(double pvFrontShadeFraction, double rowTo // Calculate and add direct and circumsolar irradiance components incidence(0, tiltRadians * RTOD, surfaceAzimuthRadians * RTOD, 45.0, solarZenithRadians, solarAzimuthRadians, this->enableBacktrack, this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, - this->forceToStow, this->stowAngleDegrees, this->useCustomTiltAngles, this->customTiltAngle, surfaceAnglesRadians); + this->forceToStow, this->stowAngleDegrees, this->useCustomRotAngles, this->customRotAngle, surfaceAnglesRadians); perez(0, calculatedDirectNormal, calculatedDiffuseHorizontal, albedo, surfaceAnglesRadians[0], surfaceAnglesRadians[1], solarZenithRadians, poa, diffc); @@ -2771,7 +2776,7 @@ void irrad::getBackSurfaceIrradiances(double pvBackShadeFraction, double rowToRo // Calculate components for a 90 degree tilt to get horizon brightening double surfaceAnglesRadians90[5] = {0, 0, 0, 0, 0}; incidence(0, 90.0, 180.0, 45.0, solarZenithRadians, solarAzimuthRadians, this->enableBacktrack, - this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomTiltAngles, this->customTiltAngle, surfaceAnglesRadians90); + this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomRotAngles, this->customRotAngle, surfaceAnglesRadians90); perez(0, calculatedDirectNormal, calculatedDiffuseHorizontal, albedo, surfaceAnglesRadians90[0], surfaceAnglesRadians90[1], solarZenithRadians, planeOfArrayIrradianceRear, diffuseIrradianceRear); double horizonDiffuse = diffuseIrradianceRear[2]; @@ -2971,7 +2976,7 @@ void irrad::getBackSurfaceIrradiances(double pvBackShadeFraction, double rowToRo // Calculate and add direct and circumsolar irradiance components incidence(0, 180.0 - tiltRadians * RTOD, (surfaceAzimuthRadians * RTOD - 180.0), 45.0, solarZenithRadians, solarAzimuthRadians, this->enableBacktrack, - this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomTiltAngles, this->customTiltAngle, surfaceAnglesRadians); + this->groundCoverageRatio, this->slopeTilt, this->slopeAzm, this->forceToStow, this->stowAngleDegrees, this->useCustomRotAngles, this->customRotAngle, surfaceAnglesRadians); perez(0, calculatedDirectNormal, calculatedDiffuseHorizontal, albedo, surfaceAnglesRadians[0], surfaceAnglesRadians[1], solarZenithRadians, planeOfArrayIrradianceRear, diffuseIrradianceRear); diff --git a/shared/lib_irradproc.h b/shared/lib_irradproc.h index 8a5578ca2..dd21d7a3c 100644 --- a/shared/lib_irradproc.h +++ b/shared/lib_irradproc.h @@ -994,8 +994,8 @@ class irrad bool enableSubhourlyClipping; //Custom rotation angles for single-axis trackers - bool useCustomTiltAngles; - double customTiltAngle; // custom tracker rotation angle in degrees + bool useCustomRotAngles; + double customRotAngle; // custom tracker rotation angle in degrees // Subarray properties double tiltDegrees; ///< Surface tilt of subarray in degrees @@ -1061,7 +1061,7 @@ class irrad double dtHour, double tiltDegrees, double azimuthDegrees, double trackerRotationLimitDegrees, double stowAngleDegreesIn, double groundCoverageRatio, double slopeTilt, double slopeAzm, std::vector monthlyTiltDegrees, std::vector userSpecifiedAlbedo, poaDecompReq* poaAllIn, - bool useSpatialAlbedos = false, const util::matrix_t* userSpecifiedSpatialAlbedos = nullptr, bool enableSubhourlyClipping = false, bool useCustomTiltAngles = false, double customTiltAngle = 0); + bool useSpatialAlbedos = false, const util::matrix_t* userSpecifiedSpatialAlbedos = nullptr, bool enableSubhourlyClipping = false, bool useCustomRotAngles = false, double customRotAngle = 0); /// Construct the irrad class with an Irradiance_IO() object and Subarray_IO() object irrad(); @@ -1084,7 +1084,7 @@ class irrad //Set whether to use subhourly clipping model void set_subhourly_clipping(bool enable = false); - void set_custom_tilt_angles(bool enable = false, double angle = 0); + void set_custom_rot_angles(bool enable = false, double angle = 0); /// Set the sky model for the irradiance processor, using \link Irradiance_IO::SKYMODEL void set_sky_model(int skymodel, double albedo, const std::vector &albedoSpatial = std::vector()); diff --git a/shared/lib_pv_io_manager.cpp b/shared/lib_pv_io_manager.cpp index 2f3ce272f..005a82db3 100644 --- a/shared/lib_pv_io_manager.cpp +++ b/shared/lib_pv_io_manager.cpp @@ -358,8 +358,8 @@ Subarray_IO::Subarray_IO(compute_module* cm, const std::string& cmName, size_t s nModulesPerString = cm->as_integer(prefix + "modules_per_string"); mpptInput = cm->as_integer(prefix + "mppt_input"); trackMode = cm->as_integer(prefix + "track_mode"); - useCustomTiltAngles = cm->as_integer(prefix + "use_custom_tilt_angles"); - useMeasuredTemp = cm->as_integer(prefix + "use_measured_temp"); + useCustomRotAngles = cm->as_boolean(prefix + "use_custom_rot_angles"); + useMeasuredTemp = cm->as_boolean(prefix + "use_measured_temp"); tiltEqualLatitude = 0; if (cm->is_assigned(prefix + "tilt_eq_lat")) tiltEqualLatitude = cm->as_boolean(prefix + "tilt_eq_lat"); @@ -380,11 +380,11 @@ Subarray_IO::Subarray_IO(compute_module* cm, const std::string& cmName, size_t s } /* Insert checks for custom tilt angles here*/ - if (useCustomTiltAngles == 1) { - if (cm->is_assigned(prefix + "custom_tilt_angles_array")) { - customTiltAngles = cm->as_vector_double(prefix + "custom_tilt_angles_array"); - for (int i = 0; i < customTiltAngles.size(); i++) { - if (customTiltAngles[i] > 90.0 || customTiltAngles[i] < -90.0) throw exec_error(cmName, "Subarray " + util::to_string((int)subarrayNumber) + "custom tilt angles cannot be outside of 90deg."); + if (useCustomRotAngles == 1) { + if (cm->is_assigned(prefix + "custom_rot_angles_array")) { + customRotAngles = cm->as_vector_double(prefix + "custom_rot_angles_array"); + for (int i = 0; i < customRotAngles.size(); i++) { + if (customRotAngles[i] > 90.0 || customRotAngles[i] < -90.0) throw exec_error(cmName, "Subarray " + util::to_string((int)subarrayNumber) + "custom tilt angles cannot be outside of 90deg."); } } else { diff --git a/shared/lib_pv_io_manager.h b/shared/lib_pv_io_manager.h index 9da8bd91d..2c03a3d71 100644 --- a/shared/lib_pv_io_manager.h +++ b/shared/lib_pv_io_manager.h @@ -465,8 +465,8 @@ struct Subarray_IO double slopeTilt; // Angle of sloped terrain [degrees] double slopeAzm; // azimuth of sloped terrain relative to tracker azimuth [degrees] double tiltDegrees; // The surface tilt [degrees] - flag useCustomTiltAngles; // Use custom timeseries rotation angles - std::vector customTiltAngles; //Custom timeseries rotation angles [degrees] + flag useCustomRotAngles; // Use custom timeseries rotation angles + std::vector customRotAngles; //Custom timeseries rotation angles [degrees] flag useMeasuredTemp; std::vector measuredTempArray; double azimuthDegrees; // The surface azimuth [degrees] diff --git a/ssc/cmod_pvsamv1.cpp b/ssc/cmod_pvsamv1.cpp index 962a79ade..0d92600f3 100644 --- a/ssc/cmod_pvsamv1.cpp +++ b/ssc/cmod_pvsamv1.cpp @@ -75,11 +75,6 @@ static var_info _cm_vtab_pvsamv1[] = { {SSC_INPUT, SSC_NUMBER, "calculate_rack_shading", "Calculate rack shading", "", "", "Losses", "?=0", "BOOLEAN", "" }, {SSC_INPUT, SSC_NUMBER, "calculate_bifacial_electrical_mismatch", "Calculate bifacial electrical mismatch", "", "", "Losses", "?=1", "BOOLEAN", "" }, - {SSC_INPUT, SSC_NUMBER, "use_measured_temp", "Use measured temperatures", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - {SSC_INPUT, SSC_ARRAY, "measured_temp_array", "Measured module temperature", "C", "", "System Design", "use_measured_temp=1", "", "" }, - {SSC_INPUT, SSC_NUMBER, "use_custom_tilt_angles", "Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - {SSC_INPUT, SSC_ARRAY, "custom_tilt_angles_array", "Custom tracker rotation angles", "deg", "", "System Design", "use_custom_tilt_angles=1", "", "" }, - // subarray 1 {SSC_INPUT, SSC_NUMBER, "subarray1_nstrings", "Sub-array 1 Number of parallel strings", "", "", "System Design", "", "INTEGER", "" }, {SSC_INPUT, SSC_NUMBER, "subarray1_modules_per_string", "Sub-array 1 Modules per string", "", "", "System Design", "*", "INTEGER,POSITIVE", "" }, @@ -94,8 +89,8 @@ static var_info _cm_vtab_pvsamv1[] = { {SSC_INPUT, SSC_NUMBER, "subarray1_slope_tilt", "Sub-array 1 terrain tilt", "degrees", "", "System Design", "subarray1_track_mode=1", "MIN=0,MAX=90", "" }, {SSC_INPUT, SSC_NUMBER, "subarray1_slope_azm", "Sub-array 1 terrain azimuth", "degrees", "", "System Design", "subarray1_track_mode=1", "MIN=0,MAX=359.9", "" }, {SSC_INPUT, SSC_ARRAY, "subarray1_monthly_tilt", "Sub-array 1 monthly tilt input", "degrees", "", "System Design", "subarray1_track_mode=4", "LENGTH=12", "" }, - {SSC_INPUT, SSC_NUMBER, "subarray1_use_custom_tilt_angles", "Sub-array 1 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - {SSC_INPUT, SSC_ARRAY, "subarray1_custom_tilt_angles_array", "Sub-array 1 Custom tracker rotation angles", "deg", "", "System Design", "subarray1_use_custom_tilt_angles=1", "", "" }, + {SSC_INPUT, SSC_NUMBER, "subarray1_use_custom_rot_angles", "Sub-array 1 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, + {SSC_INPUT, SSC_ARRAY, "subarray1_custom_rot_angles_array", "Sub-array 1 Custom tracker rotation angles", "deg", "", "System Design", "subarray1_use_custom_rot_angles=1", "", "" }, {SSC_INPUT, SSC_NUMBER, "subarray1_use_measured_temp", "Subarray 1 Use measured temperatures", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, {SSC_INPUT, SSC_ARRAY, "subarray1_measured_temp_array", "Subarray 1 Measured module temperature", "C", "", "System Design", "subarray1_use_measured_temp=1", "", "" }, @@ -186,8 +181,8 @@ static var_info _cm_vtab_pvsamv1[] = { { SSC_INPUT, SSC_MATRIX, "subarray2_shading_azal", "Sub-array 2 Azimuth x altitude beam shading losses", "%", "", "Shading", "?", "", "" }, { SSC_INPUT, SSC_NUMBER, "subarray2_shading_en_diff", "Enable Sub-array 2 Diffuse shading loss", "0/1", "0=false,1=true", "Shading", "?=0", "BOOLEAN", "" }, { SSC_INPUT, SSC_NUMBER, "subarray2_shading_diff", "Sub-array 2 Diffuse shading loss", "%", "", "Shading", "?", "", "" }, - { SSC_INPUT, SSC_NUMBER, "subarray2_use_custom_tilt_angles", "Sub-array 2 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - { SSC_INPUT, SSC_ARRAY, "subarray2_custom_tilt_angles_array", "Sub-array 2 Custom tracker rotation angles", "deg", "", "System Design", "subarray2_use_custom_tilt_angles=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "subarray2_use_custom_rot_angles", "Sub-array 2 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, + { SSC_INPUT, SSC_ARRAY, "subarray2_custom_rot_angles_array", "Sub-array 2 Custom tracker rotation angles", "deg", "", "System Design", "subarray2_use_custom_rot_angles=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "subarray2_use_measured_temp", "Subarray 2 Use measured temperatures", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, { SSC_INPUT, SSC_ARRAY, "subarray2_measured_temp_array", "Subarray 2 Measured module temperature", "C", "", "System Design", "subarray2_use_measured_temp=1", "", "" }, @@ -214,8 +209,8 @@ static var_info _cm_vtab_pvsamv1[] = { { SSC_INPUT, SSC_NUMBER, "subarray3_slope_tilt", "Sub-array 3 terrain tilt", "degrees", "", "System Design", "subarray3_enable=1&subarray3_track_mode=1", "MIN=0,MAX=90", "" }, { SSC_INPUT, SSC_NUMBER, "subarray3_slope_azm", "Sub-array 3 terrain azimuth", "degrees", "", "System Design", "subarray3_enable=1&subarray3_track_mode=1", "MIN=0,MAX=359.9", "" }, { SSC_INPUT, SSC_ARRAY, "subarray3_monthly_tilt", "Sub-array 3 Monthly tilt input", "degrees", "", "System Design", "subarray3_enable=1&subarray3_track_mode=4", "LENGTH=12", "" }, - { SSC_INPUT, SSC_NUMBER, "subarray3_use_custom_tilt_angles", "Sub-array 3 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - { SSC_INPUT, SSC_ARRAY, "subarray3_custom_tilt_angles_array", "Sub-array 3 Custom tracker rotation angles", "deg", "", "System Design", "subarray3_use_custom_tilt_angles=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "subarray3_use_custom_rot_angles", "Sub-array 3 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, + { SSC_INPUT, SSC_ARRAY, "subarray3_custom_rot_angles_array", "Sub-array 3 Custom tracker rotation angles", "deg", "", "System Design", "subarray3_use_custom_rot_angles=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "subarray3_use_measured_temp", "Subarray 3 Use measured temperatures", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, { SSC_INPUT, SSC_ARRAY, "subarray3_measured_temp_array", "Subarray 3 Measured module temperature", "C", "", "System Design", "subarray3_use_measured_temp=1", "", "" }, @@ -254,8 +249,8 @@ static var_info _cm_vtab_pvsamv1[] = { { SSC_INPUT, SSC_NUMBER, "subarray4_slope_azm", "Sub-array 4 terrain azimuth", "degrees", "", "System Design", "subarray4_enable=1&subarray4_track_mode=1", "MIN=0,MAX=359.9", "" }, { SSC_INPUT, SSC_ARRAY, "subarray4_monthly_tilt", "Sub-array 4 Monthly tilt input", "degrees", "", "System Design", "subarray2_enable=1&subarray2_track_mode=4", "LENGTH=12", "" }, // { SSC_INPUT, SSC_TABLE, "subarray4_shading", "Sub-array 4 shading losses", "", "", "Shading", "?", "", "" }, - { SSC_INPUT, SSC_NUMBER, "subarray4_use_custom_tilt_angles", "Sub-array 4 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, - { SSC_INPUT, SSC_ARRAY, "subarray4_custom_tilt_angles_array", "Sub-array 4 Custom tracker rotation angles", "deg", "", "System Design", "subarray4_use_custom_tilt_angles=1", "", "" }, + { SSC_INPUT, SSC_NUMBER, "subarray4_use_custom_rot_angles", "Sub-array 4 Use custom rotation angles", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, + { SSC_INPUT, SSC_ARRAY, "subarray4_custom_rot_angles_array", "Sub-array 4 Custom tracker rotation angles", "deg", "", "System Design", "subarray4_use_custom_rot_angles=1", "", "" }, { SSC_INPUT, SSC_NUMBER, "subarray4_use_measured_temp", "Subarray 4 Use measured temperatures", "0/1", "", "System Design", "?=0", "INTEGER,MIN=0,MAX=1", "" }, { SSC_INPUT, SSC_ARRAY, "subarray4_measured_temp_array", "Subarray 4 Measured module temperature", "C", "", "System Design", "subarray4_use_measured_temp=1", "", "" }, @@ -1141,8 +1136,8 @@ void cm_pvsamv1::exec() for (size_t nn = 0; nn < num_subarrays; nn++) { size_t user_tilt_angles_size; - if (Subarrays[nn]->useCustomTiltAngles == 1) { - user_tilt_angles_size = Subarrays[nn]->customTiltAngles.size(); + if (Subarrays[nn]->useCustomRotAngles == 1) { + user_tilt_angles_size = Subarrays[nn]->customRotAngles.size(); if (user_tilt_angles_size != nrec) throw exec_error("pvsamv1", "The custom rotation angle array must be the size of nrecords per year"); Subarrays[nn]->trackMode = irrad::SINGLE_AXIS; @@ -1521,19 +1516,14 @@ void cm_pvsamv1::exec() || Subarrays[nn]->nStrings < 1) continue; // skip disabled subarrays - /* - if (as_integer("use_custom_tilt_angles") == 1 && is_assigned("custom_tilt_angles_array")) { - Subarrays[nn]->tiltDegrees = user_tilt_angles[inrec]; - - }*/ - double custom_tilt = (Subarrays[nn]->useCustomTiltAngles) ? Subarrays[nn]->customTiltAngles[inrec] : 0.0; + double custom_rot = (Subarrays[nn]->useCustomRotAngles) ? Subarrays[nn]->customRotAngles[inrec] : 0.0; irrad irr(Irradiance->weatherRecord, Irradiance->weatherHeader, Irradiance->skyModel, Irradiance->radiationMode, Subarrays[nn]->trackMode, Irradiance->useWeatherFileAlbedo, Irradiance->instantaneous, Subarrays[nn]->backtrackingEnabled, false, Irradiance->dtHour, Subarrays[nn]->tiltDegrees, Subarrays[nn]->azimuthDegrees, Subarrays[nn]->trackerRotationLimitDegrees, 0.0, Subarrays[nn]->groundCoverageRatio, Subarrays[nn]->slopeTilt, Subarrays[nn]->slopeAzm, Subarrays[nn]->monthlyTiltDegrees, Irradiance->userSpecifiedMonthlyAlbedo, Subarrays[nn]->poa.poaAll.get(), - Irradiance->useSpatialAlbedos, &Irradiance->userSpecifiedMonthlySpatialAlbedos, as_boolean("enable_subhourly_clipping"), Subarrays[nn]->useCustomTiltAngles, custom_tilt); + Irradiance->useSpatialAlbedos, &Irradiance->userSpecifiedMonthlySpatialAlbedos, as_boolean("enable_subhourly_clipping"), Subarrays[nn]->useCustomRotAngles, custom_rot); int code = irr.calc(); diff --git a/test/input_cases/pvsamv1_common_data.cpp b/test/input_cases/pvsamv1_common_data.cpp index c72b59fcc..673f15a6d 100644 --- a/test/input_cases/pvsamv1_common_data.cpp +++ b/test/input_cases/pvsamv1_common_data.cpp @@ -105,7 +105,7 @@ void pvsamv_nofinancial_default(ssc_data_t& data) ssc_data_set_number(data, "subarray1_tracking_loss", 0); ssc_data_set_number(data, "subarray1_nameplate_loss", 0); set_array(data, "subarray1_measured_temp_array", measured_temp_array_path, 8760); - set_array(data, "subarray1_custom_tilt_angles_array", custom_rot_angle_array_path, 8760); + set_array(data, "subarray1_custom_rot_angles_array", custom_rot_angle_array_path, 8760); ssc_data_set_number(data, "subarray2_rear_soiling_loss", 0); ssc_data_set_number(data, "subarray2_rack_shading", 0); ssc_data_set_number(data, "subarray2_electrical_mismatch", 0); diff --git a/test/ssc_test/cmod_pvsamv1_test.cpp b/test/ssc_test/cmod_pvsamv1_test.cpp index 9513dc09c..1ae87cec8 100644 --- a/test/ssc_test/cmod_pvsamv1_test.cpp +++ b/test/ssc_test/cmod_pvsamv1_test.cpp @@ -1139,7 +1139,7 @@ TEST_F(CMPvsamv1PowerIntegration_cmod_pvsamv1, UseCustomAngles) { std::map pairs; - pairs["subarray1_use_custom_tilt_angles"] = 1; + pairs["subarray1_use_custom_rot_angles"] = 1; int pvsam_errors = modify_ssc_data_and_run_module(data, "pvsamv1", pairs); EXPECT_FALSE(pvsam_errors); @@ -1150,7 +1150,7 @@ TEST_F(CMPvsamv1PowerIntegration_cmod_pvsamv1, UseCustomAngles) { ssc_data_get_number(data, "annual_energy", &annualEnergy); EXPECT_NEAR(annualEnergy, 11516, 1.0); - pairs["subarray1_use_custom_tilt_angles"] = 0; + pairs["subarray1_use_custom_rot_angles"] = 0; pvsam_errors = modify_ssc_data_and_run_module(data, "pvsamv1", pairs); EXPECT_FALSE(pvsam_errors);