Skip to content

Commit

Permalink
Test removing limit on number of turbines
Browse files Browse the repository at this point in the history
  • Loading branch information
mjprilliman committed Dec 18, 2023
1 parent 91b0178 commit 5da9b0a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions shared/lib_windwatts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ windPowerCalculator::windPowerUsingResource(double windSpeed, double windDirDeg,
errDetails = "Wake model not initialized.";
return 0;
}

/*
if ((nTurbines > MAX_WIND_TURBINES) || (nTurbines < 1))
{
errDetails = "The number of wind turbines was greater than the maximum allowed in the wake model.";
return 0;
}

*/
size_t i, j;
//unsigned char wt_id[MAX_WIND_TURBINES], wid; // unsigned char has 256 limit
size_t wid;
Expand Down Expand Up @@ -369,13 +369,13 @@ bool windPowerCalculator::windPowerUsingDistribution(std::vector<std::vector<dou
errDetails = "Wake model not initialized.";
return false;
}

/*
if ((nTurbines > MAX_WIND_TURBINES) || (nTurbines < 1))
{
errDetails = "The number of wind turbines was greater than the maximum allowed in the wake model.";
return false;
}

*/
size_t i, j;
//unsigned char wt_id[MAX_WIND_TURBINES], wid; // unsigned char has 256 limit
size_t wid;
Expand Down
3 changes: 2 additions & 1 deletion ssc/cmod_windpower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,10 @@ void cm_windpower::exec()
newMaxTurbines = as_integer("max_turbine_override");
wpc.SetMaxTurbines(newMaxTurbines);
}
/* Try turning this off and see what happens (Matt)
if (wpc.nTurbines > wpc.GetMaxTurbines())
throw exec_error("windpower", util::format("the wind model is only configured to handle up to %d turbines.", wpc.GetMaxTurbines()));

*/
// create adjustment factors and losses - set them up initially here for the Weibull distribution method, rewrite them later with nrec for the time series method
adjustment_factors haf(this, "adjust");
if (!haf.setup())
Expand Down

0 comments on commit 5da9b0a

Please sign in to comment.