Skip to content

Commit

Permalink
Connect deflection models and parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
rafmudaf committed Mar 19, 2024
1 parent fd8e2d4 commit 3f4cd83
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 1 deletion.
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: []
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
@@ -0,0 +1,23 @@
name: IEA 15MW turbine
site: !include energy_site.yaml
wind_farm: !include wind_farm.yaml
attributes:
analyses:
yaw_angles:
- 12.0
wake_model:
velocity:
name: bastankhah2016
parameters:
alpha: 0.58
beta: 0.077
k: 0.38
deflection:
name: bastankhah2016_deflection
parameters:
ad: 0.0
bd: 0.0
alpha: 0.58
beta: 0.077
ka: 0.38
kb: 0.004
17 changes: 17 additions & 0 deletions examples/cases_torque2024/bastankhah_deflection/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
13 changes: 13 additions & 0 deletions examples/cases_torque2024/jimenez/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/jimenez/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
18 changes: 18 additions & 0 deletions examples/cases_torque2024/jimenez/wind_energy_system.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: IEA 15MW turbine
site: !include energy_site.yaml
wind_farm: !include wind_farm.yaml
attributes:
analyses:
yaw_angles:
- 12.0
wake_model:
velocity:
name: jensen
parameters:
alpha: 0.1
deflection:
name: jimenez
parameters:
kd: 0.05
ad: 0.0
bd: 0.0
17 changes: 17 additions & 0 deletions examples/cases_torque2024/jimenez/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
19 changes: 19 additions & 0 deletions wcomp/floris_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,25 @@
"model_ref": "none",
"parameters": {}
},
"jimenez": {
"model_ref": "jimenez",
"parameters": {
"ad": "ad",
"bd": "bd",
"kd": "kd",
}
},
"bastankhah2016_deflection": {
"model_ref": "gauss",
"parameters": {
"ad": "ad",
"bd": "bd",
"alpha": "alpha",
"beta": "beta",
"ka": "ka",
"kb": "kb",
}
},
}

# ASSUMPTION: FLORIS has a vertical and horizontal wake expansion rate for Bastankhah 2016, but FOXES uses the same for both.
Expand Down
20 changes: 20 additions & 0 deletions wcomp/foxes_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from foxes.models.wake_models.wind import JensenWake
from foxes.models.wake_models.wind import PorteAgelWake
from foxes.models.wake_models.wind import TurbOParkWake
from foxes.models.wake_frames import YawedWakes

from windIO.utils.yml_utils import load_yaml
from .base_interface import WCompBase
Expand All @@ -27,6 +28,8 @@
# to the tool's specific name. It also maps parameter names from the
# referenced papers to the parameters in the implementation.
WAKE_MODEL_MAPPING = {

# Velocity models
"jensen": {
"model_ref": JensenWake,
"parameters": {
Expand All @@ -53,6 +56,23 @@
"A": "A",
}
},

# Deflection model
# "jimenez": {
# "model_ref": ,
# "parameters": {
# "alpha": "alpha",
# "beta": "beta",
# "k": "k",
# }
# }
"bastankhah2016_deflection": {
"model_ref": YawedWakes,
"parameters": {
"alpha": "alpha",
"beta": "beta",
}
},
}

class WCompFoxes(WCompBase):
Expand Down
18 changes: 17 additions & 1 deletion wcomp/pywake_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
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.deflection_models.deflection_model import DeflectionModel
from py_wake.deflection_models import JimenezWakeDeflection
from py_wake.literature.turbopark import Nygaard_2022

from windIO.utils.yml_utils import load_yaml
Expand All @@ -27,6 +27,8 @@
# to the tool's specific name. It also maps parameter names from the
# referenced papers to the parameters in the implementation.
WAKE_MODEL_MAPPING = {

# Velocity models
"jensen": {
"model_ref": Jensen_1983,
"parameters": {
Expand Down Expand Up @@ -58,6 +60,20 @@
"A": "A",
}
},

# Deflection model
# None: {
# "model_ref": "none",
# "parameters": {}
# },
"jimenez": {
"model_ref": JimenezWakeDeflection,
"parameters": {} # No parameters
},
# "bastankhah2016_deflection": {
# "model_ref": ,
# "parameters": {} # No parameters
# },
}

class WCompPyWake(WCompBase):
Expand Down

0 comments on commit 3f4cd83

Please sign in to comment.