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

Save WindData onto FlorisModel and simplify post-run() calls #849

Merged
merged 27 commits into from
Mar 22, 2024
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f4c0963
Add functions to reshape turbine and farm power to wd x ws
paulf81 Mar 14, 2024
6892eeb
Add tests of new wind rose functions
paulf81 Mar 14, 2024
65950c1
wind_data saved onto FlorisModel; functions partially built.
misi9170 Mar 19, 2024
3d20c0a
Update tests; rename _wind_data to wind_data since optimizers may nee…
misi9170 Mar 19, 2024
648cb14
07 example updated (waked and no_wake match previous output).
misi9170 Mar 19, 2024
6c9af1f
Remove wind_data need from layout optimizers.
misi9170 Mar 20, 2024
80d9795
Bugfix; copy did not bring over wind_data."
misi9170 Mar 20, 2024
3486ff9
Update examples 13, 15
misi9170 Mar 20, 2024
9a43a3e
Removing unneeded methods.
misi9170 Mar 20, 2024
2366eba
Group hidden and outer get_turbine_powers methods.
misi9170 Mar 20, 2024
782d802
Ruff and isort.
misi9170 Mar 20, 2024
8a74427
Add getter for wind_data.
misi9170 Mar 20, 2024
12fd730
Rename converters to be more explicit about output.
misi9170 Mar 20, 2024
e60e4b9
Updating tests.
misi9170 Mar 20, 2024
9e3a2b8
Copy up docstring from hidden version.
misi9170 Mar 20, 2024
38a3af1
Fix a couple more examples.
misi9170 Mar 20, 2024
208fcb5
Merge changes from v4.
misi9170 Mar 20, 2024
6b1e32e
Fix scaling on uniform frequency.
misi9170 Mar 20, 2024
cac2e52
ruff and isort.
misi9170 Mar 20, 2024
e56f6a1
Log warnings when freq not provided and test.
misi9170 Mar 21, 2024
fb5035c
Merge branch 'v4' into v4-ms/wind_data-on-fmodel
misi9170 Mar 22, 2024
7dee0b9
Update uncertain model for new paradigm
paulf81 Mar 22, 2024
bfa7293
Add test of wind rose setting
paulf81 Mar 22, 2024
934c123
bufgix
paulf81 Mar 22, 2024
cacd65c
change _expanded suffix to _rose to avoid confusion in UncertainFlori…
misi9170 Mar 22, 2024
aed51ef
Merge branch 'v4' into v4-ms/wind_data-on-fmodel
misi9170 Mar 22, 2024
4c99029
to_ methods specify class rather than suggested instantiation.
misi9170 Mar 22, 2024
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
Prev Previous commit
Next Next commit
Add getter for wind_data.
  • Loading branch information
misi9170 committed Mar 20, 2024
commit 8a74427b18731fb83814bf6e3bb80c1775c69098
10 changes: 7 additions & 3 deletions floris/floris_model.py
Original file line number Diff line number Diff line change
@@ -99,7 +99,7 @@ def __init__(self, configuration: dict | str | Path):
raise ValueError("turbine_grid_points must be less than or equal to 3.")

# Initialize stored wind_data object to None
self.wind_data = None
self._wind_data = None

def assign_hub_height_to_ref_height(self):

@@ -278,7 +278,7 @@ def _reinitialize(
)
elif self.wind_data is not None:
misi9170 marked this conversation as resolved.
Show resolved Hide resolved
self.logger.warning("Deleting stored wind_data information.")
self.wind_data = None
self._wind_data = None
if wind_data is not None:
# Unpack wind data for reinitialization and save wind_data for use in output
(
@@ -287,7 +287,7 @@ def _reinitialize(
turbulence_intensities,
heterogenous_inflow_config,
) = wind_data.unpack_for_reinitialize()
self.wind_data = wind_data
self._wind_data = wind_data

## FlowField
if wind_speeds is not None:
@@ -1254,6 +1254,10 @@ def layout_y(self):
"""
return self.core.farm.layout_y

@property
def wind_data(self):
return self._wind_data

def get_turbine_layout(self, z=False):
"""
Get turbine layout