Time Series Energy
The time series calculation performs a wake and power calculation for a given flow case or a list of flow cases. The ambient conditions input by the user are considered at a reference location, these are then transposed to the turbine location using the speed-ups calculated by the flow model.
Calculation Set-Up
Set the reference measurement site and speedups model, this should be the measurement site holding the time series data.
// set the speedups model to WindClimateData to use
// mast-to-mast speedups in wake calculations
Workbook.ModelSettings.FlowSettings.SpeedupsModel = SpeedupsModel.WindClimateData;
Prepare Inputs For Single Flow Case
A DateTime containing a time stamp, a PointLocationFlowCase and an AirDensity objects are needed as inputs to the time series energy. The PointLocationFlowCase represents the flow case and is constituted by a Speed, StandardDeviation and Direction objects.
// DateTime for 5th of October 2017 at 10h30m
DateTime timestamp = new DateTime(2017, 10, 5, 10, 30, 00);
// Flow case with wind speed of 10 m/s, turbulence intensity
// of 8% and direction 176 degrees
Speed wspd = new Speed(10);
StandardDeviation stddev = new StandardDeviation(0.8);
DirectionBearing wdir = new DirectionBearing(176);
PointLocationFlowCase flowCase = new PointLocationFlowCase(wspd, wdir, stddev);
// Air density of 1.121 kg/m3
AirDensity airDensity = new AirDensity(1.121);
Run Calculation For Single Flow Case
The calculation will operate on an existing scenario and append the results to it.
DateTime timestamp = new DateTime(2017, 10, 5, 10, 30, 00);
MeasurementSite referenceMeasurementSite = null;
double referenceHeightAboveGround = 80.0;
PointLocationFlowCase flowCase =
new PointLocationFlowCase(
new Speed(10),
new DirectionBearing(176),
new StandardDeviation(0.8));
AirDensity airDensity = new AirDensity(1.121);
// Create a scenario that will hold the results.
Scenario scenario = Scripting.Workbook.CurrentScenario;
// Run the calculation for the given flow case
scenario = Toolbox.CalculateFlowCase(
scenario,
timestamp,
referenceMeasurementSite,
referenceHeightAboveGround,
flowCase,
airDensity);
Run Calculation For Multiple Flow Cases
The time series energy calculation is more powerful and efficient if ran for multiple flow cases. There's a command that takes lists of DateTime, PointLocationFlowCase and AirDensity and calculates all of these in one go. Using command Toolbox.CalculateFlowCase s ()
Note that the number of items in each list must coincide.
MeasurementSite referenceMeasurementSite = null;
double referenceHeightAboveGround = 80.0;
// Calculate for 3 records with the following time stamps
List<DateTime> timeStamps = new List<DateTime>()
{
new DateTime(2017, 10, 5, 10, 30, 00),
new DateTime(2017, 10, 5, 10, 40, 00),
new DateTime(2017, 10, 5, 10, 50, 00)
};
// Flow case for each of the corresponding 3 records
List<PointLocationFlowCase> flowCases = new List<PointLocationFlowCase>()
{
new PointLocationFlowCase(
new Speed(10),
new DirectionBearing(176),
new StandardDeviation(0.8)),
new PointLocationFlowCase(
new Speed(9.7),
new DirectionBearing(173),
new StandardDeviation(0.8)),
new PointLocationFlowCase(
new Speed(9.5),
new DirectionBearing(178),
new StandardDeviation(0.8))
};
// Air density for each of the corresponding 3 records
List<IAirDensity> airDensities = new List<IAirDensity>()
{
new AirDensity(1.121),
new AirDensity(1.121),
new AirDensity(1.121)
};
Scenario scenario = Workbook.CurrentScenario;
scenario = Toolbox.CalculateFlowCases(scenario, referenceMeasurementSite, referenceHeightAboveGround, timeStamps, flowCases, airDensities);
The time series in the project can be converted into the above format for usage in the time series energy calculation. Contact the WindFarmer team for more information on this.
Analyse The Results
The results are stored in the scenario object and are acessed by time stamp.
List<DateTime> timeStamps = new List<DateTime>();
Scenario scenario = null;
// Get the flow case results for the first time stamp (index 0) in the list
SingleFlowCase flowCaseResult = scenario.GetForDateTime(timeStamps[0]);
// Link between the inputs used to generate this flow case results.
double referenceWindSpeed =
flowCaseResult.ReferenceLocationFlowCase.WindSpeed.ToDouble();
double referenceStdDev =
flowCaseResult.ReferenceLocationFlowCase.WindSpeedStandardDeviation.Value;
double referenceDirection =
flowCaseResult.ReferenceLocationFlowCase.Direction.Value;
Accessing the results uses a pattern similar to the normal energy calculation, i.e access the results via ReadOnlyTurbine or its location.
List<DateTime> timeStamps = new List<DateTime>();
Scenario scenario = null;
// Get the flow case results for the first time stamp (index 0) in the list
SingleFlowCase flowCaseResult = scenario.GetForDateTime(timeStamps[0]);
// Traverse the turbines in the first wind farm
foreach (ReadOnlyTurbine turbine in scenario.WindFarms.First().Turbines)
{
// Get the turbine power for the flow case
double turbinePower =
flowCaseResult.TurbinePowers[turbine];
// Get the incident wind speed for the flow case
double incidentWindSpeed =
flowCaseResult.IncidentWindSpeeds[turbine.HubHeightLocation];
// Get the turbulence intensity for the flow case
double incidentTurbulenceIntensity =
flowCaseResult.TurbulenceIntensities[turbine.HubHeightLocation];
}