Wind Flow Calculation
Introduction
Currently WindFarmer Analyst support 4 flow model types: WaSP from Frequency Distrubution, WaSP from Wind Atlas, Simple Flow Model and loading an External Flow Model.
Select Flow Model
Set the flow model to use in the flow model settings in the workbook. The available options are:
ExportStats also includes summary statistics of the input time series.
Flow Model Type | Use case |
---|---|
FlowModelType.Simple | For the simple flow model |
FlowModelType.WaspFromFreqDist | For Wasp from frequency distribution |
FlowModelType.WaspFromAtlas | Mean of the input time series |
Valid FlowModelType.External | Years of valid data |
// Setting the flow model to be the external flow model.
Workbook.ModelSettings.FlowSettings.FlowModelType = FlowModelType.External;
Set the Simple Flow Model Options
Set the simple flow model in the flow settings of the workbook.
To use the simple flow model a shear model at each mast that initiates turbines is needed. The shear model needs to be of type UserDefinedShearModel and can use the power law or the log law. Depending on the choice the calculation value will mean alpha or the roughness length.
// Set Simple Flow Model
Workbook.ModelSettings.FlowSettings.FlowModelType = FlowModelType.Simple;
// Create a User Defined Shear Model
UserDefinedShearModel shearModel = new UserDefinedShearModel();
// Selecting power law.
shearModel.FittingType = ShearFittingType.Power;
// Set the alpha value
shearModel.CalculationValue = 0.143;
// Assign the shear model to a measurement site
Toolbox.MeasurementCampaign.SaveShearModel(
shearModel,
Workbook.Climate.MeasurementSites["M2"]);
// Run the flow model
Toolbox.CalculateWindFlow();
Set Wasp from frequency distribution
Set Wasp from frequency distribution in the flow settings of the workbook. As a safety check the availability of the wasp version can be verified. The desired wasp version can be set in the wasp parameters inside the flow settings.
// First check if wasp 11 is available
if (Toolbox.IsWaspAvailable(WAsPVersion.Version11) == WAsPStatus.Available)
{
Workbook.ModelSettings.FlowSettings.FlowModelType = FlowModelType.WaspFromFreqDist;
// Set the wasp version to use
Workbook.ModelSettings.FlowSettings.WAsPParameters.WAsPVersion = WAsPVersion.Version11;
Toolbox.CalculateWindFlow();
}
Set Wasp from wind atlas
Set Wasp from wind atlas in the flow settings of the workbook and the desired version in the wasp parameters. This flow models requires the path to the lib file to be supplied.
if (Toolbox.IsWaspAvailable(WAsPVersion.Version10) == WAsPStatus.Available)
{
Workbook.ModelSettings.FlowSettings.FlowModelType = FlowModelType.WaspFromAtlas;
// Set the wasp version to use
Workbook.ModelSettings.FlowSettings.WAsPParameters.WAsPVersion = WAsPVersion.Version10;
// Path to the location of the lib file
Workbook.ModelSettings.FlowSettings.WindAtlasFilePath = @"D:\WF TEST DATA\LEER.LIB";
Toolbox.CalculateWindFlow();
}
Setup External flow model
Set the external flow model in flow settings of the workbook. All the wrg and rsf files were placed in the same location.
For each mast the point wind resource at the mast (wrg) was loaded and linked to the respective wind climate. The rsf for the turbine locations initiated from that mast is loaded via the import discrete resources function and linked to the relevant wind climate. In the end the command to auto generate initiation regions is called to automatically setup the regions according to the loaded data.
The wind flow is now setup and ready to be used in the energy calculation, no need to run the TestingOnlyCalculateWindFlow command.
Workbook.ModelSettings.FlowSettings.FlowModelType = FlowModelType.External;
string baseFolder = @"D:\WF TEST DATA\Hawaii demo data\Kohala\x.Wasp_ExternalFlowModel";
// Import the wrg at the mast and the resource at turbine location
// for turbines initiated from mast M2
// Get the wind climate at 60m on mast M2
WindClimate m2_60m = Workbook.Climate.MeasurementSites["M2"].WindClimates[60];
// Import the wrgs at mast M2 for the wind climate height 60m
string m2pointWrgPath = System.IO.Path.Combine(
baseFolder,
"M2_60m.wrg");
Toolbox.ImportPointWindResource(
m2pointWrgPath,
m2_60m);
// Import the rsf at the turbine locations initiated from M2
string m2initatedTurbineResources = System.IO.Path.Combine(
baseFolder,
"Kohala Wind Farm.rsf");
Toolbox.ImportDiscreteWindResource(m2initatedTurbineResources, m2_60m);
// Import the point wrg at M3 for the wind climate heigh 94m
string m3pointWrgPath = System.IO.Path.Combine(
baseFolder,
"M3_94m.wrg");
WindClimate m3_94m = Workbook.Climate.MeasurementSites["M3"].WindClimates[94];
Toolbox.ImportPointWindResource(
m2pointWrgPath,
m3_94m);
// Import the rsf for the turbine locations initiated from M3
string m3initiatedTurbineResources = System.IO.Path.Combine(
baseFolder,
"My Turbines.rsf");
Toolbox.ImportDiscreteWindResource(
m3initiatedTurbineResources,
m3_94m);
// Auto generate initiation regions from loaded resources to correctly
// set up the flow model.
// Analyses the loaded resources and creates the appropriate regions.
Toolbox.AutoGenerateInitiationRegions();