Skip to content

Commit

Permalink
Add Bastankhah 2014 case
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Mar 21, 2024
1 parent a593927 commit 02ab71a
Show file tree
Hide file tree
Showing 12 changed files with 239 additions and 67 deletions.
15 changes: 15 additions & 0 deletions examples/cases_torque2024/bastankhah2014/wind_energy_system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: IEA 15MW turbine
site: !include energy_site.yaml
wind_farm: !include wind_farm.yaml
attributes:
analyses:
yaw_angles:
- 0.0
wake_model:
velocity:
name: bastankhah2014
parameters:
k_star: 0.03
deflection:
name:
parameters:
13 changes: 13 additions & 0 deletions examples/cases_torque2024/bastankhah2016/energy_resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 270 degree wind direction, 9.8 m/s wind speed, 7.5% TI
wind_resource:
wind_direction: [270.0]
wind_speed: [9.8]
probability:
data: [1.0]
dims: [wind_direction]
turbulence_intensity:
data: 0.075
dims: []
air_density:
data: 1.225
dims: []
8 changes: 8 additions & 0 deletions examples/cases_torque2024/bastankhah2016/energy_site.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: IEA Wind Task 37 Case study 1+2, 16WT Plant Energy Site
boundaries:
circle:
center:
x: 0
y: 0
radius: 1300
energy_resource: !include energy_resource.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ attributes:
parameters:
alpha: 0.58
beta: 0.077
k: 0.38
k: 0.022
deflection:
name:
parameters:
17 changes: 17 additions & 0 deletions examples/cases_torque2024/bastankhah2016/wind_farm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 1 turbine wind farm, IEA 15MW
layouts:
initial_layout:
coordinates:
x: [0.0]
y: [0.0]
turbines:
name: IEA Wind Task 37 15MW Offshore Reference Turbine
performance:
Cp_curve:
Cp_values: [0.100335552, 0.272197208, 0.359305118, 0.409156685, 0.42729002, 0.441819614, 0.452708049, 0.475270298, 0.479478644, 0.482871263, 0.484447627, 0.485186337, 0.485905846, 0.487114154, 0.488094793, 0.488866488, 0.488988058, 0.489050152, 0.489088858, 0.489114531, 0.489127764, 0.48915576, 0.489165047, 0.489154466, 0.489163867, 0.489224161, 0.489263048, 0.48928802, 0.489293116, 0.489304304, 0.489319143, 0.48938292, 0.489378059, 0.486507177, 0.472991558, 0.470349316, 0.467724941, 0.465119143, 0.462537044, 0.462021882, 0.461765284, 0.461636557, 0.46150846, 0.461380941, 0.461317766, 0.459972382, 0.447424184, 0.435324299, 0.406934831, 0.380965216, 0.357157168, 0.335295525, 0.263718683, 0.211136579, 0.171651956, 0.108080744, 0.072394937, 0.050842443, 0.037062292]
Cp_wind_speeds: [2.999999831, 3.499999916, 4, 4.500000084, 4.750000126, 5.000000169, 5.249999874, 5.999999663, 6.199999966, 6.40000027, 6.499999747, 6.55000016, 6.599999899, 6.700000051, 6.800000202, 6.900000354, 6.919999845, 6.929999928, 6.94000001, 6.950000093, 6.960000175, 6.969999584, 6.980000341, 6.989999749, 6.999999831, 7.499999916, 8, 8.500000084, 9.000000169, 9.500000253, 10.00000034, 10.2499997, 10.49999975, 10.60000057, 10.70000005, 10.72000022, 10.73999971, 10.76000055, 10.78000004, 10.78400034, 10.78600049, 10.78699989, 10.78799997, 10.78899937, 10.78950042, 10.8000002, 10.89999968, 10.99999983, 11.24999987, 11.50000059, 11.75000063, 11.99999933, 12.99999949, 13.99999966, 14.99999983, 17.50000025, 20.00000067, 22.49999975, 24.99999882]
Ct_curve:
Ct_values: [0.819748943, 0.801112031, 0.808268424, 0.821910918, 0.822876237, 0.823265981, 0.830989358, 0.834932456, 0.833618598, 0.83180478, 0.829011103, 0.826909201, 0.824740997, 0.820429675, 0.816176257, 0.811200233, 0.809740903, 0.808780765, 0.808102306, 0.807566626, 0.807251977, 0.80662442, 0.806495512, 0.806806173, 0.806651158, 0.805469658, 0.804571567, 0.803949121, 0.803904895, 0.803708734, 0.80345211, 0.801706154, 0.801777393, 0.768657554, 0.70731525, 0.698507743, 0.690211963, 0.682335591, 0.674835939, 0.673371183, 0.672646111, 0.672283185, 0.671921569, 0.671564033, 0.671386994, 0.667639697, 0.635292304, 0.607277698, 0.548965866, 0.501379105, 0.460982977, 0.425965654, 0.32116631, 0.2511023, 0.201415182, 0.125653944, 0.08506697, 0.061026446, 0.045814967]
Ct_wind_speeds: [2.999999831, 3.499999916, 4, 4.500000084, 4.750000126, 5.000000169, 5.249999874, 5.999999663, 6.199999966, 6.40000027, 6.499999747, 6.55000016, 6.599999899, 6.700000051, 6.800000202, 6.900000354, 6.919999845, 6.929999928, 6.94000001, 6.950000093, 6.960000175, 6.969999584, 6.980000341, 6.989999749, 6.999999831, 7.499999916, 8, 8.500000084, 9.000000169, 9.500000253, 10.00000034, 10.2499997, 10.49999975, 10.60000057, 10.70000005, 10.72000022, 10.73999971, 10.76000055, 10.78000004, 10.78400034, 10.78600049, 10.78699989, 10.78799997, 10.78899937, 10.78950042, 10.8000002, 10.89999968, 10.99999983, 11.24999987, 11.50000059, 11.75000063, 11.99999933, 12.99999949, 13.99999966, 14.99999983, 17.50000025, 20.00000067, 22.49999975, 24.99999882]
hub_height: 150.0
rotor_diameter: 240.0
190 changes: 156 additions & 34 deletions examples/torque2024_1turbine.ipynb

Large diffs are not rendered by default.

12 changes: 4 additions & 8 deletions wcomp/floris_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@
"we": "alpha",
}
},
"bastankhah2014": { # NOT IMPLEMENTED
"model_ref": None,
"parameters": {}
},
# "bastankhah2014": { # NOT IMPLEMENTED
# "model_ref": None,
# "parameters": {}
# },
"bastankhah2016": {
"model_ref": "gauss",
"parameters": {
Expand Down Expand Up @@ -75,10 +75,6 @@
},
}

# ASSUMPTION: FLORIS has a vertical and horizontal wake expansion rate for Bastankhah 2016, but foxes uses the same for both.
# This is also mentioned in the paper in section 7 Model Predictions.
# For simplicity in connecting the models, I'm setting FLORIS to use the same for both.

basic_dict = {
'name': 'Jensen-Jimenez',
'description': 'Three turbines using Jensen / Jimenez models',
Expand Down
18 changes: 12 additions & 6 deletions wcomp/foxes_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
# This dictionary maps generic model names in the windIO input file
# to the tool's specific name. It also maps parameter names from the
# referenced papers to the parameters in the implementation.
# "windIO_model_name": {
# "model_ref": the current software's reference for this wake model,
# "parameters": {
# "model parameter": windIO parameter
# }
# }
WAKE_MODEL_MAPPING = {

# Velocity models
Expand All @@ -37,12 +43,12 @@
"k": "alpha",
}
},
# "bastankah2014": {
# "model_ref": Bastankhah2014,
# "parameters": {
# "alpha": "k",
# }
# },
"bastankhah2014": {
"model_ref": Bastankhah2014,
"parameters": {
"k": "k_star",
}
},
"bastankhah2016": {
"model_ref": Bastankhah2016,
"parameters": {
Expand Down
31 changes: 13 additions & 18 deletions wcomp/pywake_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
import xarray as xr
from py_wake import HorizontalGrid, XZGrid, YZGrid
from py_wake.site.xrsite import XRSite
from py_wake.wind_farm_models.engineering_models import EngineeringWindFarmModel
from py_wake.wind_turbines import WindTurbine
from py_wake.wind_turbines.power_ct_functions import PowerCtFunctions

from py_wake.wind_farm_models.engineering_models import PropagateDownwind
from py_wake.literature.noj import Jensen_1983
from py_wake.literature.gaussian_models import Niayifar_PorteAgel_2016
from py_wake.deficit_models.gaussian import BastankhahGaussianDeficit
from py_wake.literature.gaussian_models import Bastankhah_PorteAgel_2014
from py_wake.deflection_models import JimenezWakeDeflection
from py_wake.literature.turbopark import Nygaard_2022

Expand All @@ -26,6 +23,12 @@
# This dictionary maps generic model names in the windIO input file
# to the tool's specific name. It also maps parameter names from the
# referenced papers to the parameters in the implementation.
# "windIO_model_name": {
# "model_ref": the current software's reference for this wake model,
# "parameters": {
# "model parameter": windIO parameter
# }
# }
WAKE_MODEL_MAPPING = {

# Velocity models
Expand All @@ -35,20 +38,12 @@
"k": "alpha",
}
},
# "niayifar-porteagel": {
# "model_ref": Niayifar_PorteAgel_2016,
# "parameters": {
# "a1": "a0",
# "a2": "a1",
# }
# },
# "bastankhah2014": {
# "model_ref": BastankhahGaussianDeficit,
# "parameters": {
# # "k": "a0",
# # "a2": "a1",
# }
# },
"bastankhah2014": {
"model_ref": Bastankhah_PorteAgel_2014,
"parameters": {
"k": "k_star",
}
},
# "bastankhah2016": { # NOT IMPLEMENTED
# "model_ref": None,
# "parameters": {
Expand Down

0 comments on commit 02ab71a

Please sign in to comment.