Skip to content

Commit

Permalink
Merge branch 'develop' into optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
dzalkind committed Nov 20, 2024
2 parents 2c96ee9 + 44799c7 commit 14ccfb2
Show file tree
Hide file tree
Showing 28 changed files with 556 additions and 143 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ The installation instructions below use the environment name, "weis-env," but an

2. Add in final packages and install the software

conda install -y petsc4py mpi4py pyoptsparse # (Mac / Linux only)
conda install -y petsc4py mpi4py pyoptsparse # (Mac / Linux only, sometimes Windows users may need to install mpi4py)
pip install -e .

3. Instructions specific for DOE HPC system Eagle. Before executing the setup script, do:
Expand Down
16 changes: 9 additions & 7 deletions examples/02_run_openfast_cases/IEA-15-240-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -745,20 +745,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6

costs:
wake_loss_factor: 0.15
Expand Down
6 changes: 2 additions & 4 deletions examples/03_NREL5MW_OC3_spar/modeling_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ General:
verbosity: False # When set to True, the code prints to screen many infos
openfast_configuration:
OF_run_fst: NREL5MW_OC3_spar
OF_run_dir: outputs/03_NREL5MW_OC3_spar
use_exe: True

WISDEM:
Expand All @@ -18,7 +17,6 @@ WISDEM:
flag: True
FloatingSE:
flag: True
rank_and_file: True
BOS:
flag: True

Expand Down Expand Up @@ -55,9 +53,9 @@ Level3: # Options for WEIS fidelity level 3 = nonlinear time domain
GenDOF: True
YawDOF: False
TwFADOF1 : True
TwFADOF2 : True
TwFADOF2 : False
TwSSDOF1 : True
TwSSDOF2 : True
TwSSDOF2 : False
PtfmSgDOF: True
PtfmSwDOF: True
PtfmHvDOF: True
Expand Down
21 changes: 16 additions & 5 deletions examples/03_NREL5MW_OC3_spar/nrel5mw-spar_oc3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -818,11 +818,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
distance_to_substation: 50.0
distance_to_interconnection: 8.
interconnect_voltage: 130
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
boem_review_cost: 0.0
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6

costs:
wake_loss_factor: 0.15
Expand Down
23 changes: 17 additions & 6 deletions examples/04_NREL5MW_OC4_semi/nrel5mw-semi_oc4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -991,12 +991,23 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
distance_to_substation: 50.0
distance_to_interconnection: 8.
interconnect_voltage: 130

commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
boem_review_cost: 0.0
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6

costs:
wake_loss_factor: 0.15
fixed_charge_rate: 0.075
Expand Down
4 changes: 2 additions & 2 deletions examples/05_IEA-3.4-130-RWT/IEA-3p4-130-RWT.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 50.0
distance_to_interconnection: 8.
interconnect_voltage: 130
Expand Down
73 changes: 73 additions & 0 deletions examples/05_IEA-3.4-130-RWT/weis_driver_model_only.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

from weis.glue_code.runWEIS import run_weis
from wisdem.commonse.mpi_tools import MPI
import os, time, sys

## File management
run_dir = os.path.dirname( os.path.realpath(__file__) ) + os.sep
fname_wt_input = run_dir + os.sep + "IEA-3p4-130-RWT.yaml"
fname_modeling_options = run_dir + "modeling_options.yaml"
fname_analysis_options = run_dir + "analysis_options.yaml"

plot_flag = False

# Test model_only flag here
modeling_override = {}
modeling_override['General'] = {}
modeling_override['General']['openfast_configuration'] = {}
modeling_override['General']['openfast_configuration']['model_only'] = True

tt = time.time()
wt_opt, modeling_options, opt_options = run_weis(fname_wt_input, fname_modeling_options, fname_analysis_options, modeling_override=modeling_override)

rank = MPI.COMM_WORLD.Get_rank() if MPI else 0

if rank == 0 and plot_flag:
print('Run time: %f'%(time.time()-tt))
sys.stdout.flush()

import matplotlib.pyplot as plt
import numpy as np
from matplotlib import cm

X = wt_opt['sse_tune.aeroperf_tables.pitch_vector']
Y = wt_opt['sse_tune.aeroperf_tables.tsr_vector']
X, Y = np.meshgrid(X, Y)
pitch_schedule = wt_opt['rotorse.rp.powercurve.pitch']
tsr_schedule = wt_opt['rotorse.rp.powercurve.Omega'] / 30. * np.pi * wt_opt['rotorse.Rtip'] / wt_opt['rotorse.rp.powercurve.V']

# Plot the Cp surface
fig, ax = plt.subplots()
Z = wt_opt['sse_tune.aeroperf_tables.Cp']
cs = ax.contourf(X, Y, Z[:,:,0], cmap=cm.inferno, levels = [0, 0.1, 0.2, 0.3, 0.4, 0.44, 0.47, 0.50, 0.53, 0.56])
ax.plot(pitch_schedule, tsr_schedule, 'w--', label = 'Regulation trajectory')
ax.set_xlabel('Pitch angle (deg)', fontweight = 'bold')
ax.set_ylabel('Tip speed ratio (-)', fontweight = 'bold')
cbar = fig.colorbar(cs)
cbar.ax.set_ylabel('Aerodynamic power coefficient (-)', fontweight = 'bold')
plt.legend()

# Plot the Ct surface
fig, ax = plt.subplots()
Z = wt_opt['sse_tune.aeroperf_tables.Ct']
cs = ax.contourf(X, Y, Z[:,:,0], cmap=cm.inferno)
ax.plot(pitch_schedule, tsr_schedule, 'w--', label = 'Regulation trajectory')
ax.set_xlabel('Pitch angle (deg)', fontweight = 'bold')
ax.set_ylabel('Tip speed ratio (-)', fontweight = 'bold')
cbar = fig.colorbar(cs)
cbar.ax.set_ylabel('Aerodynamic thrust coefficient (-)', fontweight = 'bold')
plt.legend()

# Plot the Cq surface
fig, ax = plt.subplots()
Z = wt_opt['sse_tune.aeroperf_tables.Cq']
cs = ax.contourf(X, Y, Z[:,:,0], cmap=cm.inferno)
ax.plot(pitch_schedule, tsr_schedule, 'w--', label = 'Regulation trajectory')
ax.set_xlabel('Pitch angle (deg)', fontweight = 'bold')
ax.set_ylabel('Tip speed ratio (-)', fontweight = 'bold')
cbar = fig.colorbar(cs)
cbar.ax.set_ylabel('Aerodynamic torque coefficient (-)', fontweight = 'bold')
plt.legend()

plt.show()

16 changes: 9 additions & 7 deletions examples/06_IEA-15-240-RWT/IEA-15-240-RWT_Monopile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1014,20 +1014,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6
costs:
wake_loss_factor: 0.15
fixed_charge_rate: 0.056
Expand Down
16 changes: 9 additions & 7 deletions examples/06_IEA-15-240-RWT/IEA-15-240-RWT_VolturnUS-S.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1278,20 +1278,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6
costs:
wake_loss_factor: 0.15
fixed_charge_rate: 0.056
Expand Down
16 changes: 9 additions & 7 deletions examples/06_IEA-15-240-RWT/IEA-15-floating_wTMDs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1278,20 +1278,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6
costs:
wake_loss_factor: 0.15
fixed_charge_rate: 0.056
Expand Down
16 changes: 9 additions & 7 deletions examples/06_IEA-15-240-RWT/IEA-15-floating_wTMDs_tower.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1216,20 +1216,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6

costs:
wake_loss_factor: 0.15
Expand Down
9 changes: 8 additions & 1 deletion examples/07_te_flaps/BAR_USC_flaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -913,5 +913,12 @@ control:
setpoint_smooth: {ss_vsgain: 1, ss_pcgain: 0.001}
shutdown: {limit_type: gen_speed, limit_value: 2.0}
environment: {air_density: 1.225, air_dyn_viscosity: 1.81e-05, weib_shape_parameter: 2.0, air_speed_sound: 340.0, shear_exp: 0.2, water_density: 1025.0, water_dyn_viscosity: 0.0013351, soil_shear_modulus: 140000000.0, soil_poisson: 0.4, gravity: 9.80665, air_pressure: 103500.0, air_vapor_pressure: 1700.0, water_depth: 0.0, V_mean: 0.0}
bos: {plant_turbine_spacing: 7, plant_row_spacing: 7, commissioning_pct: 0.01, decommissioning_pct: 0.15, distance_to_substation: 50.0, distance_to_interconnection: 8.0, interconnect_voltage: 130, distance_to_landfall: 100, distance_to_site: 100, port_cost_per_month: 2000000.0, site_auction_price: 0.0, site_assessment_plan_cost: 0.0, site_assessment_cost: 0.0, construction_operations_plan_cost: 0.0, boem_review_cost: 0.0, design_install_plan_cost: 0.0}
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 50.0
distance_to_interconnection: 8.
interconnect_voltage: 130
costs: {wake_loss_factor: 0.15, fixed_charge_rate: 0.0578, bos_per_kW: 441.0, opex_per_kW: 43.0, turbine_number: 120, labor_rate: 58.8, painting_rate: 30.0, blade_mass_cost_coeff: 14.6, hub_mass_cost_coeff: 3.9, pitch_system_mass_cost_coeff: 22.1, spinner_mass_cost_coeff: 11.1, lss_mass_cost_coeff: 11.9, bearing_mass_cost_coeff: 4.5, gearbox_mass_cost_coeff: 12.9, hss_mass_cost_coeff: 6.8, generator_mass_cost_coeff: 12.4, bedplate_mass_cost_coeff: 2.9, yaw_mass_cost_coeff: 8.3, converter_mass_cost_coeff: 18.8, transformer_mass_cost_coeff: 18.8, hvac_mass_cost_coeff: 124.0, cover_mass_cost_coeff: 5.7, elec_connec_machine_rating_cost_coeff: 41.85, platforms_mass_cost_coeff: 17.1, tower_mass_cost_coeff: 2.9, controls_machine_rating_cost_coeff: 21.15, crane_cost: 12000.0}
9 changes: 8 additions & 1 deletion examples/08_OLAF/BAR_USC.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -898,5 +898,12 @@ control:
setpoint_smooth: {ss_vsgain: 1, ss_pcgain: 0.001}
shutdown: {limit_type: gen_speed, limit_value: 2.0}
environment: {air_density: 1.225, air_dyn_viscosity: 1.81e-05, weib_shape_parameter: 2.0, air_speed_sound: 340.0, shear_exp: 0.2, water_density: 1025.0, water_dyn_viscosity: 0.0013351, soil_shear_modulus: 140000000.0, soil_poisson: 0.4, gravity: 9.80665, air_pressure: 103500.0, air_vapor_pressure: 1700.0, water_depth: 0.0, V_mean: 0.0}
bos: {plant_turbine_spacing: 7, plant_row_spacing: 7, commissioning_pct: 0.01, decommissioning_pct: 0.15, distance_to_substation: 50.0, distance_to_interconnection: 8.0, interconnect_voltage: 130, distance_to_landfall: 100, distance_to_site: 100, port_cost_per_month: 2000000.0, site_auction_price: 0.0, site_assessment_plan_cost: 0.0, site_assessment_cost: 0.0, construction_operations_plan_cost: 0.0, boem_review_cost: 0.0, design_install_plan_cost: 0.0}
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 50.0
distance_to_interconnection: 8.
interconnect_voltage: 130
costs: {wake_loss_factor: 0.15, fixed_charge_rate: 0.0578, bos_per_kW: 441.0, opex_per_kW: 43.0, turbine_number: 120, labor_rate: 58.8, painting_rate: 30.0, blade_mass_cost_coeff: 14.6, hub_mass_cost_coeff: 3.9, pitch_system_mass_cost_coeff: 22.1, spinner_mass_cost_coeff: 11.1, lss_mass_cost_coeff: 11.9, bearing_mass_cost_coeff: 4.5, gearbox_torque_cost: 50., hss_mass_cost_coeff: 6.8, generator_mass_cost_coeff: 12.4, bedplate_mass_cost_coeff: 2.9, yaw_mass_cost_coeff: 8.3, converter_mass_cost_coeff: 18.8, transformer_mass_cost_coeff: 18.8, hvac_mass_cost_coeff: 124.0, cover_mass_cost_coeff: 5.7, elec_connec_machine_rating_cost_coeff: 41.85, platforms_mass_cost_coeff: 17.1, tower_mass_cost_coeff: 2.9, controls_machine_rating_cost_coeff: 21.15, crane_cost: 12000.0}
16 changes: 9 additions & 7 deletions examples/12_linearization/IEA-15-floating.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1175,20 +1175,22 @@ environment:
bos:
plant_turbine_spacing: 7
plant_row_spacing: 7
commissioning_pct: 0.01
decommissioning_pct: 0.15
commissioning_cost_kW: 44.0
decommissioning_cost_kW: 58.0
distance_to_substation: 1.0
distance_to_interconnection: 8.5
interconnect_voltage: 130.
distance_to_site: 115.
distance_to_landfall: 50.
port_cost_per_month: 2e6
site_auction_price: 100e6
site_assessment_plan_cost: 1e6
site_assessment_cost: 25e6
construction_operations_plan_cost: 2.5e6
boem_review_cost: 0.0
design_install_plan_cost: 2.5e6
construction_insurance: 44.0
construction_financing: 183.0
contingency: 316.0
site_auction_price: 100e6
site_assessment_cost: 50e6
construction_plan_cost: 2.5e5
installation_plan_cost: 1e6

costs:
wake_loss_factor: 0.15
Expand Down
Loading

0 comments on commit 14ccfb2

Please sign in to comment.