Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a5b1ef6
added draft of floris wind model
elenya-grant Nov 14, 2025
0e99c4e
added is_day variable to openmeteo downloads
elenya-grant Nov 14, 2025
e135373
Merge branch 'develop' of github.com:NREL/H2Integrate into floris
elenya-grant Nov 20, 2025
7cc0eeb
added cache to floris model
elenya-grant Nov 20, 2025
ae6d5bb
added cache to floris model
elenya-grant Nov 20, 2025
db50a0f
made cache file utility method
elenya-grant Nov 20, 2025
d1c766c
updated floris to use cache filename making utility
elenya-grant Nov 20, 2025
6ed49c0
Merge branch 'develop' of github.com:NREL/H2Integrate into floris
elenya-grant Nov 20, 2025
3284f2c
added docstring to new utility method and updates to floris wrapper
elenya-grant Nov 20, 2025
37a8eff
added floris files to the library
elenya-grant Nov 20, 2025
c3eb417
added draft files for floris example
elenya-grant Nov 20, 2025
73e53c0
added floris to supported models
elenya-grant Nov 20, 2025
cbacf7e
added test for floris
elenya-grant Nov 21, 2025
ebddbe5
added in wind resource tools
elenya-grant Nov 21, 2025
fc53ff1
added resource parse methods into floris wrapper
elenya-grant Nov 21, 2025
c8ed08b
updates to floris and resource tools
elenya-grant Nov 25, 2025
04b9f1b
added docstrings and added cache_dir as input to make_cache_hash_file…
elenya-grant Nov 26, 2025
985873e
bugfixes in floris model, updated floris example, added tests for flo…
elenya-grant Nov 26, 2025
913e659
minor update to example tech config
elenya-grant Dec 1, 2025
3245738
Merge remote-tracking branch 'h2i_upstream/develop' into floris
elenya-grant Dec 1, 2025
a6786a1
added comments and updated changelog
elenya-grant Dec 1, 2025
b90b25a
added floris to technology overview
elenya-grant Dec 1, 2025
825d5b6
Merge remote-tracking branch 'upstream/develop' into HEAD
kbrunik Dec 9, 2025
958c221
Merge branch 'develop' into floris
johnjasa Dec 11, 2025
19ea58e
Merge branch 'floris' of github.com:elenya-grant/GreenHEART into floris
elenya-grant Dec 15, 2025
0190a8b
minor updates from review feedback
elenya-grant Dec 15, 2025
0c9cb77
added error message if layout is provided in floris config
elenya-grant Dec 23, 2025
d77662a
merged upstream
elenya-grant Jan 6, 2026
c19a688
updated cache dir to only be created if caching is enabled
elenya-grant Jan 6, 2026
c393357
updated floris to use cache baseclass and added tests
elenya-grant Jan 6, 2026
d1aae36
added test for preprocessing turbine tools with floris
elenya-grant Jan 6, 2026
099e7ba
updated turb preprocessing doc page
elenya-grant Jan 6, 2026
3bcfb98
fixed failing test
elenya-grant Jan 6, 2026
b2ac480
merged in develop
elenya-grant Jan 6, 2026
5681f70
added in air density adjustment and renamed operation model
elenya-grant Jan 6, 2026
d3fc28b
added test for air density adjustment in floris
elenya-grant Jan 6, 2026
176e345
removed note about including air density adjustment
elenya-grant Jan 6, 2026
47e0fd0
updated wind resource units for is_day and added some tests for wind …
elenya-grant Jan 9, 2026
84d1302
bugfix and added test for weighted average wind speed
elenya-grant Jan 9, 2026
50e2e4f
draft stage of estimating wind speed using shear
elenya-grant Jan 9, 2026
17d6ac6
removed wind shear estimations
elenya-grant Jan 9, 2026
ea5c3f4
updated test values for floris example test due to fig in weighted av…
elenya-grant Jan 9, 2026
f4f519d
renamed floris example and updated relevant tests
elenya-grant Jan 9, 2026
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
376 changes: 364 additions & 12 deletions docs/misc_resources/turbine_models_library_preprocessing.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/user_guide/model_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ Below summarizes the available performance, cost, and financial models for each
- `wind`: wind turbine
- performance models:
+ `'pysam_wind_plant_performance'`
+ `'floris_wind_plant_performance'`
- cost models:
+ `'atb_wind_cost'`
- `solar`: solar-PV panels
Expand Down
5 changes: 5 additions & 0 deletions examples/26_floris/driver_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
name: "driver_config"
description: "This analysis runs a wind plant using FLORIS"

general:
folder_output: floris_wind_outputs
54 changes: 54 additions & 0 deletions examples/26_floris/plant_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "plant_config"
description: ""

site:
latitude: 44.04218
longitude: -95.19757

resources:
wind_resource:
resource_model: "openmeteo_wind_api"
resource_parameters:
resource_year: 2023

resource_to_tech_connections: [
# connect the wind resource to the wind technology
['wind_resource', 'wind', 'wind_resource_data'],
]

plant:
plant_life: 30
simulation:
n_timesteps: 8760
dt: 3600
finance_parameters:
finance_groups:
finance_model: "ProFastComp"
model_inputs:
params:
analysis_start_year: 2032
installation_time: 36 # months
inflation_rate: 0.0 # 0 for nominal analysis
discount_rate: 0.09
debt_equity_ratio: 2.62
property_tax_and_insurance: 0.03 # percent of CAPEX
total_income_tax_rate: 0.257
capital_gains_tax_rate: 0.15 # H2FAST default
sales_tax_rate: 0.07375
debt_interest_rate: 0.07
debt_type: "Revolving debt" # can be "Revolving debt" or "One time loan".
loan_period_if_used: 0 # H2FAST default, not used for revolving debt
cash_onhand_months: 1 # H2FAST default
admin_expense: 0.00 # percent of sales H2FAST default
capital_items:
depr_type: "MACRS" # can be "MACRS" or "Straight line"
depr_period: 7 #years
refurb: [0.]
finance_subgroups:
electricity:
commodity: "electricity"
commodity_stream: "wind" #use the total electricity output from the combiner for the finance calc
technologies: ["wind"]
cost_adjustment_parameters:
cost_year_adjustment_inflation: 0.025 # used to adjust modeled costs to target_dollar_year
target_dollar_year: 2022
27 changes: 27 additions & 0 deletions examples/26_floris/run_floris_example.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from pathlib import Path

from h2integrate.core.utilities import load_yaml
from h2integrate.core.h2integrate_model import H2IntegrateModel


os.chdir(Path(__file__).parent)

driver_config = load_yaml(Path(__file__).parent / "driver_config.yaml")
tech_config = load_yaml(Path(__file__).parent / "tech_config.yaml")
plant_config = load_yaml(Path(__file__).parent / "plant_config.yaml")

h2i_config = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like having this different way of showing how to put together a config, very nice.

"name": "H2Integrate_config",
"system_summary": "",
"driver_config": driver_config,
"technology_config": tech_config,
"plant_config": plant_config,
}
# Create a H2I model
h2i = H2IntegrateModel(h2i_config)

# Run the model
h2i.run()

h2i.post_process()
33 changes: 33 additions & 0 deletions examples/26_floris/tech_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "technology_config"
description: "This plant runs a wind farm using FLORIS"

technologies:
wind:
performance_model:
model: "floris_wind_plant_performance"
cost_model:
model: "atb_wind_cost"
model_inputs:
performance_parameters:
num_turbines: 100 #number of turbines in the farm
hub_height: 65.0 # turbine hub-height
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is defined twice. Do we need it here if it's in the floris config?

operational_losses: 12.83 #percentage of non-wake losses
floris_wake_config: !include "floris_v4_default_template.yaml" #floris wake model file
floris_turbine_config: !include "floris_turbine_Vestas_660kW.yaml" #turbine model file formatted for floris
resource_data_averaging_method: "weighted_average" #"weighted_average", "average" or "nearest"
operation_model: "cosine-loss" #turbine operation model
default_turbulence_intensity: 0.06
enable_caching: True #whether to use cached results
cache_dir: "cache" #directory to save or load cached data
layout:
layout_mode: "basicgrid"
layout_options:
row_D_spacing: 5.0
turbine_D_spacing: 5.0
rotation_angle_deg: 0.0
row_phase_offset: 0.0
layout_shape: "square"
cost_parameters:
capex_per_kW: 1472.0
opex_per_kW_per_year: 32
cost_year: 2022
50 changes: 50 additions & 0 deletions examples/test/test_all_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -1260,6 +1260,56 @@ def test_sweeping_solar_sites_doe(subtests):
assert len(list(set(res_df["LCOE"].to_list()))) == len(res_df)


def test_floris_example(subtests):
from h2integrate.core.utilities import load_yaml

os.chdir(EXAMPLE_DIR / "26_floris")

driver_config = load_yaml(EXAMPLE_DIR / "26_floris" / "driver_config.yaml")
tech_config = load_yaml(EXAMPLE_DIR / "26_floris" / "tech_config.yaml")
plant_config = load_yaml(EXAMPLE_DIR / "26_floris" / "plant_config.yaml")

h2i_config = {
"name": "H2Integrate_config",
"system_summary": "",
"driver_config": driver_config,
"technology_config": tech_config,
"plant_config": plant_config,
}

# Create a H2I model
h2i = H2IntegrateModel(h2i_config)

# Run the model
h2i.run()

with subtests.test("LCOE"):
assert (
pytest.approx(
h2i.prob.get_val("finance_subgroup_electricity.LCOE", units="USD/MW/h")[0], rel=1e-6
)
== 99.872209
)

with subtests.test("Wind plant capacity"):
assert pytest.approx(h2i.prob.get_val("wind.total_capacity", units="MW"), rel=1e-6) == 66.0

with subtests.test("Total electricity production"):
assert (
pytest.approx(
np.sum(h2i.prob.get_val("wind.total_electricity_produced", units="MW*h/yr")),
rel=1e-6,
)
== 128948.21977
)

with subtests.test("Capacity factor"):
assert (
pytest.approx(h2i.prob.get_val("wind.capacity_factor", units="percent")[0], rel=1e-6)
== 22.30320668
)


def test_24_solar_battery_grid_example(subtests):
# NOTE: would be good to compare LCOE against the same example without grid selling
# and see that LCOE reduces with grid selling
Expand Down
3 changes: 3 additions & 0 deletions h2integrate/converters/hopp/test/test_hopp_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ def test_hopp_wrapper_cache_filenames(subtests, plant_config, tech_config):

with subtests.test("Check unique filename with modified config"):
assert len(cache_filename_new) > 0

# Delete cache files and the testing cache dir
shutil.rmtree(cache_dir)
Loading