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

Oahu mod #22

Open
wants to merge 78 commits into
base: feature/wave_kb
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
78 commits
Select commit Hold shift + click to select a range
766ac1c
Added ORBIT citation and references. Commented each function, citing …
nRiccobo Feb 17, 2023
161d9ea
last comment changes
nRiccobo Feb 23, 2023
180d9b2
Added Floating Platform Model and testsl
Apr 21, 2023
c7b5254
Updated Floating Platform Model and tests
Jun 1, 2023
84c72cc
Merge branch 'NREL:feature/offshore-h2' into feature/offshore-h2
ckiefer14 Jun 7, 2023
bdf9643
Update to fixed and floating platform models, Add test for Floating, …
Jun 7, 2023
10e737a
Update to fixed and floating platform models, Add test for Floating, …
Jun 7, 2023
3eace51
Merge branch 'feature/offshore-h2' of https://github.com/NREL/HOPP in…
nRiccobo Jun 12, 2023
5b5bc23
Updated test section to work with ORBIT 1.06
nRiccobo Jun 12, 2023
212e3b6
Fixed equation ref. comment
nRiccobo Jun 21, 2023
f26ee0d
Call to SemiTaut Branch in Orbit to pull mooring costs, Update to the…
Jun 29, 2023
fbd0797
Add sources to test files, Update floating cost to match ORBIT Techni…
Jul 7, 2023
34d72b5
Update to source information for test files
Jul 11, 2023
813cafa
minor modifications to example
jaredthomas68 Jul 13, 2023
58a2694
Merge pull request #128 from ckiefer14/feature/offshore-h2
jaredthomas68 Jul 18, 2023
ea5c40b
Merge branch 'feature/offshore-h2' into feature/offshore-h2
jaredthomas68 Jul 20, 2023
74d4363
Merge pull request #107 from nRiccobo/feature/offshore-h2
jaredthomas68 Jul 20, 2023
6fdc507
Merge branch 'feature/offshore-h2' of github.com:NREL/HOPP into featu…
jaredthomas68 Jul 20, 2023
ead8c08
Create floris_input_iea_osw_12MW.yaml
Jul 26, 2023
105779f
Create orbit-config-osw_12MW_01.yaml
Jul 26, 2023
96822e3
Create orbit-config-osw_12MW_02.yaml
Jul 26, 2023
d2ebbb8
Update orbit-config-osw_18MW.yaml
Jul 26, 2023
665e06a
Create 28.96_-98_windtoolkit_2013_60min_160m_200m.srw
Jul 26, 2023
4c42414
Create blythe_ca_33.617773_-114.588261_psmv3_60_tmy.csv
Jul 26, 2023
e696117
Create 105473_21.76_-157.91_2020.csv
Jul 26, 2023
09ff071
Create 3129_21.76_-158.01_2020.csv
Jul 26, 2023
a0838ea
Create 98452_21.70_-158.47_2020.csv
Jul 26, 2023
af53e21
Create wave_power_matrix.csv
Jul 26, 2023
3c583d4
Create Wave_resource_timeseries_HI.csv
Jul 26, 2023
5915a7f
Create osw_12MW.yaml
Jul 26, 2023
95bdfcb
Create Nav_HOPP_Model.py
Jul 26, 2023
6921bdb
Create mhk_wave_source.py
Jul 26, 2023
0a398a6
Update osw_18MW.yaml
Jul 26, 2023
6b4cb13
Update hopp_for_h2_floris.py
Jul 26, 2023
04adb39
Update electrolyzer.py
Jul 26, 2023
470caa1
Update finance.py
Jul 26, 2023
358e0d2
Update hopp_mgmt.py
Jul 26, 2023
5b53f2b
Update utilities.py
Jul 26, 2023
848359e
Update hybrid_simulation.py
Jul 26, 2023
b82ae98
Update power_source.py
Jul 26, 2023
36b294e
Update __init__.py
Jul 26, 2023
6caa704
Create wave_resource.py
Jul 26, 2023
fad9b66
Update site_info.py
Jul 26, 2023
1d99d67
Update requirements.txt
Jul 26, 2023
616feef
Update flatirons_site.py
Jul 26, 2023
b48b7d2
Update wind_resource.py
Jul 26, 2023
416bf87
Update wind_resource.py
Jul 26, 2023
85665fa
Delete pricing-data-2015-IronMtn-002_factors.csv
Jul 26, 2023
13d69e6
Delete pricing-data-2018-IronMtn-002_factors.csv
Jul 26, 2023
f56497b
Delete pricing-data-2019-IronMtn-002_factors.csv
Jul 26, 2023
caf5da3
Delete site_details.csv
Jul 26, 2023
7d01a31
Delete 33.162_-83.8_psmv3_60_2013.csv
Jul 26, 2023
1c79019
Delete 35.2018863_-101.945027_psmv3_60_2012.csv
Jul 26, 2023
8ec733b
Delete 36.103_-102.27_psmv3_60_2013.csv
Jul 26, 2023
f362e10
Delete 39.7555_-105.2211_psmv3_60_2012.csv
Jul 26, 2023
28e04a3
Delete 33.162_-83.8_windtoolkit_2013_60min_100m_120m.srw
Jul 26, 2023
faeba33
Delete 33.162_-83.8_windtoolkit_2013_60min_120m.srw
Jul 26, 2023
98d024d
Delete 33.162_-83.8_windtoolkit_2013_60min_120m_140m.srw
Jul 26, 2023
15e76c4
Delete 35.2018863_-101.945027_windtoolkit_2012_60min_80m_100m.srw
Jul 26, 2023
ee9c0de
Delete 36.103_-102.27_windtoolkit_2013_60min_100m_120m.srw
Jul 26, 2023
28a24dd
Delete 40.343_-73.541_windtoolkit_2013_60min_120m.srw
Jul 26, 2023
e08b8fc
Delete 40.343_-73.541_windtoolkit_2013_60min_120m_140m.srw
Jul 26, 2023
d690223
Delete 40.343_-73.541_windtoolkit_2013_60min_140m.srw
Jul 26, 2023
3af79ef
Delete 40.343_-73.541_windtoolkit_2013_60min_140m_160m.srw
Jul 26, 2023
d9bc7fc
Delete 40.343_-73.541_windtoolkit_2013_60min_160m.srw
Jul 26, 2023
9f275c9
Update finance.py
Jul 26, 2023
3e976e5
Update hopp_mgmt.py
Jul 26, 2023
7fb6c31
Update utilities.py
Jul 26, 2023
c7f3fff
Update Nav_HOPP_Model.py
Jul 26, 2023
75ce051
Create annual_cash_flow_wind_only_0.html
Jul 26, 2023
ddf6b6d
Update Nav_HOPP_Model.py
Jul 26, 2023
b8522d8
Update orbit-config-osw_12MW_02.yaml
Jul 26, 2023
afe062b
Update orbit-config-osw_12MW_02.yaml
Jul 31, 2023
bbfa935
Update Nav_HOPP_Model.py
Jul 31, 2023
4737f9a
Update Nav_HOPP_Model.py
Aug 1, 2023
7113378
Update finance.py
Aug 1, 2023
4b54bd4
Create 06-offshore-h2-wind-wave-solar.py
Aug 29, 2023
10abce6
Update 06-offshore-h2-wind-wave-solar.py
Aug 30, 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
79 changes: 48 additions & 31 deletions examples/H2_Analysis/hopp_for_h2_floris.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
from tools.analysis import create_cost_calculator
import pandas as pd

def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw, storage_size_mw, storage_size_mwh, storage_hours,
wind_cost_kw, solar_cost_kw, storage_cost_kw, storage_cost_kwh,
kw_continuous, load,
custom_powercurve,
interconnection_size_mw, grid_connected_hopp=True, wind_om_cost_kw = 42, turbine_parent_path=None, ppa_price=0.0):

def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw, wave_size_mw, storage_size_mw, storage_size_mwh, storage_hours,
wind_cost_kw, solar_cost_kw, storage_cost_kw, storage_cost_kwh,
kw_continuous, load,
custom_powercurve,
interconnection_size_mw,
grid_connected_hopp=True, wind_om_cost_kw=42,
solar_om_cost_kw=0,
turbine_parent_path=None, ppa_price=0.0):
'''
Runs HOPP for H2 analysis purposes
:param site: :class:`hybrid.sites.site_info.SiteInfo`,
Expand Down Expand Up @@ -57,7 +61,7 @@ def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw
:param grid_connected_hopp: ``bool``,
Flag for on-grid operation. Enables buying/selling of energy to grid.
:returns:

:param hybrid_plant: :class: `hybrid.hybrid_simulation.HybridSimulation`,
Base class for simulation a Hybrid Plant
:param combined_pv_wind_power_production_hopp: ``list``,
Expand All @@ -83,55 +87,66 @@ def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw
dispatch_options = {'battery_dispatch': 'heuristic'}
else:
dispatch_options = {}
hybrid_plant = HybridSimulation(technologies, site, interconnect_kw=interconnection_size_mw * 1e3, dispatch_options=dispatch_options)
hybrid_plant = HybridSimulation(
technologies, site, interconnect_kw=interconnection_size_mw * 1e3, dispatch_options=dispatch_options)
hybrid_plant.setup_cost_calculator(create_cost_calculator(interconnection_size_mw,
bos_cost_source='CostPerMW',
wind_installed_cost_mw=wind_cost_kw * 1000,
solar_installed_cost_mw=solar_cost_kw * 1000,
storage_installed_cost_mw=storage_cost_kw * 1000,
storage_installed_cost_mwh=storage_cost_kwh * 1000
))

hybrid_plant.set_om_costs_per_kw(pv_om_per_kw=None, wind_om_per_kw=wind_om_cost_kw, hybrid_om_per_kw=None)

hybrid_plant.set_om_costs_per_kw(
pv_om_per_kw=solar_om_cost_kw, wind_om_per_kw=wind_om_cost_kw, hybrid_om_per_kw=None)
if solar_size_mw > 0:
hybrid_plant.pv._financial_model.FinancialParameters.analysis_period = scenario['Useful Life']
hybrid_plant.pv._financial_model.FinancialParameters.debt_percent = scenario['Debt Equity']
hybrid_plant.pv._financial_model.FinancialParameters.analysis_period = scenario[
'Useful Life']
hybrid_plant.pv._financial_model.FinancialParameters.debt_percent = scenario[
'Debt Equity']
# hybrid_plant.pv.system_capacity_kw = solar_size_mw * 1000
# if scenario['ITC Available']:
# hybrid_plant.pv._financial_model.TaxCreditIncentives.itc_fed_percent = 26
# else:
# hybrid_plant.pv._financial_model.TaxCreditIncentives.itc_fed_percent = 0

if 'wind' in technologies:
# hybrid_plant.wind._system_model.Turbine.wind_resource_shear = 0.33
# hybrid_plant.wind.wake_model = 3
# hybrid_plant.wind.value("wake_int_loss", 3)
hybrid_plant.wind._financial_model.FinancialParameters.analysis_period = scenario['Useful Life']
hybrid_plant.wind._financial_model.FinancialParameters.analysis_period = scenario[
'Useful Life']
hybrid_plant.wind._financial_model.FinancialParameters.system_capacity = wind_size_mw * 1000
# hybrid_plant.wind.om_capacity =
hybrid_plant.wind._financial_model.FinancialParameters.debt_percent = scenario['Debt Equity']
# hybrid_plant.wind.om_capacity =
hybrid_plant.wind._financial_model.FinancialParameters.debt_percent = scenario[
'Debt Equity']
hybrid_plant.wind._financial_model.value("debt_option", 0)
hybrid_plant.wind._financial_model.FinancialParameters.debt_percent = scenario['Debt Equity']
hybrid_plant.wind._financial_model.FinancialParameters.debt_percent = scenario[
'Debt Equity']
hybrid_plant.wind._financial_model.value("debt_option", 0)
ptc_val = scenario['Wind PTC']

interim_list = list(
hybrid_plant.wind._financial_model.TaxCreditIncentives.ptc_fed_amount)
interim_list[0] = ptc_val
hybrid_plant.wind._financial_model.TaxCreditIncentives.ptc_fed_amount = tuple(interim_list)
hybrid_plant.wind._financial_model.TaxCreditIncentives.ptc_fed_amount = tuple(
interim_list)
#hybrid_plant.wind._system_model.Turbine.wind_turbine_hub_ht = scenario['Tower Height']

hybrid_plant.wind._financial_model.TaxCreditIncentives.itc_fed_percent = scenario['Wind ITC']
hybrid_plant.wind._financial_model.TaxCreditIncentives.itc_fed_percent = [
0] # scenario['Wind ITC']
hybrid_plant.wind._financial_model.FinancialParameters.real_discount_rate = 7
if custom_powercurve:
if turbine_parent_path == None:
turbine_parent_path = os.path.abspath(os.path.dirname(__file__))
powercurve_file = open(os.path.join(turbine_parent_path, scenario['Powercurve File']))
powercurve_file_extension = pathlib.Path(os.path.join(turbine_parent_path, scenario['Powercurve File'])).suffix
powercurve_file = open(os.path.join(
turbine_parent_path, scenario['Powercurve File']))
powercurve_file_extension = pathlib.Path(os.path.join(
turbine_parent_path, scenario['Powercurve File'])).suffix
if powercurve_file_extension == '.csv':
curve_data = pd.read_csv(os.path.join(turbine_parent_path, scenario['Powercurve File']))
wind_speed = curve_data['Wind Speed [m/s]'].values.tolist()
curve_data = pd.read_csv(os.path.join(
turbine_parent_path, scenario['Powercurve File']))
wind_speed = curve_data['Wind Speed [m/s]'].values.tolist()
curve_power = curve_data['Power [kW]']
hybrid_plant.wind._system_model.Turbine.wind_turbine_powercurve_windspeeds = wind_speed
hybrid_plant.wind._system_model.Turbine.wind_turbine_powercurve_powerout = curve_power
Expand All @@ -144,20 +159,21 @@ def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw
hybrid_plant.wind._system_model.Turbine.wind_turbine_powercurve_powerout = \
powercurve_data['turbine_powercurve_specification']['turbine_power_output']


hybrid_plant.wind.system_capacity_by_num_turbines(wind_size_mw * 1000)
hybrid_plant.ppa_price = ppa_price
hybrid_plant.simulate(scenario['Useful Life'])

# HOPP Specific Energy Metrics
### wind wind losses, for wind only farms ###
combined_pv_wind_power_production_hopp = hybrid_plant.grid._system_model.Outputs.system_pre_interconnect_kwac[0:8759]
combined_pv_wind_power_production_hopp = hybrid_plant.grid._system_model.Outputs.system_pre_interconnect_kwac[
0:8759]
energy_shortfall_hopp = [x - y for x, y in
zip(load,combined_pv_wind_power_production_hopp)]
zip(load, combined_pv_wind_power_production_hopp)]
energy_shortfall_hopp = [x if x > 0 else 0 for x in energy_shortfall_hopp]
combined_pv_wind_curtailment_hopp = [x - y for x, y in
zip(combined_pv_wind_power_production_hopp,load)]
combined_pv_wind_curtailment_hopp = [x if x > 0 else 0 for x in combined_pv_wind_curtailment_hopp]
zip(combined_pv_wind_power_production_hopp, load)]
combined_pv_wind_curtailment_hopp = [
x if x > 0 else 0 for x in combined_pv_wind_curtailment_hopp]

# super simple dispatch battery model with no forecasting TODO: add forecasting
# print("Length of 'energy_shortfall_hopp is {}".format(len(energy_shortfall_hopp)))
Expand All @@ -167,7 +183,8 @@ def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw

# Save the outputs
annual_energies = hybrid_plant.annual_energies
wind_plus_solar_npv = hybrid_plant.net_present_values.wind + hybrid_plant.net_present_values.pv
wind_plus_solar_npv = hybrid_plant.net_present_values.wind + \
hybrid_plant.net_present_values.pv
npvs = hybrid_plant.net_present_values
lcoe = hybrid_plant.lcoe_real.hybrid
lcoe_nom = hybrid_plant.lcoe_nom.hybrid
Expand All @@ -176,5 +193,5 @@ def hopp_for_h2_floris(site, scenario, technologies, wind_size_mw, solar_size_mw
# print('discount rate', hybrid_plant.wind._financial_model.FinancialParameters.real_discount_rate)

return hybrid_plant, combined_pv_wind_power_production_hopp, combined_pv_wind_curtailment_hopp, \
energy_shortfall_hopp,\
annual_energies, wind_plus_solar_npv, npvs, lcoe, lcoe_nom
energy_shortfall_hopp,\
annual_energies, wind_plus_solar_npv, npvs, lcoe, lcoe_nom
Loading