Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update reference turbine model data #767

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
251ad71
add power to 5MW model, matches https://github.com/NREL/floris/blob/m…
misi9170 Dec 13, 2023
f664408
Merge branch '4d' into v4/power-replaces-cp
misi9170 Dec 13, 2023
7689b6f
Removing Cp interp and replacing with direct power interp; updating t…
misi9170 Dec 13, 2023
950602a
Convert to W for power_interp; remove ref air density from power calc…
misi9170 Dec 13, 2023
c120467
Minor updates for plot axes---contains temporary limitation to NREL 5…
misi9170 Dec 13, 2023
8590d22
Updating 15mw based on https://github.com/IEAWindTask37/IEA-15-240-RW…
misi9170 Dec 14, 2023
f32e349
10mw updated.
misi9170 Dec 14, 2023
45d6ed6
Merge branch '4d' into v4/power-replaces-cp
misi9170 Dec 14, 2023
6ab6de7
Updating turbine curve conversion utility and example.
misi9170 Dec 14, 2023
52dd8a0
Utility for converting from v3 turbine models to v4.
misi9170 Dec 14, 2023
c667a2e
Ruff and isort.
misi9170 Dec 14, 2023
2efc693
Changing names to check out v3 versions.
misi9170 Dec 14, 2023
118b833
Renaming again...
misi9170 Dec 14, 2023
830bafe
Converting old models over.
misi9170 Dec 14, 2023
95a2064
So that tests run, using v4 5MW.
misi9170 Dec 14, 2023
398498f
Updates to test_build_turbine_dict.
misi9170 Dec 15, 2023
42972ca
Updating conftest, test_power() to reflect absolute power in turbine …
misi9170 Dec 15, 2023
b23fe11
air density removed from power() calls in reg tests.
misi9170 Dec 15, 2023
01529cb
Reinstating accidentally overwritten file.
misi9170 Dec 15, 2023
dec0dc9
Convert from `ref_density_cp_ct` to `ref_air_density`.
misi9170 Dec 15, 2023
94633d1
`ref_tilt` replaces `ref_tilt_cp_ct`
misi9170 Dec 15, 2023
b0adc13
Ruff, isort; remove AIR_DENSITY from turbine_unit_test.test_power().
misi9170 Dec 15, 2023
ce91f1b
Clearing empty lines.
misi9170 Dec 15, 2023
2a6be52
Check for smoothness; not yet passing `smooth enough` test.
misi9170 Dec 17, 2023
84e9f12
Tests passing for smoothness.
misi9170 Dec 18, 2023
a5310bd
Converter prints warning if nonsmooth; added handling for no R4.
misi9170 Dec 18, 2023
c9aff6e
Update build_turbine_dict test for clarity and simplicity. Ruff, isort.
misi9170 Dec 18, 2023
e99dcb1
archiving v3 models.
misi9170 Dec 18, 2023
62b886c
Removing `_v4updated` from reference turbine names.
misi9170 Dec 18, 2023
cfd2fba
Updating floating turbines to v4 data.
misi9170 Dec 18, 2023
d02a929
update nrel 5mw data in conftest; most reg tests now failing.
misi9170 Dec 18, 2023
794e89c
baselines for model reg tests updated, but several failing small_grid…
misi9170 Dec 18, 2023
4e8d3ba
Updating FI, none reg tests.
misi9170 Dec 18, 2023
e1aa6ec
Merge v4 (w/ 4d) back in.
misi9170 Dec 18, 2023
061a69c
Merge branch 'v4-ms/power-replaces-cp' into v4-ms/v4-reference-turbines
misi9170 Dec 18, 2023
36cdb39
Remove x_20MW from tests; fix bug in nrel_5MW_custom test.
misi9170 Dec 18, 2023
c2f7306
Update turbine_unit_test to use specified thrust_coefficient in deter…
misi9170 Dec 18, 2023
1ca57af
Bugfixes with changes to build_turbine_dict.
misi9170 Dec 18, 2023
f02f29b
Updating various input files to v4.
misi9170 Dec 18, 2023
c037c8e
Add units to comments, especially to denote power in kW.
misi9170 Dec 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions examples/18_check_turbine.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
if t.suffix == ".yaml" and ("multi_dim" not in t.stem)
]

# TEMPORARY
print(turbines)
turbines = turbines[1:]
# END TEMPORARY

# Declare a set of figures for comparing cp and ct across models
fig_cp_ct, axarr_cp_ct = plt.subplots(2,1,sharex=True,figsize=(10,10))

Expand All @@ -66,14 +71,14 @@
)
axarr_cp_ct[0].grid(True)
axarr_cp_ct[0].legend()
axarr_cp_ct[0].set_ylabel('Cp')
axarr_cp_ct[0].set_ylabel('Power (kW)')
axarr_cp_ct[1].plot(
fi.floris.farm.turbine_map[0].power_thrust_table["wind_speed"],
fi.floris.farm.turbine_map[0].power_thrust_table["thrust"],label=t
fi.floris.farm.turbine_map[0].power_thrust_table["thrust_coefficient"],label=t
)
axarr_cp_ct[1].grid(True)
axarr_cp_ct[1].legend()
axarr_cp_ct[1].set_ylabel('Ct')
axarr_cp_ct[1].set_ylabel('Ct (-)')
axarr_cp_ct[1].set_xlabel('Wind Speed (m/s)')

# Create a figure
Expand Down
2 changes: 1 addition & 1 deletion examples/24_floating_turbine_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
is computed for each turbine based on effective velocity. This tilt angle is then passed on
to the respective wake model.

The value of the parameter ref_tilt_cp_ct is the value of tilt at which the ct/cp curves
The value of the parameter ref_tilt is the value of tilt at which the ct/cp curves
have been defined.

If `correct_cp_ct_for_tilt` is True, then the difference between the current tilt as
Expand Down
2 changes: 1 addition & 1 deletion examples/29_floating_vs_fixedbottom_farm.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
turbine based on effective velocity. This tilt angle is then passed on
to the respective wake model.

The value of the parameter ref_tilt_cp_ct is the value of tilt at which the
The value of the parameter ref_tilt is the value of tilt at which the
ct/cp curves have been defined.

With `correct_cp_ct_for_tilt` True, the difference between the current
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
import matplotlib.pyplot as plt
import numpy as np

from floris.tools import FlorisInterface
from floris.turbine_library.turbine_utilities import build_turbine_dict
from floris.simulation import turbine
from floris.tools import build_turbine_dict, FlorisInterface


"""
Expand All @@ -30,24 +30,27 @@
"""

# Generate an example turbine power and thrust curve for use in the FLORIS model
powers_orig = np.array([0, 30, 200, 500, 1000, 2000, 4000, 4000, 4000, 4000, 4000])
wind_speeds = np.array([0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20])
power_coeffs = powers_orig[1:]/(0.5*126.**2*np.pi/4*1.225*wind_speeds[1:]**3)
turbine_data_dict = {
"wind_speed":[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20],
"power_absolute":[0, 30, 200, 500, 1000, 2000, 4000, 4000, 4000, 4000, 4000],
"wind_speed":list(wind_speeds),
"power_coefficient":[0]+list(power_coeffs),
"thrust_coefficient":[0, 0.9, 0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.25, 0.2]
}

turbine_dict = build_turbine_dict(
turbine_data_dict,
"example_turbine",
file_path=None,
file_name=None,
generator_efficiency=1,
hub_height=90,
pP=1.88,
pT=1.88,
rotor_diameter=126,
TSR=8,
air_density=1.225,
ref_tilt_cp_ct=5
ref_air_density=1.225,
ref_tilt=5
)

fi = FlorisInterface("inputs/gch.yaml")
Expand All @@ -57,18 +60,25 @@
fi.reinitialize(
layout_x=[0],
layout_y=[0],
wind_speeds=wind_speeds,
wind_directions=wind_directions,
wind_speeds=wind_speeds,
turbine_type=[turbine_dict]
)
fi.calculate_wake()

powers = fi.get_farm_power()

fig, ax = plt.subplots(1,1)
specified_powers = (
np.array(turbine_data_dict["power_coefficient"])
*0.5*turbine_dict["ref_air_density"]
*turbine_dict["rotor_diameter"]**2*np.pi/4
*np.array(turbine_data_dict["wind_speed"])**3
)/1000

fig, ax = plt.subplots(1,1,sharex=True)

ax.scatter(wind_speeds, powers/1000, color="C0", s=5, label="Test points")
ax.scatter(turbine_data_dict["wind_speed"], turbine_data_dict["power_absolute"],
ax.scatter(turbine_data_dict["wind_speed"], specified_powers,
color="red", s=20, label="Specified points")

ax.grid()
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/cc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: CC
description: Three turbines using Cumulative Gauss Curl model
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/emgauss.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Emperical Gaussian
description: Three turbines using emperical Gaussian model
floris_version: v3.x
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/gch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: Three turbines using Gauss Curl Hybrid model
###
# The earliest verion of FLORIS this input file supports.
# This is not currently only for the user's reference.
floris_version: v3.0.0
floris_version: v4.x

###
# Configure the logging level and where to show the logs.
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/gch_heterogeneous_inflow.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: GCH
description: Three turbines using Gauss Curl Hybrid model
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/gch_multi_dim_cp_ct.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: GCH multi dimensional Cp/Ct
description: Three turbines using GCH model
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/gch_multiple_turbine_types.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: GCH
description: Three turbines using Gauss Curl Hybrid model
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/jensen.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Jensen-Jimenez
description: Three turbines using Jensen / Jimenez models
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs/turbopark.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: TurbOPark
description: Three turbines using TurbOPark model
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/emgauss_fixed.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Emperical Gaussian
description: Example of single fixed-bottom turbine
floris_version: v3.x
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/emgauss_floating.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Emperical Gaussian
description: Example of single floating turbine
floris_version: v3.x
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/emgauss_floating_fixedtilt15.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Emperical Gaussian floating
description: Single turbine using emperical Gaussian model for floating
floris_version: v3.x
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/emgauss_floating_fixedtilt5.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: Emperical Gaussian floating
description: Single turbine using emperical Gaussian model for floating
floris_version: v3.x
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/gch_fixed.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: GCH
description: Example of single fixed-bottom turbine
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
2 changes: 1 addition & 1 deletion examples/inputs_floating/gch_floating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

name: GCH
description: Example of single floating turbine
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

name: GCH
description: Example of single floating turbine where the cp/ct is calculated with floating tilt included
floris_version: v3.0.0
floris_version: v4.x

logging:
console:
Expand Down
Loading
Loading